MapPress Easy Google Maps - Version 2.62.1

Version Description

  • Added: POI click settings for mashups now include showing the entire post in a full-screen popup
  • Changed: POI list widened to 300px
  • Fixed: hover effect not deselecting when new POI hovered
  • Fixed: error in infobox when POI opened on hover and map hasn't initialized yet
Download this release

Release Info

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

Code changes from version 2.59 to 2.62.1

build/index_mappress.js CHANGED
@@ -1 +1 @@
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)}();
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,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:mappl10n.options.poiList,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.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.modal_=null,this.pois_=[],this.xhr_,_.extend(this,this.defaults,this.mapdata,this.settings),this.layout=this.layout?this.layout:mappl10n.options.layout,this.postid=this.postid?this.postid:mappl10n.options.postid,mappl10n.options.iwType="ib"},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"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup"},"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(),"postmodal"==mappl10n.options.mashupClick&&(this.modal_=new i.lib.Modal),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).on("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.opened);break;case"dir-from":this.directionsOpen(this.opened,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(this.editable||(o+=" mapp-"+this.templates.popup,o+=mappl10n.options.thumbs?" mapp-thumb-"+mappl10n.options.popupThumbs:""),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()}))},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?this.popupOpen(t):e&&this.popupOpen(e),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.poiHighlight(null),this.selected=null,this.opened=null,this.hovered=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")},poiHighlight:function(t){if(("icon"!=mappl10n.options.highlight||"leaflet"!=mappl10n.options.engine||!this.editable)&&(e("[data-mapp-poi]",this.div.list).removeClass("mapp-selected"),this.selected&&this.selected.highlight(!1),this.hovered&&this.hovered.highlight(!1),t)){var i=e.inArray(t,this.pois_);e('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"),t.highlight(!0)}},poiHover:function(t){t&&this.opened==t||(mappl10n.options.tooltips||(this.poiHighlight(null),this.hovered=null),t&&(this.poiHighlight(t),this.hovered=t,mappl10n.options.tooltips&&!this.editable&&this.popupOpen(t,null,"popup")))},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.set({dirty:!0})},poiOpen:function(t,i){var o=this;if(this.poiClose(),this.selected=t,this.poiHighlight(t),t.postid&&t.url&&!this.editable)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(t.url);case"postnew":return void window.open(t.url);case"postmodal":return this.modal_.open(),this.modal_.setContent('<div class="mapp-modal-spinner">'),void t.fetchPost((function(){return o.modal_.setContent(t.html)}))}this.div.layout.hasClass("mapp-view-mini")&&this.togglePoiListOpen(!1),this.popupOpen(t,i,"popup"),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})},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.editable||("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.opened=null,e(this).triggerHandler("mapp.close"))},popupOpen:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"popup",o=null;this.popupClose(),e&&e.featureData?o=e.featureData:e&&e.propagatedFrom&&e.propagatedFrom.feature&&e.propagatedFrom.feature.properties&&(o=e.propagatedFrom.feature.properties),this.div.iw.html(t.render(i,o)),this.div.iw.toggleClass("mapp-has-image",!!t.thumbnail);var n=this.clusterGetLatLng(t),s=n||t.getPosition(e);("ib"==mappl10n.options.iwType||this.editable)&&this.iw.open({position:s,anchorPoint:t.getAnchorPoint(e)}),this.opened=t},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})),mappl10n.options.thumbs&&this.div.list.addClass(" mapp-thumb-"+mappl10n.options.listThumbs),this.editable&&(this.div.list.trigger("render"),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(var t in this.layers_)e('[data-mapp-layer="'+t+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[t].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()},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}}}},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=t.map((function(t){return t.value=t.description,t}))).filter((function(t){return t.place_id})),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(i,o){var n=this;this.map=i,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?i.getContainer():i.getDiv(),this.node=null,this.opts=_.extend({popout:!1},o),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null;var s=this;if(this.wrapper=t('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib-content"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div></div></div>'),this.wrapper.addClass(o.className),this.node=t(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?e.event.addListener(this.map,"move",(function(t){s.isOpen&&s.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=function(){s.isOpen&&s.draw()}),this.node.get(0).addEventListener("load",(function(){n.open({position:n.position,anchorPoint:n.anchorPoint})}),{capture:!0}),s.opts.popout)var a="body";else a="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();s.wrapper.appendTo(a)},e.Infobox.prototype={clipToWindow:function(){var t=p.y,e=p.x-w/2+this.anchorPoint.x,i=this.mapDiv.getBoundingClientRect(),o=i.x+window.scrollX;t+=i.y+window.scrollY,e+=o;var n=this.opts.clip?divw:document.body.clientWidth;e+w>n&&(e=n-w),e<0&&(e=0),this.wrapper.css({left:e}),h=this.node.outerHeight(),t=p.y-h+this.anchorPoint.y,this.node.removeClass("mapp-ib-flip"),this.opts.clip&&!this.opts.pan&&t<0&&t<divh-(p.y+h)&&(t=p.y,this.node.addClass("mapp-ib-flip"))},close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(this.position){var t,e;if(t=this.node.outerWidth(),this.node.outerHeight(),"leaflet"==mappl10n.options.engine)e=this.map.latLngToContainerPoint(this.position);else{var i=this.overlayView.getProjection();if(!i)return;e=i.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:e.x-t/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-e.y-this.anchorPoint.y})}},getContent:function(){return t(".mapp-ib",this.node)},open:function(t){this.position=t.position,this.anchorPoint=Array.isArray(t.anchorPoint)?{x:t.anchorPoint[0],y:t.anchorPoint[1]}:t.anchorPoint,this.node.css({maxWidth:.8*this.mapDiv.clientWidth-this.fudge,maxHeight:this.mapDiv.clientHeight+this.anchorPoint.y-2*this.fudge}),this.wrapper.addClass("mapp-open"),this.draw(),this.opts.popout?this.clipToWindow():"leaflet"==mappl10n.options.engine?this.panLeaflet():this.panGoogle(),this.isOpen=!0},panGoogle:function(){var t=this.overlayView.getProjection(),e=t?t.fromLatLngToDivPixel(this.position):null;if(e){var i=this.node.outerWidth(),o=this.node.outerHeight(),n=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(e.x-i/2-this.fudge,e.y+this.fudge)),s=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(e.x+i/2+this.fudge,e.y-o+this.anchorPoint.y-this.fudge)),a=new google.maps.LatLngBounds(n,s);this.map.panToBounds(a)}},panLeaflet:function(){var e=this.map.latLngToContainerPoint(this.position),i=t(this.mapDiv).width(),o=t(this.mapDiv).height(),n=this.node.outerWidth(),s=this.node.outerHeight(),a={x:e.x,y:e.y};e.x+n/2+this.anchorPoint.x>i-this.fudge?a.x=Math.max(i-n/2-this.anchorPoint.x-this.fudge,i/2-this.anchorPoint.x):e.x-n/2+this.anchorPoint.x<this.fudge&&(a.x=Math.min(n/2+this.anchorPoint.x+this.fudge,i/2-this.anchorPoint.x)),e.y+this.anchorPoint.y-s<this.fudge&&(a.y=s-this.anchorPoint.y+this.fudge),a.y>=o&&(a.y=o-this.fudge),this.map.panBy([e.x-a.x,e.y-a.y])},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,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"json"==e.dataType&&"OK"!=t.status&&console.log(t.status),"json"==e.dataType&&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)}},function(t){e.lib.Modal=function(){this.el=null;var e=this;this.el=t('<div class="mapp-modal" tabindex="0">').append('<div class="mapp-modal-backdrop">').append('<div class="mapp-modal-content" tabindex="1">'),this.el.hide(),this.el.on("click",".mapp-modal-backdrop",(function(){e.close()})),this.el.on("click",".mapp-modal-close",(function(){e.close()})),this.el.on("keydown",(function(t){27==t.which&&e.close()}))},e.lib.Modal.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),t("body").removeClass("mapp-modal-noscroll"))},focus:function(){t(".mapp-modal-focus",this.el).attr("tabindex",0),t(".mapp-modal-focus",this.el).focus()},open:function(){this.el.parent().length||this.el.appendTo("body"),this.el.show(),t("body").addClass("mapp-modal-noscroll"),this.focus()},setContent:function(e){t(".mapp-modal-content",this.el).empty(),t(".mapp-modal-content",this.el).append('<div class="mapp-modal-close">&times;').append(e),this.focus()}}}(jQuery)},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(),this.draw()}},setMap:function(t){this.map=t,this.overlayView.setMap(t)},setPosition:function(t){this.position=t},setValues:function(t){for(var e in t)this.set(e,t[e])},setVisible:function(t){this.visible=t,this.div&&this.div.css("visibility",t?"visible":"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,html: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 mappl10n.options.iconScale?[0,0-mappl10n.options.iconScale[1]]: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":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)},fetchPost:function(t){var i=this;this.html?t():e.lib.ajax({type:"GET",data:{action:"mapp_get_post",postid:this.postid,nonce:mappl10n.options.nonce},dataType:"html",callback:function(e){i.html=e,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(var i in t){var o=t[i];switch(i){case"dirty":this.map.set({dirty:o});break;case"iconid":this.type||(this.iconid=o,this.overlay.setIcon(e.Icons.get(o)));break;default:this[i]=o}}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){var e=t.color,i=t.opacity,o=t.weight;i=i?i/100:void 0;var n="polyline"==this.type?{strokeColor:e,strokeOpacity:i,strokeWeight:o}:{fillColor:e,fillOpacity:i,strokeColor:e,strokeWeight:o,strokeOpacity:1};this.setColors(n)},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,d=i.city&&i.city[0]!==h?i.city[0]:void 0,g=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:d?p(i._highlightResult.city):void 0,administrative:u?p(i._highlightResult.administrative):void 0,country:c?i._highlightResult.country.value:void 0,suburb:g?p(i._highlightResult.suburb):void 0,county:m?p(i._highlightResult.county):void 0,postcode:y},b={name:h,administrative:u,county:m,city:d,suburb:g,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
- !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)}();
1
+ !function(){var e={215:function(e,t,n){"use strict";n.r(t);var o=n(525),a=n(143);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s,c=window.mapp||{},p=wp.element.createElement;s=jQuery,c.Editor=function(e){this.drawingManager=null,this.map=e,this.poiEditor=null;var t=this;this.initialize=function(){this.map.display(),this.poiEditor=new c.PoiEditor(this.map),this.initDrawingManager(),s(this.map.places).off("search.mapp"),s(this.map.places).on("search.mapp",(function(e,n){t.insert(n)}))},this.insert=function(e){if(e)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.poiClose(),e.geometry){var n=e.formatted_address?e.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,o=e.name==n?"":n,a=new c.Poi({address:n,body:o,iconid:this.poiEditor.lastIcon,point:e.geometry.location,title:e.name,viewport:e.geometry.viewport?e.geometry.viewport:null});this.map.poiInsert(a),a.center()}else e.overlay?(this.map.poiHover(null),"marker"==e.type?(a=new c.Poi({body:"",iconid:null,overlay:null,point:e.overlay.getPosition().toJSON(),title:e.overlay.getPosition().toUrlValue(6),type:null}),e.overlay.setMap(null)):a=new c.Poi({body:"",iconid:null,overlay:e.overlay,title:mappl10n.shape,type:e.type}),this.map.poiInsert(a)):"string"==typeof e&&"http"==e.substring(0,4)&&(a=new c.Poi({iconid:this.poiEditor.lastIcon,kml:{url:e},title:"KML",type:"kml"}),t.map.poiInsert(a),c.event.addListenerOnce(a.overlay,"ready defaultviewport_changed",(function(){a.center()})))},this.initDrawingManager=function(){var e={fillColor:"#0000FF",fillOpacity:.4,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2};"leaflet"==mappl10n.options.engine||(this.drawingManager=new google.maps.drawing.DrawingManager({drawingControlOptions:{position:google.maps.ControlPosition.TOP_CENTER,drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},circleOptions:e,polygonOptions:e,polylineOptions:e,rectangleOptions:e}),this.drawingManager.setMap(this.map.getMap()),c.event.addListener(this.drawingManager,"overlaycomplete",(function(e){t.drawingManager.get("drawingMode")&&t.insert(e)})))},this.initialize.apply(this)},c.PoiEditor=function(e){this.map=e,this.poi=null,this.sel=null,this.lastIcon=null;var t=this;this.initialize=function(){this.sel=s(this.map.iw.getContent()),s(this.map).on("mapp.open",(function(e,n){t.render(n)})),s(this.map).on("mapp.close",(function(){t.mce(!1)})),this.sel.on("click","[data-mapp-poi]",(function(e){e.preventDefault();var n=s(this).attr("data-mapp-poi");t[n]()})),this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",(function(e){var n=s(this).hasClass("mapp-poi-visual");t.mce(n)})),this.sel.on("keydown",(function(e){13==e.which&&"mapp-poi-body"!=e.target.id&&(e.preventDefault(),t.save())}))},this.cancel=function(){this.map.poiClose()},this.initMCE=function(){if("undefined"!=typeof tinyMCE&&void 0!==tinyMCE.init){var e="en";if(void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit&&void 0!==window.tinyMCEPreInit.mceInit.content){var t=window.tinyMCEPreInit.mceInit.content;e=void 0!==t.language?t.language:"en"}var n={mode:"none",height:"100%",convert_urls:!1,language:e,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(e){var n=e?"mceAddEditor":"mceRemoveEditor";"undefined"!=typeof tinyMCE&&tinyMCE.execCommand(n,!1,"mapp-poi-body"),s(".mapp-poi-visual, .mapp-poi-html",t.sel).removeClass("mapp-active"),e?s(".mapp-poi-visual",t.sel).addClass("mapp-active"):s(".mapp-poi-html",t.sel).addClass("mapp-active")},this.remove=function(){confirm(mappl10n.delete_prompt)&&(this.map.poiClose(),this.map.poiRemove(this.poi))},this.render=function(e){this.poi=e,this.renderColorPicker(this.poi),this.renderIconPicker(this.poi),this.initMCE()},this.renderColorPicker=function(e){var t=this;document.getElementById("mapp-poi-colorpicker")&&wp.element.render(p(o.o,r(r({},e.getTemplateColors()),{},{isExtended:!0,onChange:function(n){e.set({dirty:!0}),e.setTemplateColors(n),t.map.renderList(),t.renderColorPicker(e)}})),document.getElementById("mapp-poi-colorpicker"))},this.renderIconPicker=function(e){var t=this;document.getElementById("mapp-poi-iconpicker")&&wp.element.render(p(a.G,{iconid:e.iconid,onChange:function(n){e.set({dirty:!0,iconid:n}),t.lastIcon=n,t.map.renderList(),t.renderIconPicker(e)}}),document.getElementById("mapp-poi-iconpicker"))},this.save=function(){"undefined"!=typeof tinyMCE&&tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save(),this.poi.set({dirty:!0,title:s(".mapp-poi-title").val(),body:s(".mapp-poi-body").val()}),this.map.renderList(),this.map.poiClose()},this.initialize.apply(this)}},525:function(e,t,n){"use strict";n.d(t,{o:function(){return b}});var o=n(824);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var c=wp.element.createElement,p=wp.element,u=p.Fragment,m=p.useEffect,d=(p.useLayoutEffect,p.useCallback,p.useRef,p.useState),f=(wp.data.useSelect,wp.compose.withState,wp.components),h=f.Button,g=(f.ColorPalette,f.ColorPicker),y=(f.Dashicon,f.Dropdown,f.ExternalLink,f.Modal),__=(f.Panel,f.PanelBody,f.PanelRow,f.Popover,f.RadioControl,f.Spinner,f.TabPanel,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function b(e){var t=l(d({isCustomOpen:!1,isOpen:!1}),2),n=t[0],a=t[1];function r(e){a((function(t){return i(i({},t),e)}))}function s(t,n){switch(t){case"close":r({isOpen:!1});break;case"open":r({isOpen:!0});break;case"select":e.onChange(n),s("close");break;case"set":e.onChange(n)}}return m((function(){}),[]),c(u,null,c("span",{className:"mapp-colors-toggle",onClick:function(){return s("open",null)},style:{backgroundColor:e.color,border:e.isExtended?"1px solid "+e.color:"1px solid gray",opacity:e.isExtended&&e.opacity?e.opacity/100:1},tabIndex:0}),function(){if(!n.isOpen)return null;var t=_.map([100,90,80,70,60,50,40,30,20,10,0],(function(e){return{label:e+"%",value:e}})),a=_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],(function(e){return{label:e+"px",value:e}}));return c(y,{title:__("Select a color"),className:"mapp-colors-modal",onRequestClose:function(e){return s("close")}},c("div",{className:"mapp-colors"},c("div",{className:"mapp-colors-list"},_.map([["yellow","yellowgreen","green","seagreen","blue","cornflowerblue","darkslateblue","purple","firebrick","red","darkorange","orange","saddlebrown"],["lightyellow","greenyellow","lightgreen","darkseagreen","lightblue","skyblue","slateblue","orchid","plum","pink","sandybrown","goldenrod","peru"],["white","lightgray","gray","black"]],(function(t,n){return c("div",{key:n},_.map(t,(function(t){return c("span",{className:"mapp-color"+(t==e.color?" mapp-selected":""),key:t,onClick:function(){r({isCustomOpen:!1}),s("select",{color:t})},style:{backgroundColor:t},title:t})})))}))),n.isCustomOpen&&c(g,{color:e.color,onChangeComplete:function(e){return s("set",{color:e.hex})},disableAlpha:!0}),e.isExtended&&c(o.Ph,{label:__("Opacity"),options:t,value:e.opacity?e.opacity:"",onChange:function(e){return s("set",{opacity:e})}}),e.isExtended&&c(o.Ph,{label:__("Stroke"),options:a,value:e.weight?e.weight:"",onChange:function(e){return s("set",{weight:e})}}),c("div",{className:"mapp-colors-toolbar"},c(h,{isPrimary:!0,onClick:function(){return s("close")}},__("Done")),c(h,{isLink:!0,onClick:function(){return r({isCustomOpen:!n.isCustomOpen})}},__("Custom color")))))}())}},999:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var o=n(429);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var c=window.mapp||{},p=wp.element.createElement,u=wp.element,m=(u.Fragment,u.useEffect),d=(u.useLayoutEffect,u.useRef),f=u.useState,h=wp.components,g=h.Button,y=(h.Dropdown,h.Modal,h.Panel,h.PanelBody),b=(h.Popover,h.Spinner,h.TextControl),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function v(e){var t,n,a=l(f({dragging:null,dragover:null,isFetchingMap:!!e.mapid,isPoiListOpen:!0,isSavingMap:!1,map:null}),2),r=a[0],s=a[1],u=d(null);function h(e){s((function(t){return i(i({},t),e)}))}function v(e){h({map:r.map})}function w(t,n){switch(t){case"change-settings":r.map.set(n),h({map:r.map});break;case"change-title":r.map.set({dirty:!0,title:n}),h({map:r.map});break;case"close":e.onAction("edit-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(c.store.destroyMap({mapid:e.mapid}),e.onAction("edit-destroy"));break;case"save":c.store.saveMap({mapdata:r.map.toJSON(),success:function(t){r.map.set({dirty:!1}),e.onAction("edit-save",t.mapid)}})}}return m((function(){r.map&&(jQuery(r.map.div.list).off("render",v),jQuery(r.map.div.list).on("render",(function(e){return v()})))}),[r.map]),m((function(){var t=function(t){h({mapdata:t.maps[e.mapid],isFetchingMap:t.isFetchingMap,isSavingMap:t.isSavingMap})};return c.store.subscribe(t),function(){return c.store.unsubscribe(t)}})),m((function(){e.mapid&&c.store.fetchMap({mapid:e.mapid})}),[e.mapid]),m((function(){if(!r.isFetchingMap){var t={editable:!0,embed:!0,layout:"left",mapOpts:{mapTypeControl:!0,streetViewControl:!1},menu:!1,name:"media-map",poiList:!1,sel:jQuery(u.current)};"map"!=e.context&&"mashup"!=e.context||(t.center=null,t.zoom=null);var n=new c.Map(r.mapdata,t);new c.Editor(n);h({map:n})}}),[r.mapdata]),m((function(){r.map&&setTimeout((function(){return r.map.resize()}),100)}),[r.isPoiListOpen]),p("div",{className:"mapp-edit"},(t=r.map&&!r.isFetchingMap&&r.map.title?r.map.title:"",n=r.map&&!r.isFetchingMap?__("Untitled"):"",p("div",{className:"mapp-gt-modal-header"},p(b,{className:"mapp-edit-title",placeholder:n,value:t,onChange:function(e){return w("change-title",e)}}))),p("div",{className:"mapp-edit-main"},p("div",{className:"mapp-list mapp-edit-list"+(r.isPoiListOpen?" mapp-list-open":"")},function(){if("mce"!=e.context&&"library"!=e.context)return null;if(!r.map)return null;var t=r.map,n=t.center,a=t.height,i=t.poiList,l=t.width,s=t.zoom;return p("div",{className:"mapp-gt-inspector"},p(y,{initialOpen:!1,title:__("Map settings")},p(o.MappSettings,{map:r.map,context:e.context,onAction:w,center:n,height:a,poiList:i,width:l,zoom:s})))}(),function(){if(r.map){var e=function(e,t){var n=r.dragging,o=n<o?t-1:t;r.map.pois_.splice(o,0,r.map.pois_.splice(n,1)[0]),h({map:r.map,dragover:null})};return p("div",{className:"mapp-items"},_.map(r.map.pois_,(function(t,n){return p("div",{className:r.dragover==n?"mapp-item mapp-edit-dragover":"mapp-item",draggable:!0,key:n,onClick:function(){return r.map.poiOpen(r.map.pois_[n])},onDragOver:function(e){return e.preventDefault()},onDragStart:function(e){return h({dragging:n})},onDragEnter:function(e){return h({dragover:n})},onDragEnd:function(e){return h({dragging:null,dragover:null})},onDrop:function(t){return e(t,n)}},p("img",{className:"mapp-icon",src:c.Icons.getUrl(t.iconid)}),p("div",{className:"mapp-title"},t.title))})))}}(),p("div",{className:"mapp-list-toggle",onClick:function(){return h({isPoiListOpen:!r.isPoiListOpen})}})),p("div",{className:"mapp-edit-map",key:e.mapid,ref:u,onKeyDown:function(e){return e.stopPropagation()},tabIndex:-1})),p("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:function(e){return e.stopPropagation()}},p(g,{isPrimary:!0,isBusy:r.isSavingMap,onClick:function(){return w("save")}},__("Save")),p(g,{disabled:r.isSavingMap,onClick:function(){return w("close")}},__("Cancel")),p(g,{disabled:!e.mapid||r.isSavingMap,isDestructive:!0,className:"mapp-edit-delete",onClick:function(){return w("destroy")}},__("Delete"))))}},143:function(e,t,n){"use strict";n.d(t,{G:function(){return w}});var o=n(525),a=n(824);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var p=wp.element.createElement,u=wp.element,m=u.Fragment,d=u.useEffect,f=(u.useLayoutEffect,u.useCallback,u.useRef,u.useState),h=(wp.data.useSelect,wp.compose.withState,wp.components),g=h.Button,y=(h.ColorPicker,h.DropZone,h.DropZoneProvider,h.FormFileUpload),b=h.Modal,__=(h.Popover,h.Spinner,h.TabPanel,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")}),v={"mapp-icons":{label:"Map icons",glyphs:[{name:"abseiling",codepoint:59392},{name:"accounting",codepoint:59393},{name:"airport",codepoint:59394},{name:"amusement-park",codepoint:59395},{name:"aquarium",codepoint:59396},{name:"archery",codepoint:59397},{name:"art-gallery",codepoint:59398},{name:"assistive-listening-system",codepoint:59399},{name:"atm",codepoint:59400},{name:"audio-description",codepoint:59401},{name:"bakery",codepoint:59402},{name:"bank",codepoint:59403},{name:"bar",codepoint:59404},{name:"baseball",codepoint:59405},{name:"beauty-salon",codepoint:59406},{name:"bicycle-store",codepoint:59407},{name:"bicycling",codepoint:59408},{name:"boat-ramp",codepoint:59409},{name:"boat-tour",codepoint:59410},{name:"boating",codepoint:59411},{name:"book-store",codepoint:59412},{name:"bowling-alley",codepoint:59413},{name:"braille",codepoint:59414},{name:"bus-station",codepoint:59415},{name:"cafe",codepoint:59416},{name:"campground",codepoint:59417},{name:"canoe",codepoint:59418},{name:"car-dealer",codepoint:59419},{name:"car-rental",codepoint:59420},{name:"car-repair",codepoint:59421},{name:"car-wash",codepoint:59422},{name:"casino",codepoint:59423},{name:"cemetery",codepoint:59424},{name:"chairlift",codepoint:59425},{name:"church",codepoint:59426},{name:"skip",codepoint:59427},{name:"city-hall",codepoint:59428},{name:"climbing",codepoint:59429},{name:"closed-captioning",codepoint:59430},{name:"clothing-store",codepoint:59431},{name:"compass",codepoint:59432},{name:"convenience-store",codepoint:59433},{name:"courthouse",codepoint:59434},{name:"cross-country-skiing",codepoint:59435},{name:"crosshairs",codepoint:59436},{name:"dentist",codepoint:59437},{name:"department-store",codepoint:59438},{name:"diving",codepoint:59439},{name:"doctor",codepoint:59440},{name:"electrician",codepoint:59441},{name:"electronics-store",codepoint:59442},{name:"embassy",codepoint:59443},{name:"expand",codepoint:59444},{name:"female",codepoint:59445},{name:"finance",codepoint:59446},{name:"fire-station",codepoint:59447},{name:"fish-cleaning",codepoint:59448},{name:"fishing-pier",codepoint:59449},{name:"fishing",codepoint:59450},{name:"florist",codepoint:59451},{name:"food",codepoint:59452},{name:"fullscreen",codepoint:59453},{name:"funeral-home",codepoint:59454},{name:"furniture-store",codepoint:59455},{name:"gas-station",codepoint:59456},{name:"general-contractor",codepoint:59457},{name:"golf",codepoint:59458},{name:"grocery-or-supermarket",codepoint:59459},{name:"gym",codepoint:59460},{name:"hair-care",codepoint:59461},{name:"hang-gliding",codepoint:59462},{name:"hardware-store",codepoint:59463},{name:"health",codepoint:59464},{name:"hindu-temple",codepoint:59465},{name:"horse-riding",codepoint:59466},{name:"hospital",codepoint:59467},{name:"ice-fishing",codepoint:59468},{name:"ice-skating",codepoint:59469},{name:"inline-skating",codepoint:59470},{name:"insurance-agency",codepoint:59471},{name:"jet-skiing",codepoint:59472},{name:"jewelry-store",codepoint:59473},{name:"kayaking",codepoint:59474},{name:"laundry",codepoint:59475},{name:"lawyer",codepoint:59476},{name:"library",codepoint:59477},{name:"liquor-store",codepoint:59478},{name:"local-government",codepoint:59479},{name:"location-arrow",codepoint:59480},{name:"locksmith",codepoint:59481},{name:"lodging",codepoint:59482},{name:"low-vision-access",codepoint:59483},{name:"male",codepoint:59484},{name:"skip",codepoint:59485},{name:"marina",codepoint:59486},{name:"mosque",codepoint:59487},{name:"motobike-trail",codepoint:59488},{name:"movie-rental",codepoint:59489},{name:"movie-theater",codepoint:59490},{name:"moving-company",codepoint:59491},{name:"museum",codepoint:59492},{name:"natural-feature",codepoint:59493},{name:"night-club",codepoint:59494},{name:"open-captioning",codepoint:59495},{name:"painter",codepoint:59496},{name:"park",codepoint:59497},{name:"parking",codepoint:59498},{name:"pet-store",codepoint:59499},{name:"pharmacy",codepoint:59500},{name:"physiotherapist",codepoint:59501},{name:"place-of-worship",codepoint:59502},{name:"playground",codepoint:59503},{name:"plumber",codepoint:59504},{name:"point-of-interest",codepoint:59505},{name:"police",codepoint:59506},{name:"political",codepoint:59507},{name:"post-box",codepoint:59508},{name:"post-office",codepoint:59509},{name:"skip",codepoint:59510},{name:"skip",codepoint:59511},{name:"rafting",codepoint:59512},{name:"real-estate-agency",codepoint:59513},{name:"restaurant",codepoint:59514},{name:"roofing-contractor",codepoint:59515},{name:"skip",codepoint:59516},{name:"route",codepoint:59517},{name:"rv-park",codepoint:59518},{name:"sailing",codepoint:59519},{name:"school",codepoint:59520},{name:"scuba-diving",codepoint:59521},{name:"search",codepoint:59522},{name:"skip",codepoint:59523},{name:"shopping-mall",codepoint:59524},{name:"sign-language",codepoint:59525},{name:"skateboarding",codepoint:59526},{name:"ski-jumping",codepoint:59527},{name:"skiing",codepoint:59528},{name:"sledding",codepoint:59529},{name:"snow-shoeing",codepoint:59530},{name:"snow",codepoint:59531},{name:"snowboarding",codepoint:59532},{name:"snowmobile",codepoint:59533},{name:"spa",codepoint:59534},{name:"skip",codepoint:59535},{name:"skip",codepoint:59536},{name:"skip",codepoint:59537},{name:"stadium",codepoint:59538},{name:"storage",codepoint:59539},{name:"store",codepoint:59540},{name:"subway-station",codepoint:59541},{name:"surfing",codepoint:59542},{name:"swimming",codepoint:59543},{name:"synagogue",codepoint:59544},{name:"taxi-stand",codepoint:59545},{name:"tennis",codepoint:59546},{name:"toilet",codepoint:59547},{name:"trail-walking",codepoint:59548},{name:"train-station",codepoint:59549},{name:"transit-station",codepoint:59550},{name:"travel-agency",codepoint:59551},{name:"unisex",codepoint:59552},{name:"university",codepoint:59553},{name:"veterinary-care",codepoint:59554},{name:"viewing",codepoint:59555},{name:"volume-control-telephone",codepoint:59556},{name:"walking",codepoint:59557},{name:"waterskiing",codepoint:59558},{name:"whale-watching",codepoint:59559},{name:"wheelchair",codepoint:59560},{name:"wind-surfing",codepoint:59561},{name:"zoo",codepoint:59562}]},"mapp-shapes":{label:"Map shapes",glyphs:[{name:"circle",codepoint:59648,center:[16,16]},{name:"widepin",codepoint:59649,center:[16,14]},{name:"route",codepoint:59650,center:[16,14]},{name:"shield",codepoint:59651,center:[16,14]},{name:"squarepin",codepoint:59653,center:[16,14]},{name:"square",codepoint:59652,center:[16,16]},{name:"squarerounded",codepoint:59654,center:[16,16]},{name:"roundpin",codepoint:59657,center:[16,13]},{name:"pin",codepoint:59655,center:null},{name:"pindot",codepoint:59656,center:null}]}};function w(e){var t,n,i,l=s(f({defaultIcon:mappl10n.options.defaultIcon,filename:null,fillColor:"gray",filter:"",glyph:"",glyphColor:"white",glyphFont:"mapp-icons",isFontLoaded:!1,isOpen:!1,mode:"list",shape:"circle",shapeFont:"mapp-shapes",showNames:!0,strokeColor:"black",strokeWidth:4,urls:{},userIcons:mappl10n.options.userIcons}),2),c=l[0],u=l[1];function h(e){u((function(t){return r(r({},t),e)}))}function w(t,n){switch(t){case"close":h({isOpen:!1});break;case"edit-cancel":h({mode:"list"});break;case"edit-save":!function(e){c.glyphFont;var t=2,n=32*t,o=16*t,a=document.createElement("canvas");a.width=n,a.height=n,a.style.imageRendering="pixelated";var i=a.getContext("2d");i.font=n+"px "+c.shapeFont,i.fillStyle=c.fillColor,i.textBaseline="bottom";var r=_.findWhere(v[c.shapeFont].glyphs,{name:c.shape});i.fillText(String.fromCharCode(r.codepoint),0,n);var l=1,s=l*t;if(i.strokeStyle="white",i.lineWidth=s,i.font=n-l*t+"px "+c.shapeFont,i.strokeText(String.fromCharCode(r.codepoint),l,n-l),r.center){i.imageSmoothingEnabled=!1,i.font=o+"px "+c.glyphFont,i.fillStyle=c.glyphColor;var p=[r.center[0]*t,r.center[1]*t],u=_.findWhere(v[c.glyphFont].glyphs,{name:c.glyph});i.fillText(String.fromCharCode(u.codepoint),p[0]-o/2,p[1]+o/2)}"undefined"!=typeof debug?document.getElementById("mapp-edit-debug").append(a):a.toBlob((function(e){var t=new FormData;t.append("image0",e,c.filename),k(t)}),"image/png",100)}();break;case"edit-upload":o=n,a=new FormData,_.map(o,(function(e,t){e.type.match("image.*")?a.append("image"+t,e):alert("File "+e.name+" is not an image.")})),k(a);break;case"list-clear":e.onChange&&e.onChange(null),w("close");break;case"list-delete":e.iconid&&confirm(mappl10n.delete_prompt)&&mapp.lib.ajax({type:"POST",data:{action:"mapp_icon_delete",iconids:e.iconid,nonce:mappl10n.options.nonce},callback:function(t){if(t&&"OK"==t.status){var n=mappl10n.options.userIcons.indexOf(e.iconid);n>=0&&void 0!==mappl10n.options.userIcons[n+1]?e.onChange(mappl10n.options.userIcons[n+1]):e.onChange(null),mappl10n.options.userIcons=t.data,h({userIcons:mappl10n.options.userIcons})}else alert("Delete error: "+t.status)}});break;case"list-select":e.onChange&&(n==e.iconid?e.onChange(null):e.onChange(n));break;case"mode":h({mode:n});break;case"open":h({isOpen:!0})}var o,a}function O(t){var n="user"==t?mappl10n.options.userIcons:mappl10n.options.standardIcons;return _.map(n,(function(t){return p("div",{alt:t,className:e.iconid==t?"mapp-icon-wrapper mapp-selected":"mapp-icon-wrapper",key:t,onClick:function(){return w("list-select",t)}},p("img",{className:"mapp-icon",src:mapp.Icons.getUrl(t),title:t}))}))}function k(e){e.append("action","mapp_icon_save"),e.append("nonce",mappl10n.options.nonce),mapp.lib.ajax({type:"POST",contentType:!1,processData:!1,data:e,success:function(e){e&&"OK"==e.status?(mappl10n.options.userIcons=e.data.icons,h({userIcons:mappl10n.options.userIcons}),h({mode:"list"}),w("list-select",e.data.filename)):alert("Upload error: "+e.status)}})}return d((function(){var e=[];_.map(v,(function(t,n){var o=new FontFace(n,"url("+mappl10n.options.baseurl+"/pro/fonts/"+n+".woff?"+mappl10n.options.version+")");document.fonts.add(o),e.push(o.loaded)})),Promise.all(e).then((function(){h({isFontLoaded:!0})}))}),[]),d((function(){h({filename:c.shape+"_"+c.fillColor.replace("#","")+(c.glyph?"_"+c.glyph:"")+".png"})}),[c.shape,c.fillColor,c.glyph]),p(m,null,p("img",{className:"mapp-icon",onClick:function(){return w("open",null)},src:mapp.Icons.getUrl(e.iconid)}),"list"==c.mode&&function(){if(!c.isOpen)return null;var t=e.iconid&&mappl10n.options.userIcons.indexOf(e.iconid)>=0;return p(b,{title:p("div",{className:"mapp-icons-header"},__("Select an icon"),p(g,{isSecondary:!0,onClick:function(){return w("mode","edit")}},__("New icon"))),className:"mapp-icons-modal",onRequestClose:function(){return w("close")}},p("div",{className:"mapp-icons"},p("div",{className:"mapp-icons-list"},p("div",{className:"mapp-icons-user"},O("user")),p("div",{className:"mapp-icons-standard"},O("standard"))),p("div",{className:"mapp-icons-edit-filename"},e.iconid?e.iconid:__("No icon selected")),p("div",{className:"mapp-icons-toolbar"},p("div",null,p(g,{isPrimary:!0,onClick:function(){return w("close")}},__("Select")),p(g,{isSecondary:!0,onClick:function(){return w("list-clear")}},__("Use default icon"))),p(g,{isDestructive:!0,onClick:function(){return w("list-delete")},disabled:!t},__("Delete")))))}(),"edit"==c.mode&&p(b,{title:__("Create new icon"),className:"mapp-icons-edit-modal",onRequestClose:function(){return w("edit-cancel")},shouldCloseOnClickOutside:!1},p("div",{className:"mapp-icons-edit"},p("div",{id:"mapp-edit-debug"}),p("div",{className:"mapp-icons-edit-shape-section"},p("div",{className:"mapp-icons-shape-heading"},__("Shape and color"),p(o.o,{color:c.fillColor,isExtended:!1,onChange:function(e){return h({fillColor:e.color})}})),(t=v[c.shapeFont],n=_.findWhere(v[c.glyphFont].glyphs,{name:c.glyph}),i=n?String.fromCharCode(n.codepoint):null,p("div",{className:"mapp-icons-edit-shapes",style:{color:c.fillColor,fontFamily:c.shapeFont}},_.map(t.glyphs,(function(e,t){var o=c.shape==e.name;return p("span",{className:"mapp-icons-edit-shape-wrapper"+(o?" mapp-selected":""),key:e.name,onClick:function(){return h({shape:e.name})},title:e.name},p("span",{className:"mapp-icons-edit-shape"},String.fromCharCode(e.codepoint),e.center&&n&&p("span",{className:"mapp-icons-edit-glyph",style:{left:e.center[0],top:e.center[1],color:c.glyphColor,fontFamily:c.glyphFont}},i)))}))))),p("div",{className:"mapp-icons-edit-glyph-section"},p("div",{className:"mapp-icons-glyph-heading"},__("Glyph"),p("div",null,__("Search"),p(a.II,{onChange:function(e){return h({filter:e})}}))),function(){c.glyphFont;var e=_.filter(v[c.glyphFont].glyphs,(function(e){return(!c.filter||e.name.includes(c.filter))&&"skip"!=e.name}));return p("div",{className:"mapp-icons-edit-glyph-list",style:{color:c.glyphColor,fontFamily:c.glyphFont}},_.map(e,(function(e,t){return p("div",{className:"mapp-icons-edit-glyph-wrapper"+(c.glyph==e.name?" mapp-selected":""),key:t,onClick:function(){return h({glyph:c.glyph==e.name?null:e.name})}},p("span",{className:"mapp-icons-edit-glyph"},String.fromCharCode(e.codepoint)),p("div",{className:"mapp-icons-edit-glyph-title"},e.name))})))}()),p("div",{className:"mapp-icons-edit-toolbar"},p("div",null,p(g,{isPrimary:!0,onClick:function(){return w("edit-save")}},__("Save")),p(g,{isSecondary:!0,onClick:function(){return w("edit-cancel")}},__("Cancel"))),p(y,{accept:"image/*",icon:"upload",multiple:!0,onChange:function(e){w("edit-upload",e.target.files)}},__("Upload icons"))))))}},800:function(e,t,n){"use strict";n.r(t);var o=n(557);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}window.mapp;var c=wp.element.createElement,p=wp.element,u=(p.Fragment,p.useEffect,p.useLayoutEffect,p.useRef,p.useState),m=wp.components;m.Button,m.Dashicon,m.Modal;function d(e){var t=l(u({mapid:null}),2),n=t[0],a=t[1];return c(o.default,{context:"mce",mapid:n.mapid,onAction:function(t,n){switch(t){case"pick-close":o={mapid:null},a((function(e){return i(i({},e),o)})),e.onAction("pick-close",n);break;case"pick-insert":e.onAction("pick-insert",n)}var o}})}window.parent&&(window.mappIframeRender=function(e){wp.element.render(c(d,e),document.getElementById("mapp-iframe-react"))}),function(e){function t(){var t=this;this.contentWindow=null,this.iframe=null;e(".mapp-iframe-button").on("click",(function(e){e.preventDefault(),t.open()}))}t.prototype={load:function(t){var n=this;if(this.iframe)return this.iframe.show(),void t();this.iframe=e('<iframe class="mapp-iframe" allowtransparency="true"></iframe>').appendTo("body"),e("iframe").on("load",(function(){t()})),e.get(mappl10n.options.ajaxurl,{action:"mapp_iframe",nonce:mappl10n.options.nonce},(function(e){n.contentWindow=n.iframe.get(0).contentWindow,n.contentWindow.document.open("text/html","replace"),n.contentWindow.document.write(e),n.contentWindow.document.close()}))},open:function(){var e=this;this.load((function(){e.contentWindow&&e.contentWindow.mappIframeRender&&e.contentWindow.mappIframeRender({onAction:function(t,n){return e.onAction(t,n)}})}))},onAction:function(e,t){switch(e){case"pick-close":this.iframe.hide();break;case"pick-insert":var n='[mappress mapid="'+t+'"]';"undefined"==typeof wpActiveEditor?alert(mappl10n.need_classic):send_to_editor(n),this.iframe.hide()}}},e(".mapp-iframe-button").length&&new t(this)}(jQuery)},938:function(e,t,n){"use strict";n.r(t);var o=n(557);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}window.mapp;var r=wp.element.createElement,l=wp.element,s=(l.Fragment,l.render,l.useEffect),c=(l.useLayoutEffect,l.useRef,l.useState),p=wp.components;p.Button,p.Modal;document.getElementById("mapp-library")&&(mappl10n.options.postid=0,wp.element.render(r((function(e){var t=a(c({mapid:null}),2),n=t[0];return t[1],s((function(){}),[]),r(o.default,{context:"library",mapid:n.mapid,onAction:function(e,t){switch(e){case"pick-shortcode":var n=jQuery("<input>");jQuery("body").append(n),n.val('[mappress mapid="'+t+'"]').select(),document.execCommand("copy"),n.remove(),alert((o="Shortcode copied",wp.i18n.__(o,"mappress-google-maps-for-wordpress")))}var o}})})),document.getElementById("mapp-library")))},816:function(e,t,n){"use strict";n.r(t);var o=n(429),a=n(557);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var p=window.mapp||{},u=wp.element.createElement,m=wp.element,d=m.Fragment,f=m.useEffect,h=(m.useLayoutEffect,m.useRef),g=m.useState,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function y(e){var t=wp.components,n=(t.BaseControl,t.Button),i=(t.ButtonGroup,t.CheckboxControl,t.Dropdown,t.Modal,t.Panel,t.PanelBody),l=(t.PanelRow,t.Placeholder),c=(t.RadioControl,t.SelectControl,t.TextControl,t.ToggleControl,t.Toolbar),m=t.ToolbarButton,y=(t.ToolbarGroup,wp.blockEditor),b=y.BlockControls,v=y.InspectorControls,w=s(g({isOpen:!1,map:null,mapdata:null,pickerMode:"list",pickerMapid:null}),2),O=w[0],k=w[1],C=h(null);function S(e){k((function(t){return r(r({},t),e)}))}function P(t,n){switch(t){case"add":S({isOpen:!0,pickerMapid:null,pickerMode:"edit"}),e.setAttributes({center:void 0,zoom:void 0});break;case"change-settings":e.setAttributes(n);break;case"edit":S({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"edit"});break;case"edit-close":S({isOpen:!1});break;case"pick-destroy":e.setAttributes({mapid:void 0,center:void 0,zoom:void 0,width:void 0,height:void 0}),S({isOpen:!1});break;case"pick-close":S({isOpen:!1});break;case"pick-insert":case"pick-duplicate":n!=e.attributes.mapid&&e.setAttributes({center:void 0,mapid:n,zoom:void 0}),S({isOpen:!1});break;case"open":S({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"list"})}}function j(){var t=void 0!==t?t:c;return u(b,null,u(t,null,e.attributes.mapid&&u(m,{icon:"edit",label:__("Edit map"),onClick:function(){return P("edit")}}),u(m,{icon:"portfolio",label:__("Map Library"),onClick:function(){return P("open")}})))}function I(){if(O.isOpen)return u(a.default,{mapid:O.pickerMapid,mode:O.pickerMode,onAction:P,type:"post"})}return f((function(){var t=function(t){var n=t.maps[e.attributes.mapid];n&&S({mapdata:n})};return p.store.subscribe(t),function(){return p.store.unsubscribe(t)}})),f((function(){e.attributes.mapid&&p.store.fetchMap({mapid:e.attributes.mapid,failure:function(){return S({mapdata:void 0})}})}),[e.attributes.mapid]),f((function(){var t;e.attributes.mapid&&C.current&&O.mapdata&&((t=new p.Map(O.mapdata,{center:e.attributes.center,height:e.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:e.attributes.poiList,sel:jQuery(C.current),width:e.attributes.width,zoom:e.attributes.zoom})).display(),S({map:t}))}),[O.mapdata]),e.attributes.preview?u("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"}):e.attributes.mapid&&void 0!==O.mapdata?u(d,null,j(),function(){if(!O.map)return null;var t=e.attributes,n=t.center,a=t.height,r=t.poiList,l=t.width,s=t.zoom;return u(v,null,u("div",{className:"mapp-gt-inspector"},u(i,{title:__("Map settings")},u(o.MappSettings,{map:O.map,alignment:null,context:"map",onAction:P,center:n,height:a,poiList:r,width:l,zoom:s}))))}(),u("div",{className:"mapp-gt",ref:C}),I()):u(d,null,u(d,null,j(),u(l,{className:"mapp-gt-placeholder",icon:"location",label:__("MapPress Map"),instructions:__("Use the map library to create a new map or insert an existing map.")},u(n,{icon:"portfolio",isSecondary:!0,onClick:function(){return P("open")}},__("Map Library")))),I())}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(e){return e.named.center}},height:{type:"string",shortcode:function(e){return e.named.height}},initialOpenDirections:{type:"boolean",shortcode:function(e){return"true"==e.named.initialOpenDirections||"true"==e.named.initialopendirections}},mapid:{type:"string",shortcode:function(e){return e.named.mapid}},poiList:{type:"boolean",shortcode:function(e){return"true"==e.named.poiList||"true"==e.named.poilist}},width:{type:"string",shortcode:function(e){return e.named.width}},zoom:{type:"number",shortcode:function(e){return parseInt(e.named.zoom)?parseInt(e.named.zoom):null}}}},{type:"block",blocks:["core/shortcode"],isMatch:function(e){var t=e.text,n=wp.shortcode.regexp("mappress");return n.lastIndex=0,n.test(t)},transform:function(e){var t=e.text;return wp.blocks.rawHandler({HTML:"<p>"+t+"</p>",mode:"BLOCKS"})}}]},edit:function(e){return u(y,e)},save:function(e){return e},example:{attributes:{preview:!0}}})},186:function(e,t,n){"use strict";n.r(t);n(429);wp.element.createElement;var o=wp.element,a=(o.Fragment,o.useEffect,o.useLayoutEffect,o.useRef,o.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 i=wp.element,r=(i.Fragment,i.useEffect,i.useLayoutEffect,i.useRef,i.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},498:function(e,t,n){"use strict";n.r(t);var o=n(557);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}window.mapp;var c=wp.element.createElement,p=wp.element,u=p.Fragment,m=(p.useEffect,p.useLayoutEffect,p.useRef,p.useState),d=wp.components,f=(d.Button,d.Dashicon),__=(d.Modal,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function h(){var e=l(m({isOpen:!1,mapid:null}),2),t=e[0],n=e[1];function a(e){n((function(t){return i(i({},t),e)}))}function r(e,t){switch(e){case"pick-close":a({isOpen:!1,mapid:null});break;case"pick-insert":a({isOpen:!1});var n='[mappress mapid="'+t+'"]';"undefined"==typeof wpActiveEditor?__("Please select the post content to insert the map into."):send_to_editor(n);break;case"open":a({isOpen:!0,mapid:s()})}}function s(){var e=tinyMCE?tinyMCE.get("content"):null,t=e&&e.selection?e.selection.getSel():null;if(!t||void 0===t.anchorOffset||!t.anchorNode||!t.anchorNode.data)return null;for(var n=null,o=t.anchorNode.data,a=-1,i=t.anchorOffset-1;i>=0;i--){var r=o[i];if("["==r){a=i;break}if("]"==r||"<"==r||">"==r)break}return a>=0&&(n=wp.shortcode.next("mappress",o,a))?n.shortcode.attrs.named.mapid:null}return c(u,null,c("button",{className:"button",onClick:function(e){e.preventDefault(),r("open")}},c(f,{className:"wp-media-buttons-icon",icon:"location"}),__("MapPress")),t.isOpen&&c(o.default,{context:"mce",mapid:t.mapid,onAction:r}))}Array.from(document.getElementsByClassName("mapp-mce")).forEach((function(e,t){return wp.element.render(c(h),e)}))},218:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return C}});var o=n(824),a=n(143);function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||p(e)||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 r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||p(e,t)||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(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var m=wp.element.createElement,d=wp.element,f=d.Fragment,h=d.useEffect,g=(d.useLayoutEffect,d.useCallback,d.useRef),y=d.useState,b=wp.data.useSelect,v=wp.components,w=v.Button,O=v.Dashicon,k=v.ExternalLink,__=(v.Modal,v.Panel,v.PanelBody,v.PanelRow,v.Popover,v.RadioControl,v.Spinner,v.TabPanel,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function C(e){var t=c(y(l({},mappress_options_state)),2),n=t[0],r=t[1];function s(e){r((function(t){return l(l({},t),e)}))}h((function(){S.current&&new mapp.Map(n.helpers.demo_map,{sel:jQuery(S.current)}).display()}),[]);var p,u,d,v,C,S=g(null);function P(e){return _.map(e,(function(e,t){return{value:t,label:e}}))}function j(e,t){switch(e){case"license-check":mapp.lib.ajax({type:"POST",data:{action:"mapp_license_check",nonce:mappl10n.options.nonce,license:settings.license},callback:function(e){e&&"OK"==e.status&&window.location.reload()}});break;case"reset":mapp.lib.ajax({type:"POST",data:{action:"mapp_options_reset",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&window.location.reload()}});break;case"save":mapp.lib.ajax({type:"POST",data:{action:"mapp_options_save",nonce:mappl10n.options.nonce,settings:n},callback:function(e){e&&"OK"==e.status&&window.location.reload()}})}}return m("div",{className:"mapp-options"},m("form",{onSubmit:function(e){e.preventDefault(),j("save")}},m(o.$0,{title:__("Sample Map"),className:"mapp-demo-section"},m("div",{className:"mapp-options-demo",ref:S})),m(o.$0,{title:__("Basic Settings")},m(o.Tr,{title:__("Mapping API"),options:[{label:"Leaflet",value:"leaflet"},{label:"Google",value:"google"}],onChange:function(e){return s({engine:e,geocoder:"google"==e?"google":""})},checked:n.engine,help:{href:"#toc-picking-a-mapping-api",text:__("Leaflet is free and requires no API key. Google requires an API key and has strict usage limits.")}}),"leaflet"==n.engine&&m(o.II,{title:__("Mapbox access token"),value:n.mapbox,onChange:function(e){s({mapbox:e}),"mapbox"!=n.geocoder||e||s({geocoder:""})},size:50,placeholder:__("Enter token to use Mapbox features"),help:{href:"https://www.mapbox.com/help/define-access-token/"}}),"google"==n.engine&&m(o.II,{title:__("Google API key"),name:"apiKey",value:n.apiKey,onChange:function(e){return s({apiKey:e})},size:50,help:{href:"https://mappresspro.com/mappress-faq/#toc-google-maps-api-keys"}}),"leaflet"==n.engine&&(C=[{value:"",label:__("Algolia")},{value:"nominatim",label:"Nominatim"},{value:"mapbox",label:"MapBox",disabled:!n.mapbox}],m(o.Tr,{title:__("Geocoder"),options:C,checked:n.geocoder,onChange:function(e){return s({geocoder:e})},help:{href:"#toc-picking-a-geocoder"}}))),mappl10n.options.pro&&(!n.helpers.is_multisite||n.helpers.is_super_admin||n.helpers.is_main_site)&&m(o.$0,{title:__("License")},m(o.Wx,{title:__("MapPress license key")},m(o.II,{value:n.license,onChange:function(e){return s({license:e})},size:37,placeholder:__("Enter license to enable automatic updates")}),(v=m("a",{className:"mapp-license-status",href:"https://mappresspro.com/account",target:"_blank"},__("Get license")),n.license&&n.helpers.license_status?"active"==n.helpers.license_status?m("span",{className:"mapp-license-status"},m(O,{icon:"yes"}),__("Active")):m(f,null,m(w,{type:"submit",className:"mapp-options-check-license",isSecondary:!0,onClick:function(){return j("license-check")}},__("Check now")),m("div",null,m(O,{icon:"no"}),n.helpers.license_message)):v)),m(o.XZ,{title:__("Beta versions"),label:__("Enable updates for beta versions"),checked:n.betas,onChange:function(e){return s({betas:e})}})),m(o.$0,{title:__("Map Settings")},m(o.xI,{title:__("Post types"),values:n.postTypes,options:P(n.helpers.post_types),onChange:function(e){return s({postTypes:e})}}),m(o.Tr,{title:__("Automatic display"),options:[{value:"",label:__("None")},{value:"top",label:__("Top of post")},{value:"bottom",label:__("Bottom of post")}],checked:n.autodisplay,onChange:function(e){return s({autodisplay:e})}}),m(o.Tr,{title:__("Map alignment"),options:[{value:"",label:__("Default")},{value:"center",label:__("Center")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],checked:n.alignment,onChange:function(e){return s({alignment:e})}}),m(o.Tr,{title:__("Directions"),checked:n.directions,options:[{value:"google",label:"Google"},{value:"inline",label:__("Inline")}],onChange:function(e){return s({directions:e})}}),m(o.XZ,{title:__("POI list"),checked:n.poiList,label:__("Show a list of POIs with each map"),onChange:function(e){return s({poiList:e})}}),mappl10n.options.pro&&m(o.Tr,{title:__("POI list layout"),checked:n.directions,options:[{value:"left",label:"Left of map"},{value:"inline",label:__("Below map")}],onChange:function(e){return s({directions:e})}}),m(o.II,{title:__("Mini width"),value:n.mini,onChange:function(e){return s({mini:e})},size:3,label:__("Width (px) to hide the POI list")}),m(o.XZ,{title:__("Sort"),checked:n.sort,label:__("Sort POI list by title"),onChange:function(e){return s({sort:e})}})),m(o.$0,{title:__("POI Settings")},m(o.Ph,{title:__("Default zoom"),label:__("Default zoom when displaying a single POI"),value:n.poiZoom,options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],(function(e){return{value:e,label:e}})),onChange:function(e){return s({zoom:e})}}),m(o.XZ,{title:__("Hover"),checked:n.tooltips,label:__("Open POIs on hover"),onChange:function(e){return s({tooltips:e})}}),m(o.XZ,{title:__("Open first POI"),checked:n.initialOpenInfo,onChange:function(e){return s({initialOpenInfo:e})},label:__("Open first POI")}),m(o.XZ,{title:__("Clustering"),checked:n.clustering,label:__("Enable marker clustering"),onChange:function(e){return s({clustering:e})}})),mappl10n.options.pro&&m(o.$0,{title:__("Mashups")},m(o.XZ,{title:__("Search"),checked:n.search,label:__("Enable search"),onChange:function(e){return s({search:e})}}),m(o.Ph,{title:__("Filter"),value:n.filter,options:P(n.helpers.taxonomies),onChange:function(e){return s({filter:e})},placeholder:""}),m(o.Tr,{title:__("Marker click"),checked:n.mashupClick,options:[{value:"poi",label:__("Open popup")},{value:"post",label:__("Open post")},{value:"postnew",label:__("Post in new tab")},{value:"postmodal",label:__("Post in modal")}],onChange:function(e){return s({mashupClick:e})}}),m(o.Tr,{title:__("Popup content"),checked:n.mashupBody,options:[{value:"poi",label:__("POI title + POI body")},{value:"post",label:__("Post title + post excerpt")}],onChange:function(e){return updatestate({mashupBody:mashupBody,val:e})}}),m(o.XZ,{title:__("KMLs"),checked:n.mashupKml,label:__("Include KML POIs in mashups"),onChange:function(e){return s({mashupKml:e})}})),mappl10n.options.pro&&m(o.$0,{title:__("Icons")},m(o.Wx,{title:__("Default icon")},m(a.G,{iconid:n.defaultIcon,onChange:function(e){mappl10n.options.defaultIcon=e,s({defaultIcon:e})}})),m(o.Wx,{title:__("Icon directory")},m("code",null,n.helpers.icon_directory)),m(o.Wx,{title:__("Highlight selected POI")},m(o.Tr,{checked:n.highlight,options:[{value:"",label:__("None")},{value:"circle",label:__("Circle")},{value:"scale",label:__("Scale")},{value:"icon",label:__("Icon")}],onChange:function(e){return s({highlight:e})}}),"icon"==n.highlight&&m(a.G,{defaultIcon:n.defaultIcon,iconid:n.highlightIcon,onChange:function(e){return s({highlightIcon:e})}})),(d=n.iconScale&&Array.isArray(n.iconScale)?i(n.iconScale):[0,0],m(o.Wx,{title:__("Icon scaling")},m(o.II,{value:d[0]?d[0]:"",onChange:function(e){e<=64&&(d[0]=e,s({iconScale:d}))},type:"number",min:0,max:64}),m("span",null," X "),m(o.II,{value:d[1]?d[1]:"",onChange:function(e){e<=64&&(d[1]=e,s({iconScale:d}))},type:"number",min:0,max:64}),m("span",null," (px) "))),function(){var e=P(n.helpers.taxonomies);e.unshift({value:"post_type",label:__("Post type")});var t=b((function(e){if("post_type"==n.autoicons.key)return P(n.helpers.post_types);var t=wp.data.select("core").getEntityRecords("taxonomy",n.autoicons.key,{per_page:-1,_fields:"id,name"});return t?t.map((function(e){return{value:e.id,label:e.name}})):null}),[n.autoicons.key]);return m(o.Wx,{title:__("Automatic icons")},m(o.Ph,{value:n.autoicons?n.autoicons.key:null,options:e,onChange:function(e){var t=n.autoicons?l({},n.autoicons):[];t.key=e,t.values=[],s({autoicons:t})},placeholder:""}),m(o.WM,{cols:[{id:"key",label:__("Key"),type:"select",options:t},{id:"value",label:__("Icon"),type:"icon"}],data:n.autoicons.values,onChange:function(e){var t=n.autoicons?l({},n.autoicons):[];t.values=e,s({autoicons:t})}}))}()),mappl10n.options.pro&&m(o.$0,{title:__("Styled Maps")},"leaflet"==n.engine&&m(o.Wx,{title:__("Styled maps")},m("div",null,__("Enter styles from Mapbox Studio"),m(k,{href:"https://www.mapbox.com/mapbox-studio/"})),m(o.WM,{cols:[{id:"key",label:__("Style name"),size:10},{id:"value",label:__("MapBox Share URL")}],data:n.mapboxStyles,onChange:function(e){return s({mapboxStyles:e,style:selected})},selectionColumn:"key",selectionType:"checkbox",selected:n.style})),"google"==n.engine&&m(o.Wx,{title:__("Styled maps")},m("div",null,__("Enter styles from Snazzy Maps"),m(k,{href:"https://snazzymaps.com/explore"})),m(o.WM,{cols:[{id:"key",label:__("Style name"),size:10},{id:"value",label:__("JSON"),type:"json"}],data:n.styles,onChange:function(e,t){return s({styles:e,style:t})},selectionColumn:"key",selectionType:"checkbox",selected:n.style}))),mappl10n.options.pro&&m(o.$0,{title:__("Geocoding")},m(o.Wx,{title:__("Geocoding fields")},m(o.WM,{cols:[{id:"key",label:__("Map field"),type:"select",options:P(n.helpers.meta_fields)},{id:"value",label:__("Custom field"),type:"select",options:P(n.helpers.meta_keys)}],data:n.metaKeys,onChange:function(e){return s({metaKeys:e})}})),m(o.XZ,{title:__("Overwrite"),label:__("Overwrite maps when posts are saved"),checked:n.metaSyncSave,onChange:function(e){s({metaSyncSave:e})}}),(u=__("No errors found"),n.helpers.geocoding_errors&&n.helpers.geocoding_errors.length>0&&(u=_.map(n.helpers.geocoding_errors,(function(e){return m("div",{key:e.ID},m("a",{href:mappl10n.options.editurl+"?post="+e.ID+"&action=edit"},e.post_title),m("span",null," : "+e.error))}))),m(o.Wx,{title:__("Geocoding errors")},u)),"google"==n.engine&&m(o.II,{title:__("Google Server API key"),name:"apiKeyServer",value:n.apiKeyServer,onChange:function(e){return s({apiKeyServer:e})},size:50,help:{text:__("Key secured by IP address for geocoding custom fields (optional)"),href:"https://mappresspro.com/mappress-faq"}})),mappl10n.options.pro&&m(o.$0,{title:__("Templates")},m(o.Wx,{title:__("Custom templates")},m(o.Nb)),m(o.XZ,{title:__("Mashup thumbnails"),checked:n.thumbs,label:__("Show featured image thumbnails in mashup popups and lists"),onChange:function(e){return s({thumbs:e})}}),m(o.Wx,{title:__("Thumbnail size")},m(o.Ph,{onChange:function(e){return s({thumbSize:e})},options:P(n.helpers.thumbnail_sizes),value:n.thumbSize}),m("span",null," "+__("or")+" "),m(o.II,{value:n.thumbWidth,onChange:function(e){return s({thumbWidth:e})},type:"number",min:0,max:9999}),m("span",null," X "),m(o.II,{value:n.thumbHeight,onChange:function(e){return s({thumbHeight:e})},type:"number",min:0,max:9999}),m("span",null," (px) "))),m(o.$0,{title:__("Localization")},(p="leaflet"==n.engine?"https://en.wikipedia.org/wiki/ISO_639-1":"http://code.google.com/apis/maps/faq.html#languagesupport",m(o.Ph,{title:__("Search language"),value:n.language,options:P(n.helpers.languages),onChange:function(e){return s({language:e})},help:{text:__("Language for searches and Google map controls"),href:p}})),m(o.Ph,{title:__("Search country"),label:__("Country code for searches"),value:n.country,options:_.map(["","AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","VG","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CK","CR","HR","CU","CW","CY","CZ","CD","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","CI","JM","JP","JE","JO","KZ","KE","KI","XK","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","KP","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","CG","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","KR","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","VI","UG","UA","AE","GB","US","UM","UY","UZ","VU","VA","VE","VN","WF","EH","YE","ZM","ZW"],(function(e){return{value:e,label:e}})),onChange:function(e){return s({country:e})},help:{href:"https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements"}}),m(o.II,{title:__("Directions server"),value:n.directionsServer,onChange:function(e){return s({directionsServer:directionsServer,val:e})},size:25})),m(o.$0,{title:__("Miscellaneous")},m(o.Wx,{title:__("Map sizes")},m(o.WM,{cols:[{id:"width",label:__("Width")+" (px, %, vw)",size:4},{id:"height",label:__("Height")+" (px, %, vh)"}],data:n.sizes,onChange:function(e,t){return s({sizes:e,size:t})},selectionColumn:"rowid",selected:n.size})),n.helpers.jetpack?null:m(o.XZ,{title:__("Scripts"),checked:n.footer,label:__("Output scripts in footer"),onChange:function(e){return s({footer:e})},help:{text:__("Disable footer scripts if maps are output using AJAX")}}),m(o.XZ,{title:"WPML",checked:n.wpml,label:__("Copy maps when overwriting a translation"),onChange:function(e){return s({wpml:e})},help:{href:"https://mappresspro.com/mappress-documentation#wpml"}}),"google"==n.engine&&m(o.XZ,{title:__("Compatiblity"),checked:n.deregister,label:__("Prevent other plugins/themes from loading the Google Maps API"),onChange:function(e){return s({deregister:e})}})),m("div",{className:"mapp-options-toolbar"},m(w,{className:"mapp-options-save",type:"submit",isPrimary:!0},__("Save")),m(w,{isSecondary:!0,onClick:function(){return j("reset")}},__("Reset Defaults")))))}document.getElementById("mapp-options-settings")&&wp.element.render(m(C),document.getElementById("mapp-options-settings"))},824:function(e,t,n){"use strict";function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||i(e,t)||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(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(e)||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(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n.d(t,{XZ:function(){return k},xI:function(){return C},II:function(){return P},Tr:function(){return I},Ph:function(){return M},$0:function(){return E},Wx:function(){return x},WM:function(){return N},Nb:function(){return D}});var u=wp.element.createElement,m=wp.element,d=m.Fragment,f=m.useEffect,h=(m.useLayoutEffect,m.useCallback),g=(m.useRef,m.useState),y=(wp.data.useSelect,wp.components),b=y.Button,v=(y.ColorPicker,y.Dashicon),w=(y.Dropdown,y.ExternalLink,y.Modal),O=(y.Panel,y.PanelBody,y.PanelRow,y.Popover,y.RadioControl,y.Spinner,y.TabPanel),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function k(e){var t=e.title,n=e.label,o=e.onChange,a=e.help,i=p(e,["title","label","onChange","help"]),r=u(d,null,u("label",null,u("input",s({type:"checkbox",onChange:function(e){o&&o(e.target.checked)}},i)),n&&u("span",{className:"mapp-option-label"},n)),a&&u(S,a));return t?u(x,{title:t},r):r}function C(e){var t=u(d,null,_.map(e.options,(function(t,n){var o=e.values?e.values.indexOf(t.value):-1;return u(k,{key:n,label:t.label,value:t.value,checked:o>=0,onChange:function(n){var i=a(e.values);n&&-1==o&&e.onChange(i.concat(t.value)),!n&&o>=0&&(i.splice(o,1),e.onChange(i))}})})),e.help&&u(S,e.help));return e.title?u(x,{title:e.title},t):t}function S(e){var t=null;return e.href&&(t="#"==e.href.substr(0,1)?"https://mappresspro.com/mappress-documentation/"+e.href:e.href),u(d,null,t&&u("a",{className:"mapp-help-link",href:t,target:"_blank"},u(v,{icon:"editor-help"})),e.text&&u("div",{className:"mapp-help-text"},e.text))}function P(e){var t=e.title,n=e.value,o=e.label,a=e.onChange,i=e.help,r=e.type,l=p(e,["title","value","label","onChange","help","type"]),c=u(d,null,u("input",s({value:n,onChange:function(e){return a(e.target.value.trim())},type:r||"text"},l)),o&&u("span",{className:"mapp-option-label"},o),i&&u(S,i));return t?u(x,{title:t},c):c}var j=function(e){var t=e.onChange,n=e.label,o=p(e,["onChange","label"]);return u("label",null,u("input",s({type:"radio",onChange:function(e){return t(e.target.value)}},o)),n&&u("span",{className:"mapp-option-label"},n))};function I(e){var t=u(d,null,_.map(e.options,(function(t,n){return u(j,{key:n,value:t.value,checked:e.checked==t.value,onChange:function(t){return e.onChange(t)},disabled:t.disabled,label:t.label})})),e.help&&u(S,e.help));return e.title?u(x,{title:e.title},t):t}function M(e){var t=e.title,n=e.value,o=e.label,a=e.onChange,i=e.options,r=e.help,l=e.placeholder,c=p(e,["title","value","label","onChange","options","help","placeholder"]);void 0!==l&&i.unshift({value:"",label:l});var m=u(d,null,u("select",s({value:n,onChange:function(e){return a(e.target.value)}},c),_.map(i,(function(e,t){return u("option",{key:t,value:e.value},e.label)}))),o&&u("span",{className:"mapp-option-label"},o),r&&u(S,r));return t?u(x,{title:t},m):m}function A(e){var t=e.title,n=e.onChange,o=e.label,a=e.help,i=p(e,["title","onChange","label","help"]),r=u(d,null,u("textarea",s({onChange:function(e){return n(e.target.value)}},i)),o&&u("span",{className:"mapp-option-label"},o),a&&u(S,a));return t?u(x,{title:t},r):r}function E(e){var t=e.className?" "+e.className:"";return u("div",{className:"mapp-option-section"+t},u("h2",null,e.title),e.children)}function x(e){return u("div",{className:"mapp-option"},u("div",{className:"mapp-option-title"},e.title),u("div",{className:"mapp-option-value"},e.children))}function N(e){var t,n,i=o(g({dragging:null,dragover:null}),2),r=i[0],l=i[1];function c(e){l((function(t){return s(s({},t),e)}))}function p(t,n){var o=a(e.data);switch(t){case"add":var i={};_.map(e.cols,(function(e){i[e.id]=""})),o.push(i),e.onChange(o,e.selected);break;case"change":o[n.i][n.id]=n.value,e.onChange(o,e.selected);break;case"delete":var l;o.splice(n,1),l=n==e.selected?null:n<e.selected?e.selected-1:e.selected,e.onChange(o,l);break;case"select":c({selected:n}),e.onChange(o,n);break;case"sort":var s=r.dragging,p=s<p?n-1:n;o.splice(p,0,o.splice(s,1)[0]),e.onChange(o,p),c({dragover:null})}}return f((function(){}),[]),u("div",{className:"mapp-grid"},e.data&&!!e.data.length&&u("div",{className:"mapp-grid-table"},(t=e.selectionColumn?u("div",{className:"mapp-grid-cell",key:"select"},__("Default")):null,n=u("div",{className:"mapp-grid-cell",key:"actions"},""),u("div",{className:"mapp-grid-header"},u("div",{className:"mapp-grid-row"},t,_.map(e.cols,(function(e){return u("div",{className:"mapp-grid-cell",key:e.id},e.label)})),n))),u("div",{className:"mapp-grid-body"},_.map(e.data,(function(t,n){return function(t,n){return u("div",{className:"mapp-grid-row"+(r.dragover==n?" mapp-dragover":""),draggable:!0,key:n,onDragOver:function(e){return e.preventDefault()},onDragStart:function(e){return c({dragging:n})},onDragEnter:function(e){return c({dragover:n})},onDragEnd:function(e){return c({dragging:null,dragover:null})},onDrop:function(e){return p("sort",n)}},function(t,n){if(!e.selectionColumn)return null;var o,a;switch("rowid"==e.selectionColumn?o=n:t[e.selectionColumn]?o=t[e.selectionColumn]:a=!0,e.selectionType){case"checkbox":return u("div",{className:"mapp-grid-cell"},u(k,{value:o,checked:e.selected==o,disabled:a,onChange:function(e){p("select",e?o:null)}}));case"radio":default:return u("div",{className:"mapp-grid-cell"},u(j,{checked:e.selected==o,onChange:function(){return p("select",o)}}))}}(t,n),_.map(e.cols,(function(t,o){return u("div",{className:"mapp-grid-cell",key:n+"-"+o},function(t,n){switch(n.type){case"icon":return u(MappIconPicker,{iconid:e.data[t][n.id],onChange:function(e){return p("change",{i:t,id:n.id,value:e})}});case"json":return u(A,{className:"mapp-option-expando",value:e.data[t][n.id],onChange:function(e){return p("change",{i:t,id:n.id,value:e})}});case"select":return u(M,{key:t+"-"+n.id,value:e.data[t][n.id],options:n.options,onChange:function(e){p("change",{i:t,id:n.id,value:e})}});case"input":default:return u(P,{key:t+"-"+n.id,size:e.data[t][n.size],value:e.data[t][n.id],onChange:function(e){return p("change",{i:t,id:n.id,value:e})}})}}(n,t))})),function(e){return u("div",{className:"mapp-grid-cell",key:"delete"},u(b,{icon:"trash",onClick:function(){return p("delete",e)}}))}(n))}(t,n)})))),u("div",{className:"mapp-grid-toolbar"},u(b,{isSecondary:!0,onClick:function(){return p("add")}},__("Add"))))}function D(e){var t=o(g({codeEditor:null,isOpen:!1,name:null,tab:"editor",template:null,tokens:null}),2),n=t[0],a=t[1];function i(e){a((function(t){return s(s({},t),e)}))}var r,l,c=h((function(e){if(null!=e){var t=wp.codeEditor.initialize(e);t.codemirror.setSize("auto","auto"),t.codemirror.setOption("readOnly","editor"!=n.tab),i({codeEditor:t})}}),[]);function p(e,t){switch(e){case"close":i({isOpen:!1});break;case"delete":confirm(mappl10n.delete_prompt)&&(mapp.lib.ajax({type:"POST",data:{action:"mapp_tpl_delete",name:n.template.name,nonce:mappl10n.options.nonce}}),i({isOpen:!1}));break;case"insert":var o=n.codeEditor.codemirror.getDoc(),a=o.getCursor();o.replaceRange("{{{poi."+t+"}}}",a);break;case"open":mapp.lib.ajax({type:"GET",data:{action:"mapp_tpl_get",name:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&i({isOpen:!0,name:t,tab:"editor",template:e.data.template,tokens:e.data.tokens})}});break;case"save":var r="editor"==n.tab?n.codeEditor.codemirror.getValue():n.template.content;mapp.lib.ajax({type:"POST",data:{action:"mapp_tpl_save",content:r,name:n.template.name,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&i({isOpen:!1,template:null,tokens:null})}});break;case"tab-select":if("editor"!=t){var l=s({},n.template);l.content=n.codeEditor.codemirror.getValue(),i({template:l})}i({tab:t})}}return u("div",{className:"mapp-templates"},(l=[{name:"map-popup",label:__("Map popup")},{name:"map-item",label:__("Map list item")},{name:"mashup-popup",label:__("Mashup popup")},{name:"mashup-item",label:__("Mashup list item")}],u("div",{className:"mapp-templates-list"},_.map(l,(function(e,t){return u("a",{href:"#",key:e.name,className:"mapp-templates-item",onClick:function(t){t.preventDefault(),p("open",e.name)}},e.label)})))),n.isOpen&&n.template?u(w,{title:(r=n.template.name+" ("+(n.template.exists?__("Custom"):__("New"))+")",u("div",{className:"mapp-templates-name"},r)),className:"mapp-templates-modal",onRequestClose:function(){return p("close")},shouldCloseOnClickOutside:!1},u(O,{className:"mapp-templates-tabs",onSelect:function(e){return p("tab-select",e)},tabs:[{name:"editor",title:__("Editor")},{name:"standard",title:__("Default")}]},(function(e){return t=u("div",{className:"mapp-templates-tokens"},_.map(n.tokens,(function(e,t){return u("code",{onClick:function(){return p("insert",e)},key:t,title:e},e)}))),o=u("div",{className:"mapp-templates-path"},n.template.path),u(d,null,"editor"==n.tab&&o,"editor"==n.tab&&t,u("div",{className:"editor"==n.tab?"mapp-templates-editor":"mapp-templates-standard"},u("textarea",{ref:c,defaultValue:"editor"==n.tab?n.template.content:n.template.standard})));var t,o})),u("div",{className:"mapp-templates-toolbar"},u(b,{isPrimary:!0,onClick:function(){return p("save")}},__("Save")),u(b,{isSecondary:!0,onClick:function(){return p("close")}},__("Cancel")),n.template.exists&&u("a",{onClick:function(e){e.preventDefault(),p("delete")}},__("Delete")))):null)}},557:function(e,t,n){"use strict";function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.r(t),n.d(t,{default:function(){return G}});var s=wp.element.createElement,c=wp.url.addQueryArgs,p=wp.element,u=p.useCallback,m=p.useEffect,d=p.useState,f=wp.components,h=(f.Button,f.Dropdown),g=f.Spinner,y=f.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function b(e){var t=r(d({results:[],search:"",searchTerm:""}),2),n=t[0],o=t[1];function i(e){o((function(t){return a(a({},t),e)}))}m((function(){wp.apiFetch({path:c("/wp/v2/search",{search:n.search,per_page:20})}).then((function(e){i({results:e})}))}),[n.search]);var l=u(_.debounce((function(e){i({search:e})}),1e3),[]);function p(t,o){return s("div",{className:"mapp-attach-control"},s("div",{className:"mapp-attach-control-toolbar"},s(y,{autoComplete:"false",value:n.searchTerm,onChange:function(e){i({searchTerm:e}),l(e)},placeholder:__("Search")})),n.results?n.results.length?s("div",{className:"mapp-attach-items"},n.results.map((function(t){return s("div",{key:t.id,className:"mapp-attach-item",onClick:function(){e.onChange(t.id,t.title)}},s("div",{className:"mapp-attach-item-title"},t.title?t.title:__("Untitled")),s("div",{className:"mapp-attach-item-type"},t.type))}))):s("div",{},__("No posts found")):s(g,null))}return s("div",{onClick:function(e){return e.stopPropagation()}},s(h,{renderToggle:function(e){e.isOpen;var t=e.onToggle;return s("a",{href:"#",onClick:t},__("Attach"))},renderContent:function(e){e.isOpen,e.onToggle;return p()}}))}var v=n(999);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var P=window.mapp||{},j=wp.element.createElement,I=wp.data.select,M=wp.element,A=(M.Fragment,M.useEffect),E=(M.useLayoutEffect,M.useRef),x=M.useState,N=wp.components,D=(N.BaseControl,N.Button),T=N.Dashicon,B=N.Modal,L=(N.PanelBody,N.RadioControl),F=N.Spinner,R=N.TextControl,z=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function G(e){var t=C(x({isFetchingItems:!0,items:null,mode:e.mode?e.mode:"list",mapid:e.mapid?e.mapid:null,search:"",type:"all"}),2),n=t[0],o=t[1],a=E(null),i=E(null);function r(e){o((function(t){return O(O({},t),e)}))}function l(e){if("post"==n.type&&e.postid!=mappl10n.options.postid)return!1;var t=n.search.toLowerCase();return!t||(e.mapid.indexOf(t)>=0||(!!(e.post_title&&e.post_title.toLowerCase().indexOf(t)>=0)||!!(e.map_title&&e.map_title.toLowerCase().indexOf(t)>=0)))}function s(t,o){switch(t){case"attach":P.store.mutateMap({mapdata:o});break;case"add-new":r({mode:"edit",mapid:null});break;case"change-type":r({type:o});break;case"close":e.onAction("pick-close");break;case"duplicate":P.store.duplicateMap({mapid:o,success:function(e){alert(z("Map copied")),r({mapid:e.mapid}),jQuery(".mapp-pick-items").scrollTop(0)}});break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(P.store.destroyMap({mapid:o}),o==n.mapid&&e.onAction("pick-destroy",o)),a.current.focus();break;case"edit":r({mode:"edit",mapid:o});break;case"edit-close":"edit"==e.mode?e.onAction("pick-close"):r({mode:"list"});break;case"edit-destroy":r({mode:"list",mapid:null}),e.onAction("pick-destroy",o);break;case"edit-save":"edit"==e.mode?e.onAction("pick-close",o):r({mode:"list",mapid:o});break;case"insert":e.onAction("pick-insert",o);break;case"shortcode":e.onAction("pick-shortcode",o);break;case"sort":P.store.setSort({sortBy:o,sortAsc:P.store.state.sortBy!=o||!P.store.state.sortAsc})}}function c(t){var o,a,r,l=t.mapid==n.mapid;a=t.post_title,o=t.map_title?t.map_title:z("Untitled"),("map"==e.context||"mashup"==e.context&&t.postid==mappl10n.options.postid)&&(a=I("core/editor").getEditedPostAttribute("title")),a=a||z("Untitled"),t.postid>0&&t.postid==mappl10n.options.postid&&(a=z("Current post")),r=t.postid>0?t.postid==mappl10n.options.postid?a:j("a",{href:mappl10n.options.editurl+"?post="+t.postid+"&action=edit",target:"_blank",title:z("Edit post")},a):z("Unattached");var c=[{action:"edit",label:z("Edit")},{action:"insert",label:z("Insert into post")},{action:"duplicate",label:z("Copy")},{action:"shortcode",label:z("Shortcode")},{action:"destroy",label:z("Delete")}];"library"==e.context?c.splice(1,1):c.splice(3,1),c=j("div",{className:"mapp-pick-actions"},c.map((function(e){return j("a",{href:"#",key:e.action,onClick:function(n){n.stopPropagation(),n.preventDefault(),s(e.action,t.mapid)}},e.label)})));var p=null;return p=t.postid>0?j("a",{href:"#",onClick:function(){return s("attach",{mapid:t.mapid,postid:0})}},z("Detach")):"library"==e.context?j(b,{onChange:function(e,n){return s("attach",{mapid:t.mapid,postid:e,post_title:n})}},z("Attach")):j("a",{href:"#",onClick:function(){return s("attach",{mapid:t.mapid,postid:mappl10n.options.postid,post_title:null})}},z("Attach")),j("div",{className:"mapp-pick-item"+(l?" mapp-selected":""),key:t.mapid+"|"+t.postid,ref:l?i:null},j("div",{className:"mapp-pick-col-map_title",onClick:function(e){return s("edit",t.mapid)}},j("div",null,o),j("div",null,c)),j("div",{className:"mapp-pick-col-mapid"},t.mapid),j("div",{className:"mapp-pick-col-post_title"},r,j("div",null,p)))}A((function(){var e=function(e){r({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return P.store.subscribe(e),function(){return P.store.unsubscribe(e)}})),A((function(){a.current&&a.current.focus(),P.store.fetchItems()}),[]),A((function(){i.current&&P.lib.scrollTo(jQuery(".mapp-pick-items"),jQuery(i.current))}),[n.type,n.items]);var p,u,m=j("div",{className:"mapp-list-panel"},j("div",{className:"mapp-gt-modal-header"},j("div",{className:"mapp-gt-modal-header-title"},j("h1",null,z("Select a map")),j(D,{isPrimary:!0,onClick:function(){return s("add-new")}},z("Add New"))),j(D,{onClick:function(){return s("close")},icon:"no-alt"})),(p="library"==e.context?null:j(L,{className:"mapp-pick-type",options:[{label:z("Attached to this post"),value:"post"},{label:z("All maps"),value:"all"}],onChange:function(e){return s("change-type",e)},selected:n.type}),u=n.isFetchingItems||n.isAttaching&&"library"!=e.context,j("div",{className:"mapp-pick-filter"},u&&j(F,null),j(R,{ref:a,className:"mapp-pick-search",tabIndex:1,label:z("Search"),placeholder:z("post title, map title, or map id"),onChange:function(e){return r({search:e})}}),p)),function(){var e,t=_.filter(n.items,l),o="";return o=n.isFetchingItems?null:t.length?_.map(t,c):j("div",{className:"mapp-pick-message"},z("No maps found")),j("div",{className:"mapp-pick-items"},(e={map_title:z("Map title"),mapid:z("Map ID"),post_title:z("Attached to")},j("div",{className:"mapp-pick-items-header"},_.map(e,(function(e,t){return j("div",{className:"mapp-pick-col-"+t,onClick:function(){return s("sort",t)},key:t},e,P.store.state.sortBy==t&&j(T,{icon:P.store.state.sortAsc?"arrow-up":"arrow-down"}))})))),o)}(),function(){if("library"!=e.context)return j("div",{className:"mapp-pick-toolbar"},j(D,{isSecondary:!0,onClick:function(){return s("close")}},z("Close")))}()),d=null;if("edit"==n.mode){var f=j("div",{className:"mapp-edit-panel"},j(v.default,{context:e.context,mapid:n.mapid,onAction:s}));d="library"==e.context?j(B,{className:"mapp-gt-modal",isDismissible:!1},f):f}var h="mapp-pick mapp-mode-"+n.mode+" mapp-context-"+e.context;return"library"==e.context?j("div",{className:h},m,d):j(B,{className:"mapp-gt-modal "+h,isDismissible:"list"==n.mode,onRequestClose:function(){return s("close")},shouldCloseOnEsc:"list"==n.mode,shouldCloseOnClickOutside:"list"==n.mode},m,d)}},429:function(e,t,n){"use strict";function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==i.return||i.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.r(t),n.d(t,{MappSettings:function(){return g}});window.mapp;var i=wp.element.createElement,r=wp.element,l=r.Fragment,s=(r.useEffect,r.useLayoutEffect,r.useRef,r.useState),c=wp.components,p=c.BaseControl,u=c.Button,m=c.ButtonGroup,d=(c.Dashicon,c.Dropdown,c.ExternalLink,c.Panel,c.PanelBody,c.PanelRow),f=(c.RadioControl,c.SelectControl),h=c.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function g(e){var t,n=o(s({}),2);n[0],n[1];function a(e){if(!e||"string"!=typeof e)return e;var t={px:2048,vw:100,vh:100,"%":100},n=parseInt(e),o=2048,a="";for(var i in t)e.includes(i)&&(a=i,o=t[i]);return n>o?o+a:e}function r(t,n){var o=null;switch(t){case"mapTypeId":e.map.set({mapTypeId:n}),o={mapTypeId:n};break;case"poiList":e.map.set({poiList:n}),o={poiList:n};break;case"size":n.hasOwnProperty("height")&&(n.height=a(n.height)),n.hasOwnProperty("width")&&(n.width=a(n.width)),e.map.setSize(n),o=n;break;case"viewport-reset":e.map.center=e.map.zoom=null,e.map.recenter(),o={center:void 0,zoom:void 0};break;case"viewport-set":var i=e.map.getCenter().toJSON();e.map.center=i,e.map.zoom=e.map.getZoom(),o={center:i.lat+","+i.lng,zoom:e.map.getZoom()},"mce"==e.context||"library"==e.context?alert(__("Viewport set")):wp.data.dispatch("core/notices").createNotice("success",__("Viewport set"),{type:"snackbar",isDismissible:!0})}o&&e.onAction("change-settings",o)}return i("div",{className:"mapp-settings"},null,(t=e.map.title?e.map.title:__("Untitled"),i(d,null,"map"==e.context&&i(p,{className:"mapp-settings-title"},t),i(p,{className:"mapp-settings-id",label:__("Map ID")},e.map.mapid))),"mashup"==e.context&&function(){var t=[];if("leaflet"==mappl10n.options.engine)t=mappl10n.options.baseLayers.map((function(e){return{label:e.label,value:e.name}}));else{var n=mappl10n.options.styles?_.keys(mappl10n.options.styles):[];t=["roadmap","satellite","terrain","hybrid"].concat(n).map((function(e){return{label:e.charAt(0).toUpperCase()+e.slice(1),value:e}}))}return t.unshift({label:__("Default"),value:null}),i(f,{className:"mapp-settings-type",help:"",label:__("Map type"),value:e.map.mapTypeId,options:t,onChange:function(e){return r("mapTypeId",e)}})}(),function(){var t=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=mappl10n.options.sizes.map((function(e,t){return{label:e.width+" X "+e.height,height:e.height,width:e.width,value:t+1}}));n.unshift({height:"",label:__("Default"),value:0,width:""}),n.push({label:__("Custom"),value:"custom",disabled:!0});for(var o="custom",a=0;a<n.length-1;a++)n[a].width==e.width&&n[a].height==e.height&&(o=a);return i(l,null,i(f,{className:"mapp-settings-dims-select",help:"",label:__("Size"),value:o,options:n,onChange:function(e){return r("size",{width:n[e].width,height:n[e].height})}}),i(d,null,i(h,{className:"mapp-settings-dims-custom",help:__("px, %, vw"),label:__("Width"),onChange:function(e){return r("size",{width:e})},placeholder:t.width,value:e.width?e.width:""}),i(h,{className:"mapp-settings-dims-custom",help:__("px, %, vh"),label:__("Height"),onChange:function(e){return r("size",{height:e})},placeholder:t.height,value:e.height?e.height:""})))}(),(e.center&&(e.center.lat,e.center.lng,__("Zoom"),e.zoom),i(l,null,i(p,{className:"mapp-settings-viewport",label:__("Center/Zoom")},i(m,{label:__("Center/Zoom")},i(u,{onClick:function(){return r("viewport-reset")},isPressed:!e.center,isSmall:!0},__("Automatic")),i(u,{onClick:function(){return r("viewport-set")},isPressed:e.center,isSmall:!0},__("Set")))))))}},787:function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var i=window.mapp||{};i.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,sortBy:"map_title",sortAsc:!0,maps:{},items:[]}},i.Store.prototype={createMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.success,n=void 0===t?function(){}:t;this.state.isFetchingMap=!1,this.publish(),n()},destroyMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapid,n=e.success,o=void 0===n?function(){}:n,a=e.failure,r=void 0===a?function(){}:a,l=this;i.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(delete l.state.maps[t],l.destroyItem(t),o(t)):r(),l.publish()}})},duplicateMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapid,n=e.success,o=void 0===n?function(){}:n,a=e.failure,r=void 0===a?function(){}:a,l=this;this.state.isSavingMap=!0,this.publish(),i.lib.ajax({type:"POST",data:{action:"mapp_duplicate",mapid:t,postid:mappl10n.options.postid,nonce:mappl10n.options.nonce},callback:function(e){if(e&&"OK"==e.status){var t=e.data,n=t.mapid;l.state.maps[n]=t,l.saveItem(t),o(t)}else r();l.state.isSavingMap=!1,l.publish()}})},fetchMap:function(e){var t=e.mapid,n=e.success,o=void 0===n?function(){}:n,a=e.failure,r=void 0===a?function(){}:a,l=this;if(void 0!==this.state.maps[t])return l.publish(),void o(this.state.maps[t]);this.state.isFetchingMap=!0,l.publish(),i.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(l.state.maps[t]=e.data,o(e.data)):r(),l.state.isFetchingMap=!1,l.publish()}})},mutateMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapdata,n=e.success,o=void 0===n?function(){}:n,a=e.failure,r=void 0===a?function(){}:a,l=this;this.state.isSavingMap=!0,this.saveItem(t),this.publish(),i.lib.ajax({type:"POST",data:{action:"mapp_mutate",mapdata:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(l.state.maps[e.data.mapid]=e.data,o(t)):r(),l.state.isSavingMap=!1,l.publish()}})},saveMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapdata,n=e.success,o=void 0===n?function(){}:n,a=e.failure,r=void 0===a?function(){}:a,l=this;this.state.isSavingMap=!0,this.publish(),i.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(t),nonce:mappl10n.options.nonce},callback:function(e){if(e&&"OK"==e.status){var t=e.data,n=t.mapid;l.state.maps[n]=t,l.saveItem(t),o(t)}else r();l.state.isSavingMap=!1,l.publish()}})},destroyItem:function(e){var t=this.state.items?this.state.items:[],o=_.findIndex(t,{mapid:e});o>-1&&t.splice(o,1),this.state.items=n(t),this.publish()},fetchItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.success,n=void 0===t?function(){}:t,o=e.failure,a=void 0===o?function(){}:o,r=this;if(this.state.itemsFetched)return n(this.state.items),void r.publish();this.state.isFetchingItems=!0,r.publish(),i.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(r.state.items=e.data,r.sort(),n(r.state.items),r.state.itemsFetched=!0):a(),r.state.isFetchingItems=!1,r.sort(),r.publish()}})},saveItem:function(n){var o=this.state.items?this.state.items:[],a=_.findWhere(o,{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 o=1;o<arguments.length;o++){var a=null!=arguments[o]?arguments[o]:{};o%2?e(Object(a),!0).forEach((function(e){t(n,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))}))}return n}({},a)):(a={mapid:n.mapid,map_title:n.title,postid:mappl10n.options.postid,post_title:null},o.unshift(a))},setSort:function(e){e.sortBy&&(this.state.sortBy=e.sortBy),void 0!==e.sortAsc&&(this.state.sortAsc=e.sortAsc),this.sort(),this.publish()},sort:function(e,t){var n,o=this,a=(n="untitled",wp.i18n.__(n,"mappress-google-maps-for-wordpress"));this.state.items.sort((function(e,t){return function(e,t,n,o){if(o=o?1:-1,"mapid"==n)return o*(Number(e.mapid)-Number(t.mapid));var i=e[n]?e[n]:a,r=t[n]?t[n]:a,l=o*i.localeCompare(r);return 0==l?Number(e.mapid)-Number(t.mapid):l}(e,t,o.state.sortBy,o.state.sortAsc)}))},subscribe:function(e){this.subs.add(e)},unsubscribe:function(e){this.subs.delete(e)},publish:function(){var e,t=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(_e){throw _e},f:i}}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,l=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw r}}}}(n(this.subs));try{for(t.s();!(e=t.n()).done;){(0,e.value)(this.state)}}catch(e){t.e(e)}finally{t.f()}}},i.store=new i.Store},308:function(e,t,n){"use strict";e.exports=function(e,t){var o,a,i,r,l,s,c,p,u,m,d,f,h,g=String(e).replace(/^&/,"").replace(/&$/,"").split("&"),y=g.length,b=function(e){return decodeURIComponent(e.replace(/\+/g,"%20"))},v="undefined"!=typeof window?window:n.g;v.$locutus=v.$locutus||{};var w=v.$locutus;for(w.php=w.php||{},t||(t=v),o=0;o<y&&(u=b((p=g[o].split("="))[0]),m=p.length<2?"":b(p[1]),!(u.includes("__proto__")||u.includes("constructor")||u.includes("prototype")));o++){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,a=0;a<u.length;a++)if("["!==u.charAt(a)||d){if("]"===u.charAt(a)&&d&&(f.length||f.push(u.slice(0,d-1)),f.push(u.substr(d,a-d)),d=0,"["!==u.charAt(a+1)))break}else d=a+1;for(f.length||(f=[u]),a=0;a<f[0].length&&(" "!==(c=f[0].charAt(a))&&"."!==c&&"["!==c||(f[0]=f[0].substr(0,a)+"_"+f[0].substr(a+1)),"["!==c);a++);for(s=t,a=0,h=f.length;a<h;a++){if(l=s,(""===(u=f[a].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==a){for(r in i=-1,s)s.hasOwnProperty(r)&&+r>i&&r.match(/^\d+$/g)&&(i=+r);u=i+1}Object(s[u])!==s[u]&&(s[u]={}),s=s[u]}l[u]=m}}}}},t={};function n(o){if(t[o])return t[o].exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(215),n(787),n(999),n(800),n(938),n(816),n(186),n(498),n(218),n(557),n(429)}();
css/mappress.css CHANGED
@@ -26,6 +26,14 @@
26
  font-size: 13px;
27
  }
28
 
 
 
 
 
 
 
 
 
29
  /* 2019 */
30
  .mapp-layout input, .mapp-layout button, .mapp-layout select, .mapp-layout textarea, .mapp-layout p, .mapp-layout a {
31
  font-family: sans-serif;
@@ -149,7 +157,7 @@ only screen and (min-device-pixel-ratio: 2) {
149
  }
150
 
151
  .mapp-list-open .mapp-list {
152
- width: 250px;
153
  }
154
 
155
  /* List toggle, left layout only */
@@ -157,6 +165,7 @@ only screen and (min-device-pixel-ratio: 2) {
157
  align-items: center;
158
  background-color: white;
159
  border: 1px solid lightgray;
 
160
  display: flex;
161
  height: 40px;
162
  justify-content: center;
@@ -194,10 +203,23 @@ only screen and (min-device-pixel-ratio: 2) {
194
  }
195
 
196
  .mapp-list .mapp-item {
 
197
  border-bottom: 1px solid lightgray;
 
198
  cursor: pointer;
199
  overflow: hidden;
200
- padding: 5px;
 
 
 
 
 
 
 
 
 
 
 
201
  }
202
 
203
  .mapp-list .mapp-item.mapp-selected {
@@ -212,20 +234,38 @@ only screen and (min-device-pixel-ratio: 2) {
212
  background-color: #f6f6f6;
213
  }
214
 
215
- .mapp-list .mapp-item .mapp-title {
216
- overflow: hidden;
217
- vertical-align: middle;
218
- }
219
-
220
  .mapp-list .mapp-item .mapp-icon {
221
  border: none; /* 2011 */
222
  float: left;
223
  margin-right: 5px;
224
- max-width: 24px !important; /* 2012 tries to override */
225
- max-height: 24px;
226
  padding: 0; /* 2011 */
227
  }
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  /*
230
  -----------------------------------------------------------------------------------
231
  Header
@@ -415,35 +455,44 @@ only screen and (min-device-pixel-ratio: 2) {
415
 
416
  - This applies only to Infoboxes! Google standard infoWindow / Leaflet popup use class .mapp-iw instead
417
 
418
- mapp-ib-wrapper - wrapper around box + tip, used for sizing
419
- mapp-ib - box only, with border
420
- .mapp-iw | .mapp-iw-edit - infowindow (popup) or tooltip content
421
- mapp-ib-tip - triangle tip
 
422
 
423
  Classses applied to mapp-ib-wrapper:
424
- type .mapp-ib-popup | .mapp-ib-tooltip | .mapp-ib-edit | .mapp-open
425
 
426
  Classes applied to mapp-iw:
427
- template name .mapp-map-popup | .mapp-map-tooltip | .mapp-mashup-popup | .mapp-mashup-tooltip
428
  -----------------------------------------------------------------------------------------------------------
429
  */
430
 
431
- /* IB wrapper. Line-height is critical for tip position. Z-index places IB above menu icon, but below menu */
432
  .mapp-ib-wrapper {
433
  display: none;
434
- flex-direction: column;
435
- line-height: 0;
436
- max-height: calc(100% - 50px);
437
- max-width: calc(100% - 50px);
438
  position: absolute;
439
- z-index: 1005;
440
  }
441
 
442
  .mapp-ib-wrapper.mapp-open {
443
  display: flex;
444
  }
445
 
446
- .mapp-ib-wrapper.mapp-ib-flip {
 
 
 
 
 
 
 
 
 
 
 
447
  flex-direction: column-reverse;
448
  }
449
 
@@ -453,21 +502,21 @@ only screen and (min-device-pixel-ratio: 2) {
453
  :-moz-full-screen ~ .mapp-ib-wrapper { z-index: 10000000000; }
454
  :-ms-fullscreen ~ .mapp-ib-wrapper { z-index: 10000000000; }
455
 
456
-
457
  .mapp-ib {
458
  background-color: white;
459
- border: 1px solid lightgray;
460
  box-sizing: border-box;
461
  display: flex;
462
  flex-direction: column;
463
  line-height: normal;
464
  outline: none;
465
  overflow: hidden;
 
466
  }
467
 
468
  .mapp-ib-tip {
469
  display: flex;
470
  flex: 0 0 auto;
 
471
  position: relative;
472
  width: 0;
473
  }
@@ -559,14 +608,14 @@ only screen and (min-device-pixel-ratio: 2) {
559
 
560
  /*
561
  -----------------------------------------------------------------------------------
562
- Popup
563
  -----------------------------------------------------------------------------------
564
  */
565
 
566
  .mapp-iw {
567
  display: flex;
568
  flex-direction: column;
569
- min-width: 150px;
570
  overflow: hidden;
571
  }
572
 
@@ -583,7 +632,10 @@ only screen and (min-device-pixel-ratio: 2) {
583
  .mapp-layout .mapp-iw * {
584
  color: black;
585
  line-height: normal;
586
- margin: 0;
 
 
 
587
  padding: 0;
588
  }
589
 
@@ -593,79 +645,99 @@ only screen and (min-device-pixel-ratio: 2) {
593
  max-width: 100%;
594
  }
595
 
596
- .mapp-iw p {
597
- margin: 5px 0 5px 0 !important;
 
 
 
 
 
 
598
  }
599
 
600
- .mapp-iw .mapp-body {
 
601
  flex: 1;
602
- overflow: auto;
603
- overflow-wrap: break-word;
 
604
  }
605
 
606
  .mapp-iw .mapp-title {
607
  font-weight: bold;
608
- padding-bottom: 10px;
609
  }
610
 
611
- /* Thumbnails */
612
- .mapp-iw .mapp-body .wp-post-image {
613
- vertical-align: top;
614
- float: left;
615
- margin: 3px 3px 3px 0px;
616
- padding: 0;
617
- width: 32px;
618
- height: 32px;
619
  }
620
 
621
  .mapp-iw .mapp-links {
622
- clear: both; /* Clear any floats from images in body */
623
- white-space: nowrap; /* Don't let links split in small infowindows */
624
- margin: 0 !important; /* Margin causes scrollbars */
625
- padding-top: 4px !important;
626
- }
627
-
628
- /* Override theme link styles */
629
- .mapp-iw a, .mapp-iw a:link, .mapp-iw a:active, .mapp-iw a:visited, .mapp-iw a:hover {
630
- border: none !important;
631
- box-shadow: none !important; /* 2016, 2017 */
632
- color: #4272db !important;
633
- text-decoration: none !important;
634
  }
635
 
636
- /* Add padding for IB, IW/Leaflet do it by default */
637
- .mapp-ib .mapp-iw {
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
655
  -----------------------------------------------------------------------------------
656
  */
657
 
658
- /* Always make tooltip <= 50% height, since they need room to flip */
659
- .mapp-ib-tooltip {
660
- max-height: 50%;
 
 
 
661
  }
662
 
663
- /* No point having scrollbar on a tooltip */
664
- .mapp-ib-tooltip .mapp-iw {
665
- overflow: hidden;
666
- padding: 10px;
667
  }
668
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
669
 
670
  /*
671
  -----------------------------------------------------------------------------------
@@ -722,7 +794,7 @@ only screen and (min-device-pixel-ratio: 2) {
722
  .mapp-view-filters .mapp-filters {
723
  display: flex;
724
  flex-direction: column;
725
- z-index: 1001;
726
  }
727
 
728
  .mapp-view-menu .mapp-menu {
@@ -798,6 +870,7 @@ only screen and (min-device-pixel-ratio: 2) {
798
 
799
  .mapp-marker {
800
  cursor: pointer;
 
801
  position: absolute;
802
  touch-action: none; /* For dragdrop */
803
  }
@@ -821,7 +894,7 @@ only screen and (min-device-pixel-ratio: 2) {
821
  /* Scale image */
822
  .mapp-marker-scale img {
823
  transform-origin: 50% 100%;
824
- transform: scale(1.5);
825
  perspective: 1001px;
826
  }
827
 
@@ -874,15 +947,11 @@ only screen and (min-device-pixel-ratio: 2) {
874
  }
875
 
876
 
877
- .mapp-dir-toolbar {
878
  margin-top: 10px;
879
  }
880
 
881
- .mapp-dir-google {
882
- float: right;
883
- }
884
-
885
- .mapp-dir-swap {
886
  display:inline-block;
887
  border: none !important; /* 2015 */
888
  text-align: center ;
@@ -897,20 +966,20 @@ only screen and (min-device-pixel-ratio: 2) {
897
  vertical-align: bottom;
898
  }
899
 
900
- .mapp-route {
901
  margin: 10px 0 0px 0 ;
902
  }
903
 
904
- .mapp-dir-saddr, .mapp-dir-daddr {
905
  width: 80% ;
906
  line-height: normal ;
907
  }
908
 
909
- .mapp-dir-saddr {
910
  margin-bottom: 5px;
911
  }
912
 
913
- .mapp-dir-arrows {
914
  background: transparent url('../images/directions.png') no-repeat center center;
915
  background-position: -10px -489px;
916
  cursor: pointer;
@@ -980,21 +1049,131 @@ only screen and (min-device-pixel-ratio: 2) {
980
  border-bottom: 1px solid lightgray;
981
  }
982
 
 
983
  /*
984
  -----------------------------------------------------------------------------------
985
- CSS tables
 
 
 
 
 
 
 
 
 
 
 
 
986
  -----------------------------------------------------------------------------------
987
  */
988
- .mapp-table {
989
- display: table;
990
- width: 100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
991
  }
992
 
993
- .mapp-table > div { display: table-row; }
994
- .mapp-table > div > div, .mapp-table > div > label {
995
- display: table-cell;
 
 
996
  }
997
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
998
  /*
999
  -----------------------------------------------------------------------------------
1000
  Misc
@@ -1031,10 +1210,11 @@ only screen and (min-device-pixel-ratio: 2) {
1031
  }
1032
 
1033
  img.mapp-icon, .mapp-icon img {
1034
- max-width: 24px !important; /* 2012 tries to override */
1035
- max-height: 24px;
1036
- vertical-align: middle;
1037
  box-shadow: none !important; /* 2012 applies box shadow to all images */
 
 
 
 
1038
  }
1039
 
1040
  .mapp-error {
@@ -1081,4 +1261,4 @@ img.mapp-icon, .mapp-icon img {
1081
 
1082
  .mapp-button-submit {
1083
  color: #4285F4;
1084
- }
26
  font-size: 13px;
27
  }
28
 
29
+ .mapp-canvas {
30
+ user-select: none;
31
+ }
32
+
33
+ .mapp-canvas img {
34
+ max-width: none !important; /* 2021 interferes with pegman */
35
+ }
36
+
37
  /* 2019 */
38
  .mapp-layout input, .mapp-layout button, .mapp-layout select, .mapp-layout textarea, .mapp-layout p, .mapp-layout a {
39
  font-family: sans-serif;
157
  }
158
 
159
  .mapp-list-open .mapp-list {
160
+ width: 300px;
161
  }
162
 
163
  /* List toggle, left layout only */
165
  align-items: center;
166
  background-color: white;
167
  border: 1px solid lightgray;
168
+ cursor: pointer;
169
  display: flex;
170
  height: 40px;
171
  justify-content: center;
203
  }
204
 
205
  .mapp-list .mapp-item {
206
+ align-items: start;
207
  border-bottom: 1px solid lightgray;
208
+ display: flex;
209
  cursor: pointer;
210
  overflow: hidden;
211
+ padding: 10px;
212
+ }
213
+
214
+ .mapp-list .mapp-info {
215
+ align-items: center;
216
+ display: flex;
217
+ flex: 1;
218
+ }
219
+
220
+ .mapp-list .mapp-item .mapp-title {
221
+ overflow: hidden;
222
+ vertical-align: middle;
223
  }
224
 
225
  .mapp-list .mapp-item.mapp-selected {
234
  background-color: #f6f6f6;
235
  }
236
 
 
 
 
 
 
237
  .mapp-list .mapp-item .mapp-icon {
238
  border: none; /* 2011 */
239
  float: left;
240
  margin-right: 5px;
241
+ max-width: 32px !important; /* 2012 tries to override */
242
+ max-height: 32px;
243
  padding: 0; /* 2011 */
244
  }
245
 
246
+ /* Thumbnails in lists. Default is right */
247
+ .mapp-list .mapp-item .mapp-thumbnail {
248
+ max-width: 40%;
249
+ }
250
+
251
+ .mapp-list.mapp-thumb-top .mapp-thumbnail {
252
+ max-width: 100%;
253
+ padding-bottom: 10px;
254
+ }
255
+
256
+ .mapp-list.mapp-thumb-left .mapp-item {
257
+ flex-direction: row-reverse;
258
+ }
259
+
260
+ .mapp-list.mapp-thumb-top .mapp-item {
261
+ flex-direction: column;
262
+ }
263
+
264
+ .mapp-list.mapp-thumb-top .mapp-info {
265
+ padding-top: 10px;
266
+ }
267
+
268
+
269
  /*
270
  -----------------------------------------------------------------------------------
271
  Header
455
 
456
  - This applies only to Infoboxes! Google standard infoWindow / Leaflet popup use class .mapp-iw instead
457
 
458
+ .mapp-ib-wrapper - positioning element
459
+ .mapp-ib-content - box + tip
460
+ .mapp-ib - box only, with border
461
+ .mapp-iw | .mapp-iw-edit - infowindow (popup) or tooltip content
462
+ .mapp-ib-tip - triangle tip
463
 
464
  Classses applied to mapp-ib-wrapper:
465
+ type .mapp-ib-popup | .mapp-ib-edit | .mapp-open
466
 
467
  Classes applied to mapp-iw:
468
+ template name .mapp-map-popup | .mapp-mashup-popup
469
  -----------------------------------------------------------------------------------------------------------
470
  */
471
 
472
+ /* Positioning element: width prevents clipping, height must be zero or it'll obscure canvas */
473
  .mapp-ib-wrapper {
474
  display: none;
475
+ height: 0px;
 
 
 
476
  position: absolute;
477
+ width: 9999px;
478
  }
479
 
480
  .mapp-ib-wrapper.mapp-open {
481
  display: flex;
482
  }
483
 
484
+ .mapp-ib-content {
485
+ bottom: 0; left: 0;
486
+ display: flex;
487
+ flex-direction: column;
488
+ line-height: 0; /* Prevent font from distorting tip */
489
+ max-height: 300px;
490
+ max-width: 400px;
491
+ position: absolute;
492
+ z-index: 1005; /* Needed for Leaflet, above menu icon, below menu */
493
+ }
494
+
495
+ .mapp-ib-content .mapp-ib-flip {
496
  flex-direction: column-reverse;
497
  }
498
 
502
  :-moz-full-screen ~ .mapp-ib-wrapper { z-index: 10000000000; }
503
  :-ms-fullscreen ~ .mapp-ib-wrapper { z-index: 10000000000; }
504
 
 
505
  .mapp-ib {
506
  background-color: white;
 
507
  box-sizing: border-box;
508
  display: flex;
509
  flex-direction: column;
510
  line-height: normal;
511
  outline: none;
512
  overflow: hidden;
513
+ box-shadow: 0 0px 7px 0px rgba(0,0,0,0.20);
514
  }
515
 
516
  .mapp-ib-tip {
517
  display: flex;
518
  flex: 0 0 auto;
519
+ left: 50%;
520
  position: relative;
521
  width: 0;
522
  }
608
 
609
  /*
610
  -----------------------------------------------------------------------------------
611
+ Popup contents
612
  -----------------------------------------------------------------------------------
613
  */
614
 
615
  .mapp-iw {
616
  display: flex;
617
  flex-direction: column;
618
+ min-width: 200px;
619
  overflow: hidden;
620
  }
621
 
632
  .mapp-layout .mapp-iw * {
633
  color: black;
634
  line-height: normal;
635
+ }
636
+
637
+ .mapp-iw p {
638
+ margin: 0 !important;
639
  padding: 0;
640
  }
641
 
645
  max-width: 100%;
646
  }
647
 
648
+ /* Override theme link styles */
649
+ .mapp-iw a, .mapp-iw a:link, .mapp-iw a:active, .mapp-iw a:visited, .mapp-iw a:hover {
650
+ border: none !important;
651
+ box-shadow: none !important; /* 2016, 2017 */
652
+ color: #4272db !important;
653
+ margin: 0;
654
+ padding: 0;
655
+ text-decoration: none !important;
656
  }
657
 
658
+ .mapp-iw .mapp-info {
659
+ display: flex;
660
  flex: 1;
661
+ flex-direction: column;
662
+ overflow: hidden;
663
+ padding: 10px;
664
  }
665
 
666
  .mapp-iw .mapp-title {
667
  font-weight: bold;
 
668
  }
669
 
670
+ .mapp-iw .mapp-body {
671
+ flex: 1;
672
+ overflow: auto;
673
+ overflow-wrap: break-word;
 
 
 
 
674
  }
675
 
676
  .mapp-iw .mapp-links {
677
+ margin-top: 10px;
 
 
 
 
 
 
 
 
 
 
 
678
  }
679
 
680
+ /* Make directions look like a link */
681
+ .mapp-iw .mapp-dir {
682
+ color: #4272db;
683
  }
684
 
685
  /* Workarounds for IE, which doesn't like flex */
 
 
 
 
 
686
  .mapp-ie .mapp-iw {
687
  display: block;
688
  overflow: auto;
689
  }
690
 
691
+ .mapp-ie .mapp-iw .mapp-body {
692
+ flex: none;
693
+ overflow: none;
694
+ }
695
+
696
  /*
697
  -----------------------------------------------------------------------------------
698
+ Thumbnail styles
699
  -----------------------------------------------------------------------------------
700
  */
701
 
702
+ .mapp-iw .mapp-thumbnail {
703
+ overflow: hidden;
704
+ }
705
+
706
+ .mapp-iw .mapp-thumbnail a {
707
+ display: flex;
708
  }
709
 
710
+ /* Try to get consistent sizing for featured image */
711
+ .mapp-iw .mapp-thumbnail img {
712
+ max-width: 100% !important;
713
+ object-fit: cover;
714
  }
715
 
716
+ .mapp-iw.mapp-thumb-left {
717
+ flex-direction: row;
718
+ }
719
+
720
+ .mapp-iw.mapp-thumb-left .mapp-thumbnail {
721
+ max-width: 40%;
722
+ }
723
+
724
+ .mapp-iw.mapp-thumb-right {
725
+ flex-direction: row-reverse;
726
+ }
727
+
728
+ .mapp-iw.mapp-thumb-right .mapp-thumbnail {
729
+ max-width: 40%;
730
+ }
731
+
732
+ .mapp-iw.mapp-thumb-top {
733
+ flex-direction: column;
734
+ }
735
+
736
+ /* Trick to size the .mapp-info section to the featured image. Popups w/o an image will be min-size. */
737
+ .mapp-iw.mapp-thumb-top .mapp-info {
738
+ min-width: 100%;
739
+ width: 0;
740
+ }
741
 
742
  /*
743
  -----------------------------------------------------------------------------------
794
  .mapp-view-filters .mapp-filters {
795
  display: flex;
796
  flex-direction: column;
797
+ z-index: 10000;
798
  }
799
 
800
  .mapp-view-menu .mapp-menu {
870
 
871
  .mapp-marker {
872
  cursor: pointer;
873
+ filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.4));
874
  position: absolute;
875
  touch-action: none; /* For dragdrop */
876
  }
894
  /* Scale image */
895
  .mapp-marker-scale img {
896
  transform-origin: 50% 100%;
897
+ transform: scale(1.2);
898
  perspective: 1001px;
899
  }
900
 
947
  }
948
 
949
 
950
+ .mapp-directions .mapp-dir-toolbar {
951
  margin-top: 10px;
952
  }
953
 
954
+ .mapp-directions .mapp-dir-swap {
 
 
 
 
955
  display:inline-block;
956
  border: none !important; /* 2015 */
957
  text-align: center ;
966
  vertical-align: bottom;
967
  }
968
 
969
+ .mapp-directions .mapp-route {
970
  margin: 10px 0 0px 0 ;
971
  }
972
 
973
+ .mapp-directions .mapp-dir-saddr, .mapp-directions .mapp-dir-daddr {
974
  width: 80% ;
975
  line-height: normal ;
976
  }
977
 
978
+ .mapp-directions .mapp-dir-saddr {
979
  margin-bottom: 5px;
980
  }
981
 
982
+ .mapp-directions .mapp-dir-arrows {
983
  background: transparent url('../images/directions.png') no-repeat center center;
984
  background-position: -10px -489px;
985
  cursor: pointer;
1049
  border-bottom: 1px solid lightgray;
1050
  }
1051
 
1052
+
1053
  /*
1054
  -----------------------------------------------------------------------------------
1055
+ Mashup modal:
1056
+
1057
+ Use these styles with the 'mashup-modal.php' template.
1058
+
1059
+ .mapp-modal
1060
+ .mapp-modal-backdrop
1061
+ .mapp-modal-content
1062
+ .mapp-modal-close
1063
+ .mapp-modal-featured
1064
+ .mapp-modal-article
1065
+ .mapp-modal-body
1066
+ .mapp-modal-meta
1067
+
1068
  -----------------------------------------------------------------------------------
1069
  */
1070
+
1071
+ /* Prevent scrollbars when popup is open */
1072
+ body.mapp-modal-noscroll {
1073
+ overflow-y: hidden;
1074
+ }
1075
+
1076
+ .mapp-modal {
1077
+ position: fixed;
1078
+ top: 0; left: 0; bottom: 0; right: 0;
1079
+ z-index: 100000; /* WP adminbar is 99999 */
1080
+ }
1081
+
1082
+ .mapp-modal-title {
1083
+ margin-bottom: 15px;
1084
+ }
1085
+
1086
+ .mapp-modal-content {
1087
+ background-color: white;
1088
+ box-shadow: 5px 5px 10px #888;
1089
+ box-sizing: content-box;
1090
+ display: flex;
1091
+ flex-direction: row;
1092
+ height: 80vh;
1093
+ max-height: 900px;
1094
+ max-width: 1024px;
1095
+ position: fixed;
1096
+ top: 50%; left: 50%;
1097
+ transform: translate(-50%, -50%);
1098
+ width: 80vw;
1099
+ z-index: 1;
1100
+ }
1101
+
1102
+ /* Featured image displays on the left by default */
1103
+ .mapp-modal-featured {
1104
+ max-width: 40%;
1105
+ }
1106
+
1107
+ .mapp-modal-featured img {
1108
+ height: 100% !important;
1109
+ object-fit: cover;
1110
+ width: 100% !important;
1111
+ max-width: none !important;
1112
+ }
1113
+
1114
+ .mapp-modal-article {
1115
+ display: flex;
1116
+ flex: 1;
1117
+ flex-direction: column;
1118
+ overflow: auto;
1119
+ padding: 30px;
1120
  }
1121
 
1122
+ .mapp-modal-meta {
1123
+ display: flex;
1124
+ font-size: 12px;
1125
+ justify-content: space-between;
1126
+ margin-top: 50px;
1127
  }
1128
 
1129
+ /* Element to receive focus when modal opens (e.g. scrollable post content) */
1130
+ .mapp-modal-focus {
1131
+ outline: none;
1132
+ }
1133
+
1134
+ .mapp-modal-backdrop {
1135
+ background-color: black;
1136
+ opacity: 0.6;
1137
+ height: 100vh;
1138
+ width: 100vw;
1139
+ user-select: none;
1140
+ }
1141
+
1142
+ .mapp-modal-close {
1143
+ color: white;
1144
+ cursor: pointer;
1145
+ display: inline-block;
1146
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
1147
+ font-size: 36px;
1148
+ line-height: 36px;
1149
+ position: absolute;
1150
+ text-align: center;
1151
+ top: 5px; right: -40px;
1152
+ z-index: 1;
1153
+ }
1154
+
1155
+ .mapp-modal-close:hover {
1156
+ color: black;
1157
+ }
1158
+
1159
+ .mapp-modal-spinner-wrapper {
1160
+ transform: translate(-200%, -200%);
1161
+ width: 5px;
1162
+ height: 5px;
1163
+ }
1164
+
1165
+ /* https://www.w3schools.com/howto/howto_css_loader.asp */
1166
+ .mapp-modal-spinner {
1167
+ background: transparent url(../images/spinner-2x.gif) no-repeat center center;
1168
+ height: 40px;
1169
+ width: 40px;
1170
+ margin-left: 10px;
1171
+ margin-right: 10px;
1172
+ position: absolute;
1173
+ top: 50%; left: 50%;
1174
+ }
1175
+
1176
+
1177
  /*
1178
  -----------------------------------------------------------------------------------
1179
  Misc
1210
  }
1211
 
1212
  img.mapp-icon, .mapp-icon img {
 
 
 
1213
  box-shadow: none !important; /* 2012 applies box shadow to all images */
1214
+ filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.4));
1215
+ height: 32px;
1216
+ width: 32px;
1217
+ vertical-align: middle;
1218
  }
1219
 
1220
  .mapp-error {
1261
 
1262
  .mapp-button-submit {
1263
  color: #4285F4;
1264
+ }
css/mappress_admin.css CHANGED
@@ -1,7 +1,7 @@
1
 
2
  /*
3
  -----------------------------------------------------------------------------------
4
- Gutenberg block
5
  -----------------------------------------------------------------------------------
6
  */
7
  .mapp-gt .mapp-layout {
@@ -34,24 +34,13 @@
34
  Map library
35
  -----------------------------------------------------------------------------------
36
  */
37
- .mapp-library-wrapper {
38
- background-color: white;
39
- border: 1px solid lightgray;
40
- display: flex;
41
- flex-direction: column;
42
- height: 80vh;
43
- margin-top: 10px;
44
- width: 100%;
45
- }
46
-
47
- .mapp-library .mapp-edit-title input {
48
- margin: 5px;
49
- width: 240px;
50
- }
51
 
52
- .mapp-library h1 {
53
- display: inline;
54
- margin-right: 10px;
 
 
 
55
  }
56
 
57
  /* Hide the wp_editor instance used to load the editor scripts */
@@ -59,45 +48,52 @@
59
  display: none;
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
62
  /*
63
  -----------------------------------------------------------------------------------
64
  Picker / Editor Modal
65
  -----------------------------------------------------------------------------------
66
  */
67
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
- .mapp-pick-modal .components-modal__header, .mapp-edit-modal .components-modal__header {
70
  margin: 0;
71
  padding: 10px 20px;
72
  }
73
 
74
- .mapp-pick-modal .components-modal__content, .mapp-edit-modal .components-modal__content {
75
  background-color: white;
76
  font-size: 13px;
77
  padding: 0;
78
  }
79
 
80
  /* Override WP settings */
81
- .mapp-pick-modal a, .mapp-edit-modal a {
82
  text-decoration: none;
83
  }
84
 
85
- .mapp-pick-modal {
86
- height: 90vh;
87
- max-height: 625px;
88
- max-width: 450px;
89
- width: 90vw;
90
- }
91
-
92
- .mapp-edit-modal {
93
- max-height: none;
94
- max-width: none;
95
- height: 90vh;
96
- width: 90vw;
97
- }
98
-
99
  @media screen and (max-width: 600px) {
100
- .mapp-pick-modal {
101
  height: 100vh;
102
  max-height: none;
103
  max-width: none;
@@ -109,17 +105,70 @@
109
  },
110
  }
111
 
112
- .mapp-pick-modal .components-modal__content, .mapp-edit-modal .components-modal__content {
113
  display: flex;
114
  flex-direction: column;
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  /*
118
  -----------------------------------------------------------------------------------
119
- Map Picker
120
  -----------------------------------------------------------------------------------
121
  */
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  .mapp-pick-filter {
124
  border-bottom: 1px solid lightgray;
125
  padding: 10px 20px;
@@ -172,8 +221,16 @@
172
  top: 45%;
173
  }
174
 
 
 
 
 
 
 
 
175
  /* If header is placed outside scroll area, headings are offset by scrollbar width */
176
- .mapp-pick-header {
 
177
  background-color: white;
178
  border-bottom: 1px solid lightgray;
179
  display: flex;
@@ -183,47 +240,50 @@
183
  z-index: 1;
184
  }
185
 
186
- .mapp-pick-items {
187
- flex: 1;
188
- overflow: auto;
189
  }
190
 
191
  .mapp-pick-item {
192
- align-items: center;
193
  border-bottom: 1px solid lightgray;
194
- cursor: pointer;
195
  display: flex;
196
- overflow: hidden;
197
- padding: 5px 20px;
198
  text-overflow: ellipsis;
199
  }
200
 
 
 
 
 
 
 
201
  .mapp-pick-item.mapp-selected {
202
  background-color: #f6f6f6;
203
- font-weight: 500;
204
  }
205
 
206
  .mapp-pick-item:hover {
207
  background-color: #f6f6f6;
208
  }
209
 
210
- .mapp-pick-col-map-title, .mapp-pick-col-post-title, .mapp-pick-col-mapid {
 
211
  overflow: hidden;
212
  text-overflow: ellipsis;
213
  white-space: nowrap;
214
  }
215
 
216
- .mapp-pick-col-map-title {
217
- width: 35%;
 
218
  }
219
 
220
- .mapp-pick-col-post-title {
221
- width: 35%;
222
  }
223
 
224
- .mapp-pick-col-post-title a {
225
- font-weight: normal;
226
- text-decoration: none;
227
  }
228
 
229
  .mapp-pick-col-mapid {
@@ -231,26 +291,25 @@
231
  width: 15%;
232
  }
233
 
234
- .mapp-pick-col-actions {
235
- display: flex;
236
- font-weight: normal;
237
- white-space: nowrap;
238
- width: 100px;
239
  }
240
 
241
- .mapp-pick-col-actions button {
242
- background: none;
243
- border: none;
244
- padding: 4px !important;
245
- min-width: auto !important;
246
  }
247
 
248
- .mapp-pick-col-actions .dashicon {
249
- color: inherit;
 
 
250
  }
251
 
252
- .mapp-pick-col-actions .dashicon:hover {
253
- color: #007cba;
254
  }
255
 
256
 
@@ -262,13 +321,54 @@
262
 
263
  .mapp-edit {
264
  display: flex;
 
265
  flex-direction: column;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  flex: 1;
267
  overflow: hidden;
268
  }
269
 
270
- .mapp-edit .mapp-gt {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  flex: 1;
 
272
  }
273
 
274
  .mapp-edit .mapp-layout {
@@ -284,16 +384,6 @@
284
  padding-bottom: 0px;
285
  }
286
 
287
- .mapp-edit-title input {
288
- cursor: pointer;
289
- font-size: 16px !important;
290
- margin-left: -10px;
291
- }
292
-
293
- .mapp-edit-title input:not(:hover) {
294
- border: 1px solid white !important;
295
- }
296
-
297
  .mapp-edit-toolbar {
298
  border-top: 1px solid lightgray;
299
  padding: 5px 20px;
@@ -341,6 +431,11 @@
341
  align-items: baseline;
342
  }
343
 
 
 
 
 
 
344
  /* WP sets different (8px) margin-bottom only on last child in panel row */
345
  .block-editor-block-inspector .mapp-gt-inspector .components-base-control:last-child {
346
  margin-bottom: 24px;
@@ -376,9 +471,10 @@
376
  white-space: nowrap;
377
  }
378
 
379
- .mapp-settings-dims-select {
380
- display: block !important; /* GT tries to set flex */
381
- min-width: 7em; /* WP's custom arrow obscures values */
 
382
  }
383
 
384
  .mapp-settings-dims-custom input {
@@ -389,15 +485,13 @@
389
  margin-bottom: 0;
390
  }
391
 
392
- .mapp-settings-poilist {
393
- white-space: nowrap;
394
  }
395
 
396
- .mapp-settings-poilist .components-radio-control__option {
397
- display: inline-block;
398
- }
399
- .mapp-settings-poilist .components-base-control__label {
400
- display: inline;
401
  }
402
 
403
  .mapp-settings-viewport-status {
@@ -405,6 +499,12 @@
405
  margin-left: 10px;
406
  }
407
 
 
 
 
 
 
 
408
  /*
409
  -----------------------------------------------------------------------------------
410
  Mashup query builder
@@ -465,960 +565,960 @@ button.mapp-query-refresh {
465
  flex: 1;
466
  }
467
 
468
- /*
469
- -----------------------------------------------------------------------------------
470
- Classic (tinyMCE) editor
471
- -----------------------------------------------------------------------------------
472
- */
473
- /*
474
- -----------------------------------------------------------------------------------
475
- Metaboxes
476
- -----------------------------------------------------------------------------------
477
- */
478
- #mappress.postbox h1 {
479
- display: inline-block;
480
- margin-right: 10px;
481
- }
482
 
483
  /*
484
  -----------------------------------------------------------------------------------
485
- Classic map picker
486
  -----------------------------------------------------------------------------------
487
  */
488
 
489
- .mapp-mce {
490
- background-color: white;
 
 
 
 
 
 
 
 
491
  display: flex;
 
492
  flex-direction: column;
493
- height: 100%;
494
- overflow: hidden;
495
  }
496
 
497
- /* Override WP */
498
- .mapp-mce .button {
499
- margin: 0;
500
  }
501
 
502
- .mapp-mce h1 {
503
- font-size: 16px;
504
- margin: 0;
505
- padding: 10px 0;
506
  }
507
 
508
- .mapp-mce .spinner {
509
- visibility: visible;
 
 
510
  }
511
 
 
 
 
512
 
513
- .mapp-mce-header {
514
  align-items: center;
515
- border-bottom: 1px solid lightgray;
516
  display: flex;
517
  justify-content: space-between;
518
- padding: 10px 20px;
519
- }
520
-
521
- .mapp-mce-header input.mapp-mce-title {
522
- border: none;
523
- color: #32373c;
524
- cursor: pointer;
525
- font-size: 16px !important;
526
- font-weight: 600;
527
- min-width: 150px !important;
528
  }
529
 
530
- .mapp-mce-header-left {
531
- display: flex;
532
- align-items: center;
533
  }
534
 
535
- .mapp-mce-header-left .button {
536
- margin-left: 10px;
537
  }
538
 
539
- /* Override WP settings */
540
- .mapp-mce-list-panel {
541
- display: none;
542
  }
543
 
544
- .mapp-mce-list-panel.mapp-open {
545
  display: flex;
546
- flex-direction: column;
547
  flex: 1;
548
- overflow: hidden;
549
  }
550
 
551
- .mapp-mce-list {
552
- background-color: white;
553
- flex: 1;
554
- overflow: auto;
555
  }
556
 
557
- .mapp-mce-filter-block {
558
- border-bottom: 1px solid lightgray;
559
- display: flex;
560
- flex-direction: column;
561
- padding: 10px 20px;
562
  }
563
 
564
- .mapp-mce-search-block {
565
  display: flex;
566
- align-items: center;
567
- }
568
-
569
- .mapp-mce-search {
570
- margin-left: 10px;
571
  }
572
 
573
- .mapp-mce-types-block {
574
  align-items: center;
575
  display: flex;
576
- margin-top: 10px;
577
  }
578
 
579
- .mapp-mce-types-block label {
580
- margin-right: 10px;
581
  }
582
 
583
- .mapp-mce .spinner {
584
- display: none;
585
- }
586
 
587
- .mapp-mce-list-header {
588
- background-color: white;
589
- border-bottom: 1px solid lightgray;
590
- display: flex;
591
- padding: 10px 20px;
592
- position: sticky;
593
- top: 0;
594
- z-index: 1;
595
- }
596
 
597
- .mapp-mce-item {
598
- border-bottom: 1px solid lightgray;
 
 
599
  cursor: pointer;
600
  display: flex;
601
- overflow: hidden;
602
- padding: 10px 20px;
603
- }
604
-
605
- .mapp-mce-item.mapp-selected {
606
- background-color: #f6f6f6;
607
- font-weight: 600;
608
  }
609
 
610
- .mapp-mce-item:hover {
611
- background-color: #f6f6f6;
 
 
 
612
  }
613
 
614
- .mapp-mce-col-map-title {
615
- overflow: hidden;
616
- text-overflow: ellipsis;
617
- white-space: nowrap;
618
- width: 35%;
619
  }
620
 
621
- .mapp-mce-col-post-title {
622
- overflow: hidden;
623
- text-overflow: ellipsis;
624
- white-space: nowrap;
625
- width: 35%;
626
  }
627
 
628
- .mapp-mce-col-post-title a {
629
- font-weight: normal;
630
- text-decoration: none;
 
 
 
 
 
 
 
 
631
  }
632
 
633
- .mapp-mce-col-mapid {
634
- white-space: nowrap;
635
- width: 15%;
 
636
  }
637
 
638
- .mapp-mce-col-actions {
639
- font-weight: normal;
640
- min-width: 120px;
 
641
  white-space: nowrap;
642
- width: 15%;
643
  }
644
 
645
- .mapp-mce-col-actions a {
646
- text-decoration: none;
647
  }
648
 
649
- .mapp-mce-list-footer {
650
- text-align: center;
651
- padding: 40px;
652
  }
653
 
654
- /*
655
- -----------------------------------------------------------------------------------
656
- Classic map editor
657
- -----------------------------------------------------------------------------------
658
- */
659
-
660
- .mapp-mce-edit-panel {
661
- display: none;
662
  }
663
 
664
- .mapp-mce-edit-panel.mapp-open {
665
- display: flex;
666
  flex: 1;
667
- flex-direction: column;
668
  }
669
 
670
- .mapp-mce-settings {
671
- align-items: center;
672
- border-bottom: 1px solid lightgray;
673
  display: flex;
 
674
  flex-wrap: wrap;
675
- justify-content: space-between;
676
- padding: 10px 20px;
677
  }
678
 
679
- .mapp-mce-setting {
680
- align-items: center;
681
- display: flex;
682
- }
683
-
684
- .mapp-mce-label {
685
- width: 65px;
686
- }
687
-
688
- .mapp-mce-custom {
689
  white-space: nowrap;
690
  }
691
 
692
- .mapp-mce-size {
693
- text-decoration: none;
694
- }
695
-
696
- .mapp-mce-width {
697
- margin-left: 5px;
698
  }
699
 
700
- .mapp-mce-toolbar {
701
- align-items: center;
702
- display: flex;
703
- border-top: 1px solid lightgray;
704
- padding: 10px 20px;
705
  }
706
 
707
- .mapp-mce-viewport-block {
708
  flex: 1;
709
- text-align: right;
 
 
710
  }
711
 
712
- .mapp-mce-toolbar .button {
713
- margin-right: 10px;
714
  }
715
 
716
  /*
717
  -----------------------------------------------------------------------------------
718
- POI editor
719
  -----------------------------------------------------------------------------------
720
  */
721
 
722
- .mapp-ib-wrapper.mapp-ib-edit {
723
- height: 100%;
724
- max-width: 550px;
725
- width: 100%;
726
  }
727
 
728
- .mapp-ib-wrapper.mapp-ib-edit .mapp-ib {
729
- flex: 1;
 
730
  }
731
 
732
- .mapp-iw-edit {
733
  display: flex;
734
- flex: 1;
735
- flex-direction: column;
736
- overflow: auto;
737
  padding: 10px;
738
  }
739
 
740
- .mapp-poi-header {
741
- display: flex;
742
- align-items: center;
743
  }
744
 
745
- .mapp-poi-header .mapp-poi-title {
746
  flex: 1;
747
- font-weight: bold;
748
- min-width: 0;
749
- }
750
-
751
- /* Set fixed icon size, otherwise Leaflet will incorrectly position the popup */
752
- .mapp-poi-header img.mapp-icon {
753
- width: 24px;
754
- height: 24px;
755
- }
756
-
757
- .mapp-iw-edit [data-mapp-iconpicker], .mapp-iw-edit [data-mapp-colorpicker] {
758
- margin-left: 5px !important;
759
- }
760
-
761
- .mapp-poi-url {
762
- width: 100%;
763
- }
764
-
765
- .mapp-poi-editor-toolbar {
766
- align-items: center;
767
- display: flex;
768
- justify-content: space-between;
769
- padding: 3px 0;
770
- }
771
-
772
- .mapp-poi-toolbar button {
773
- margin-right: 5px;
774
  }
775
 
776
- .mapp-poi-visual, .mapp-poi-html {
777
- cursor: pointer;
778
- }
779
-
780
- .mapp-poi-visual.mapp-active, .mapp-poi-html.mapp-active {
781
- font-weight: bold;
782
  }
783
 
784
- .mapp-poi-main {
785
- display: flex;
786
- flex: 1;
787
- overflow-wrap: break-word;
788
- }
789
 
790
- .mapp-poi-main textarea {
 
 
 
 
 
 
 
 
 
791
  width: 100%;
 
792
  }
793
 
794
- /* TinyMCE by default sizes width 100% which obscures right edge */
795
- .mapp-poi-main .mce-tinymce {
796
- border: 1px solid lightgray;
797
- /* width: auto !important;*/
798
- }
799
-
800
- .mapp-poi-main .mce-tinymce, .mapp-poi-main .mce-stack-layout, .mapp-poi-main .mce-edit-area{
801
- display: flex;
802
- flex-direction: column;
803
- flex: 1;
804
- overflow: hidden;
805
- width: auto !important;
806
- }
807
-
808
- .mapp-poi-toolbar {
809
- align-items: center;
810
- display: flex;
811
- margin-top: 5px;
812
- }
813
-
814
- .mapp-poi-toolbar button {
815
- margin-right: 3px !important;
816
  }
817
 
818
  /*
819
  -----------------------------------------------------------------------------------
820
- Plugin settings screen
821
  -----------------------------------------------------------------------------------
822
  */
823
 
824
- .mapp-settings-screen #mapp0-layout {
825
- max-width: 600px;
826
- }
827
-
828
- .mapp-settings-screen label {
829
- margin-right: 10px;
830
- white-space: nowrap;
831
  }
832
 
833
- .mapp-settings-header {
834
  align-items: baseline;
835
  background-color: #f0f0f0;
836
  border-bottom: 1px solid gray;
837
  display: flex;
 
838
  justify-content: space-between;
839
  top: 30px;
840
  padding: 0px 10px 10px 10px;
841
  }
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
 
856
- .mapp-settings-toolbar {
857
  background-color: #f0f0f0;
858
  border-top: 1px solid gray;
859
  bottom: 0;
860
  padding: 10px;
861
  position: sticky;
 
862
  }
863
 
864
- /* Hidden submit buttons to use as form default */
865
- .mapp-settings-hidden-toolbar {
866
- height: 0;
867
- overflow: hidden;
868
- }
869
 
870
- /* Simulate postboxes */
871
- .mapp-settings-screen h2 {
872
  background-color: white;
873
- border-bottom: 1px solid #eee;
 
 
 
 
 
 
874
  font-size: 14px;
875
- margin-bottom: 0;
876
- padding: 8px 12px 8px 12px;
 
 
877
  }
878
 
879
- .mapp-settings-screen .form-table {
880
- margin-top: 0;
881
  }
882
 
883
- .mapp-settings-screen .form-table th {
884
- background-color: white;
885
- padding: 16px 12px 16px 12px;
886
  }
887
 
888
- .mapp-settings-screen .form-table td {
889
- background-color: white;
890
- padding: 16px 12px 16px 12px;
 
 
 
 
891
  }
892
 
893
- .mapp-settings-screen .button {
 
894
  vertical-align: middle;
895
  }
896
 
897
- /* MapPress tables */
898
- .mapp-settings-screen .form-table table {
899
- border: 1px solid #dfdfdf;
900
- border-collapse: collapse;
901
- height: auto;
902
- margin-top: 5px;
903
- width: auto;
904
  }
905
 
906
- .mapp-settings-screen .form-table table th {
907
- font-weight: bold;
908
- background-color: rgb(241, 241, 241);
909
- width: auto;
910
- height: auto;
911
- border-bottom: 1px solid lightgray;
912
- padding: 5px;
913
  }
914
 
915
- .mapp-settings-screen .form-table table td {
916
- width: auto;
917
- height: auto;
918
- border-bottom: 1px solid lightgray;
919
- margin: 0;
920
- vertical-align: middle;
921
- padding: 5px;
 
 
 
922
  }
923
 
924
- a.mapp-help {
925
- display: inline-block;
926
- margin-left: 2px;
 
 
 
 
 
 
 
927
  text-decoration: none;
928
  }
929
 
 
 
 
 
 
 
 
930
 
931
- /* Sort handles */
932
- .mapp-handle {
933
- cursor: move;
934
  }
935
 
936
- .mapp-yes {
937
  vertical-align: middle;
938
  color:green;
939
  }
940
 
941
- .mapp-no {
942
  vertical-align: middle;
943
  color:red;
944
  }
945
 
946
- a.mapp-check-account {
947
  margin-left: 10px;
 
 
 
 
948
  text-decoration: none;
949
  }
950
 
 
 
 
 
951
  /*
952
  -----------------------------------------------------------------------------------
953
- Multiselect
954
  -----------------------------------------------------------------------------------
955
  */
 
 
 
 
956
 
957
- .mapp-select {}
 
 
 
958
 
959
- .mapp-select-input {
960
  border: 1px solid lightgray;
961
  cursor: pointer;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
962
  display: flex;
963
- line-height: normal;
964
- padding: 5px;
965
  }
966
 
967
- @media only screen and (max-width: 782px) {
968
- .mapp-select-input {
969
- min-height: 40px;
970
- width: 100%;
971
- }
 
 
 
 
 
972
  }
973
 
974
- .mapp-select-input .dashicons {
975
- font-size: 16px;
976
- height: 16px;
977
- width: 16px;
 
 
 
978
  }
979
 
980
- .mapp-select-dropdown-wrapper {
981
- position: relative;
 
 
982
  }
983
 
984
- .mapp-select-dropdown {
985
- background-color: white;
986
- border-radius: 4px;
987
- box-shadow: 0 5px 15px rgba(0,0,0,.2);
988
- cursor: pointer;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
989
  display: flex;
990
  flex-direction: column;
991
- max-height: 150px;
992
- position: absolute;
993
- top: 0; left: 0; right: 0;
994
- z-index: 100000;
995
  }
996
 
997
- .mapp-select-dropdown-list {
 
 
 
 
 
 
 
 
 
 
 
998
  flex: 1;
999
- overflow: auto;
1000
- padding: 5px;
1001
  }
1002
 
1003
- .mapp-select-dropdown-item {
 
 
 
 
1004
  overflow: hidden;
1005
- padding: 5px;
1006
- text-overflow : ellipsis;
1007
- white-space: nowrap;
1008
  }
1009
 
1010
- .mapp-select-dropdown-item:hover {
1011
- background-color: #eee;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1012
  }
1013
 
1014
- .mapp-select .components-base-control, .mapp-select .components-base-control__field {
1015
- margin-bottom: 0 !important;
 
 
 
 
 
1016
  }
1017
 
1018
- /* WP checkboxcontrol has a bug: it doubles click events on any parent, so we can't use parent div, and it also doesn't make event object available; So, make checkbox full width instead */
1019
- .mapp-select-dropdown-item .components-base-control__field {
1020
- display: flex;
 
 
1021
  }
1022
 
1023
- .mapp-select-dropdown-item label {
 
1024
  flex: 1;
 
 
 
1025
  }
1026
 
1027
- .mapp-select-tokens {
 
1028
  display: flex;
1029
  flex: 1;
1030
  flex-wrap: wrap;
 
1031
  }
1032
 
1033
- .mapp-select-token {
1034
- background-color: #ddd;
1035
- margin: 2px;
1036
- overflow: hidden;
1037
- padding: 3px;
1038
- text-overflow: ellipsis;
1039
- white-space: nowrap;
 
 
 
 
 
1040
  }
1041
 
1042
- .mapp-select-token-delete {
1043
- padding: 2px;
1044
  }
1045
 
1046
- .mapp-select-token-delete:hover {
1047
- color: red;
1048
  }
1049
 
1050
- .mapp-select-values {
1051
- flex: 1;
1052
- overflow: hidden;
1053
- text-overflow: ellipsis;
1054
- white-space: nowrap;
1055
  }
1056
 
1057
- .mapp-select-filter {
 
1058
  padding: 5px;
1059
  }
1060
 
1061
- /*
1062
- -----------------------------------------------------------------------------------
1063
- Post attachment control + popup
1064
- -----------------------------------------------------------------------------------
1065
- */
1066
 
1067
- .mapp-attach-control {
1068
- max-width: 360px;
1069
- width: 90vw;
1070
  }
1071
 
1072
- .mapp-attach-items {
1073
- max-height: 200px;
1074
- overflow: auto;
1075
  }
1076
 
1077
- .mapp-attach-item {
 
 
 
 
 
 
1078
  display: flex;
1079
- flex-direction: row;
1080
- padding: 10px;
 
1081
  }
1082
 
1083
- .mapp-attach-item:hover {
1084
- background-color: #ddd;
 
 
1085
  }
1086
 
1087
- .mapp-attach-item-title {
 
1088
  flex: 1;
 
1089
  }
1090
 
1091
- .mapp-attach-item-type {
1092
- background-color: #f0f0f0;
1093
- padding: 3px 8px;
1094
  }
1095
 
 
 
 
1096
 
1097
- /*
1098
- -----------------------------------------------------------------------------------
1099
- Template Editor
1100
- -----------------------------------------------------------------------------------
1101
- */
1102
 
1103
- .mapp-tp-detail {
1104
- height: 600px;
1105
- width: 800px;
1106
- max-width: 90%;
1107
- max-height: 90%;
 
 
 
 
 
1108
  padding: 10px;
1109
  }
1110
 
1111
- .mapp-tp-detail .mapp-tp-name {
1112
- font-weight: bold;
1113
- margin: 5px 0 5px 0;
1114
- text-transform: uppercase;
1115
  }
1116
 
1117
- .mapp-tp-detail .mapp-tp-path {
1118
- font-size: 12px;
1119
- font-style: italic;
1120
- margin-bottom: 5px;
1121
  }
1122
 
1123
- .mapp-tp-detail code {
1124
- border: 1px solid gray;
1125
- margin-right: 10px;
 
1126
  }
1127
 
1128
- .mapp-tp-detail .mapp-tp-toolbar {
1129
- align-items: center;
1130
- border-top: 1px solid lightgray;
1131
- display: flex;
1132
- margin-top: 5px;
1133
- padding: 5px;
1134
  }
1135
 
1136
- .mapp-tp-detail .mapp-tp-toolbar input.button {
1137
- margin-right: 4px;
1138
  }
1139
 
1140
- .mapp-tp-detail .mapp-tab-standard .CodeMirror {
1141
- background: #f7f7f7;
1142
- height: auto;
1143
- position: absolute;
1144
- top: 100px; bottom: 50px; left: 5px; right: 5px;
1145
  }
1146
 
1147
- .mapp-tp-detail .mapp-tab-content .CodeMirror {
1148
- position: absolute;
1149
- top: 150px; bottom: 50px; left: 5px; right: 5px;
1150
  }
1151
 
1152
- .mapp-tp-detail .mapp-tp-toolbar {
1153
- position: absolute;
1154
- bottom: 5px; left: 5px; right: 5px;
1155
  }
1156
 
1157
  /*
1158
  -----------------------------------------------------------------------------------
1159
- Icon Editor
1160
  -----------------------------------------------------------------------------------
1161
  */
1162
 
1163
- .mapp-icon-editor {
1164
- cursor: default;
 
 
 
 
 
 
 
 
 
 
 
1165
  display: flex;
1166
  flex-direction: column;
1167
- height: 70vh;
1168
- max-width: 500px;
1169
- padding: 20px;
1170
- width: 70vh;;
1171
  }
1172
 
1173
- .mapp-icon-editor-wrapper {
1174
  border: 1px solid lightgray;
1175
- flex: 1;
1176
- overflow: auto;
 
1177
  }
1178
 
1179
- .mapp-icon-editor-toolbar {
1180
- padding-top: 20px;
1181
  }
1182
 
1183
- ul.mapp-icon-editor-list {
1184
- display: table;
1185
- margin: 0;
1186
- padding: 0;
1187
- width: 100%;
1188
  }
1189
 
1190
- .mapp-icon-editor-list li {
1191
- display: table-row;
 
 
1192
  }
1193
 
1194
- .mapp-icon-editor-list li:hover {
1195
- background-color: #fafafa;
 
 
1196
  }
1197
 
1198
- .mapp-icon-editor-list span {
1199
  border-bottom: 1px solid lightgray;
1200
- display: table-cell;
1201
- overflow: hidden;
1202
- padding: 5px 15px;
1203
- text-overflow: ellipsis;
1204
  }
1205
 
1206
- .mapp-icon-editor-list img {
 
 
1207
  margin-right: 10px;
1208
  }
1209
 
1210
- .mapp-icon-editor .dashicons {
1211
- color: #d0d0d0;
 
1212
  }
1213
 
1214
- .mapp-icon-editor .dashicons:hover {
1215
- color: black;
1216
  }
1217
 
1218
- .mapp-icon-editor .spinner {
1219
- float: none;
1220
- visibility: visible;
1221
  }
1222
 
1223
- .mapp-icon-editor-msg {
1224
- margin-top: 50px;
1225
- text-align: center;
1226
  }
1227
 
1228
 
1229
- /*
1230
- -----------------------------------------------------------------------------------
1231
- Tabs
1232
- -----------------------------------------------------------------------------------
1233
- */
1234
-
1235
- .mapp-tabs .mapp-tab-label {
1236
- background-color: white;
1237
- border-left: 1px solid lightgray;
1238
- border-right: 1px solid lightgray;
1239
  border-top: 1px solid lightgray;
1240
- cursor: pointer;
1241
- display: inline-block;
1242
- margin: 0;
1243
- padding: 10px;
1244
- position: relative;
1245
- top: 1px;
1246
- z-index: 1;
1247
- }
1248
- .mapp-tabs .mapp-tab-label.mapp-active {
1249
- border-bottom: 1px solid white;
1250
- font-weight: bold;
1251
  }
1252
 
1253
- .mapp-tabs .mapp-tab {
1254
- background-color: white;
1255
- border-top: 1px solid lightgray;
1256
- clear: both;
1257
- display: none;
1258
- padding: 10px;
1259
  }
1260
 
1261
- .mapp-tabs .mapp-tab.mapp-active {
1262
- display: block;
1263
  }
1264
 
 
1265
  /*
1266
  -----------------------------------------------------------------------------------
1267
- Popup
1268
  -----------------------------------------------------------------------------------
1269
  */
1270
 
1271
- /* Keep autocomplete above */
1272
- .pac-container {
1273
- z-index: 100002;
1274
- }
1275
-
1276
- .mapp-popup {
1277
  background-color: white;
1278
  border: 1px solid lightgray;
1279
- box-shadow: 5px 5px 10px #888;
1280
- box-sizing: content-box;
1281
- display: inline-block;
1282
- z-index: 100005; /* Keep above popup-max */
1283
- }
1284
-
1285
- /* Center modals */
1286
- .mapp-popup-modal {
1287
- position: fixed;
1288
- left: 50%;
1289
- top: 50%;
1290
- transform: translate(-50%, -50%);
1291
- z-index: 100002;
1292
- }
1293
-
1294
- .mapp-popup-max {
1295
- left: 5%;
1296
- right: 5%;
1297
- top: 5%;
1298
- bottom: 5%;
1299
- transform: none;
1300
- }
1301
-
1302
- @media only screen and (max-width: 600px) {
1303
- .mapp-popup-max {
1304
- left: 0;
1305
- right: 0;
1306
- top: 0;
1307
- bottom: 0;
1308
- }
1309
- }
1310
-
1311
- /* Prevent scrollbars on body when popup is open */
1312
- body.mapp-popup-noscroll {
1313
- overflow: hidden;
1314
  }
1315
 
1316
- .mapp-popup-backdrop {
1317
- background-color: black;
1318
- display: none;
1319
- opacity: 0.8;
1320
- position: fixed;
1321
- top: 0; right: 0; bottom: 0; left : 0;
1322
- user-select: none;
1323
- z-index: 100000; /* WP adminbar is 99999 */
1324
  }
1325
 
1326
- /*
1327
- -----------------------------------------------------------------------------------
1328
- Icon Picker
1329
- -----------------------------------------------------------------------------------
1330
- */
1331
-
1332
- .mapp-iconpicker {
1333
  padding: 5px;
1334
- width: 260px;
1335
  }
1336
 
1337
- img.mapp-iconpicker-toggle {
1338
- max-width: 24px !important;
1339
- max-height: 24px !important;
1340
  }
1341
 
1342
- .mapp-iconpicker-wrapper {
1343
- height: 210px;
1344
- overflow: auto;
1345
- padding: 5px;
1346
- user-select: none;
1347
  }
1348
 
1349
- .mapp-iconpicker-toolbar {
1350
- padding: 5px 5px 0 5px;
1351
- border-top: 1px solid lightgray;
 
 
 
 
1352
  }
1353
 
1354
- .mapp-iconpicker .mapp-icon, .mapp-iconpicker .mapp-icon-sprite {
1355
- border: 2px solid white;
1356
- user-select: none;
1357
  margin: 0;
1358
  }
1359
 
1360
- .mapp-iconpicker .mapp-icon:hover, .mapp-iconpicker .mapp-icon.mapp-selected, .mapp-iconpicker .mapp-icon-sprite:hover, .mapp-iconpicker .mapp-icon-sprite.mapp-selected {
1361
- border: 2px solid blue;
1362
- }
1363
-
1364
- .mapp-iconpicker .mapp-icon-sprite { display: inline-block; background: transparent url('../images/icons.png') no-repeat; width: 24px; height: 24px; }
1365
-
1366
- /*
1367
- -----------------------------------------------------------------------------------
1368
- Color Picker
1369
- -----------------------------------------------------------------------------------
1370
- */
1371
-
1372
- .mapp-colorpicker {
1373
- padding: 5px;
1374
- width: 260px;
1375
- max-height: 250px;
1376
- }
1377
-
1378
- span.mapp-colorpicker-toggle {
1379
- border: 1px solid lightgray;
1380
- cursor: pointer;
1381
- display: inline-block;
1382
- height: 20px;
1383
- margin: 1px;
1384
- vertical-align: middle;
1385
- width: 20px;
1386
  }
1387
 
1388
- .mapp-colorpicker span[data-mapp-color] {
1389
- border: 2px solid lightgray;
1390
- display: inline-block;
1391
- height: 15px;
1392
- line-height: 1;
1393
- margin: 1px;
1394
- width: 15px;
1395
  }
1396
 
1397
- .mapp-colorpicker .mapp-color:hover, .mapp-colorpicker .mapp-color.mapp-selected {
1398
- border: 2px solid black;
1399
- }
1400
 
1401
  /*
1402
  -----------------------------------------------------------------------------------
1403
  Misc
1404
  -----------------------------------------------------------------------------------
1405
  */
1406
- #mappress .mapp-support {
1407
- border-bottom: 1px solid lightgray;
1408
- padding-bottom: 10px;
1409
- }
1410
 
1411
- #mappress .mapp-support h1 {
1412
- padding: 0;
 
 
 
 
 
1413
  }
1414
 
1415
- .mapp-support .button, .mapp-support .button:active {
1416
- margin-left: 10px;
1417
- vertical-align: middle;
 
1418
  }
1419
 
1420
- .mapp-grid .mapp-close {
1421
- position: static;
1422
  }
1423
 
1424
  .mapp-review p {
@@ -1435,6 +1535,5 @@ span.mapp-colorpicker-toggle {
1435
  }
1436
 
1437
  .mapp-review-options a:last-of-type {
1438
- color: #dc3232;
1439
  margin-left: 10px !important;
1440
- }
1
 
2
  /*
3
  -----------------------------------------------------------------------------------
4
+ Map block
5
  -----------------------------------------------------------------------------------
6
  */
7
  .mapp-gt .mapp-layout {
34
  Map library
35
  -----------------------------------------------------------------------------------
36
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
+ .mapp-library {
39
+ border: 1px solid gray;
40
+ display: flex;
41
+ height: calc(100vh - 125px);
42
+ margin-right: 20px;
43
+ margin-top: 20px;
44
  }
45
 
46
  /* Hide the wp_editor instance used to load the editor scripts */
48
  display: none;
49
  }
50
 
51
+ /*
52
+ -----------------------------------------------------------------------------------
53
+ Map MCE
54
+ -----------------------------------------------------------------------------------
55
+ */
56
+
57
+ .mapp-mce {
58
+ display: inline;
59
+ }
60
+
61
  /*
62
  -----------------------------------------------------------------------------------
63
  Picker / Editor Modal
64
  -----------------------------------------------------------------------------------
65
  */
66
 
67
+ .mapp-gt-modal {
68
+ max-height: none;
69
+ max-width: none;
70
+ height: 90vh;
71
+ width: 90vw;
72
+ }
73
+
74
+ /* Box sizing is set in GT but not in MCE, so force it here */
75
+ .mapp-gt-modal *, .mapp-gt-modal :before, .mapp-gt-modal :after {
76
+ box-sizing: border-box;
77
+ }
78
 
79
+ .mapp-gt-modal .components-modal__header {
80
  margin: 0;
81
  padding: 10px 20px;
82
  }
83
 
84
+ .mapp-gt-modal .components-modal__content {
85
  background-color: white;
86
  font-size: 13px;
87
  padding: 0;
88
  }
89
 
90
  /* Override WP settings */
91
+ .mapp-gt-modal a {
92
  text-decoration: none;
93
  }
94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  @media screen and (max-width: 600px) {
96
+ .mapp-gt-modal {
97
  height: 100vh;
98
  max-height: none;
99
  max-width: none;
105
  },
106
  }
107
 
108
+ .mapp-gt-modal .components-modal__content {
109
  display: flex;
110
  flex-direction: column;
111
  }
112
 
113
+ /* Custom titles */
114
+ .mapp-gt-modal .components-modal__header { display: none; }
115
+
116
+ .mapp-gt-modal-header {
117
+ border-bottom: 1px solid lightgray;
118
+ display: flex;
119
+ height: 60px;
120
+ justify-content: space-between;
121
+ padding: 10px 20px;
122
+ }
123
+
124
+ .mapp-gt-modal-header h1 {
125
+ font-size: 16px;
126
+ }
127
+
128
+ .mapp-gt-modal-header button {
129
+ margin-left: 20px;
130
+ }
131
+
132
+ .mapp-gt-modal-header-title {
133
+ display: flex;
134
+ align-items: center;
135
+ }
136
+
137
+
138
  /*
139
  -----------------------------------------------------------------------------------
140
+ Map picker
141
  -----------------------------------------------------------------------------------
142
  */
143
 
144
+ /* Fill container when displayed in library */
145
+ .mapp-library .mapp-pick {
146
+ display: flex;
147
+ flex: 1;
148
+ position: relative;
149
+ }
150
+
151
+ /* Toggling */
152
+ .mapp-list-panel, .mapp-edit-panel {
153
+ background-color: white;
154
+ display: flex;
155
+ flex-direction: column;
156
+ flex: 1;
157
+ overflow: hidden;
158
+ }
159
+
160
+ .mapp-edit-panel .components-spinner {
161
+ position: relative;
162
+ top: 50%; left: 50%;
163
+ transform: translateX(-50%) translateY(-50%);
164
+ }
165
+
166
+ /* In modal (not in library) hide list when editing */
167
+ .mapp-gt-modal.mapp-mode-edit .mapp-list-panel {
168
+ flex: 0;
169
+ height: 0px;
170
+ }
171
+
172
  .mapp-pick-filter {
173
  border-bottom: 1px solid lightgray;
174
  padding: 10px 20px;
221
  top: 45%;
222
  }
223
 
224
+ .mapp-pick-items {
225
+ display: flex;
226
+ flex: 1;
227
+ flex-direction: column;
228
+ overflow: auto;
229
+ }
230
+
231
  /* If header is placed outside scroll area, headings are offset by scrollbar width */
232
+ .mapp-pick-items-header {
233
+ align-items: center;
234
  background-color: white;
235
  border-bottom: 1px solid lightgray;
236
  display: flex;
240
  z-index: 1;
241
  }
242
 
243
+ .mapp-pick-items-header a {
244
+ box-shadow: none;
245
+ text-decoration: none;
246
  }
247
 
248
  .mapp-pick-item {
249
+ align-items: stretch; /* Make map title fill its whole column so it's easier to click */
250
  border-bottom: 1px solid lightgray;
 
251
  display: flex;
252
+ padding: 10px 20px;
 
253
  text-overflow: ellipsis;
254
  }
255
 
256
+ .mapp-pick-item a {
257
+ box-shadow: none;
258
+ text-decoration: none;
259
+ }
260
+
261
+
262
  .mapp-pick-item.mapp-selected {
263
  background-color: #f6f6f6;
 
264
  }
265
 
266
  .mapp-pick-item:hover {
267
  background-color: #f6f6f6;
268
  }
269
 
270
+ .mapp-pick-col-map_title, .mapp-pick-col-post_title, .mapp-pick-col-mapid {
271
+ cursor: pointer;
272
  overflow: hidden;
273
  text-overflow: ellipsis;
274
  white-space: nowrap;
275
  }
276
 
277
+ .mapp-pick-col-map_title {
278
+ cursor: pointer;
279
+ flex: 1;
280
  }
281
 
282
+ .mapp-pick-col-map_title {
 
283
  }
284
 
285
+ .mapp-pick-col-post_title {
286
+ width: 25%;
 
287
  }
288
 
289
  .mapp-pick-col-mapid {
291
  width: 15%;
292
  }
293
 
294
+ .mapp-pick-actions {
295
+ margin-top: 5px;
 
 
 
296
  }
297
 
298
+ .mapp-pick-actions a:not(:last-child):after {
299
+ color: gray;
300
+ content: "|";
301
+ margin-left: 5px;
302
+ margin-right: 5px;
303
  }
304
 
305
+ .mapp-pick-toolbar {
306
+ border-top: 1px solid lightgray;
307
+ padding: 5px 20px;
308
+ white-space: nowrap;
309
  }
310
 
311
+ .mapp-pick-toolbar button {
312
+ margin-right: 10px;
313
  }
314
 
315
 
321
 
322
  .mapp-edit {
323
  display: flex;
324
+ flex: 1;
325
  flex-direction: column;
326
+ overflow: hidden;
327
+ }
328
+
329
+ .mapp-edit-title input {
330
+ cursor: pointer;
331
+ font-size: 16px !important;
332
+ font-weight: 600;
333
+ margin-left: -10px;
334
+ }
335
+
336
+ .mapp-edit-title input:not(:hover) {
337
+ border: 1px solid white !important;
338
+ }
339
+
340
+ .mapp-edit-main {
341
+ display: flex;
342
  flex: 1;
343
  overflow: hidden;
344
  }
345
 
346
+
347
+ /* It's not possible to re-use all of the frontend CSS because it depends on classes at .mapp-layout level */
348
+ .mapp-edit-list {
349
+ background-color: white;
350
+ border-right: 1px solid lightgray;
351
+ display: flex;
352
+ flex-direction: column;
353
+ position: relative; /* Needed to scroll list for selection */
354
+ transition-property : all;
355
+ transition-duration: .1s;
356
+ width: 0;
357
+ }
358
+
359
+ .mapp-edit-list.mapp-list-open {
360
+ width: 250px;
361
+ }
362
+
363
+ .mapp-edit-list .mapp-item.mapp-edit-dragover {
364
+ border-top: 1px solid black;
365
+ }
366
+
367
+ .mapp-edit-map {
368
+ display: flex;
369
+ flex-direction: column;
370
  flex: 1;
371
+ overflow: hidden;
372
  }
373
 
374
  .mapp-edit .mapp-layout {
384
  padding-bottom: 0px;
385
  }
386
 
 
 
 
 
 
 
 
 
 
 
387
  .mapp-edit-toolbar {
388
  border-top: 1px solid lightgray;
389
  padding: 5px 20px;
431
  align-items: baseline;
432
  }
433
 
434
+ /* WP adds 8px left margin on select controls */
435
+ .mapp-gt-inspector .components-input-control__container {
436
+ margin-left: 0px !important;
437
+ }
438
+
439
  /* WP sets different (8px) margin-bottom only on last child in panel row */
440
  .block-editor-block-inspector .mapp-gt-inspector .components-base-control:last-child {
441
  margin-bottom: 24px;
471
  white-space: nowrap;
472
  }
473
 
474
+ /* GT tries to set flex on selects, and custom arrow obscures values */
475
+ .mapp-settings-dims-select, .mapp-settings-type {
476
+ display: block !important;
477
+ min-width: 7em;
478
  }
479
 
480
  .mapp-settings-dims-custom input {
485
  margin-bottom: 0;
486
  }
487
 
488
+ .mapp-settings-viewport {
489
+ margin-top: 5px;
490
  }
491
 
492
+ .mapp-settings-viewport .components-button-group {
493
+ display: block;
494
+ margin-top: 8px;
 
 
495
  }
496
 
497
  .mapp-settings-viewport-status {
499
  margin-left: 10px;
500
  }
501
 
502
+ /* Settings shown in poi list */
503
+ .mapp-list-settings {
504
+ border-bottom: 1px solid lightgray;
505
+ }
506
+
507
+
508
  /*
509
  -----------------------------------------------------------------------------------
510
  Mashup query builder
565
  flex: 1;
566
  }
567
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
568
 
569
  /*
570
  -----------------------------------------------------------------------------------
571
+ POI editor
572
  -----------------------------------------------------------------------------------
573
  */
574
 
575
+ /* Go for a large dialog, IB will restrict as needed */
576
+ .mapp-ib-wrapper.mapp-ib-edit .mapp-ib-content {
577
+ width: 600px;
578
+ height: 400px;
579
+ }
580
+ .mapp-ib-wrapper.mapp-ib-edit .mapp-ib {
581
+ height: 100%;
582
+ }
583
+
584
+ .mapp-iw-edit {
585
  display: flex;
586
+ flex: 1;
587
  flex-direction: column;
588
+ overflow: auto;
589
+ padding: 10px;
590
  }
591
 
592
+ .mapp-poi-header {
593
+ display: flex;
594
+ align-items: center;
595
  }
596
 
597
+ .mapp-poi-header .mapp-poi-title {
598
+ flex: 1;
599
+ font-weight: bold;
600
+ min-width: 0;
601
  }
602
 
603
+ /* Set fixed icon size, otherwise Leaflet will incorrectly position the popup */
604
+ .mapp-poi-header img.mapp-icon {
605
+ width: 32px;
606
+ height: 32px;
607
  }
608
 
609
+ .mapp-poi-url {
610
+ width: 100%;
611
+ }
612
 
613
+ .mapp-poi-editor-toolbar {
614
  align-items: center;
 
615
  display: flex;
616
  justify-content: space-between;
617
+ padding: 3px 0;
 
 
 
 
 
 
 
 
 
618
  }
619
 
620
+ .mapp-poi-toolbar button {
621
+ margin-right: 5px;
 
622
  }
623
 
624
+ .mapp-poi-visual, .mapp-poi-html {
625
+ cursor: pointer;
626
  }
627
 
628
+ .mapp-poi-visual.mapp-active, .mapp-poi-html.mapp-active {
629
+ font-weight: bold;
 
630
  }
631
 
632
+ .mapp-poi-main {
633
  display: flex;
 
634
  flex: 1;
635
+ overflow-wrap: break-word;
636
  }
637
 
638
+ .mapp-poi-main textarea {
639
+ width: 100%;
 
 
640
  }
641
 
642
+ /* TinyMCE by default sizes width 100% which obscures right edge */
643
+ .mapp-poi-main .mce-tinymce {
644
+ border: 1px solid lightgray;
645
+ /* width: auto !important;*/
 
646
  }
647
 
648
+ .mapp-poi-main .mce-tinymce, .mapp-poi-main .mce-stack-layout, .mapp-poi-main .mce-edit-area{
649
  display: flex;
650
+ flex-direction: column;
651
+ flex: 1;
652
+ overflow: hidden;
653
+ width: auto !important;
 
654
  }
655
 
656
+ .mapp-poi-toolbar {
657
  align-items: center;
658
  display: flex;
659
+ margin-top: 5px;
660
  }
661
 
662
+ .mapp-poi-toolbar button {
663
+ margin-right: 3px !important;
664
  }
665
 
 
 
 
666
 
667
+ /*
668
+ -----------------------------------------------------------------------------------
669
+ GT Multiselect
670
+ -----------------------------------------------------------------------------------
671
+ */
 
 
 
 
672
 
673
+ .mapp-select {}
674
+
675
+ .mapp-select-input {
676
+ border: 1px solid lightgray;
677
  cursor: pointer;
678
  display: flex;
679
+ line-height: normal;
680
+ padding: 5px;
 
 
 
 
 
681
  }
682
 
683
+ @media only screen and (max-width: 782px) {
684
+ .mapp-select-input {
685
+ min-height: 40px;
686
+ width: 100%;
687
+ }
688
  }
689
 
690
+ .mapp-select-input .dashicons {
691
+ font-size: 16px;
692
+ height: 16px;
693
+ width: 16px;
 
694
  }
695
 
696
+ .mapp-select-dropdown-wrapper {
697
+ position: relative;
 
 
 
698
  }
699
 
700
+ .mapp-select-dropdown {
701
+ background-color: white;
702
+ border-radius: 4px;
703
+ box-shadow: 0 5px 15px rgba(0,0,0,.2);
704
+ cursor: pointer;
705
+ display: flex;
706
+ flex-direction: column;
707
+ max-height: 150px;
708
+ position: absolute;
709
+ top: 0; left: 0; right: 0;
710
+ z-index: 100000;
711
  }
712
 
713
+ .mapp-select-dropdown-list {
714
+ flex: 1;
715
+ overflow: auto;
716
+ padding: 5px;
717
  }
718
 
719
+ .mapp-select-dropdown-item {
720
+ overflow: hidden;
721
+ padding: 5px;
722
+ text-overflow : ellipsis;
723
  white-space: nowrap;
 
724
  }
725
 
726
+ .mapp-select-dropdown-item:hover {
727
+ background-color: #eee;
728
  }
729
 
730
+ .mapp-select .components-base-control, .mapp-select .components-base-control__field {
731
+ margin-bottom: 0 !important;
 
732
  }
733
 
734
+ /* WP checkboxcontrol has a bug: it doubles click events on any parent, so we can't use parent div, and it also doesn't make event object available; So, make checkbox full width instead */
735
+ .mapp-select-dropdown-item .components-base-control__field {
736
+ display: flex;
 
 
 
 
 
737
  }
738
 
739
+ .mapp-select-dropdown-item label {
 
740
  flex: 1;
 
741
  }
742
 
743
+ .mapp-select-tokens {
 
 
744
  display: flex;
745
+ flex: 1;
746
  flex-wrap: wrap;
 
 
747
  }
748
 
749
+ .mapp-select-token {
750
+ background-color: #ddd;
751
+ margin: 2px;
752
+ overflow: hidden;
753
+ padding: 3px;
754
+ text-overflow: ellipsis;
 
 
 
 
755
  white-space: nowrap;
756
  }
757
 
758
+ .mapp-select-token-delete {
759
+ padding: 2px;
 
 
 
 
760
  }
761
 
762
+ .mapp-select-token-delete:hover {
763
+ color: red;
 
 
 
764
  }
765
 
766
+ .mapp-select-values {
767
  flex: 1;
768
+ overflow: hidden;
769
+ text-overflow: ellipsis;
770
+ white-space: nowrap;
771
  }
772
 
773
+ .mapp-select-filter {
774
+ padding: 5px;
775
  }
776
 
777
  /*
778
  -----------------------------------------------------------------------------------
779
+ GT Post attachment control + popup
780
  -----------------------------------------------------------------------------------
781
  */
782
 
783
+ .mapp-attach-control {
784
+ max-width: 360px;
785
+ width: 90vw;
 
786
  }
787
 
788
+ .mapp-attach-items {
789
+ max-height: 200px;
790
+ overflow: auto;
791
  }
792
 
793
+ .mapp-attach-item {
794
  display: flex;
795
+ flex-direction: row;
 
 
796
  padding: 10px;
797
  }
798
 
799
+ .mapp-attach-item:hover {
800
+ background-color: #ddd;
 
801
  }
802
 
803
+ .mapp-attach-item-title {
804
  flex: 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
805
  }
806
 
807
+ .mapp-attach-item-type {
808
+ background-color: #f0f0f0;
809
+ padding: 3px 8px;
 
 
 
810
  }
811
 
 
 
 
 
 
812
 
813
+ /*
814
+ -----------------------------------------------------------------------------------
815
+ Iframe
816
+ -----------------------------------------------------------------------------------
817
+ */
818
+ .mapp-iframe {
819
+ background: none transparent;
820
+ height: 100%;
821
+ position: fixed;
822
+ top: 0; right: 0; bottom: 0; left: 0;
823
  width: 100%;
824
+ z-index: 100000;
825
  }
826
 
827
+ .mapp-iframe-html body {
828
+ background: none transparent;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
829
  }
830
 
831
  /*
832
  -----------------------------------------------------------------------------------
833
+ GT options page
834
  -----------------------------------------------------------------------------------
835
  */
836
 
837
+ .mapp-options {
838
+ font-size: 14px;
 
 
 
 
 
839
  }
840
 
841
+ .mapp-options-header {
842
  align-items: baseline;
843
  background-color: #f0f0f0;
844
  border-bottom: 1px solid gray;
845
  display: flex;
846
+ flex-wrap: wrap;
847
  justify-content: space-between;
848
  top: 30px;
849
  padding: 0px 10px 10px 10px;
850
  }
851
 
852
+
853
+ .mapp-options .mapp-layout {
854
+ margin: 0;
855
+ max-width: 600px;
856
+ }
857
+
858
+ .mapp-options-header-version {
859
  display: flex;
860
  align-items: baseline;
861
  }
862
 
863
+ .mapp-options-header-version h1 {
864
  margin-right: 10px;
865
  }
866
 
867
+ .mapp-options-header-links {
868
+ align-items: baseline;
869
+ display: flex;
870
+ }
871
+
872
+ .mapp-options-header-links a {
873
  margin: 0 5px;
874
  }
875
 
876
+ .mapp-options-toolbar {
877
  background-color: #f0f0f0;
878
  border-top: 1px solid gray;
879
  bottom: 0;
880
  padding: 10px;
881
  position: sticky;
882
+ z-index: 1000;
883
  }
884
 
 
 
 
 
 
885
 
886
+ .mapp-option-section {
 
887
  background-color: white;
888
+ border-bottom: 1px solid lightgray;
889
+ margin-top: 20px;
890
+ }
891
+
892
+ .mapp-option-section h2 {
893
+ border-bottom: 1px solid lightgray;
894
+ color: #23282D;
895
  font-size: 14px;
896
+ font-weight: 600;
897
+ margin: 0;
898
+ margin-bottom: 10px;
899
+ padding: 10px;
900
  }
901
 
902
+ .mapp-option-section.mapp-demo-section h2 {
903
+ margin-bottom: 0;
904
  }
905
 
906
+ .mapp-option {
907
+ display: flex;
908
+ padding: 16px 10px;
909
  }
910
 
911
+ .mapp-option-title {
912
+ display: inline-block;
913
+ color: #23282D;
914
+ font-size: 14px;
915
+ font-weight: 600;
916
+ vertical-align: middle;
917
+ width: 200px;
918
  }
919
 
920
+ .mapp-option-value {
921
+ display: inline-block;
922
  vertical-align: middle;
923
  }
924
 
925
+ .mapp-option-value select {
926
+ vertical-align: baseline;
 
 
 
 
 
927
  }
928
 
929
+ .mapp-option-value label { white-space: nowrap; }
930
+
931
+ .mapp-option-label {
932
+ margin-left: 10px;
 
 
 
933
  }
934
 
935
+ @media only screen and (max-width: 780px) {
936
+ .mapp-option {
937
+ display: block;
938
+ }
939
+
940
+ .mapp-option-title {
941
+ padding-bottom: 20px;
942
+ display: block;
943
+ }
944
+
945
  }
946
 
947
+ .mapp-options label {
948
+ margin-right: 20px;
949
+ }
950
+
951
+ .mapp-options .mapp-help-text {
952
+ font-style: italic;
953
+ padding-top: 10px;
954
+ }
955
+
956
+ .mapp-options a.mapp-help-link {
957
  text-decoration: none;
958
  }
959
 
960
+ .mapp-options .mapp-license-status {
961
+ margin-left: 10px;
962
+ }
963
+
964
+ button.mapp-options-save {
965
+ margin-right: 10px;
966
+ }
967
 
968
+ .mapp-options .dashicons-editor-help {
969
+ margin-left: 5px;
 
970
  }
971
 
972
+ .mapp-options .dashicons-yes {
973
  vertical-align: middle;
974
  color:green;
975
  }
976
 
977
+ .mapp-options .dashicons-no {
978
  vertical-align: middle;
979
  color:red;
980
  }
981
 
982
+ .mapp-options-check-license {
983
  margin-left: 10px;
984
+ }
985
+
986
+ /* Override WP stuff */
987
+ .mapp-options a {
988
  text-decoration: none;
989
  }
990
 
991
+ .mapp-options a:focus {
992
+ box-shadow: none;
993
+ }
994
+
995
  /*
996
  -----------------------------------------------------------------------------------
997
+ GT Color picker
998
  -----------------------------------------------------------------------------------
999
  */
1000
+ .mapp-colors-modal {
1001
+ min-width: 0;
1002
+ overflow: hidden;
1003
+ }
1004
 
1005
+ .mapp-colors {
1006
+ overflow: hidden;
1007
+ width: 320px;
1008
+ }
1009
 
1010
+ .mapp-colors-toggle {
1011
  border: 1px solid lightgray;
1012
  cursor: pointer;
1013
+ display: inline-block;
1014
+ height: 20px;
1015
+ margin: 1px;
1016
+ vertical-align: middle;
1017
+ width: 20px;
1018
+ }
1019
+
1020
+ .mapp-color {
1021
+ border: 2px solid lightgray;
1022
+ box-sizing: border-box;
1023
+ display: inline-block;
1024
+ height: 22px;
1025
+ line-height: 1;
1026
+ margin: 1px;
1027
+ width: 22px;
1028
+ }
1029
+
1030
+ .mapp-color:hover, .mapp-color.mapp-selected {
1031
+ border: 2px solid black;
1032
+ }
1033
+
1034
+ .mapp-colors .mapp-option-label {
1035
+ margin-right: 10px;
1036
+ }
1037
+
1038
+ /* Try to adjust WP's picker to be usable in modal */
1039
+ .mapp-colors .components-color-picker {
1040
+ margin: 1px;
1041
+ }
1042
+
1043
+ .mapp-colors .components-color-picker__body {
1044
+ padding: 16px 0;
1045
+ }
1046
+
1047
+ .mapp-colors .components-color-picker__saturation {
1048
+ padding-bottom: 75px;
1049
+ }
1050
+
1051
+ .mapp-colors select {
1052
+ margin: 0;
1053
+ }
1054
+
1055
+ .mapp-colors-toolbar {
1056
  display: flex;
1057
+ margin: 20px 1px 1px 1px;
1058
+ justify-content: space-between;
1059
  }
1060
 
1061
+ /*
1062
+ -----------------------------------------------------------------------------------
1063
+ GT Icon picker
1064
+ -----------------------------------------------------------------------------------
1065
+ */
1066
+
1067
+ .mapp-icons-modal {}
1068
+
1069
+ .mapp-icons-header button {
1070
+ margin-left: 20px;
1071
  }
1072
 
1073
+ .mapp-icons-list {
1074
+ border: 1px solid lightgray;
1075
+ flex: 1;
1076
+ margin-bottom: 5px;
1077
+ max-height: 250px;
1078
+ overflow: auto;
1079
+ user-select: none;
1080
  }
1081
 
1082
+ .mapp-icons-toolbar {
1083
+ display: flex;
1084
+ justify-content: space-between;
1085
+ padding-top: 10px;
1086
  }
1087
 
1088
+ .mapp-icons-toolbar button {
1089
+ margin-right: 5px;
1090
+ }
1091
+
1092
+ .mapp-icons .mapp-icon-wrapper {
1093
+ border: 2px solid white;
1094
+ display: inline-block;
1095
+ margin: 4px;
1096
+ user-select: none;
1097
+ }
1098
+
1099
+ .mapp-icons .mapp-icon-wrapper:hover {
1100
+ border: 2px solid lightgray;
1101
+ }
1102
+
1103
+ .mapp-icons .mapp-icon-wrapper.mapp-selected {
1104
+ border: 2px solid gray;
1105
+ }
1106
+
1107
+ /*
1108
+ -----------------------------------------------------------------------------------
1109
+ GT Icon Editor
1110
+ -----------------------------------------------------------------------------------
1111
+ */
1112
+
1113
+ .mapp-icons-edit-modal {
1114
  display: flex;
1115
  flex-direction: column;
1116
+ min-height: 90%;
1117
+ min-width: 60vw;
 
 
1118
  }
1119
 
1120
+ .mapp-icons-edit-modal h1 {
1121
+ padding: 24px 0px;
1122
+ }
1123
+
1124
+ .mapp-icons-edit-header {
1125
+ display: flex;
1126
+ align-items: stretch;
1127
+ flex-direction: row;
1128
+ }
1129
+
1130
+ .mapp-icons-edit-modal .components-modal__content {
1131
+ display: flex;
1132
  flex: 1;
1133
+ flex-direction: column;
1134
+ overflow: hidden;
1135
  }
1136
 
1137
+ .mapp-icons-edit {
1138
+ cursor: default;
1139
+ display: flex;
1140
+ flex: 1;
1141
+ flex-direction: column;
1142
  overflow: hidden;
 
 
 
1143
  }
1144
 
1145
+ .mapp-icons-edit-wrapper {
1146
+ border: 1px solid lightgray;
1147
+ flex: 1;
1148
+ overflow: auto;
1149
+ }
1150
+
1151
+ .mapp-icons-edit-toolbar {
1152
+ display: flex;
1153
+ justify-content: space-between;
1154
+ padding-top: 20px;
1155
+ }
1156
+
1157
+ .mapp-icons-edit-toolbar button {
1158
+ margin-bottom: 5px;
1159
+ margin-left: 5px;
1160
+ margin-right: 5px;
1161
+ }
1162
+
1163
+ .mapp-icons-edit-create-tab {
1164
+ display: flex;
1165
+ flex: 1;
1166
+ flex-direction: column;
1167
+ overflow: auto;
1168
+ }
1169
+
1170
+ .mapp-icons-edit-preview {}
1171
+
1172
+ .mapp-icons-edit-shape-wrapper {
1173
+ border: 3px solid white;
1174
+ display: inline-block;
1175
+ padding: 8px;
1176
+ position: relative;
1177
+ }
1178
+
1179
+ .mapp-icons-edit-shape-wrapper.mapp-selected {
1180
+ border: 3px solid gray;
1181
  }
1182
 
1183
+ .mapp-icons-edit-shape {
1184
+ filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.4));
1185
+ font-family: 'mapp-shapes';
1186
+ font-size: 32px;
1187
+ height: 32px;
1188
+ line-height: 32px;
1189
+ width: 32px;
1190
  }
1191
 
1192
+ .mapp-icons-edit-shape .mapp-icons-edit-glyph {
1193
+ font-size: 16px;
1194
+ position: absolute;
1195
+ top: 50%; left: 50%;
1196
+ transform: translate(-50%, -50%);
1197
  }
1198
 
1199
+ .mapp-icons-edit-glyph-section {
1200
+ display: flex;
1201
  flex: 1;
1202
+ flex-direction: column;
1203
+ overflow: hidden;
1204
+ user-select: none;
1205
  }
1206
 
1207
+ .mapp-icons-edit-glyph-list {
1208
+ border: 1px solid lightgray;
1209
  display: flex;
1210
  flex: 1;
1211
  flex-wrap: wrap;
1212
+ overflow: auto;
1213
  }
1214
 
1215
+ .mapp-icons-edit-glyph-wrapper {
1216
+ background: white;
1217
+ border: 3px solid white;
1218
+ color: black;
1219
+ display: flex;
1220
+ flex-direction: column;
1221
+ height: 120px;
1222
+ position: relative;
1223
+ width: 130px;
1224
+ margin: 1px;
1225
+ text-align: center;
1226
+ box-sizing: border-box;
1227
  }
1228
 
1229
+ .mapp-icons-edit-glyph-wrapper:hover {
1230
+ border: 3px solid lightgray;
1231
  }
1232
 
1233
+ .mapp-icons-edit-glyph-wrapper.mapp-selected {
1234
+ border: 3px solid gray;
1235
  }
1236
 
1237
+ .mapp-icons-edit-glyph-wrapper .mapp-icons-edit-glyph {
1238
+ font-size: 32px;
1239
+ line-height: 32px;
1240
+ padding: 10px;
 
1241
  }
1242
 
1243
+ .mapp-icons-edit-glyph-title {
1244
+ color: #a0a0a0;
1245
  padding: 5px;
1246
  }
1247
 
1248
+ button.mapp-icons-edit-set-color {
1249
+ margin: 5px 0 5px 2px;
1250
+ }
 
 
1251
 
1252
+ .mapp-icons-edit a {
1253
+ box-shadow: none;
1254
+ text-decoration: none;
1255
  }
1256
 
1257
+ .mapp-icons-edit-filename {
1258
+ text-transform: uppercase;
 
1259
  }
1260
 
1261
+ .mapp-icons-edit-colorpicker {
1262
+ width: 250px;
1263
+ z-index: 100;
1264
+ }
1265
+
1266
+ .mapp-icons-edit-list {
1267
+ border: 1px solid lightgray;
1268
  display: flex;
1269
+ flex: 1;
1270
+ flex-direction: column;
1271
+ overflow: hidden;
1272
  }
1273
 
1274
+ .mapp-icons-edit-list-header {
1275
+ border-bottom: 1px solid lightgray;
1276
+ display: flex;
1277
+ padding: 20px 10px;
1278
  }
1279
 
1280
+ .mapp-icons-edit-list-body {
1281
+ display: flex;
1282
  flex: 1;
1283
+ overflow: auto;
1284
  }
1285
 
1286
+ .mapp-icons-edit-list-body ul {
1287
+ flex: 1;
 
1288
  }
1289
 
1290
+ .mapp-icons-edit-list .mapp-col-action {
1291
+ width: 40px;
1292
+ }
1293
 
1294
+ .mapp-icons-edit-list .mapp-col-icon {
1295
+ width: 60px;
1296
+ }
 
 
1297
 
1298
+ .mapp-icons-edit-list .mapp-col-title {
1299
+ flex: 1;
1300
+ overflow: hidden;
1301
+ text-overflow: ellipsis;
1302
+ }
1303
+
1304
+ .mapp-icons-edit-list li {
1305
+ align-items: center;
1306
+ border-bottom: 1px solid lightgray;
1307
+ display: flex;
1308
  padding: 10px;
1309
  }
1310
 
1311
+ .mapp-icons-edit-list li:hover {
1312
+ background-color: #fafafa;
 
 
1313
  }
1314
 
1315
+ .mapp-icons-edit-list img {
1316
+ height: 32px;
1317
+ width: 32px;
 
1318
  }
1319
 
1320
+ .mapp-icons-shape-heading, .mapp-icons-glyph-heading {
1321
+ margin: 10px 0;
1322
+ font-size: 14px;
1323
+ font-weight: 600;
1324
  }
1325
 
1326
+ .mapp-icons-shape-heading {
1327
+ display: inline-block;
 
 
 
 
1328
  }
1329
 
1330
+ .mapp-icons-shape-heading .mapp-colors-toggle {
1331
+ margin-left: 20px;
1332
  }
1333
 
1334
+ .mapp-icons-glyph-heading {
1335
+ align-items: center;
1336
+ display: flex;
1337
+ justify-content: space-between;
 
1338
  }
1339
 
1340
+ .mapp-icons-glyph-heading input {
1341
+ margin-left: 10px;
 
1342
  }
1343
 
1344
+ .mapp-icons-edit-glyph-section {
1345
+ margin-top: 20px;
 
1346
  }
1347
 
1348
  /*
1349
  -----------------------------------------------------------------------------------
1350
+ GT Template Editor
1351
  -----------------------------------------------------------------------------------
1352
  */
1353
 
1354
+ .mapp-templates-modal {
1355
+ height: 600px;
1356
+ width: 800px;
1357
+ max-width: 90vw;
1358
+ max-height: 90vh;
1359
+ }
1360
+
1361
+ .mapp-templates-modal .components-modal__content {
1362
+ display: flex;
1363
+ flex-direction: column;
1364
+ }
1365
+
1366
+ .mapp-templates-modal-content {
1367
  display: flex;
1368
  flex-direction: column;
 
 
 
 
1369
  }
1370
 
1371
+ a.mapp-templates-item {
1372
  border: 1px solid lightgray;
1373
+ padding: 10px;
1374
+ margin: 0 2px;
1375
+ text-decoration: none;
1376
  }
1377
 
1378
+ .mapp-templates-name {
1379
+ text-transform: uppercase;
1380
  }
1381
 
1382
+ .mapp-templates-path {
1383
+ font-style: italic;
1384
+ margin-top: 10px;
 
 
1385
  }
1386
 
1387
+ .mapp-templates-tabs {
1388
+ display: flex;
1389
+ flex: 1;
1390
+ flex-direction: column;
1391
  }
1392
 
1393
+ .mapp-templates-tabs .components-tab-panel__tab-content {
1394
+ display: flex;
1395
+ flex: 1;
1396
+ flex-direction: column;
1397
  }
1398
 
1399
+ .mapp-templates-tokens {
1400
  border-bottom: 1px solid lightgray;
1401
+ margin-bottom: 10px;
1402
+ padding: 10px 0;
 
 
1403
  }
1404
 
1405
+ .mapp-templates-tokens code {
1406
+ border: 1px solid gray;
1407
+ cursor: pointer;
1408
  margin-right: 10px;
1409
  }
1410
 
1411
+ /* Editor and standard (Default) tab contents, shown using CodeMirror */
1412
+ .mapp-templates-editor {
1413
+ flex: 1;
1414
  }
1415
 
1416
+ .mapp-templates-editor .CodeMirror {
1417
+ height: 100% !important;
1418
  }
1419
 
1420
+ .mapp-templates-standard {
1421
+ flex: 1;
 
1422
  }
1423
 
1424
+ .mapp-templates-standard .CodeMirror {
1425
+ background-color: #f5f5f5;
1426
+ height: 100% !important;
1427
  }
1428
 
1429
 
1430
+ .mapp-templates-toolbar {
1431
+ padding-top: 10px;
 
 
 
 
 
 
 
 
1432
  border-top: 1px solid lightgray;
 
 
 
 
 
 
 
 
 
 
 
1433
  }
1434
 
1435
+ .mapp-templates-toolbar button {
1436
+ margin-right: 5px;
 
 
 
 
1437
  }
1438
 
1439
+ .mapp-templates-toolbar a {
1440
+ cursor: pointer;
1441
  }
1442
 
1443
+
1444
  /*
1445
  -----------------------------------------------------------------------------------
1446
+ GT Grid
1447
  -----------------------------------------------------------------------------------
1448
  */
1449
 
1450
+ .mapp-grid-table {
 
 
 
 
 
1451
  background-color: white;
1452
  border: 1px solid lightgray;
1453
+ display: table;
1454
+ margin-bottom: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1455
  }
1456
 
1457
+ .mapp-grid-header {
1458
+ display: table-header-group;
 
 
 
 
 
 
1459
  }
1460
 
1461
+ .mapp-grid-header .mapp-grid-cell {
1462
+ background-color: #f1f1f1;
1463
+ border-bottom: 1px solid lightgray;
1464
+ font-weight: 600;
 
 
 
1465
  padding: 5px;
 
1466
  }
1467
 
1468
+ .mapp-grid-body {
1469
+ display: table-row-group;
 
1470
  }
1471
 
1472
+ .mapp-grid-row {
1473
+ display: table-row;
 
 
 
1474
  }
1475
 
1476
+ .mapp-grid-cell {
1477
+ border-bottom: 1px solid lightgray;
1478
+ cursor: pointer;
1479
+ display: table-cell;
1480
+ padding: 5px;
1481
+ text-align: center;
1482
+ vertical-align: middle;
1483
  }
1484
 
1485
+ .mapp-grid-cell .components-base-control__field {
 
 
1486
  margin: 0;
1487
  }
1488
 
1489
+ .mapp-grid-row.mapp-dragover .mapp-grid-cell {
1490
+ border-top: 1px solid black;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1491
  }
1492
 
1493
+ .mapp-grid-cell label {
1494
+ margin: 0;
 
 
 
 
 
1495
  }
1496
 
1497
+ .mapp-grid-toolbar {}
 
 
1498
 
1499
  /*
1500
  -----------------------------------------------------------------------------------
1501
  Misc
1502
  -----------------------------------------------------------------------------------
1503
  */
 
 
 
 
1504
 
1505
+ .mapp-tab {
1506
+ border-bottom: 4px solid transparent;
1507
+ cursor: pointer;
1508
+ height: 48px;
1509
+ line-height: 48px;
1510
+ padding: 3px 16px;
1511
+ font-weight: 500;
1512
  }
1513
 
1514
+ .mapp-tab.mapp-selected {
1515
+ border-bottom: 4px solid #007cba;
1516
+ position: relative;
1517
+ z-index: 1;
1518
  }
1519
 
1520
+ .mapp-inline {
1521
+ display: inline-block;
1522
  }
1523
 
1524
  .mapp-review p {
1535
  }
1536
 
1537
  .mapp-review-options a:last-of-type {
 
1538
  margin-left: 10px !important;
1539
+ }
images/get-directions.png ADDED
Binary file
images/icons.png DELETED
Binary file
images/mappress.png DELETED
Binary file
images/spinner-2x.gif ADDED
Binary file
images/spinner.gif ADDED
Binary file
languages/mappress-google-maps-for-wordpress.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the MapPress Maps for WordPress plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MapPress Maps for WordPress 2.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,502 +33,269 @@ msgstr ""
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
 
195
- #: mappress_controls.php:93
196
- #: templates_admin/widgets.php:42
197
- msgid "Add"
198
- msgstr ""
199
-
200
- #: mappress_controls.php:102
201
- #: templates_admin/editor.php:47
202
- #: templates_admin/mce.php:98
203
- #: templates_admin/widgets.php:94
204
- msgid "Delete"
205
- msgstr ""
206
-
207
  #: mappress_map.php:86
208
- #: mappress_settings.php:333
209
  msgid "MapPress"
210
  msgstr ""
211
 
212
- #: mappress_map.php:95
213
- #: templates_admin/mce.php:29
214
- #: templates_admin/mce.php:78
215
- #: templates_admin/mce.php:84
216
  msgid "Untitled"
217
  msgstr ""
218
 
219
- #: mappress_map.php:96
220
  msgid "Copy of %s"
221
  msgstr ""
222
 
223
- #: mappress_map.php:200
224
  msgid "Map not found"
225
  msgstr ""
226
 
227
- #: mappress_settings.php:89
228
- msgid "Sample Map"
229
- msgstr ""
230
-
231
- #: mappress_settings.php:91
232
- msgid "Basic Settings"
233
- msgstr ""
234
-
235
- #: mappress_settings.php:92
236
- msgid "Mapping API"
237
- msgstr ""
238
-
239
- #: mappress_settings.php:95
240
- msgid "Google API key"
241
- msgstr ""
242
-
243
- #: mappress_settings.php:98
244
- msgid "Mapbox access token"
245
- msgstr ""
246
-
247
- #: mappress_settings.php:102
248
- msgid "License"
249
- msgstr ""
250
-
251
- #: mappress_settings.php:104
252
- msgid "Map Settings"
253
- msgstr ""
254
-
255
- #: mappress_settings.php:105
256
- msgid "Post types"
257
- msgstr ""
258
-
259
- #: mappress_settings.php:106
260
- msgid "Automatic display"
261
- msgstr ""
262
-
263
- #: mappress_settings.php:107
264
- msgid "Map alignment"
265
- msgstr ""
266
-
267
- #: mappress_settings.php:108
268
- #: templates/map-popup.php:3
269
- #: templates/mashup-popup.php:6
270
- msgid "Directions"
271
- msgstr ""
272
-
273
- #: mappress_settings.php:111
274
- msgid "POI Settings"
275
- msgstr ""
276
-
277
- #: mappress_settings.php:112
278
- msgid "Default zoom"
279
- msgstr ""
280
-
281
- #: mappress_settings.php:113
282
- #: mappress_settings.php:242
283
- msgid "Open first POI"
284
- msgstr ""
285
-
286
- #: mappress_settings.php:117
287
- msgid "Mashups"
288
- msgstr ""
289
-
290
- #: mappress_settings.php:118
291
- msgid "Icons"
292
- msgstr ""
293
-
294
- #: mappress_settings.php:119
295
- msgid "Styled Maps"
296
- msgstr ""
297
-
298
- #: mappress_settings.php:120
299
- msgid "Geocoding"
300
- msgstr ""
301
-
302
- #: mappress_settings.php:121
303
- msgid "Templates"
304
- msgstr ""
305
-
306
- #: mappress_settings.php:124
307
- msgid "Localization"
308
- msgstr ""
309
-
310
- #: mappress_settings.php:125
311
- msgid "Search language"
312
- msgstr ""
313
-
314
- #: mappress_settings.php:126
315
- msgid "Search country"
316
- msgstr ""
317
-
318
- #: mappress_settings.php:127
319
- msgid "Directions server"
320
- msgstr ""
321
-
322
- #: mappress_settings.php:129
323
- msgid "Miscellaneous"
324
- msgstr ""
325
-
326
- #: mappress_settings.php:130
327
- msgid "Map sizes"
328
- msgstr ""
329
-
330
- #: mappress_settings.php:131
331
- msgid "Scripts"
332
  msgstr ""
333
 
334
- #: mappress_settings.php:135
335
- msgid "Compatiblity"
336
- msgstr ""
337
-
338
- #: mappress_settings.php:179
339
- #: mappress_settings.php:248
340
- #: pro/mappress_pro_settings.php:235
341
- #: templates_admin/widgets.php:78
342
  msgid "Default"
343
  msgstr ""
344
 
345
- #: mappress_settings.php:180
346
- msgid "Center"
347
- msgstr ""
348
-
349
- #: mappress_settings.php:181
350
- msgid "Left"
351
- msgstr ""
352
-
353
- #: mappress_settings.php:182
354
- msgid "Right"
355
- msgstr ""
356
-
357
- #: mappress_settings.php:194
358
- #: pro/mappress_pro_settings.php: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
-
486
- #: mappress_template.php:34
487
  msgid "Address"
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
-
502
- #: mappress_template.php:37
503
  msgid "Thumbnail"
504
  msgstr ""
505
 
506
  #: mappress_template.php:38
507
- #: pro/mappress_pro_settings.php:346
508
- msgid "Title"
509
- msgstr ""
510
-
511
- #: mappress_template.php:39
512
  msgid "Url"
513
  msgstr ""
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
 
527
- #: pro/mappress_filter.php:120
528
  msgid "Taxonomy"
529
  msgstr ""
530
 
531
- #: pro/mappress_filter.php:120
532
  msgid "Post field"
533
  msgstr ""
534
 
@@ -559,11 +326,7 @@ msgstr ""
559
  msgid "Invalid JSON from Geocoding service: %s"
560
  msgstr ""
561
 
562
- #: pro/mappress_icons.php:49
563
- msgid "No file provided"
564
- msgstr ""
565
-
566
- #: pro/mappress_icons.php:74
567
  msgid "Files error: "
568
  msgstr ""
569
 
@@ -571,357 +334,21 @@ msgstr ""
571
  msgid "Automatic"
572
  msgstr ""
573
 
574
- #: pro/mappress_pro_settings.php:16
575
- msgid "MapPress license key"
576
- msgstr ""
577
-
578
- #: pro/mappress_pro_settings.php:17
579
- msgid "Beta versions"
580
- msgstr ""
581
-
582
- #: pro/mappress_pro_settings.php:21
583
- msgid "Geocoder"
584
- msgstr ""
585
-
586
- #: pro/mappress_pro_settings.php:23
587
- msgid "POI list"
588
- msgstr ""
589
-
590
- #: pro/mappress_pro_settings.php:24
591
- msgid "POI list layout"
592
- msgstr ""
593
-
594
- #: pro/mappress_pro_settings.php:25
595
- msgid "Mini width"
596
- msgstr ""
597
-
598
- #: pro/mappress_pro_settings.php:26
599
- msgid "Sort"
600
- msgstr ""
601
-
602
- #: pro/mappress_pro_settings.php:28
603
- msgid "Clustering"
604
- msgstr ""
605
-
606
- #: pro/mappress_pro_settings.php:29
607
- msgid "Popup type"
608
- msgstr ""
609
-
610
- #: pro/mappress_pro_settings.php:31
611
- msgid "Default icon"
612
- msgstr ""
613
-
614
- #: pro/mappress_pro_settings.php:32
615
- msgid "Icon directory"
616
- msgstr ""
617
-
618
- #: pro/mappress_pro_settings.php:33
619
- msgid "Custom icons"
620
- msgstr ""
621
-
622
- #: pro/mappress_pro_settings.php:34
623
- msgid "Highlight selected POI"
624
- msgstr ""
625
-
626
- #: pro/mappress_pro_settings.php:36
627
- msgid "Icon scaling"
628
- msgstr ""
629
-
630
- #: pro/mappress_pro_settings.php:37
631
- msgid "Automatic icons"
632
- msgstr ""
633
-
634
- #: pro/mappress_pro_settings.php:39
635
- #: templates/map.php: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
-
914
  #: pro/mappress_updater.php:122
915
  msgid "JSON error"
916
  msgstr ""
917
 
918
  #: pro/mappress_widget.php:69
919
- #: pro/mappress_widget_map.php:56
920
  msgid "Widget title"
921
  msgstr ""
922
 
923
  #: pro/mappress_widget.php:74
924
- #: pro/mappress_widget_map.php:66
925
  msgid "Map size"
926
  msgstr ""
927
 
@@ -950,23 +377,21 @@ msgid "Learn about queries"
950
  msgstr ""
951
 
952
  #: pro/mappress_widget.php:94
953
- #: pro/mappress_widget_map.php:74
954
  msgid "Show POI list"
955
  msgstr ""
956
 
957
  #: pro/mappress_widget.php:101
958
- #: pro/mappress_widget_map.php:81
959
  msgid "Other Settings"
960
  msgstr ""
961
 
962
  #: pro/mappress_widget.php:104
963
- #: pro/mappress_widget_map.php:84
964
  msgid "Example: initialopeninfo=\"true\""
965
  msgstr ""
966
 
967
- #: pro/mappress_widget_map.php:61
968
- #: templates_admin/mce.php:47
969
- #: templates_admin/mce.php:67
970
  msgid "Map ID"
971
  msgstr ""
972
 
@@ -975,6 +400,8 @@ msgid "My location"
975
  msgstr ""
976
 
977
  #: templates/map-directions.php:14
 
 
978
  msgid "Get Directions"
979
  msgstr ""
980
 
@@ -990,10 +417,18 @@ msgstr ""
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 ""
@@ -1022,132 +457,45 @@ msgstr ""
1022
  msgid "Show Map"
1023
  msgstr ""
1024
 
1025
- #: templates_admin/editor.php:34
1026
- msgid "Visual"
1027
- msgstr ""
1028
-
1029
- #: templates_admin/editor.php:34
1030
- msgid "HTML"
1031
- msgstr ""
1032
-
1033
- #: templates_admin/editor.php:36
1034
- msgid "Add Media"
1035
- msgstr ""
1036
-
1037
- #: templates_admin/editor.php:45
1038
- #: templates_admin/mce.php:53
1039
- #: templates_admin/widgets.php:91
1040
- msgid "Save"
1041
- msgstr ""
1042
-
1043
- #: templates_admin/editor.php:46
1044
- #: templates_admin/mce.php:54
1045
- #: templates_admin/widgets.php:92
1046
- msgid "Cancel"
1047
- msgstr ""
1048
-
1049
- #: templates_admin/mce.php:6
1050
- msgid "Select a map"
1051
- msgstr ""
1052
-
1053
- #: templates_admin/mce.php:7
1054
- msgid "Add New"
1055
- msgstr ""
1056
-
1057
- #: templates_admin/mce.php:13
1058
- msgid "post title"
1059
- msgstr ""
1060
-
1061
- #: templates_admin/mce.php:17
1062
- msgid "Attached to this post"
1063
- msgstr ""
1064
-
1065
- #: templates_admin/mce.php:18
1066
- msgid "All maps"
1067
- msgstr ""
1068
-
1069
- #: templates_admin/mce.php:23
1070
- msgid "Close"
1071
- msgstr ""
1072
-
1073
- #: templates_admin/mce.php:33
1074
- msgid "Size"
1075
- msgstr ""
1076
-
1077
- #: templates_admin/mce.php:57
1078
- msgid "Save center / zoom"
1079
  msgstr ""
1080
 
1081
- #: templates_admin/mce.php:66
1082
- msgid "Map title"
 
1083
  msgstr ""
1084
 
1085
- #: templates_admin/mce.php:69
1086
- msgid "Attached to"
1087
  msgstr ""
1088
 
1089
- #: templates_admin/mce.php:71
1090
- msgid "Action"
1091
  msgstr ""
1092
 
1093
- #: templates_admin/mce.php:85
1094
- msgid "Current post"
1095
- msgstr ""
1096
-
1097
- #: templates_admin/mce.php:90
1098
- msgid "Unattached"
1099
- msgstr ""
1100
-
1101
- #: templates_admin/mce.php:97
1102
- msgid "Insert into post"
1103
- msgstr ""
1104
-
1105
- #: templates_admin/mce.php:105
1106
- msgid "No maps found"
1107
- msgstr ""
1108
-
1109
- #: templates_admin/widgets.php:7
1110
- msgid "Opacity"
1111
- msgstr ""
1112
-
1113
- #: templates_admin/widgets.php:13
1114
- msgid "Weight"
1115
- msgstr ""
1116
-
1117
- #: templates_admin/widgets.php:28
1118
- msgid "No custom icons have been added yet."
1119
- msgstr ""
1120
-
1121
- #: templates_admin/widgets.php:59
1122
- msgid "Use default icon"
1123
- msgstr ""
1124
-
1125
- #: templates_admin/widgets.php:67
1126
- msgid "Map popup"
1127
- msgstr ""
1128
-
1129
- #: templates_admin/widgets.php:67
1130
- msgid "Map list item"
1131
  msgstr ""
1132
 
1133
- #: templates_admin/widgets.php:67
1134
- msgid "Mashup popup"
1135
  msgstr ""
1136
 
1137
- #: templates_admin/widgets.php:67
1138
- msgid "Mashup list item"
1139
  msgstr ""
1140
 
1141
- #: templates_admin/widgets.php:74
1142
- msgid "New"
1143
  msgstr ""
1144
 
1145
- #: templates_admin/widgets.php:74
1146
- msgid "Custom"
1147
  msgstr ""
1148
 
1149
- #: templates_admin/widgets.php:77
1150
- msgid "Editor"
1151
  msgstr ""
1152
 
1153
  #: package.json
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.62.1\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-03-22T02:10:26+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:196
37
+ #: mappress.php:730
38
  msgid "Settings"
39
  msgstr ""
40
 
41
+ #: mappress.php:197
42
  msgid "Map Library"
43
  msgstr ""
44
 
45
+ #: mappress.php:208
46
  msgid "MapPress database tables are missing. Please deactivate the plugin and activate it again to fix this."
47
  msgstr ""
48
 
49
+ #: mappress.php:213
50
  msgid "A Google Maps API key is required"
51
  msgstr ""
52
 
53
+ #: mappress.php:213
54
  msgid "Please update your"
55
  msgstr ""
56
 
57
+ #: mappress.php:213
58
  msgid "MapPress Settings"
59
  msgstr ""
60
 
61
+ #: mappress.php:477
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  msgid "renew your license"
63
  msgstr ""
64
 
65
+ #: mappress.php:478
66
  msgid "Your MapPress license has expired. Please %s to get the latest updates and prevent errors."
67
  msgstr ""
68
 
69
+ #: mappress.php:487
70
  msgid "Please enter your MapPress license key to enable plugin updates"
71
  msgstr ""
72
 
73
+ #: mappress.php:491
74
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
75
  msgstr ""
76
 
77
+ #: mappress.php:495
78
+ msgid "MapPress has many new features! %s."
 
 
 
 
79
  msgstr ""
80
 
81
+ #: mappress.php:495
82
+ #: mappress.php:499
83
+ msgid "Learn more"
84
  msgstr ""
85
 
86
+ #: mappress.php:499
87
+ msgid "MapPress popup templates have changed! Please update custom templates to the new format. %s."
88
  msgstr ""
89
 
90
+ #: mappress.php:545
91
  msgid "Are you sure you want to delete?"
92
  msgstr ""
93
 
94
+ #: mappress.php:546
95
  msgid "Permanently delete this map from the map library?"
96
  msgstr ""
97
 
98
+ #: mappress.php:547
99
  msgid "Error reading KML file"
100
  msgstr ""
101
 
102
+ #: mappress.php:548
103
  msgid "URL for KML file"
104
  msgstr ""
105
 
106
+ #: mappress.php:549
107
  msgid "Loading"
108
  msgstr ""
109
 
110
+ #: mappress.php:550
111
+ msgid "Please select an editor to insert into."
112
  msgstr ""
113
 
114
+ #: mappress.php:551
115
  msgid "Unable to get your location"
116
  msgstr ""
117
 
118
+ #: mappress.php:552
119
  msgid "No results"
120
  msgstr ""
121
 
122
+ #: mappress.php:553
123
  msgid "Save changes?"
124
  msgstr ""
125
 
126
+ #: mappress.php:554
127
  msgid "Shape"
128
  msgstr ""
129
 
130
+ #: mappress.php:584
131
  msgid "Improve this map"
132
  msgstr ""
133
 
134
+ #: mappress.php:600
135
+ #: mappress.php:619
136
  msgid "Streets"
137
  msgstr ""
138
 
139
+ #: mappress.php:601
140
  msgid "Outdoors"
141
  msgstr ""
142
 
143
+ #: mappress.php:602
144
  msgid "Light"
145
  msgstr ""
146
 
147
+ #: mappress.php:603
148
  msgid "Dark"
149
  msgstr ""
150
 
151
+ #: mappress.php:604
152
  msgid "Satellite"
153
  msgstr ""
154
 
155
+ #: mappress.php:605
156
  msgid "Satellite Streets"
157
  msgstr ""
158
 
159
+ #: mappress.php:731
160
+ #: mappress_settings.php:369
161
  msgid "What's new"
162
  msgstr ""
163
 
164
+ #: mappress.php:980
165
  msgid "Version"
166
  msgstr ""
167
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  #: mappress_map.php:86
169
+ #: mappress_settings.php:364
170
  msgid "MapPress"
171
  msgstr ""
172
 
173
+ #: mappress_map.php:96
 
 
 
174
  msgid "Untitled"
175
  msgstr ""
176
 
177
+ #: mappress_map.php:97
178
  msgid "Copy of %s"
179
  msgstr ""
180
 
181
+ #: mappress_map.php:201
182
  msgid "Map not found"
183
  msgstr ""
184
 
185
+ #: mappress_map.php:244
186
+ msgid "Post not found"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  msgstr ""
188
 
189
+ #: mappress_settings.php:163
 
 
 
 
 
 
 
190
  msgid "Default"
191
  msgstr ""
192
 
193
+ #: mappress_settings.php:218
194
+ msgid "Easy Google Maps"
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  msgstr ""
196
 
197
+ #: mappress_settings.php:242
198
+ msgid "Active"
199
  msgstr ""
200
 
201
+ #: mappress_settings.php:245
202
+ msgid "Communication error, please try again later: %s"
203
  msgstr ""
204
 
 
205
  #: mappress_settings.php:247
206
+ msgid "License is invalid or expired"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  msgstr ""
208
 
209
+ #: mappress_settings.php:255
210
+ msgid "Address line "
211
  msgstr ""
212
 
213
+ #: mappress_settings.php:256
214
+ msgid "Latitude"
215
  msgstr ""
216
 
217
+ #: mappress_settings.php:256
218
+ msgid "Longitude"
 
219
  msgstr ""
220
 
221
+ #: mappress_settings.php:256
222
+ #: mappress_template.php:37
223
+ msgid "Title"
224
  msgstr ""
225
 
226
+ #: mappress_settings.php:256
227
+ #: mappress_template.php:34
228
+ msgid "Body"
229
  msgstr ""
230
 
231
+ #: mappress_settings.php:256
232
+ #: mappress_template.php:35
233
+ msgid "Icon"
234
  msgstr ""
235
 
236
+ #: mappress_settings.php:256
237
+ msgid "Zoom"
238
  msgstr ""
239
 
240
+ #: mappress_settings.php:345
241
+ msgid "OK, you deserve it!"
242
  msgstr ""
243
 
244
+ #: mappress_settings.php:346
245
+ msgid "Nope, maybe later"
246
  msgstr ""
247
 
248
+ #: mappress_settings.php:347
249
+ msgid "I need help using the plugin"
250
  msgstr ""
251
 
252
+ #: mappress_settings.php:349
253
+ msgid "Help Spread the Word"
254
  msgstr ""
255
 
256
+ #: mappress_settings.php:350
257
+ msgid "Hi, I hope you're enjoying MapPress. Would you mind taking a moment to write a brief review? It would mean a lot to me!"
258
  msgstr ""
259
 
260
+ #: mappress_settings.php:368
261
  msgid "Get help"
262
  msgstr ""
263
 
264
+ #: mappress_settings.php:371
265
  msgid "Your account"
266
  msgstr ""
267
 
268
+ #: mappress_settings.php:373
269
  msgid "Upgrade to MapPress Pro"
270
  msgstr ""
271
 
272
+ #: mappress_template.php:33
 
 
 
 
 
 
 
 
 
 
273
  msgid "Address"
274
  msgstr ""
275
 
 
 
 
 
 
276
  #: mappress_template.php:36
 
 
 
 
 
 
 
277
  msgid "Thumbnail"
278
  msgstr ""
279
 
280
  #: mappress_template.php:38
 
 
 
 
 
281
  msgid "Url"
282
  msgstr ""
283
 
284
+ #: mappress_template.php:39
285
+ #: pro/mappress_filter.php:192
 
286
  msgid "Custom Field"
287
  msgstr ""
288
 
289
  #: pro/mappress_filter.php:84
290
+ #: pro/mappress_filter.php:205
 
291
  msgid "Post type"
292
  msgstr ""
293
 
294
+ #: pro/mappress_filter.php:192
295
  msgid "Taxonomy"
296
  msgstr ""
297
 
298
+ #: pro/mappress_filter.php:192
299
  msgid "Post field"
300
  msgstr ""
301
 
326
  msgid "Invalid JSON from Geocoding service: %s"
327
  msgstr ""
328
 
329
+ #: pro/mappress_icons.php:131
 
 
 
 
330
  msgid "Files error: "
331
  msgstr ""
332
 
334
  msgid "Automatic"
335
  msgstr ""
336
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  #: pro/mappress_updater.php:116
338
  msgid "Communication error, please try again later"
339
  msgstr ""
340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  #: pro/mappress_updater.php:122
342
  msgid "JSON error"
343
  msgstr ""
344
 
345
  #: pro/mappress_widget.php:69
346
+ #: pro/mappress_widget_map.php:57
347
  msgid "Widget title"
348
  msgstr ""
349
 
350
  #: pro/mappress_widget.php:74
351
+ #: pro/mappress_widget_map.php:67
352
  msgid "Map size"
353
  msgstr ""
354
 
377
  msgstr ""
378
 
379
  #: pro/mappress_widget.php:94
380
+ #: pro/mappress_widget_map.php:75
381
  msgid "Show POI list"
382
  msgstr ""
383
 
384
  #: pro/mappress_widget.php:101
385
+ #: pro/mappress_widget_map.php:82
386
  msgid "Other Settings"
387
  msgstr ""
388
 
389
  #: pro/mappress_widget.php:104
390
+ #: pro/mappress_widget_map.php:85
391
  msgid "Example: initialopeninfo=\"true\""
392
  msgstr ""
393
 
394
+ #: pro/mappress_widget_map.php:62
 
 
395
  msgid "Map ID"
396
  msgstr ""
397
 
400
  msgstr ""
401
 
402
  #: templates/map-directions.php:14
403
+ #: templates/map-popup.php:5
404
+ #: templates/mashup-popup.php:6
405
  msgid "Get Directions"
406
  msgstr ""
407
 
417
  msgid "Results"
418
  msgstr ""
419
 
420
+ #: templates/map.php:51
421
+ msgid "Search"
422
+ msgstr ""
423
+
424
  #: templates/map.php:53
425
  msgid "Your Location"
426
  msgstr ""
427
 
428
+ #: templates/map.php:58
429
+ msgid "Filter"
430
+ msgstr ""
431
+
432
  #: templates/map.php:67
433
  msgid "Menu"
434
  msgstr ""
457
  msgid "Show Map"
458
  msgstr ""
459
 
460
+ #: templates/mashup-modal.php:18
461
+ msgid "Continue reading"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
462
  msgstr ""
463
 
464
+ #. translators: %s: Author name.
465
+ #: templates/mashup-modal.php:24
466
+ msgid "By %s"
467
  msgstr ""
468
 
469
+ #: templates/mashup-modal.php:28
470
+ msgid "In"
471
  msgstr ""
472
 
473
+ #: templates/mashup-modal.php:29
474
+ msgid " Tagged "
475
  msgstr ""
476
 
477
+ #: templates_admin/editor.php:19
478
+ msgid "Visual"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
479
  msgstr ""
480
 
481
+ #: templates_admin/editor.php:19
482
+ msgid "HTML"
483
  msgstr ""
484
 
485
+ #: templates_admin/editor.php:21
486
+ msgid "Add Media"
487
  msgstr ""
488
 
489
+ #: templates_admin/editor.php:30
490
+ msgid "Save"
491
  msgstr ""
492
 
493
+ #: templates_admin/editor.php:31
494
+ msgid "Cancel"
495
  msgstr ""
496
 
497
+ #: templates_admin/editor.php:32
498
+ msgid "Delete"
499
  msgstr ""
500
 
501
  #: package.json
languages/texts.php CHANGED
@@ -10,26 +10,19 @@ __("MapPress database tables are missing. Please deactivate the plugin and acti
10
  __("A Google Maps API key is required");
11
  __("Please update your");
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.");
24
- __("what's new");
25
- __("The MapPress map editor has moved!");
26
- __("Use this button to open the new popup editor where you can easily create, edit and insert maps.");
27
  __("Are you sure you want to delete?");
28
  __("Permanently delete this map from the map library?");
29
  __("Error reading KML file");
30
  __("URL for KML file");
31
  __("Loading");
32
- __("Please select a classic editor block to insert into.");
33
  __("Unable to get your location");
34
  __("No results");
35
  __("Save changes?");
@@ -43,78 +36,33 @@ __("Satellite");
43
  __("Satellite Streets");
44
  __("What's new");
45
  __("Version");
46
- __("Add");
47
- __("Delete");
48
  __("MapPress");
49
  __("Untitled");
50
  __("Copy of %s");
51
  __("Map not found");
52
- __("Sample Map");
53
- __("Basic Settings");
54
- __("Mapping API");
55
- __("Google API key");
56
- __("Mapbox access token");
57
- __("License");
58
- __("Map Settings");
59
- __("Post types");
60
- __("Automatic display");
61
- __("Map alignment");
62
- __("Directions");
63
- __("POI Settings");
64
- __("Default zoom");
65
- __("Open first POI");
66
- __("Mashups");
67
- __("Icons");
68
- __("Styled Maps");
69
- __("Geocoding");
70
- __("Templates");
71
- __("Localization");
72
- __("Search language");
73
- __("Search country");
74
- __("Directions server");
75
- __("Miscellaneous");
76
- __("Map sizes");
77
- __("Scripts");
78
- __("Compatiblity");
79
  __("Default");
80
- __("Center");
81
- __("Left");
82
- __("Right");
83
- __("None");
84
- __("Top of post");
85
- __("Bottom of post");
86
- __("(list)");
87
- __("Country code for searches");
88
- __("Prevent other plugins/themes from loading the Google Maps API");
89
- __("Google");
90
- __("Inline");
91
- __("Leaflet");
92
- __("Leaflet is free and requires no API key. Google requires an API key and has strict usage limits.");
93
- __("Output scripts in footer");
94
- __("Disabled because Jetpack Infinite Scroll is active");
95
- __("disable if maps are output using AJAX");
96
- __("Language for searches and Google map controls");
97
- __("Enter token to use Mapbox map tiles");
98
- __("Map type control");
99
- __("Street view control");
100
- __("Zoom control");
101
- __("Default zoom when displaying a single POI");
102
  __("Easy Google Maps");
103
- __("Width (px, %, vh, vw)");
104
- __("Height (px, %, vh, vw)");
105
- __("Default size");
106
- __("Show a tooltip when mouse is over a POI");
107
- __("Copy maps when overwriting a translation");
 
 
 
 
 
 
 
 
 
 
108
  __("Get help");
109
  __("Your account");
110
  __("Upgrade to MapPress Pro");
111
- __("Save Changes");
112
- __("Reset Defaults");
113
  __("Address");
114
- __("Body");
115
- __("Icon");
116
  __("Thumbnail");
117
- __("Title");
118
  __("Url");
119
  __("Custom Field");
120
  __("Post type");
@@ -126,92 +74,9 @@ __("Server API Key is missing - see MapPress Settings");
126
  __("Invalid status: %s, %s Address: %s");
127
  __("Error: %s %s");
128
  __("Invalid JSON from Geocoding service: %s");
129
- __("No file provided");
130
  __("Files error: ");
131
  __("Automatic");
132
- __("MapPress license key");
133
- __("Beta versions");
134
- __("Geocoder");
135
- __("POI list");
136
- __("POI list layout");
137
- __("Mini width");
138
- __("Sort");
139
- __("Clustering");
140
- __("Popup type");
141
- __("Default icon");
142
- __("Icon directory");
143
- __("Custom icons");
144
- __("Highlight selected POI");
145
- __("Icon scaling");
146
- __("Automatic icons");
147
- __("Search");
148
- __("Filter");
149
- __("POI content");
150
- __("POI click");
151
- __("KMLs");
152
- __("Thumbnails");
153
- __("Thumbnail size");
154
- __("Styled maps");
155
- __("Default style");
156
- __("Geocoding fields");
157
- __("Overwrite");
158
- __("Geocoding errors");
159
- __("Google Server API key");
160
- __("Custom templates");
161
- __("Force resize");
162
- __("more info");
163
- __("API key secured by IP address for geocoding (optional)");
164
- __("Value");
165
- __("Enable updates for beta versions");
166
- __("Enable marker clustering");
167
- __("Checkboxes");
168
- __("Select");
169
- __("Key");
170
- __("Format");
171
- __("Permanently resize existing maps (classic editor only)");
172
- __("from %s to %s");
173
- __("Algolia");
174
- __("Nominatim");
175
- __("MapBox");
176
- __("Circle");
177
- __("Edit");
178
- __("Standard");
179
- __("InfoBox");
180
- __("Left of map");
181
- __("Below map");
182
- __("Get license");
183
- __("Enter license to enable automatic updates");
184
- __("Active");
185
- __("Check now");
186
  __("Communication error, please try again later");
187
- __("License is invalid or expired");
188
- __("POI title + POI body");
189
- __("Post title + post excerpt");
190
- __("Open POI");
191
- __("Open post");
192
- __("Open post in new tab");
193
- __("Include KML POIs in mashups");
194
- __("%d Errors");
195
- __("Address line ");
196
- __("Latitude");
197
- __("Longitude");
198
- __("Zoom");
199
- __("Map Field");
200
- __("Overwrite maps when posts are saved");
201
- __("Width (px) at which to collapse the left POI list");
202
- __("Show a list of POIs with each map");
203
- __("Enable search");
204
- __("Sort POI list by title");
205
- __("No styles have been defined yet");
206
- __("Snazzy Maps");
207
- __("Enter JSON from %s");
208
- __("Style name");
209
- __("Mapbox Studio");
210
- __("Enter styles from %s");
211
- __("Only admins or multisite super-admins can edit templates");
212
- __("WordPress 4.9 or higher is needed to use the template editor.");
213
- __("or ");
214
- __("Show featured image thumbnails in mashup POIs");
215
  __("JSON error");
216
  __("Widget title");
217
  __("Map size");
@@ -230,7 +95,9 @@ __("Get Directions");
230
  __("Done");
231
  __("Reset");
232
  __("Results");
 
233
  __("Your Location");
 
234
  __("Menu");
235
  __("Center map");
236
  __("Traffic");
@@ -238,36 +105,15 @@ __("Bicycling");
238
  __("Transit");
239
  __("Show List");
240
  __("Show Map");
 
 
 
 
241
  __("Visual");
242
  __("HTML");
243
  __("Add Media");
244
  __("Save");
245
  __("Cancel");
246
- __("Select a map");
247
- __("Add New");
248
- __("post title");
249
- __("Attached to this post");
250
- __("All maps");
251
- __("Close");
252
- __("Size");
253
- __("Save center / zoom");
254
- __("Map title");
255
- __("Attached to");
256
- __("Action");
257
- __("Current post");
258
- __("Unattached");
259
- __("Insert into post");
260
- __("No maps found");
261
- __("Opacity");
262
- __("Weight");
263
- __("No custom icons have been added yet.");
264
- __("Use default icon");
265
- __("Map popup");
266
- __("Map list item");
267
- __("Mashup popup");
268
- __("Mashup list item");
269
- __("New");
270
- __("Custom");
271
- __("Editor");
272
  __("MapPress Maps for WordPress");
273
  ?>
10
  __("A Google Maps API key is required");
11
  __("Please update your");
12
  __("MapPress Settings");
 
 
 
 
 
 
13
  __("renew your license");
14
  __("Your MapPress license has expired. Please %s to get the latest updates and prevent errors.");
15
  __("Please enter your MapPress license key to enable plugin updates");
16
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
17
+ __("MapPress has many new features! %s.");
18
+ __("Learn more");
19
+ __("MapPress popup templates have changed! Please update custom templates to the new format. %s.");
 
20
  __("Are you sure you want to delete?");
21
  __("Permanently delete this map from the map library?");
22
  __("Error reading KML file");
23
  __("URL for KML file");
24
  __("Loading");
25
+ __("Please select an editor to insert into.");
26
  __("Unable to get your location");
27
  __("No results");
28
  __("Save changes?");
36
  __("Satellite Streets");
37
  __("What's new");
38
  __("Version");
 
 
39
  __("MapPress");
40
  __("Untitled");
41
  __("Copy of %s");
42
  __("Map not found");
43
+ __("Post not found");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  __("Default");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  __("Easy Google Maps");
46
+ __("Active");
47
+ __("Communication error, please try again later: %s");
48
+ __("License is invalid or expired");
49
+ __("Address line ");
50
+ __("Latitude");
51
+ __("Longitude");
52
+ __("Title");
53
+ __("Body");
54
+ __("Icon");
55
+ __("Zoom");
56
+ __("OK, you deserve it!");
57
+ __("Nope, maybe later");
58
+ __("I need help using the plugin");
59
+ __("Help Spread the Word");
60
+ __("Hi, I hope you're enjoying MapPress. Would you mind taking a moment to write a brief review? It would mean a lot to me!");
61
  __("Get help");
62
  __("Your account");
63
  __("Upgrade to MapPress Pro");
 
 
64
  __("Address");
 
 
65
  __("Thumbnail");
 
66
  __("Url");
67
  __("Custom Field");
68
  __("Post type");
74
  __("Invalid status: %s, %s Address: %s");
75
  __("Error: %s %s");
76
  __("Invalid JSON from Geocoding service: %s");
 
77
  __("Files error: ");
78
  __("Automatic");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  __("Communication error, please try again later");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  __("JSON error");
81
  __("Widget title");
82
  __("Map size");
95
  __("Done");
96
  __("Reset");
97
  __("Results");
98
+ __("Search");
99
  __("Your Location");
100
+ __("Filter");
101
  __("Menu");
102
  __("Center map");
103
  __("Traffic");
105
  __("Transit");
106
  __("Show List");
107
  __("Show Map");
108
+ __("Continue reading");
109
+ __("By %s");
110
+ __("In");
111
+ __(" Tagged ");
112
  __("Visual");
113
  __("HTML");
114
  __("Add Media");
115
  __("Save");
116
  __("Cancel");
117
+ __("Delete");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  __("MapPress Maps for WordPress");
119
  ?>
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.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/)
@@ -17,7 +17,6 @@ Thanks to all the translators and to Matthias Stasiak for his wonderful icons (h
17
  */
18
 
19
  require_once dirname( __FILE__ ) . '/mappress_obj.php';
20
- require_once dirname( __FILE__ ) . '/mappress_controls.php';
21
  require_once dirname( __FILE__ ) . '/mappress_poi.php';
22
  require_once dirname( __FILE__ ) . '/mappress_map.php';
23
  require_once dirname( __FILE__ ) . '/mappress_settings.php';
@@ -29,7 +28,6 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
29
  include_once dirname( __FILE__ ) . '/pro/mappress_geocoder.php';
30
  include_once dirname( __FILE__ ) . '/pro/mappress_icons.php';
31
  include_once dirname( __FILE__ ) . '/pro/mappress_meta.php';
32
- include_once dirname( __FILE__ ) . '/pro/mappress_pro_settings.php';
33
  include_once dirname( __FILE__ ) . '/pro/mappress_query.php';
34
  include_once dirname( __FILE__ ) . '/pro/mappress_updater.php';
35
  include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
@@ -37,18 +35,18 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
37
  }
38
 
39
  class Mappress {
40
- const VERSION = '2.59';
41
 
42
  static
43
  $baseurl,
44
  $basename,
45
  $basedir,
46
  $debug,
 
47
  $loaded,
48
  $options,
49
  $notices,
50
  $pages,
51
- $pointers,
52
  $pro,
53
  $updater,
54
  $version
@@ -87,9 +85,6 @@ class Mappress {
87
  add_action('wp_enqueue_scripts', array(__CLASS__, 'wp_enqueue_scripts'));
88
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
89
 
90
- // Review
91
- add_action('current_screen', array(__CLASS__, 'current_screen'));
92
-
93
  // Plugin action links
94
  add_filter("plugin_action_links_" . self::$basename, array(__CLASS__, 'plugin_action_links'), 10, 2);
95
 
@@ -118,13 +113,48 @@ class Mappress {
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
@@ -136,49 +166,34 @@ class Mappress {
136
  if (empty($hook))
137
  return;
138
 
139
- // Network admin has no pages
140
- if (empty(self::$pages))
141
  return;
142
 
143
- $is_editing = in_array($hook, array('post.php', 'post-new.php'));
144
- $is_settings = in_array($hook, self::$pages);
145
- $is_customizer = $hook == 'customize.php';
146
-
147
- if ($is_editing || $is_settings || $is_customizer) {
148
- self::scripts_enqueue('backend');
149
-
150
- // Settings - Gutenberg CSS for library + code editor
151
- if ($is_settings) {
152
- wp_enqueue_style( 'wp-edit-blocks' );
153
- if (function_exists('wp_enqueue_code_editor'))
154
- wp_enqueue_code_editor(array( 'type' => 'php' ));
155
- }
156
-
157
- // Leaflet CSS
158
- if (self::$options->engine == 'leaflet')
159
- wp_enqueue_style('mappress-leaflet', 'https://unpkg.com/leaflet@1.7.1/dist/leaflet.css', null, '1.7.1');
160
- if (self::$options->clustering) {
161
- wp_enqueue_style('mappress-leaflet-markercluster-default', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.Default.css", null, '1.4.1');
162
- wp_enqueue_style('mappress-leaflet-markercluster', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.css", null, '1.4.1');
163
  }
164
-
165
- // Mappress CSS
166
- wp_enqueue_style('mappress', self::$baseurl . '/css/mappress.css', null, self::$version);
167
- wp_enqueue_style('mappress-admin', self::$baseurl . '/css/mappress_admin.css', null, self::$version);
168
- }
169
-
170
- // Temporary, for mce pointer
171
- if ($is_editing) {
172
- wp_enqueue_style( 'wp-pointer' );
173
- wp_enqueue_script( 'wp-pointer' );
174
  }
175
  }
176
 
177
  static function admin_menu() {
178
  // Settings
179
- $settings = (self::$pro) ? new Mappress_Pro_Settings() : new Mappress_Settings();
180
- self::$pages[] = add_menu_page('MapPress', 'MapPress', 'manage_options', 'mappress', array(&$settings, 'options_page'), 'dashicons-location');
181
- self::$pages[] = add_submenu_page('mappress', __('Settings', 'mappress-google-maps-for-wordpress'), __('Settings', 'mappress-google-maps-for-wordpress'), 'manage_options', 'mappress', array(&$settings, 'options_page'));
182
  self::$pages[] = add_submenu_page('mappress', __('Map Library', 'mappress-google-maps-for-wordpress'), __('Map Library', 'mappress-google-maps-for-wordpress'), 'manage_options', 'mappress_maps', array(__CLASS__, 'map_library'));
183
  }
184
 
@@ -284,36 +299,6 @@ class Mappress {
284
  );
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;
294
- }
295
-
296
- if (time() <= $first_time + (60 * 60 * 24 * 10))
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>";
309
- $body .= "<p>" . __("If you have any issues or suggestions, please let me know. I'll be happy to help!", 'mappress-google-maps-for-wordpress') . "</p>";
310
- $body .= "<p>" . "~ Chris Richardson" . "</p>";
311
- $body .= "<div class='mapp-review-options'>" . $review_link . $no_link . $help_link . "</div>";
312
- $body .= "</div>";
313
- self::$notices['review'] = array('review', $body);
314
- }
315
- }
316
-
317
  static function debugging() {
318
  global $wpdb;
319
 
@@ -433,25 +418,27 @@ class Mappress {
433
  */
434
  static function init() {
435
  Mappress_Map::register();
 
436
  Mappress_Template::register();
437
  Mappress_WPML::register();
438
 
439
  if (self::$pro) {
440
  Mappress_Icons::register();
441
  Mappress_Meta::register();
442
- Mappress_Pro_Settings::register();
443
  Mappress_Query::register();
444
  Mappress_Widget::register();
445
  Mappress_Widget_Map::register();
446
  }
447
 
448
  self::scripts_register();
 
449
 
450
  // Register Gutenberg block types and load GT scripts
451
  if (function_exists('register_block_type')) {
452
  register_block_type('mappress/map', array(
453
  'render_callback' => array(__CLASS__, 'shortcode_map'),
454
- 'editor_script' => array('mappress_admin')
 
455
  ));
456
  if (self::$pro) {
457
  register_block_type('mappress/mashup', array(
@@ -483,7 +470,7 @@ class Mappress {
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);
@@ -504,18 +491,15 @@ class Mappress {
504
  self::$notices['255_min_version'] = array('error', __('MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.', 'mappress-google-maps-for-wordpress'));
505
 
506
  // New features
507
- if ($current_version && $current_version < '2.55' and self::VERSION >= '2.55')
508
- self::$notices['255_whats_new'] = array('info', sprintf(__('MapPress has many new features! Please take a moment to learn %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("what's new", 'mappress-google-maps-for-wordpress') . '</a>'));
509
 
510
- // New MCE editor
511
- if ($current_version && $current_version < '2.57') {
512
- $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
513
- if (!in_array('257_new_editor', $dismissed)) {
514
- $header = sprintf("<h3>%s</h3>", __("The MapPress map editor has moved!", 'mappress-google-maps-for-wordpress'));
515
- $content = sprintf("<p>%s</p>", __('Use this button to open the new popup editor where you can easily create, edit and insert maps.', 'mappress-google-maps-for-wordpress'));
516
- self::$pointers['257_new_editor'] = $header . $content;
517
- }
518
- }
519
 
520
  update_option('mappress_version', self::VERSION);
521
  }
@@ -563,7 +547,7 @@ class Mappress {
563
  'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
564
  'layer' => __('URL for KML file', 'mappress-google-maps-for-wordpress'),
565
  'loading' => "<span class='mapp-spinner'></span>" . __('Loading', 'mappress-google-maps-for-wordpress'),
566
- 'need_classic' => __('Please select a classic editor block to insert into.', 'mappress-google-maps-for-wordpress'),
567
  'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
568
  'no_results' => __('No results', 'mappress-google-maps-for-wordpress'),
569
  'save' => __('Save changes?', 'mappress-google-maps-for-wordpress'),
@@ -582,13 +566,13 @@ class Mappress {
582
  'language' => self::get_language(),
583
  'mapbox' => self::get_api_keys()->mapbox,
584
  'nonce' => wp_create_nonce('mappress'),
585
- 'pointers' => self::$pointers,
586
  'postid' => ($post) ? $post->ID : null, // Note: GT => numeric, classic => string
587
  'pro' => self::$pro,
588
  'ssl' => self::is_ssl(), // SSL is needed for 'your location' in directions
589
  'standardIcons' => (self::$pro) ? Mappress_Icons::$standard_icons : null,
590
  'standardIconsUrl' => (self::$pro) ? Mappress_Icons::$standard_icons_url : null,
591
- 'userIcons' => (self::$pro) ? Mappress_Icons::get_user_icons() : null
 
592
  );
593
 
594
  // Leaflet layers for mapbox / OSM
@@ -645,8 +629,8 @@ class Mappress {
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)) {
@@ -663,6 +647,41 @@ class Mappress {
663
  wp_editor('', 'mapp-library-tinymce');
664
  }
665
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
  static function scripts_register() {
667
  $dev = self::is_dev();
668
  $footer = self::is_footer();
@@ -698,7 +717,7 @@ class Mappress {
698
  $deps[] = (self::$options->engine == 'leaflet') ? 'mappress-leaflet-markercluster' : 'mappress-markerclustererplus';
699
 
700
  wp_register_script('mappress', $js . "/index_mappress.js", $deps, self::$version, $footer);
701
- wp_register_script('mappress_admin', $js . "/index_mappress_admin.js", array('mappress', 'jquery-ui-position', 'jquery-ui-sortable', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-editor', 'wp-element', 'wp-i18n'), self::$version, $footer);
702
 
703
  // I18N
704
  if (function_exists('wp_set_script_translations')) {
@@ -707,27 +726,6 @@ class Mappress {
707
  }
708
  }
709
 
710
- static function scripts_enqueue($type = 'frontend') {
711
- if (self::$loaded)
712
- return;
713
- else
714
- self::$loaded = true;
715
-
716
- wp_enqueue_script('mappress');
717
- wp_localize_script('mappress', 'mappl10n', self::l10n());
718
-
719
- if ($type == 'backend')
720
- wp_enqueue_script('mappress_admin');
721
-
722
- // Templates
723
- $templates = array('map', 'map-directions', 'map-filters', 'map-item', 'map-loop', 'map-popup', 'mashup-popup', 'mashup-loop', 'mashup-item');
724
- if ($type == 'backend')
725
- $templates = array_merge($templates, array('mce', 'editor', 'mce', 'widgets'));
726
-
727
- foreach($templates as $template_name)
728
- Mappress_Template::enqueue_template($template_name, self::is_footer());
729
- }
730
-
731
  static function plugin_action_links($links, $file) {
732
  $settings_link = "<a href='" . admin_url("admin.php?page=mappress") . "'>" . __('Settings', 'mappress-google-maps-for-wordpress') . "</a>";
733
  $whatsnew_link = "<a href='https://mappresspro.com/whats-new/' target='_blank'>" . __("What's new", 'mappress-google-maps-for-wordpress') . "</a>";
@@ -872,6 +870,43 @@ class Mappress {
872
  return $data;
873
  }
874
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
875
  /**
876
  * Automatic map display.
877
  * If set, the [mappress] shortcode will be prepended/appended to the post body, once for each map
@@ -934,28 +969,9 @@ class Mappress {
934
  * CSS is loaded from: child theme, theme, or plugin directory
935
  */
936
  static function wp_enqueue_scripts() {
937
- // Leaflet CSS
938
- if (self::$options->engine == 'leaflet') {
939
- wp_enqueue_style('mappress-leaflet', 'https://unpkg.com/leaflet@1.7.1/dist/leaflet.css', null, '1.7.1');
940
- if (self::$options->clustering) {
941
- wp_enqueue_style('mappress-leaflet-markercluster-default', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.Default.css", null, '1.4.1');
942
- wp_enqueue_style('mappress-leaflet-markercluster', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.css", null, '1.4.1');
943
- }
944
- }
945
-
946
- // Mappress CSS from plugin directory
947
- wp_enqueue_style('mappress', self::$baseurl . '/css/mappress.css', null, self::$version);
948
-
949
- // Mappress CSS from theme directory
950
- if ( @file_exists( get_stylesheet_directory() . '/mappress.css' ) )
951
- $file = get_stylesheet_directory_uri() . '/mappress.css';
952
- elseif ( @file_exists( get_template_directory() . '/mappress.css' ) )
953
- $file = get_template_directory_uri() . '/mappress.css';
954
-
955
- if (isset($file))
956
- wp_enqueue_style('mappress-custom', $file, array('mappress'), self::$version);
957
 
958
- // Load scripts in header
959
  if (!self::is_footer())
960
  self::scripts_enqueue();
961
  }
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.62.1
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/)
17
  */
18
 
19
  require_once dirname( __FILE__ ) . '/mappress_obj.php';
 
20
  require_once dirname( __FILE__ ) . '/mappress_poi.php';
21
  require_once dirname( __FILE__ ) . '/mappress_map.php';
22
  require_once dirname( __FILE__ ) . '/mappress_settings.php';
28
  include_once dirname( __FILE__ ) . '/pro/mappress_geocoder.php';
29
  include_once dirname( __FILE__ ) . '/pro/mappress_icons.php';
30
  include_once dirname( __FILE__ ) . '/pro/mappress_meta.php';
 
31
  include_once dirname( __FILE__ ) . '/pro/mappress_query.php';
32
  include_once dirname( __FILE__ ) . '/pro/mappress_updater.php';
33
  include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
35
  }
36
 
37
  class Mappress {
38
+ const VERSION = '2.62.1';
39
 
40
  static
41
  $baseurl,
42
  $basename,
43
  $basedir,
44
  $debug,
45
+ $iframe,
46
  $loaded,
47
  $options,
48
  $notices,
49
  $pages,
 
50
  $pro,
51
  $updater,
52
  $version
85
  add_action('wp_enqueue_scripts', array(__CLASS__, 'wp_enqueue_scripts'));
86
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
87
 
 
 
 
88
  // Plugin action links
89
  add_filter("plugin_action_links_" . self::$basename, array(__CLASS__, 'plugin_action_links'), 10, 2);
90
 
113
 
114
  // Add KML/KMZ as valid mime types
115
  add_filter('mime_types', array(__CLASS__, 'mime_types'));
116
+
117
+ if (self::$iframe)
118
+ add_action('wp_ajax_mapp_iframe', array(__CLASS__, 'ajax_iframe'));
119
  }
120
 
121
+ static function ajax_iframe() {
122
+ check_ajax_referer('mappress', 'nonce');
123
+ if (!current_user_can('edit_posts'))
124
+ return;
125
+
126
+ ob_start();
127
+
128
+ Mappress::$options->footer = true;
129
+ Mappress::scripts_register();
130
+ Mappress::styles_enqueue('backend');
131
+ Mappress::scripts_enqueue('backend');
132
+
133
+ // Iframe needs to include some standard CSS
134
+ wp_enqueue_style('forms');
135
+ wp_enqueue_style('common');
136
+
137
+ ?>
138
+ <!doctype html>
139
+ <html class='mapp-iframe-html' <?php language_attributes(); ?>>
140
+ <head>
141
+ <title>MapPress</title>
142
+ <?php
143
+ Mappress::wp_head();
144
+ wp_print_styles();
145
+ ?>
146
+ </head>
147
+ <body>
148
+ <div id='mapp-iframe-react'></div>
149
+ <?php wp_print_footer_scripts(); ?>
150
+ <?php Mappress_Template::print_footer_templates(); ?>
151
+ </body>
152
+ </html>
153
+ <?php
154
+ $output = trim(ob_get_clean());
155
+ header( "Content-Type: text/html" );
156
+ $response = $output;
157
+ die ($response);
158
  }
159
 
160
  // Scripts & styles for admin
166
  if (empty($hook))
167
  return;
168
 
169
+ else if (empty(self::$pages)) // Network admin has no pages
 
170
  return;
171
 
172
+ $page = null;
173
+ if (in_array($hook, array('post.php', 'post-new.php')))
174
+ $page = 'editor';
175
+ else if ($hook == self::$pages[0])
176
+ $page = 'settings';
177
+ else if ($hook == self::$pages[2])
178
+ $page = 'library';
179
+ else if (in_array($hook, array('customize.php', 'appearance_page_gutenberg-widgets')))
180
+ $page = 'customizer';
181
+
182
+ if ($page) {
183
+ if ($page == 'settings') {
184
+ self::scripts_enqueue('settings');
185
+ self::styles_enqueue('settings');
186
+ } else {
187
+ self::scripts_enqueue('backend');
188
+ self::styles_enqueue('backend');
 
 
 
189
  }
 
 
 
 
 
 
 
 
 
 
190
  }
191
  }
192
 
193
  static function admin_menu() {
194
  // Settings
195
+ self::$pages[] = add_menu_page('MapPress', 'MapPress', 'manage_options', 'mappress', array('Mappress_Settings', 'options_page'), 'dashicons-location');
196
+ self::$pages[] = add_submenu_page('mappress', __('Settings', 'mappress-google-maps-for-wordpress'), __('Settings', 'mappress-google-maps-for-wordpress'), 'manage_options', 'mappress', array('Mappress_Settings', 'options_page'));
 
197
  self::$pages[] = add_submenu_page('mappress', __('Map Library', 'mappress-google-maps-for-wordpress'), __('Map Library', 'mappress-google-maps-for-wordpress'), 'manage_options', 'mappress_maps', array(__CLASS__, 'map_library'));
198
  }
199
 
299
  );
300
  }
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  static function debugging() {
303
  global $wpdb;
304
 
418
  */
419
  static function init() {
420
  Mappress_Map::register();
421
+ Mappress_Settings::register();
422
  Mappress_Template::register();
423
  Mappress_WPML::register();
424
 
425
  if (self::$pro) {
426
  Mappress_Icons::register();
427
  Mappress_Meta::register();
 
428
  Mappress_Query::register();
429
  Mappress_Widget::register();
430
  Mappress_Widget_Map::register();
431
  }
432
 
433
  self::scripts_register();
434
+ self::styles_register();
435
 
436
  // Register Gutenberg block types and load GT scripts
437
  if (function_exists('register_block_type')) {
438
  register_block_type('mappress/map', array(
439
  'render_callback' => array(__CLASS__, 'shortcode_map'),
440
+ 'editor_script' => array('mappress_admin'),
441
+
442
  ));
443
  if (self::$pro) {
444
  register_block_type('mappress/mashup', array(
470
  // Check for license expired
471
  if (self::$pro && self::$options->license) {
472
  $last_check = get_option('mappress_license_check');
473
+ if (!$last_check || time() > $last_check + (60 * 60 * 24 * 7)) {
474
  $status = Mappress::$updater->get_status();
475
  if ($status != 'active') {
476
  self::admin_notices_dismiss('license_expired', false);
491
  self::$notices['255_min_version'] = array('error', __('MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.', 'mappress-google-maps-for-wordpress'));
492
 
493
  // New features
494
+ if ($current_version && $current_version < '2.55' && self::VERSION >= '2.55')
495
+ self::$notices['255_whats_new'] = array('info', sprintf(__('MapPress has many new features! %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
496
 
497
+ // New features
498
+ if ($current_version && $current_version < '2.60' && self::VERSION >= '2.60')
499
+ self::$notices['260_whats_new'] = array('warning', sprintf(__('MapPress popup templates have changed! Please update custom templates to the new format. %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
500
+
501
+ // if ($current_version && $current_version < '2.62.1' && self::VERSION >= '2.62.1')
502
+ // self::$notices['260_whats_new'] = array('warning', sprintf(__('MapPress list templates have changed! Please update any mashup item or map item custom templates to the new format. %s.'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more") . '</a>'));
 
 
 
503
 
504
  update_option('mappress_version', self::VERSION);
505
  }
547
  'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
548
  'layer' => __('URL for KML file', 'mappress-google-maps-for-wordpress'),
549
  'loading' => "<span class='mapp-spinner'></span>" . __('Loading', 'mappress-google-maps-for-wordpress'),
550
+ 'need_classic' => __('Please select an editor to insert into.', 'mappress-google-maps-for-wordpress'),
551
  'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
552
  'no_results' => __('No results', 'mappress-google-maps-for-wordpress'),
553
  'save' => __('Save changes?', 'mappress-google-maps-for-wordpress'),
566
  'language' => self::get_language(),
567
  'mapbox' => self::get_api_keys()->mapbox,
568
  'nonce' => wp_create_nonce('mappress'),
 
569
  'postid' => ($post) ? $post->ID : null, // Note: GT => numeric, classic => string
570
  'pro' => self::$pro,
571
  'ssl' => self::is_ssl(), // SSL is needed for 'your location' in directions
572
  'standardIcons' => (self::$pro) ? Mappress_Icons::$standard_icons : null,
573
  'standardIconsUrl' => (self::$pro) ? Mappress_Icons::$standard_icons_url : null,
574
+ 'userIcons' => (self::$pro) ? Mappress_Icons::get_user_icons() : null,
575
+ 'version' => self::$version
576
  );
577
 
578
  // Leaflet layers for mapbox / OSM
629
 
630
  // Global settings
631
  $options = array('alignment', 'clustering', 'country', 'defaultIcon', 'directions', 'directionsServer',
632
+ 'engine', 'filter', 'geocoder', 'highlight', 'highlightIcon', 'iconScale', 'initialOpenInfo', 'iwType', 'layout', 'listThumbs',
633
+ 'mashupClick', 'mini', 'poiList', 'poiZoom', 'popupThumbs', 'radius', 'search', 'size', 'sizes', 'style', 'thumbs', 'tooltips');
634
 
635
  foreach($options as $option) {
636
  if (isset(self::$options->$option)) {
647
  wp_editor('', 'mapp-library-tinymce');
648
  }
649
 
650
+ static function mime_types($mimes) {
651
+ // Additional entries must match WP, which use finfo_file(), e.g. KML => text/xml
652
+ $mimes['kml'] = 'text/xml'; // Real type: 'application/vnd.google-earth.kml+xml';
653
+ $mimes['kmz'] = 'application/zip'; // Real type: 'application/vnd.google-earth.kmz';
654
+ return $mimes;
655
+ }
656
+
657
+ static function scripts_enqueue($type = 'frontend') {
658
+ if (self::$loaded)
659
+ return;
660
+ else
661
+ self::$loaded = true;
662
+
663
+ wp_enqueue_script('mappress');
664
+
665
+ // L10N - can't be done at register because $post global isn't set
666
+ wp_localize_script('mappress', 'mappl10n', self::l10n());
667
+
668
+ if ($type == 'backend' || $type == 'settings')
669
+ wp_enqueue_script('mappress_admin');
670
+
671
+ if ($type == 'settings') {
672
+ if (function_exists('wp_enqueue_code_editor'))
673
+ wp_enqueue_code_editor(array( 'type' => 'php' ));
674
+ }
675
+
676
+ // Templates
677
+ $templates = array('map', 'map-directions', 'map-filters', 'map-item', 'map-loop', 'map-popup', 'mashup-popup', 'mashup-loop', 'mashup-item');
678
+ if ($type == 'backend')
679
+ $templates = array_merge($templates, array('mce', 'editor'));
680
+
681
+ foreach($templates as $template_name)
682
+ Mappress_Template::enqueue_template($template_name, self::is_footer());
683
+ }
684
+
685
  static function scripts_register() {
686
  $dev = self::is_dev();
687
  $footer = self::is_footer();
717
  $deps[] = (self::$options->engine == 'leaflet') ? 'mappress-leaflet-markercluster' : 'mappress-markerclustererplus';
718
 
719
  wp_register_script('mappress', $js . "/index_mappress.js", $deps, self::$version, $footer);
720
+ wp_register_script('mappress_admin', $js . "/index_mappress_admin.js", array('mappress', 'jquery-ui-position', 'jquery-ui-sortable', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-url', 'wp-core-data', 'wp-i18n'), self::$version, $footer);
721
 
722
  // I18N
723
  if (function_exists('wp_set_script_translations')) {
726
  }
727
  }
728
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
729
  static function plugin_action_links($links, $file) {
730
  $settings_link = "<a href='" . admin_url("admin.php?page=mappress") . "'>" . __('Settings', 'mappress-google-maps-for-wordpress') . "</a>";
731
  $whatsnew_link = "<a href='https://mappresspro.com/whats-new/' target='_blank'>" . __("What's new", 'mappress-google-maps-for-wordpress') . "</a>";
870
  return $data;
871
  }
872
 
873
+ static function styles_enqueue($type = 'frontend') {
874
+ wp_enqueue_style('mappress-leaflet');
875
+ wp_enqueue_style('mappress-leaflet-markercluster-default');
876
+ wp_enqueue_style('mappress-leaflet-markercluster');
877
+ wp_enqueue_style('mappress');
878
+
879
+ if ($type == 'frontend')
880
+ wp_enqueue_style('mappress-custom');
881
+ else if ($type == 'backend' || $type == 'settings')
882
+ wp_enqueue_style('mappress-admin');
883
+ }
884
+
885
+ static function styles_register() {
886
+ // Leaflet CSS
887
+ if (self::$options->engine == 'leaflet') {
888
+ wp_register_style('mappress-leaflet', 'https://unpkg.com/leaflet@1.7.1/dist/leaflet.css', null, '1.7.1');
889
+ if (self::$options->clustering) {
890
+ wp_register_style('mappress-leaflet-markercluster-default', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.Default.css", null, '1.4.1');
891
+ wp_register_style('mappress-leaflet-markercluster', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.css", null, '1.4.1');
892
+ }
893
+ }
894
+
895
+ // Mappress CSS from plugin directory
896
+ wp_register_style('mappress', self::$baseurl . '/css/mappress.css', null, self::$version);
897
+
898
+ // Mappress CSS from theme directory
899
+ if ( @file_exists( get_stylesheet_directory() . '/mappress.css' ) )
900
+ $file = get_stylesheet_directory_uri() . '/mappress.css';
901
+ elseif ( @file_exists( get_template_directory() . '/mappress.css' ) )
902
+ $file = get_template_directory_uri() . '/mappress.css';
903
+ if (isset($file))
904
+ wp_register_style('mappress-custom', $file, array('mappress'), self::$version);
905
+
906
+ // Admin CSS
907
+ wp_register_style('mappress-admin', self::$baseurl . '/css/mappress_admin.css', array('wp-edit-blocks'), self::$version);
908
+ }
909
+
910
  /**
911
  * Automatic map display.
912
  * If set, the [mappress] shortcode will be prepended/appended to the post body, once for each map
969
  * CSS is loaded from: child theme, theme, or plugin directory
970
  */
971
  static function wp_enqueue_scripts() {
972
+ self::styles_enqueue('frontend');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
973
 
974
+ // Load scripts in header if needed
975
  if (!self::is_footer())
976
  self::scripts_enqueue();
977
  }
mappress_controls.php DELETED
@@ -1,276 +0,0 @@
1
- <?php
2
- /**
3
- * Generic HTML controls
4
- */
5
- class Mappress_Controls {
6
-
7
- static function parse_atts($name, $args = '') {
8
- $args = empty($args) ? array() : $args;
9
-
10
- // Include name if set
11
- $atts = (empty($name)) ? '' : "name='" . esc_attr($name) . "'";
12
-
13
- foreach($args as $key => $value) {
14
- // Attributes with value
15
- if (isset($value) && in_array($key, array('class', 'id', 'maxlength', 'multiple', 'onclick', 'placeholder', 'rows', 'size', 'style', 'title', 'type')))
16
- $atts .= " $key='" . esc_attr($value) . "' ";
17
-
18
- // Boolean attributes
19
- if (in_array($key, array('checked', 'disabled', 'multiple', 'readonly', 'selected')) && $value)
20
- if (!empty($value))
21
- $atts .= " $key ";
22
-
23
- // Data (not escaped)
24
- if (substr($key, 0, 4) == 'data')
25
- $atts .= " $key='$value' ";
26
- }
27
-
28
- return $atts;
29
- }
30
-
31
- static function button($name, $label, $args = '') {
32
- $args = (object) wp_parse_args($args, array('class' => '', 'type' => 'button'));
33
- $args->class = 'button ' . $args->class;
34
- $atts = self::parse_atts($name, $args);;
35
- $label = esc_attr($label);
36
- $html = "<input value='$label' $atts />";
37
- return $html;
38
- }
39
-
40
- // Boolean checkbox
41
- static function checkmark($name, $value, $label = '', $args = '') {
42
- $atts = self::parse_atts($name, $args);
43
- return "<input type='hidden' name='$name' value='false' /><label><input type='checkbox' value='true' " . checked($value, true, false) . " $atts />$label</label> ";
44
- }
45
-
46
- // Checkbox
47
- static function checkbox($name, $value, $checked, $label = '', $args = '') {
48
- $args = (object) wp_parse_args($args, array('checked' => ''));
49
- $args->checked = (is_array($checked)) ? in_array($value, $checked) : $value == $checked;
50
- $atts = self::parse_atts($name, $args);
51
- return "<label><input type='checkbox' value='" . esc_attr($value) . "' $atts />$label</label> ";
52
- }
53
-
54
- // Checkbox list
55
- static function checkboxes($name, $labels, $selected = null, $args = '') {
56
- $selected = ($selected) ? $selected : array();
57
- $name .= '[]';
58
-
59
- $html = "";
60
- foreach ($labels as $value => $label)
61
- $html .= self::checkbox($name, $value, in_array($value, $selected), $label, $args);
62
- return $html;
63
- }
64
-
65
- static function grid($headers, $rows, $args = '') {
66
- $atts = (object) wp_parse_args($args, array('style' => (count($rows) < 2) ? 'display:none' : null));
67
- $atts = self::parse_atts(null, $atts);
68
-
69
- // Prefix sortable rows with a drag icon
70
- $sortable = (isset($args['sortable']) && $args['sortable']);
71
-
72
- // Add a sortable header column
73
- if ($sortable)
74
- array_unshift($headers, '');
75
-
76
- // Add an action header column
77
- $headers[] = '';
78
-
79
- $html = "<div data-mapp-grid class='mapp-grid'>";
80
- $html .= "<table $atts>";
81
- $html .= "<thead>" . self::table_row($headers, 'th') . "</thead>";
82
- $html .= "<tbody>";
83
-
84
- foreach($rows as $i => $row) {
85
- // Grab the last (presumably blank) row as a template
86
- if ($i == count($rows) - 1)
87
- $template = self::grid_row($row, $sortable);
88
- else
89
- $html .= self::grid_row($row, $sortable);
90
- }
91
- $html .= "</tbody>";
92
- $html .= "</table>";
93
- $html .= "<button type='button' class='button' data-mapp-action='add'>" . __('Add', 'mappress-google-maps-for-wordpress') . "</button>";
94
- $html .= Mappress::script_template($template);
95
- $html .= "</div>";
96
- return $html;
97
- }
98
-
99
- static function grid_row($row, $sortable) {
100
- if ($sortable)
101
- array_unshift($row, '<span class="mapp-handle dashicons dashicons-menu"></span>');
102
- $row[] = "<span data-mapp-action='remove' class='mapp-close' title='" . __('Delete', 'mappress-google-maps-for-wordpress') . "'></span>";
103
- return self::table_row($row);
104
- }
105
-
106
- static function help($text = '', $url = '') {
107
- $icon = '<span class="dashicons dashicons-editor-help"></span>';
108
- $html = '';
109
- if ($url) {
110
- if (substr($url, 0, 1) == '#')
111
- $url = "http://mappresspro.com/mappress-documentation$url";
112
- $html .= sprintf("<a class='mapp-help' href='%s' target='_blank'>%s</a>", $url, $icon);
113
- }
114
- if ($text)
115
- $html .= "<div class='mapp-help'><i>$text</i></div>";
116
- return $html;
117
- }
118
-
119
- static function icon_picker($name = '', $value = '', $args = '') {
120
- $atts = self::parse_atts($name, $args);
121
- $name = esc_attr($name);
122
- $iconid = esc_attr($value);
123
- $icon = Mappress_Icons::get($value);
124
- $html = "<img class='mapp-icon' data-mapp-iconpicker data-mapp-iconid='$iconid' tabindex='0' src='$icon'><input type='hidden' name='$name' value='$iconid' $atts />";
125
- return $html;
126
- }
127
-
128
- static function input($name, $value, $args = '') {
129
- $args = (object) wp_parse_args($args, array('label' => '', 'type' => 'text'));
130
- $atts = self::parse_atts($name, $args);
131
- $value = esc_attr($value);
132
- return "<label><input $atts value='$value' /> {$args->label}</label>";
133
- }
134
-
135
- static function radio($name, $key, $label, $args = '') {
136
- $atts = self::parse_atts($name, $args);
137
- $key = esc_attr($key);
138
- $html = "<label><input type='radio' value='$key' $atts />$label</label> ";
139
- return $html;
140
- }
141
-
142
- static function radios($name, $data, $selected = null, $args = '') {
143
- $atts = self::parse_atts($name, $args);
144
- $html = "";
145
- foreach ((array)$data as $key => $label) {
146
- $key = esc_attr($key);
147
- $html .= "<label><input type='radio' value='$key' " . checked($selected, $key, false) . " $atts />$label</label> ";
148
- }
149
- return $html;
150
- }
151
-
152
- static function select($name, $data, $selected = '', $args = '') {
153
- $args = (object) wp_parse_args($args, array('none' => false));
154
- $atts = self::parse_atts($name, $args);
155
-
156
- if (!is_array($data) || empty($data))
157
- $data = array();
158
-
159
- if ($args->none) {
160
- $none = ($args->none === true) ? '&nbsp;' : $args->none;
161
- $data = array('' => $none) + $data;
162
- }
163
-
164
- $html = "\r\n<select $atts>\r\n";
165
- foreach ((array)$data as $key => $label) {
166
- if (substr($key, 0, 8) == 'optgroup') {
167
- $html .= "<optgroup label='" . esc_attr($label) . "'>";
168
- continue;
169
- }
170
- $select = (is_array($selected)) ? in_array($key, $selected) : $key === $selected;
171
- $select = ($select) ? 'selected' : '';
172
-
173
- $value = esc_attr($key);
174
- $label = esc_attr($label);
175
- $html .= "<option value='$value' title='$label' $select>$label</option>\r\n";
176
- }
177
- $html .= "</select>\r\n";
178
- return $html;
179
- }
180
-
181
- static function table($headers, $rows, $args = '') {
182
- $atts = self::parse_atts(null, $args);
183
-
184
- $html = "<table $atts>";
185
- $html .= "<thead>" . self::table_row($headers, 'th') . "</thead>";
186
- $html .= "<tbody>";
187
- foreach($rows as $row)
188
- $html .= self::table_row($row);
189
- $html .= "</tbody>";
190
- $html .= "</table>";
191
- return $html;
192
- }
193
-
194
- static function table_row($row, $tag = 'td') {
195
- $html = "<tr>";
196
- foreach($row as $col)
197
- $html .= "<$tag>$col</$tag>";
198
- $html .= "</tr>";
199
- return $html;
200
- }
201
-
202
- static function get_meta_keys() {
203
- global $wpdb;
204
- $keys = $wpdb->get_col( "
205
- SELECT DISTINCT meta_key
206
- FROM $wpdb->postmeta
207
- WHERE meta_key NOT in ('_edit_last', '_edit_lock', '_encloseme', '_pingme', '_thumbnail_id')
208
- AND meta_key NOT LIKE ('\_wp%')"
209
- );
210
- $results = (is_array($keys) && !empty($keys)) ? array_combine($keys, $keys) : array();
211
- return $results;
212
- }
213
-
214
- static function get_meta_values($meta_key) {
215
- global $wpdb;
216
- $sql = "SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value != '' ORDER BY meta_value";
217
- $meta_values = $wpdb->get_col($wpdb->prepare($sql, $meta_key));
218
- $results = ($meta_values) ? array_combine($meta_values, $meta_values) : array();
219
- return $results;
220
- }
221
-
222
- static function get_post_types() {
223
- $results = array();
224
- $post_types = get_post_types(array('show_ui' => true), 'objects');
225
- unset($post_types['mappress_map'], $post_types['attachment']);
226
- foreach($post_types as $type => $obj)
227
- $results[$type] = $obj->label;
228
- return $results;
229
- }
230
-
231
- static function get_taxonomies() {
232
- $results = array();
233
- $tax_objs = get_taxonomies(array('public' => true), 'objects');
234
- unset($tax_objs['post_format']);
235
- foreach($tax_objs as $tax_obj)
236
- $results[$tax_obj->name] = $tax_obj->label;
237
- return $results;
238
- }
239
-
240
- static function get_terms($taxonomy, $fields='slugs') {
241
- $results = array();
242
- $terms = get_terms($taxonomy, array('hide_empty' => false, 'exclude' => 1));
243
- if (is_array($terms)) {
244
- $walker = new Mappress_Walker($fields);
245
- $walk = $walker->walk($terms, 0, array('indent' => true));
246
- if (is_array($walk))
247
- $results = $walk;
248
- }
249
- return $results;
250
- }
251
- }
252
-
253
- /**
254
- * Walker for taxonomy values.
255
- * Call with array of terms objects: $walker->walk($terms, 0);
256
- * Returns array of (term slug => name)
257
- */
258
- class Mappress_Walker extends Walker {
259
- public $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
260
- public $fields;
261
-
262
- function __construct($fields=false) {
263
- $this->fields = $fields;
264
- }
265
-
266
- function start_el( &$output, $term, $depth = 0, $args = array(), $id = 0 ) {
267
- if (!is_array($output))
268
- $output = array();
269
-
270
- // If 'indent' set, use spaces (for hierarchical lists like taxonomies)
271
- $indent = (isset($args['indent']) && $args['indent']) ? str_repeat('&mdash;', $depth) : '';
272
- $value = ($this->fields == 'names') ? $term->name : $term->slug;
273
- $output[$term->slug] = $indent . $value . ' (' . $term->count . ')';
274
- }
275
- }
276
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mappress_map.php CHANGED
@@ -49,6 +49,7 @@ class Mappress_Map extends Mappress_Obj {
49
  add_action('wp_ajax_mapp_duplicate', array(__CLASS__, 'ajax_duplicate'));
50
  add_action('wp_ajax_mapp_find', array(__CLASS__, 'ajax_find'));
51
  add_action('wp_ajax_mapp_get', array(__CLASS__, 'ajax_get'));
 
52
  add_action('wp_ajax_mapp_mutate', array(__CLASS__, 'ajax_mutate'));
53
  add_action('wp_ajax_mapp_save', array(__CLASS__, 'ajax_save'));
54
 
@@ -81,10 +82,10 @@ class Mappress_Map extends Mappress_Obj {
81
  }
82
 
83
  static function media_buttons($editor_id) {
84
- if ($editor_id == 'content') {
85
- echo '<button type="button" class="button mapp-media-button">';
86
- echo '<span class="wp-media-buttons-icon dashicons dashicons-location"></span> ' . __('MapPress', 'mappress-google-maps-for-wordpress') . '</button>';
87
- }
88
  }
89
 
90
  static function duplicate($mapid, $postid) {
@@ -231,6 +232,22 @@ class Mappress_Map extends Mappress_Obj {
231
  }
232
  }
233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  function save() {
235
  global $wpdb;
236
  $maps_table = $wpdb->prefix . 'mappress_maps';
@@ -240,6 +257,10 @@ class Mappress_Map extends Mappress_Obj {
240
  foreach($this->pois as &$poi)
241
  $poi->body = wpautop($poi->body);
242
 
 
 
 
 
243
  $map = serialize($this);
244
 
245
  // Update map
@@ -255,6 +276,9 @@ class Mappress_Map extends Mappress_Obj {
255
  if ($result === false || !$this->mapid)
256
  return false;
257
 
 
 
 
258
  $result = $wpdb->query($wpdb->prepare("INSERT INTO $posts_table (postid, mapid) VALUES(%d, %d) ON DUPLICATE KEY UPDATE postid = %d, mapid = %d", $this->postid, $this->mapid,
259
  $this->postid, $this->mapid));
260
 
@@ -351,18 +375,12 @@ class Mappress_Map extends Mappress_Obj {
351
  Mappress::ajax_response('Error, map not found!');
352
 
353
  $map->update($mapdata);
354
-
355
- // Current save() allows multiple attachments, so delete existing attachments first
356
- $result = $wpdb->query($wpdb->prepare("DELETE FROM $posts_table WHERE mapid = %d", $map->mapid));
357
- if (!$result)
358
- Mappress::ajax_response('Internal error in posts table, your data has not been saved!');
359
-
360
  $result = $map->save();
361
 
362
  if (!$result)
363
  Mappress::ajax_response('Internal errorsaving, your data has not been saved!');
364
 
365
- // Return update map
366
  Mappress::ajax_response('OK', $map);
367
  }
368
 
49
  add_action('wp_ajax_mapp_duplicate', array(__CLASS__, 'ajax_duplicate'));
50
  add_action('wp_ajax_mapp_find', array(__CLASS__, 'ajax_find'));
51
  add_action('wp_ajax_mapp_get', array(__CLASS__, 'ajax_get'));
52
+ add_action('wp_ajax_mapp_get_post', array(__CLASS__, 'ajax_get_post'));
53
  add_action('wp_ajax_mapp_mutate', array(__CLASS__, 'ajax_mutate'));
54
  add_action('wp_ajax_mapp_save', array(__CLASS__, 'ajax_save'));
55
 
82
  }
83
 
84
  static function media_buttons($editor_id) {
85
+ if (Mappress::$iframe)
86
+ echo '<button class="button mapp-iframe-button" class="button mapp-media-button"><span class="wp-media-buttons-icon dashicons dashicons-location"></span> ' . __('MapPress', 'mappress-google-maps-for-wordpress') . '</button>';
87
+ else
88
+ echo '<div class="mapp-mce"></div>';
89
  }
90
 
91
  static function duplicate($mapid, $postid) {
232
  }
233
  }
234
 
235
+ static function ajax_get_post() {
236
+ global $post;
237
+
238
+ check_ajax_referer('mappress', 'nonce');
239
+ ob_start();
240
+ $postid = (isset($_GET['postid'])) ? $_GET['postid'] : null;
241
+ $post = get_post( $postid );
242
+
243
+ if (!$post)
244
+ die(sprintf(__('Post not found', 'mappress-google-maps-for-wordpress'), $postid));
245
+
246
+ setup_postdata($post);
247
+ $html = Mappress_Template::get_template('mashup-modal');
248
+ die($html);
249
+ }
250
+
251
  function save() {
252
  global $wpdb;
253
  $maps_table = $wpdb->prefix . 'mappress_maps';
257
  foreach($this->pois as &$poi)
258
  $poi->body = wpautop($poi->body);
259
 
260
+ // Make sure there's a postid
261
+ if (is_null($this->postid))
262
+ return false;
263
+
264
  $map = serialize($this);
265
 
266
  // Update map
276
  if ($result === false || !$this->mapid)
277
  return false;
278
 
279
+ // Delete any existing post assignment to prevent multiple attachment
280
+ $wpdb->query($wpdb->prepare("DELETE FROM $posts_table WHERE mapid = %d", $this->mapid));
281
+
282
  $result = $wpdb->query($wpdb->prepare("INSERT INTO $posts_table (postid, mapid) VALUES(%d, %d) ON DUPLICATE KEY UPDATE postid = %d, mapid = %d", $this->postid, $this->mapid,
283
  $this->postid, $this->mapid));
284
 
375
  Mappress::ajax_response('Error, map not found!');
376
 
377
  $map->update($mapdata);
 
 
 
 
 
 
378
  $result = $map->save();
379
 
380
  if (!$result)
381
  Mappress::ajax_response('Internal errorsaving, your data has not been saved!');
382
 
383
+ // Return updated map
384
  Mappress::ajax_response('OK', $map);
385
  }
386
 
mappress_poi.php CHANGED
@@ -75,7 +75,7 @@ class Mappress_Poi extends Mappress_Obj {
75
  function get_thumbnail($post) {
76
  $size = (Mappress::$options->thumbSize) ? Mappress::$options->thumbSize : null;
77
  $style = (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight) ? sprintf("width: %spx; height : %spx;", Mappress::$options->thumbWidth, Mappress::$options->thumbHeight) : null;
78
- return get_the_post_thumbnail($post, $size, array('style' => $style));
79
  }
80
  }
81
  ?>
75
  function get_thumbnail($post) {
76
  $size = (Mappress::$options->thumbSize) ? Mappress::$options->thumbSize : null;
77
  $style = (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight) ? sprintf("width: %spx; height : %spx;", Mappress::$options->thumbWidth, Mappress::$options->thumbHeight) : null;
78
+ return get_the_post_thumbnail($post, $size, array('style' => $style)); // Slow due to get_post_thumbnail_id()
79
  }
80
  }
81
  ?>
mappress_settings.php CHANGED
@@ -42,15 +42,23 @@ class Mappress_Options extends Mappress_Obj {
42
  $postTypes = array('post', 'page'),
43
  $radius = 15,
44
  $search = true,
45
- $size = 1,
46
- $sizes = array(array('width' => 300, 'height' => 300), array('width' => 425, 'height' => 350), array('width' => 640, 'height' => 480)),
 
 
 
 
 
 
47
  $sort,
48
  $style,
49
  $styles = array(),
50
  $thumbs = true,
51
- $thumbSize,
52
- $thumbWidth = 64,
53
- $thumbHeight = 64,
 
 
54
  $tooltips = false,
55
  $wpml = true
56
  ;
@@ -68,272 +76,295 @@ class Mappress_Options extends Mappress_Obj {
68
  function save() {
69
  return update_option('mappress_options', get_object_vars($this));
70
  }
71
- } // End class Mappress_Options
72
 
73
 
74
  /**
75
  * Options menu display
76
  */
77
  class Mappress_Settings {
78
- static $basename = 'mappress_options';
79
- var $options;
80
-
81
- function __construct() {
82
- $this->options = Mappress_Options::get();
83
- add_action('admin_init', array($this, 'admin_init'));
84
- }
85
-
86
- function admin_init() {
87
- register_setting('mappress', self::$basename, array($this, 'validate'));
88
-
89
- $this->add_section('demo', __('Sample Map', 'mappress-google-maps-for-wordpress'));
90
-
91
- $this->add_section('basic', __('Basic Settings', 'mappress-google-maps-for-wordpress'));
92
- $this->add_field('engine', __('Mapping API', 'mappress-google-maps-for-wordpress'), 'basic');
93
-
94
- if ($this->options->engine == 'google')
95
- $this->add_field('apiKey', __('Google API key', 'mappress-google-maps-for-wordpress'), 'basic');
96
-
97
- if ($this->options->engine == 'leaflet')
98
- $this->add_field('mapbox', __('Mapbox access token', 'mappress-google-maps-for-wordpress'), 'basic');
99
-
100
- // License: single blogs, or main blog on multisite
101
- if (Mappress::$pro && (!is_multisite() || (is_super_admin() && is_main_site())) )
102
- $this->add_section('license', __('License', 'mappress-google-maps-for-wordpress'));
103
 
104
- $this->add_section('maps', __('Map Settings', 'mappress-google-maps-for-wordpress'));
105
- $this->add_field('postTypes', __('Post types', 'mappress-google-maps-for-wordpress'), 'maps');
106
- $this->add_field('autodisplay', __('Automatic display', 'mappress-google-maps-for-wordpress'), 'maps');
107
- $this->add_field('alignment', __('Map alignment', 'mappress-google-maps-for-wordpress'), 'maps');
108
- $this->add_field('directions', __('Directions', 'mappress-google-maps-for-wordpress'), 'maps');
109
- // TBD $this->add_field('mapOptions', __('Map options'), 'maps');
110
 
111
- $this->add_section('pois', __('POI Settings', 'mappress-google-maps-for-wordpress'));
112
- $this->add_field('poiZoom', __('Default zoom', 'mappress-google-maps-for-wordpress'), 'pois');
113
- $this->add_field('initialOpenInfo', __('Open first POI', 'mappress-google-maps-for-wordpress'), 'pois');
114
- // TBD $this->add_field('tooltips', __('Tooltips'), 'pois');
115
 
116
- if (Mappress::$pro) {
117
- $this->add_section('mashups', __('Mashups', 'mappress-google-maps-for-wordpress'));
118
- $this->add_section('icons', __('Icons', 'mappress-google-maps-for-wordpress'));
119
- $this->add_section('styles', __('Styled Maps', 'mappress-google-maps-for-wordpress'));
120
- $this->add_section('geocoding', __('Geocoding', 'mappress-google-maps-for-wordpress'));
121
- $this->add_section('templates', __('Templates', 'mappress-google-maps-for-wordpress'));
122
- }
123
 
124
- $this->add_section('l10n', __('Localization', 'mappress-google-maps-for-wordpress'));
125
- $this->add_field('language', __('Search language', 'mappress-google-maps-for-wordpress'), 'l10n');
126
- $this->add_field('country', __('Search country', 'mappress-google-maps-for-wordpress'), 'l10n');
127
- $this->add_field('directionsServer', __('Directions server', 'mappress-google-maps-for-wordpress'), 'l10n');
128
 
129
- $this->add_section('misc', __('Miscellaneous', 'mappress-google-maps-for-wordpress'));
130
- $this->add_field('sizes', __('Map sizes', 'mappress-google-maps-for-wordpress'), 'misc');
131
- $this->add_field('footer', __('Scripts', 'mappress-google-maps-for-wordpress'), 'misc');
132
- $this->add_field('wpml', 'WPML', 'misc');
133
 
134
- if ($this->options->engine != 'leaflet')
135
- $this->add_field('deregister', __('Compatiblity', 'mappress-google-maps-for-wordpress'), 'misc');
 
136
  }
137
 
138
- function add_section($section, $title) {
139
- $callback = ($section == 'demo') ? array($this, 'set_preview') : null;
140
- add_settings_section($section, $title, $callback, 'mappress');
141
- }
142
 
143
- function add_field($field, $label, $section) {
144
- $callback = 'set_' . strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $field));
145
- add_settings_field($field, $label, array($this, $callback), 'mappress', $section, self::$basename . "[$field]");
 
 
 
 
146
  }
147
 
148
- function validate($input) {
149
- // If reset defaults was clicked
150
- if (isset($_POST['reset_defaults'])) {
151
- $options = new Mappress_Options();
152
- return get_object_vars($this);
153
- }
154
 
155
- // Trim fields if present
156
- foreach(array('apiKey', 'apiKeyServer') as $key) {
157
- if (isset($input[$key]))
158
- $input[$key] = trim($input[$key]);
159
- }
160
 
161
- // If NO post types selected, set value to empty array
162
- if (!isset($input['postTypes']))
163
- $input['postTypes'] = array();
 
164
 
165
- // Force checkboxes to boolean
166
- foreach($input as &$item)
167
- $item = Mappress::string_to_boolean($item);
 
 
168
 
169
- // For arrays passed as checkboxes set empty array for no selection
170
- $input['postTypes'] = (isset($input['postTypes'])) ? $input['postTypes'] : array();
 
171
 
172
- // Merge in old values so they're not lost
173
- $input = array_merge((array)$this->options, $input);
174
- return $input;
175
  }
176
 
177
- function set_alignment($name) {
178
- $alignments = array(
179
- '' => __('Default', 'mappress-google-maps-for-wordpress'),
180
- 'center' => __('Center', 'mappress-google-maps-for-wordpress'),
181
- 'left' => __('Left', 'mappress-google-maps-for-wordpress'),
182
- 'right' => __('Right', 'mappress-google-maps-for-wordpress')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  );
184
- echo Mappress_Controls::radios($name, $alignments, $this->options->alignment);
185
- }
186
 
187
- function set_api_key($name) {
188
- echo Mappress_Controls::input($name, $this->options->apiKey, array('size' => '50'));
189
- echo Mappress_Controls::help('', 'https://mappresspro.com/mappress-faq/#toc-google-maps-api-keys');
190
  }
191
 
192
- function set_autodisplay($name) {
193
- $autos = array(
194
- '' => __('None', 'mappress-google-maps-for-wordpress'),
195
- 'top' => __('Top of post', 'mappress-google-maps-for-wordpress'),
196
- 'bottom' => __('Bottom of post', 'mappress-google-maps-for-wordpress')
197
- );
198
- echo Mappress_Controls::radios($name, $autos, $this->options->autodisplay);
199
- }
200
 
201
- function set_country($name) {
202
- $url = 'https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements';
203
- $link = sprintf('<a style="vertical-align:text-bottom" target="_blank" href="%s">%s</a>', $url, __("(list)", 'mappress-google-maps-for-wordpress'));
204
- $codes = array('', 'AF' ,'AX' ,'AL' ,'DZ' ,'AS' ,'AD' ,'AO' ,'AI' ,'AQ' ,'AG' ,'AR' ,'AM' ,'AW' ,'AU' ,'AT' ,'AZ' ,'BS' ,'BH' ,'BD' ,'BB' ,'BY' ,'BE' ,'BZ' ,'BJ' ,'BM' ,'BT' ,'BO' ,'BQ' ,'BA' ,'BW' ,'BV' ,'BR' ,'IO' ,'VG' ,'BN' ,'BG' ,'BF' ,'BI' ,'KH' ,'CM' ,'CA' ,'CV' ,'KY' ,'CF' ,'TD' ,'CL' ,'CN' ,'CX' ,'CC' ,'CO' ,'KM' ,'CK' ,'CR' ,'HR' ,'CU' ,'CW' ,'CY' ,'CZ' ,'CD' ,'DK' ,'DJ' ,'DM' ,'DO' ,'EC' ,'EG' ,'SV' ,'GQ' ,'ER' ,'EE' ,'ET' ,'FK' ,'FO' ,'FJ' ,'FI' ,'FR' ,'GF' ,'PF' ,'TF' ,'GA' ,'GM' ,'GE' ,'DE' ,'GH' ,'GI' ,'GR' ,'GL' ,'GD' ,'GP' ,'GU' ,'GT' ,'GG' ,'GN' ,'GW' ,'GY' ,'HT' ,'HM' ,'HN' ,'HK' ,'HU' ,'IS' ,'IN' ,'ID' ,'IR' ,'IQ' ,'IE' ,'IM' ,'IL' ,'IT' ,'CI' ,'JM' ,'JP' ,'JE' ,'JO' ,'KZ' ,'KE' ,'KI' ,'XK' ,'KW' ,'KG' ,'LA' ,'LV' ,'LB' ,'LS' ,'LR' ,'LY' ,'LI' ,'LT' ,'LU' ,'MO' ,'MK' ,'MG' ,'MW' ,'MY' ,'MV' ,'ML' ,'MT' ,'MH' ,'MQ' ,'MR' ,'MU' ,'YT' ,'MX' ,'FM' ,'MD' ,'MC' ,'MN' ,'ME' ,'MS' ,'MA' ,'MZ' ,'MM' ,'NA' ,'NR' ,'NP' ,'NL' ,'AN' ,'NC' ,'NZ' ,'NI' ,'NE' ,'NG' ,'NU' ,'NF' ,'KP' ,'MP' ,'NO' ,'OM' ,'PK' ,'PW' ,'PS' ,'PA' ,'PG' ,'PY' ,'PE' ,'PH' ,'PN' ,'PL' ,'PT' ,'PR' ,'QA' ,'CG' ,'RE' ,'RO' ,'RU' ,'RW' ,'BL' ,'SH' ,'KN' ,'LC' ,'MF' ,'PM' ,'VC' ,'WS' ,'SM' ,'ST' ,'SA' ,'SN' ,'RS' ,'SC' ,'SL' ,'SG' ,'SX' ,'SK' ,'SI' ,'SB' ,'SO' ,'ZA' ,'GS' ,'KR' ,'SS' ,'ES' ,'LK' ,'SD' ,'SR' ,'SJ' ,'SZ' ,'SE' ,'CH' ,'SY' ,'TW' ,'TJ' ,'TZ' ,'TH' ,'TL' ,'TG' ,'TK' ,'TO' ,'TT' ,'TN' ,'TR' ,'TM' ,'TC' ,'TV' ,'VI' ,'UG' ,'UA' ,'AE' ,'GB' ,'US' ,'UM' ,'UY' ,'UZ' ,'VU' ,'VA' ,'VE' ,'VN' ,'WF' ,'EH' ,'YE' ,'ZM' ,'ZW');
205
- sort($codes);
206
- $codes = array_combine($codes, $codes);
207
- echo Mappress_Controls::select($name, $codes, $this->options->country);
208
- echo ' ' . __("Country code for searches", 'mappress-google-maps-for-wordpress') . ' ' . $link;
209
- }
210
-
211
- function set_deregister($name) {
212
- echo Mappress_Controls::checkmark($name, $this->options->deregister, __('Prevent other plugins/themes from loading the Google Maps API', 'mappress-google-maps-for-wordpress'));
213
- }
214
 
215
- function set_directions($name) {
216
- $directions_types = array('google' => __('Google', 'mappress-google-maps-for-wordpress'), 'inline' => __('Inline', 'mappress-google-maps-for-wordpress'));
217
- echo Mappress_Controls::radios($name, $directions_types, $this->options->directions);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  }
219
 
220
- function set_directions_server($name) {
221
- echo Mappress_Controls::input($name, $this->options->directionsServer, array('size' => 25));
 
 
222
  }
223
 
224
- function set_engine($name) {
225
- $engines = array('leaflet' => __('Leaflet', 'mappress-google-maps-for-wordpress'), 'google' => __('Google', 'mappress-google-maps-for-wordpress'));
226
- echo Mappress_Controls::radios($name, $engines, $this->options->engine);
227
- echo Mappress_Controls::help(__('Leaflet is free and requires no API key. Google requires an API key and has strict usage limits.', 'mappress-google-maps-for-wordpress'), '#toc-picking-a-mapping-api');
 
 
 
 
 
 
 
228
  }
229
 
230
- function set_footer($name) {
231
- // Disable if jetpack infinite scroll is used
232
- if (class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' )) {
233
- echo Mappress_Controls::checkmark($name, false, __('Output scripts in footer', 'mappress-google-maps-for-wordpress'), array('disabled' => true));
234
- printf("<br/><i>%s</i>", __('Disabled because Jetpack Infinite Scroll is active', 'mappress-google-maps-for-wordpress'));
235
- } else {
236
- echo Mappress_Controls::checkmark($name, $this->options->footer, __('Output scripts in footer', 'mappress-google-maps-for-wordpress'));
237
- printf("<br/><i>(%s)</i>", __('disable if maps are output using AJAX', 'mappress-google-maps-for-wordpress'));
 
 
 
 
 
238
  }
 
239
  }
240
 
241
- function set_initial_open_info($name) {
242
- echo Mappress_Controls::checkmark($name, $this->options->initialOpenInfo, __('Open first POI', 'mappress-google-maps-for-wordpress'));
 
 
 
243
  }
244
 
245
- function set_language($name) {
246
- $url = ($this->options->engine == 'leaflet') ? 'https://en.wikipedia.org/wiki/ISO_639-1' : 'http://code.google.com/apis/maps/faq.html#languagesupport';
247
- $lang_link = sprintf('<a style="vertical-align:text-bottom" target="_blank" href="%s">%s</a>', $url, __("(list)", 'mappress-google-maps-for-wordpress'));
248
- $langs = array('' => __('Default', 'mappress-google-maps-for-wordpress'), 'ab' => 'Abkhazian', 'aa' => 'Afar', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'bm' => 'Bambara', 'ba' => 'Bashkir', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali', 'bh' => 'Bihari languages', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan, Valencian', 'km' => 'Central Khmer', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'ny' => 'Chichewa, Chewa, Nyanja', 'zh' => 'Chinese', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree', 'hr' => 'Croatian', 'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi, Dhivehi, Maldivian', 'nl' => 'Dutch, Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijian', 'fi' => 'Finnish', 'fr' => 'French', 'ff' => 'Fulah', 'gd' => 'Gaelic, Scottish Gaelic', 'gl' => 'Galician', 'lg' => 'Ganda', 'ka' => 'Georgian', 'de' => 'German', 'ki' => 'Gikuyu, Kikuyu', 'el' => 'Greek (Modern)', 'kl' => 'Greenlandic, Kalaallisut', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian, Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'is' => 'Icelandic', 'io' => 'Ido', 'ig' => 'Igbo', 'id' => 'Indonesian', 'iu' => 'Inuktitut', 'ik' => 'Inupiaq', 'ga' => 'Irish', 'it' => 'Italian', 'ja' => 'Japanese', 'jv' => 'Javanese', 'kn' => 'Kannada', 'kr' => 'Kanuri', 'ks' => 'Kashmiri', 'kk' => 'Kazakh', 'rw' => 'Kinyarwanda', 'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kwanyama, Kuanyama', 'ku' => 'Kurdish', 'ky' => 'Kyrgyz', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'lb' => 'Letzeburgesch, Luxembourgish', 'li' => 'Limburgish, Limburgan, Limburger', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lu' => 'Luba-Katanga', 'mk' => 'Macedonian', 'mg' => 'Malagasy', 'ms' => 'Malay', 'ml' => 'Malayalam', 'mt' => 'Maltese', 'gv' => 'Manx', 'mi' => 'Maori', 'mr' => 'Marathi', 'mh' => 'Marshallese', 'ro' => 'Moldovan, Moldavian, Romanian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo, Navaho', 'nd' => 'Northern Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'se' => 'Northern Sami', 'no' => 'Norwegian', 'nb' => 'Norwegian Bokmål', 'nn' => 'Norwegian Nynorsk', 'ii' => 'Nuosu, Sichuan Yi', 'oc' => 'Occitan (post 1500)', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian, Ossetic', 'pi' => 'Pali', 'pa' => 'Panjabi, Punjabi', 'ps' => 'Pashto, Pushto', 'fa' => 'Persian', 'pl' => 'Polish', 'pt' => 'Portuguese', 'qu' => 'Quechua', 'rm' => 'Romansh', 'rn' => 'Rundi', 'ru' => 'Russian', 'sm' => 'Samoan', 'sg' => 'Sango', 'sa' => 'Sanskrit', 'sc' => 'Sardinian', 'sr' => 'Serbian', 'sn' => 'Shona', 'sd' => 'Sindhi', 'si' => 'Sinhala, Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'nr' => 'South Ndebele', 'es' => 'Spanish, Castilian', 'su' => 'Sundanese', 'sw' => 'Swahili', 'ss' => 'Swati', 'sv' => 'Swedish', 'tl' => 'Tagalog', 'ty' => 'Tahitian', 'tg' => 'Tajik', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'ts' => 'Tsonga', 'tn' => 'Tswana', 'tr' => 'Turkish', 'tk' => 'Turkmen', 'tw' => 'Twi', 'ug' => 'Uighur, Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volap_k', 'wa' => 'Walloon', 'cy' => 'Welsh', 'fy' => 'Western Frisian', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang, Chuang', 'zu' => 'Zulu');
249
- echo Mappress_Controls::select($name, $langs, $this->options->language);
250
- echo ' ' . __('Language for searches and Google map controls', 'mappress-google-maps-for-wordpress') . ' ' . $lang_link;
 
251
  }
252
 
253
- function set_mapbox($name) {
254
- echo Mappress_Controls::input($name, $this->options->mapbox, array('size' => '50', 'placeholder' => __('Enter token to use Mapbox map tiles', 'mappress-google-maps-for-wordpress')));
255
- echo Mappress_Controls::help('', 'https://www.mapbox.com/help/define-access-token/');
 
 
 
256
  }
257
 
258
- function set_map_options($name) {
259
- $labels = array(
260
- 'google' => array(
261
- 'mapTypeControl' => __('Map type control', 'mappress-google-maps-for-wordpress'),
262
- 'streetViewControl' => __("Street view control", 'mappress-google-maps-for-wordpress'),
263
- 'zoomControl' => __('Zoom control', 'mappress-google-maps-for-wordpress')
264
- ),
265
- 'leaflet' => array(
266
- 'mapTypeControl' => __('Map type control', 'mappress-google-maps-for-wordpress'),
267
- 'zoomControl' => __('Zoom control', 'mappress-google-maps-for-wordpress')
268
- )
269
  );
270
-
271
- $mapOptions = $this->options->mapOptions;
272
-
273
- foreach($labels[$this->options->engine] as $option => $label) {
274
- $value = (isset($mapOptions->$option)) ? $mapOptions->$option : false;
275
- echo Mappress_Controls::checkmark($name . "[$option]", $value, $label);
276
- }
277
  }
278
 
279
- function set_poi_zoom($name) {
280
- $zooms = array_combine(range(1, 17), range(1,17));
281
- echo Mappress_Controls::select($name, $zooms, (int) $this->options->poiZoom);
282
- echo __("Default zoom when displaying a single POI", 'mappress-google-maps-for-wordpress');
 
 
283
  }
284
 
285
- function set_post_types($name) {
286
- $post_types = Mappress_Controls::get_post_types();
287
- echo Mappress_Controls::checkboxes($name, $post_types, $this->options->postTypes);
288
- return;
 
 
 
289
  }
290
 
291
- function set_preview() {
292
- $poi = new Mappress_Poi(array(
293
- 'address' => 'San Francisco, CA',
294
- "title" => "MapPress",
295
- "body" => __("Easy Google Maps", 'mappress-google-maps-for-wordpress'),
296
- "point" => array('lat' => 37.774095, 'lng' => -122.418731)
297
- ));
298
- $pois = array($poi);
299
- $map = new Mappress_Map(array('alignment' => 'default', 'width' => '100%', 'height' => 200, 'pois' => $pois, 'zoom' => 8));
300
- echo "<table class='form-table'><tr><td>" . $map->display() . "</td></tr></table>";
301
- }
302
- function set_sizes($name) {
303
- $headers = array(__('Width (px, %, vh, vw)', 'mappress-google-maps-for-wordpress'), __('Height (px, %, vh, vw)', 'mappress-google-maps-for-wordpress'), __('Default size', 'mappress-google-maps-for-wordpress'));
304
- $rows = array();
305
-
306
- foreach($this->options->sizes as $i => $size) {
307
- $checked = ($i == $this->options->size) ? "checked='checked'" : "";
308
- $rows[] = array(
309
- Mappress_Controls::input("{$name}[$i][width]", $size['width'], array('size' => 4)),
310
- Mappress_Controls::input("{$name}[$i][height]", $size['height'], array('size' => 4)),
311
- Mappress_Controls::input(self::$basename . "[size]", $i, array('type' => 'radio', 'checked' => $checked)),
312
- );
313
  }
314
- echo Mappress_Controls::table($headers, $rows);
 
 
 
 
 
 
 
 
 
 
 
315
  }
316
 
317
- function set_tooltips($name) {
318
- echo Mappress_Controls::checkmark($name, $this->options->tooltips, __('Show a tooltip when mouse is over a POI', 'mappress-google-maps-for-wordpress'));
319
- }
320
 
 
 
 
 
321
 
322
- function set_wpml($name) {
323
- echo Mappress_Controls::checkmark($name, $this->options->wpml, __("Copy maps when overwriting a translation", 'mappress-google-maps-for-wordpress'));
324
- echo Mappress_Controls::help(null, 'https://mappresspro.com/mappress-documentation#wpml');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  }
326
 
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) { ?>
@@ -343,21 +374,7 @@ class Mappress_Settings {
343
  <?php } ?>
344
  </div>
345
  </div>
346
- <form action="options.php" method="post">
347
- <?php // Force default submit button ?>
348
- <div class='mapp-settings-hidden-toolbar'>
349
- <input name='save' type='submit' class='button button-primary' value='<?php _e("Save Changes", 'mappress-google-maps-for-wordpress'); ?>' />
350
- <input name='reset_defaults' type='submit' class='button' value='<?php _e("Reset Defaults", 'mappress-google-maps-for-wordpress'); ?>' />
351
- </div>
352
-
353
- <?php settings_fields('mappress'); ?>
354
- <?php do_settings_sections('mappress'); ?>
355
-
356
- <div class='mapp-settings-toolbar'>
357
- <input name='save' type='submit' class='button button-primary' value='<?php _e("Save Changes", 'mappress-google-maps-for-wordpress'); ?>' />
358
- <input name='reset_defaults' type='submit' class='button' value='<?php _e("Reset Defaults", 'mappress-google-maps-for-wordpress'); ?>' />
359
- </div>
360
- </form>
361
  </div>
362
  <?php
363
  }
42
  $postTypes = array('post', 'page'),
43
  $radius = 15,
44
  $search = true,
45
+ $size = 0,
46
+ $sizes = array(
47
+ array('width' => '425', 'height' => '350'),
48
+ array('width' => '50%', 'height' => '50%'),
49
+ array('width' => '75%', 'height' => '50%'),
50
+ array('width' => '100%', 'height' => '50%'),
51
+ array('width' => '100vw', 'height' => '100vh')
52
+ ),
53
  $sort,
54
  $style,
55
  $styles = array(),
56
  $thumbs = true,
57
+ $thumbSize = 'medium',
58
+ $popupThumbs = 'left',
59
+ $listThumbs = 'right',
60
+ $thumbWidth,
61
+ $thumbHeight,
62
  $tooltips = false,
63
  $wpml = true
64
  ;
76
  function save() {
77
  return update_option('mappress_options', get_object_vars($this));
78
  }
79
+ }
80
 
81
 
82
  /**
83
  * Options menu display
84
  */
85
  class Mappress_Settings {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
 
87
+ static function register() {
88
+ add_action('wp_ajax_mapp_license_check', array(__CLASS__, 'ajax_license_check'));
89
+ add_action('wp_ajax_mapp_options_reset', array(__CLASS__, 'ajax_reset'));
90
+ add_action('wp_ajax_mapp_options_save', array(__CLASS__, 'ajax_save'));
 
 
91
 
92
+ //add_action( 'admin_menu', array(__CLASS__, 'admin_menu'));
93
+ add_action('load-toplevel_page_mappress', array(__CLASS__, 'review_admin_notice'));
94
+ }
 
95
 
96
+ static function ajax_license_check() {
97
+ check_ajax_referer('mappress', 'nonce');
 
 
 
 
 
98
 
99
+ if (!current_user_can('manage_options'))
100
+ Mappress::ajax_response('Not authorized');
 
 
101
 
102
+ ob_start();
103
+ $settings = (isset($_POST['license'])) ? (object) $_POST['license'] : null;
104
+ if (!$settings)
105
+ Mappress::ajax_response('Internal error, missing license!');
106
 
107
+ // For now, this just clears the cache because the page must still be reloaded to show (or clear) admin notices
108
+ $result = Mappress::$updater->clear_cache();
109
+ Mappress::ajax_response('OK');
110
  }
111
 
112
+ static function ajax_reset() {
113
+ check_ajax_referer('mappress', 'nonce');
 
 
114
 
115
+ if (!current_user_can('manage_options'))
116
+ Mappress::ajax_response('Not authorized');
117
+
118
+ ob_start();
119
+ $options = new Mappress_Options();
120
+ $options->save();
121
+ Mappress::ajax_response('OK');
122
  }
123
 
124
+ static function ajax_save() {
125
+ check_ajax_referer('mappress', 'nonce');
 
 
 
 
126
 
127
+ if (!current_user_can('manage_options'))
128
+ Mappress::ajax_response('Not authorized');
 
 
 
129
 
130
+ ob_start();
131
+ $settings = (isset($_POST['settings'])) ? (object) $_POST['settings'] : null;
132
+ if (!$settings)
133
+ Mappress::ajax_response('Internal error, missing settings!');
134
 
135
+ // Convert JS object arrays to PHP associative arrays
136
+ self::assoc($settings->autoicons['values'], true);
137
+ self::assoc($settings->mapboxStyles, true);
138
+ self::assoc($settings->metaKeys, true);
139
+ self::assoc($settings->styles, true);
140
 
141
+ // If license changed, re-check it
142
+ if ($settings->license && $settings->license != Mappress::$options->license)
143
+ Mappress::$updater->clear_cache();
144
 
145
+ $options = new Mappress_Options($settings);
146
+ $options->save();
147
+ Mappress::ajax_response('OK');
148
  }
149
 
150
+ static function get_initial_state() {
151
+ $state = array();
152
+
153
+ // Settings
154
+ $state = Mappress::$options;
155
+
156
+ // Convert PHP associative arrays to object arrays for JS
157
+ self::assoc($state->autoicons['values'], false);
158
+ self::assoc($state->mapboxStyles, false);
159
+ self::assoc($state->metaKeys, false);
160
+ self::assoc($state->styles, false);
161
+
162
+ // Setup helpers
163
+ $languages = array('' => __('Default', 'mappress-google-maps-for-wordpress'), 'ab' => 'Abkhazian', 'aa' => 'Afar', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'bm' => 'Bambara', 'ba' => 'Bashkir', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali', 'bh' => 'Bihari languages', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan, Valencian', 'km' => 'Central Khmer', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'ny' => 'Chichewa, Chewa, Nyanja', 'zh' => 'Chinese', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree', 'hr' => 'Croatian', 'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi, Dhivehi, Maldivian', 'nl' => 'Dutch, Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijian', 'fi' => 'Finnish', 'fr' => 'French', 'ff' => 'Fulah', 'gd' => 'Gaelic, Scottish Gaelic', 'gl' => 'Galician', 'lg' => 'Ganda', 'ka' => 'Georgian', 'de' => 'German', 'ki' => 'Gikuyu, Kikuyu', 'el' => 'Greek (Modern)', 'kl' => 'Greenlandic, Kalaallisut', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian, Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'is' => 'Icelandic', 'io' => 'Ido', 'ig' => 'Igbo', 'id' => 'Indonesian', 'iu' => 'Inuktitut', 'ik' => 'Inupiaq', 'ga' => 'Irish', 'it' => 'Italian', 'ja' => 'Japanese', 'jv' => 'Javanese', 'kn' => 'Kannada', 'kr' => 'Kanuri', 'ks' => 'Kashmiri', 'kk' => 'Kazakh', 'rw' => 'Kinyarwanda', 'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kwanyama, Kuanyama', 'ku' => 'Kurdish', 'ky' => 'Kyrgyz', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'lb' => 'Letzeburgesch, Luxembourgish', 'li' => 'Limburgish, Limburgan, Limburger', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lu' => 'Luba-Katanga', 'mk' => 'Macedonian', 'mg' => 'Malagasy', 'ms' => 'Malay', 'ml' => 'Malayalam', 'mt' => 'Maltese', 'gv' => 'Manx', 'mi' => 'Maori', 'mr' => 'Marathi', 'mh' => 'Marshallese', 'ro' => 'Moldovan, Moldavian, Romanian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo, Navaho', 'nd' => 'Northern Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'se' => 'Northern Sami', 'no' => 'Norwegian', 'nb' => 'Norwegian Bokmål', 'nn' => 'Norwegian Nynorsk', 'ii' => 'Nuosu, Sichuan Yi', 'oc' => 'Occitan (post 1500)', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian, Ossetic', 'pi' => 'Pali', 'pa' => 'Panjabi, Punjabi', 'ps' => 'Pashto, Pushto', 'fa' => 'Persian', 'pl' => 'Polish', 'pt' => 'Portuguese', 'qu' => 'Quechua', 'rm' => 'Romansh', 'rn' => 'Rundi', 'ru' => 'Russian', 'sm' => 'Samoan', 'sg' => 'Sango', 'sa' => 'Sanskrit', 'sc' => 'Sardinian', 'sr' => 'Serbian', 'sn' => 'Shona', 'sd' => 'Sindhi', 'si' => 'Sinhala, Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'nr' => 'South Ndebele', 'es' => 'Spanish, Castilian', 'su' => 'Sundanese', 'sw' => 'Swahili', 'ss' => 'Swati', 'sv' => 'Swedish', 'tl' => 'Tagalog', 'ty' => 'Tahitian', 'tg' => 'Tajik', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'ts' => 'Tsonga', 'tn' => 'Tswana', 'tr' => 'Turkish', 'tk' => 'Turkmen', 'tw' => 'Twi', 'ug' => 'Uighur, Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volap_k', 'wa' => 'Walloon', 'cy' => 'Welsh', 'fy' => 'Western Frisian', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang, Chuang', 'zu' => 'Zulu');
164
+ $license_status = self::get_license_status();
165
+
166
+ $helpers = (object) array(
167
+ 'demo_map' => self::demo_map(),
168
+ 'geocoding_errors' => self::geocoding_errors(),
169
+ 'icon_directory' => (class_exists('Mappress_Icons')) ? Mappress_Icons::$icons_dir : null,
170
+ 'is_multisite' => is_multisite(),
171
+ 'is_super_admin' => is_super_admin(),
172
+ 'is_main_site' => is_main_site(),
173
+ 'jetpack' => (class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' )),
174
+ 'languages' => $languages,
175
+ 'license_status' => $license_status->status,
176
+ 'license_message' => $license_status->message,
177
+ 'meta_fields' => self::get_meta_fields(),
178
+ 'meta_keys' => self::get_meta_keys(),
179
+ 'post_types' => self::get_post_types(),
180
+ 'taxonomies' => self::get_taxonomies(),
181
+ 'thumbnail_sizes' => self::get_thumbnail_sizes()
182
  );
183
+ $state->helpers = $helpers;
 
184
 
185
+ return json_encode($state);
 
 
186
  }
187
 
188
+ static function assoc(&$a, $to_assoc) {
189
+ $result = [];
 
 
 
 
 
 
190
 
191
+ if (!is_array($a) || empty($a)) {
192
+ $a = array();
193
+ return;
194
+ }
 
 
 
 
 
 
 
 
 
195
 
196
+ // Convert to associative
197
+ if ($to_assoc) {
198
+ foreach($a as $i => $row) {
199
+ // Sanitize keys
200
+ $key = sanitize_title_with_dashes($row['key'], '', 'save');
201
+ $value = trim($row['value']);
202
+
203
+ // Discard rows with empty key or value
204
+ if (empty($key) && empty($value))
205
+ continue;
206
+ else
207
+ $result[$key] = $value;
208
+ }
209
+ } else {
210
+ // Convert from associative
211
+ foreach($a as $key => $value)
212
+ $result[] = array('key' => $key, 'value' => $value);
213
+ }
214
+ $a = $result;
215
  }
216
 
217
+ static function demo_map() {
218
+ $poi = new Mappress_Poi(array('address' => 'San Francisco, CA', "title" => "MapPress", "body" => __("Easy Google Maps", 'mappress-google-maps-for-wordpress'), "point" => array('lat' => 37.774095, 'lng' => -122.418731)));
219
+ $map = new Mappress_Map(array('alignment' => 'default', 'width' => '100%', 'height' => 300,'pois' => array($poi), 'zoom' => 8));
220
+ return $map;
221
  }
222
 
223
+ static function geocoding_errors() {
224
+ $geocoding_errors = array();
225
+ $query = new WP_Query(array('meta_key' => 'mappress_error', 'posts_per_page' => 20, 'post_type' => Mappress::$options->postTypes));
226
+ foreach($query->posts as $post) {
227
+ $geocoding_errors[] = array(
228
+ 'ID' => $post->ID,
229
+ 'post_title' => $post->post_title,
230
+ 'error' => get_post_meta($post->ID, 'mappress_error', true)
231
+ );
232
+ };
233
+ return $geocoding_errors;
234
  }
235
 
236
+ static function get_license_status() {
237
+ $license = (object) array('status' => null, 'message' => null);
238
+
239
+ if (Mappress::$pro && Mappress::$options->license) {
240
+ $license->status = Mappress::$updater->get_status();
241
+ if ($license->status == 'active')
242
+ $license->message = __('Active', 'mappress-google-maps-for-wordpress');
243
+ else {
244
+ if (is_wp_error($license->status))
245
+ $license->message = sprintf(__('Communication error, please try again later: %s', 'mappress-google-maps-for-wordpress'), $license_status->get_error_message());
246
+ else
247
+ $license->message = __('License is invalid or expired', 'mappress-google-maps-for-wordpress');
248
+ }
249
  }
250
+ return $license;
251
  }
252
 
253
+ static function get_meta_fields() {
254
+ for ($i = 1; $i < 7; $i++)
255
+ $fields['address' . $i] = __('Address line ', 'mappress-google-maps-for-wordpress') . ' ' . $i;
256
+ $fields = array_merge($fields, array('lat' => __('Latitude', 'mappress-google-maps-for-wordpress'), 'lng' => __('Longitude', 'mappress-google-maps-for-wordpress'), 'title' => __('Title', 'mappress-google-maps-for-wordpress'), 'body' => __('Body', 'mappress-google-maps-for-wordpress'), 'iconid' => __('Icon', 'mappress-google-maps-for-wordpress'), 'zoom' => __('Zoom', 'mappress-google-maps-for-wordpress')));
257
+ return $fields;
258
  }
259
 
260
+ static function get_post_types() {
261
+ $results = array();
262
+ $post_types = get_post_types(array('show_ui' => true, 'public' => true), 'objects');
263
+ unset($post_types['mappress_map'], $post_types['attachment']);
264
+ foreach($post_types as $type => $obj)
265
+ $results[$type] = $obj->label;
266
+ return $results;
267
  }
268
 
269
+
270
+ static function get_thumbnail_sizes() {
271
+ // Note: WP doesn't return dimensions, just the size names - ticket is > 6 months old now: http://core.trac.wordpress.org/ticket/18947
272
+ $sizes = get_intermediate_image_sizes();
273
+ $sizes = array_combine(array_values($sizes), array_values($sizes));
274
+ return $sizes;
275
  }
276
 
277
+ static function get_meta_keys() {
278
+ global $wpdb;
279
+ $keys = $wpdb->get_col( "
280
+ SELECT DISTINCT meta_key
281
+ FROM $wpdb->postmeta
282
+ WHERE meta_key NOT in ('_edit_last', '_edit_lock', '_encloseme', '_pingme', '_thumbnail_id')
283
+ AND meta_key NOT LIKE ('\_wp%')"
 
 
 
 
284
  );
285
+ $results = (is_array($keys) && !empty($keys)) ? array_combine($keys, $keys) : array();
286
+ return $results;
 
 
 
 
 
287
  }
288
 
289
+ static function get_meta_values($meta_key) {
290
+ global $wpdb;
291
+ $sql = "SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value != '' ORDER BY meta_value";
292
+ $meta_values = $wpdb->get_col($wpdb->prepare($sql, $meta_key));
293
+ $results = ($meta_values) ? array_combine($meta_values, $meta_values) : array();
294
+ return $results;
295
  }
296
 
297
+ static function get_taxonomies() {
298
+ $results = array();
299
+ $tax_objs = get_taxonomies(array('public' => true), 'objects');
300
+ unset($tax_objs['post_format']);
301
+ foreach($tax_objs as $tax_obj)
302
+ $results[$tax_obj->name] = $tax_obj->label;
303
+ return $results;
304
  }
305
 
306
+ static function get_usage() {
307
+ global $wpdb;
308
+ $maps_table = $wpdb->prefix . 'mappress_maps';
309
+ $posts_table = $wpdb->prefix . 'mappress_posts';
310
+
311
+ $usage = new stdClass();
312
+ foreach(array('autodisplay', 'betas', 'engine', 'footer', 'geocoder', 'highlight', 'layout', 'language', 'poiList') as $key) {
313
+ if (isset(Mappress::$options->$key))
314
+ $usage->$key = Mappress::$options->$key;
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  }
316
+ $usage->mp_version = Mappress::VERSION;
317
+ $usage->wp_version = get_bloginfo('version');
318
+ $usage->gutenberg = version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' ) && function_exists('is_plugin_active') && !is_plugin_active( 'classic-editor/classic-editor.php' );
319
+ $usage->license = (trim(Mappress::$options->license)) ? true : false;
320
+ $usage->filter = (Mappress::$options->filter) ? true : false;
321
+ $usage->mapbox = (Mappress::$options->mapbox) ? true : false;
322
+ $usage->autoicons = Mappress::$options->autoicons && Mappress::$options->autoicons['key'];
323
+ $usage->multisite = is_multisite();
324
+
325
+ $usage->assignment1 = $wpdb->get_var("SELECT count(distinct(mapid)) FROM $posts_table GROUP BY mapid HAVING count(*) > 1");
326
+ $usage->count1 = $wpdb->get_var("SELECT count(*) from $maps_table");
327
+ return $usage;
328
  }
329
 
330
+ static function review_admin_notice() {
331
+ $first_time = get_option('mappress_review');
 
332
 
333
+ if (!$first_time) {
334
+ update_option('mappress_review', time());
335
+ return;
336
+ }
337
 
338
+ if (time() <= $first_time + (60 * 60 * 24 * 10))
339
+ return;
340
+
341
+ $ids = Mappress_Map::get_list(null, 'ids');
342
+ if (count($ids) < 1)
343
+ return;
344
+
345
+ $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'));
346
+ $no_link = sprintf("<a class='button mapp-dismiss' href='#'>%s</a>", __('Nope, maybe later', 'mappress-google-maps-for-wordpress'));
347
+ $help_link = sprintf("<a class='mapp-dismiss' href='https://mappresspro.com/chris-contact' target='_blank'>%s</a>", __('I need help using the plugin', 'mappress-google-maps-for-wordpress'));
348
+ $body = "<div class='mapp-review'>";
349
+ $body .= "<h3>" . __("Help Spread the Word", 'mappress-google-maps-for-wordpress') . "</h3>";
350
+ $body .= "<p>" . __("Hi, I hope you're enjoying MapPress. Would you mind taking a moment to write a brief review? It would mean a lot to me!", 'mappress-google-maps-for-wordpress') . "</p>";
351
+ $body .= "<p>" . "~ Chris Richardson" . "</p>";
352
+ $body .= "<div class='mapp-review-options'>" . $review_link . $no_link . $help_link . "</div>";
353
+ $body .= "</div>";
354
+ Mappress::$notices['review'] = array('review', $body);
355
  }
356
 
357
+ static function options_page() {
358
  ?>
359
+ <script>var mappress_options_state=<?php echo self::get_initial_state();?>;</script>
360
+ <div class="wrap mapp-options">
361
+ <h1></h1>
362
+ <div class='mapp-options-header'>
363
+ <div class='mapp-options-header-version'>
364
+ <h1><?php _e('MapPress', 'mappress-google-maps-for-wordpress'); ?></h1>
365
  <?php echo Mappress::$version; ?>
366
  </div>
367
+ <div class='mapp-options-header-links'>
368
  <a target='_blank' href='https://mappresspro.com/mappress/mappress-documentation'><?php _e('Get help', 'mappress-google-maps-for-wordpress');?></a>
369
  <a target='_blank' href='https://mappresspro.com/whats-new/'><?php _e("What's new", 'mappress-google-maps-for-wordpress');?></a>
370
  <?php if (Mappress::$pro) { ?>
374
  <?php } ?>
375
  </div>
376
  </div>
377
+ <div id="mapp-options-settings"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  </div>
379
  <?php
380
  }
mappress_template.php CHANGED
@@ -22,7 +22,6 @@ class Mappress_Template extends Mappress_Obj {
22
  add_action('wp_ajax_mapp_tpl_delete', array(__CLASS__, 'ajax_delete'));
23
  add_filter('mappress_poi_props', array(__CLASS__, 'filter_poi_props'), 0, 3);
24
 
25
-
26
  // Print queued templates
27
  // wp_footer used instead of wp_footer_scripts because NGG reverses calling order of the two hooks
28
  add_action('wp_print_scripts', array(__CLASS__, 'print_templates'), -1);
@@ -83,10 +82,10 @@ class Mappress_Template extends Mappress_Obj {
83
  'content' => ($html) ? $html : $standard,
84
  'path' => $filepath,
85
  'standard' => $standard,
86
- 'exists' => ($html) ? true : false
87
  ));
88
 
89
- Mappress::ajax_response('OK', $template);
90
  }
91
 
92
  static function ajax_save() {
@@ -189,7 +188,7 @@ class Mappress_Template extends Mappress_Obj {
189
 
190
  static function print_template($template_name) {
191
  // Read collections of templates or individual templates
192
- if (in_array($template_name, array('editor', 'map', 'mce', 'widgets')))
193
  require(self::locate_template($template_name));
194
  else {
195
  $template = self::get_template($template_name);
@@ -197,5 +196,19 @@ class Mappress_Template extends Mappress_Obj {
197
  printf("<script type='text/html' id='mapp-tmpl-$template_name'>%s</script>", $template);
198
  }
199
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  }
201
  ?>
22
  add_action('wp_ajax_mapp_tpl_delete', array(__CLASS__, 'ajax_delete'));
23
  add_filter('mappress_poi_props', array(__CLASS__, 'filter_poi_props'), 0, 3);
24
 
 
25
  // Print queued templates
26
  // wp_footer used instead of wp_footer_scripts because NGG reverses calling order of the two hooks
27
  add_action('wp_print_scripts', array(__CLASS__, 'print_templates'), -1);
82
  'content' => ($html) ? $html : $standard,
83
  'path' => $filepath,
84
  'standard' => $standard,
85
+ 'exists' => ($html) ? true : false,
86
  ));
87
 
88
+ Mappress::ajax_response('OK', array('template' => $template, 'tokens' => self::$tokens));
89
  }
90
 
91
  static function ajax_save() {
188
 
189
  static function print_template($template_name) {
190
  // Read collections of templates or individual templates
191
+ if (in_array($template_name, array('editor', 'map')))
192
  require(self::locate_template($template_name));
193
  else {
194
  $template = self::get_template($template_name);
196
  printf("<script type='text/html' id='mapp-tmpl-$template_name'>%s</script>", $template);
197
  }
198
  }
199
+
200
+
201
+ static function print_js_templates() {
202
+ $results = array();
203
+ foreach(self::$queue as $template_name => $footer) {
204
+ // Ignore static editor templates
205
+ if (in_array($template_name, array('editor', 'map')))
206
+ continue;
207
+ $template = self::get_template($template_name);
208
+ // JS doesn't like dashes in property names
209
+ $results[str_replace('-', '_', $template_name)] = $template;
210
+ }
211
+ return "var mappress_templates = " . json_encode($results) . ';';
212
+ }
213
  }
214
  ?>
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
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.
@@ -50,7 +50,7 @@ Upgrade to [MapPress Pro](https://mappresspro.com/mappress) for even more featur
50
  * Generate maps automatically from custom fields
51
  * Automatically assign marker icons by taxonomy, tag, or category
52
  * KML support for Google Earth
53
- * Google drawing manager for drawing polygons, circles, and lines directly on your maps
54
  * MultiSite compatible
55
  * Compatible with WPML language settings
56
 
@@ -84,8 +84,45 @@ Please see the plugin documentation pages:
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
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.7
8
+ Stable tag: 2.62.1
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interfactive Google and Leaflet maps to WordPress.
50
  * Generate maps automatically from custom fields
51
  * Automatically assign marker icons by taxonomy, tag, or category
52
  * KML support for Google Earth
53
+ * Google drawing manager for drawing polygons, circles, and lines on your maps
54
  * MultiSite compatible
55
  * Compatible with WPML language settings
56
 
84
 
85
  == Changelog ==
86
 
87
+ = 2.62.1 =
88
+ * Added: POI click settings for mashups now include showing the entire post in a full-screen popup
89
+ * Changed: POI list widened to 300px
90
+ * Fixed: hover effect not deselecting when new POI hovered
91
+ * Fixed: error in infobox when POI opened on hover and map hasn't initialized yet
92
+
93
+ = 2.62 =
94
+ * Added: new icon generator to create icons dynamically
95
+ * Added: new color picker
96
+ * Added: new icon picker
97
+
98
+ = 2.61.1 =
99
+ * Fixed: error "class Mappress_Pro_Settings not found"
100
+
101
+ = 2.61 =
102
+ * Added: default sizes are now responsive (%) based, pixel and viewport sizes are still supported
103
+ * Added: default sizes are now editable and sortable
104
+ * Added: new settings have been added for users of the free version
105
+ * Added: support for the new block-based widget editor
106
+ * Changed: plugin setttings screen is now React-based
107
+ * Changed: POI editor icon picker and color picker have been converted to React
108
+ * Fixed: POI list not updating when POI is changed
109
+ * Fixed: conflict with Yoast preview slug temporarily appearing blank
110
+ * Fixed: Gutenberg editor setting map alignment on settings screen prevents blocks from being selected
111
+ * Fixed: React error for duplicate keys in multiselect
112
+
113
+ = 2.60 =
114
+ * Added: updated flex-based mashup list & popup templates with better thumbnail support - please update any custom template
115
+ * Added: updated map popup template and CSS - please update any custom templates
116
+ * Added: for classic editor: put the cursor on a shortcode to open that map in editor
117
+ * Added: better infobox panning and sizing
118
+ * Added: mashup thumbnail position can now be set in MapPress settings
119
+ * Added: setting to open POIs on mouse hover
120
+ * Added: map library now supports column sorting by mapid, map title, and post title
121
+ * Added: window.location is now passed as argument ($args->url) to filter 'mappress_pre_query'
122
+ * Added: classic editor is now React-based
123
+
124
  = 2.59 =
125
+ * Fixed: JS files were not compiling for IE11. Note that IE11 is NOT a supported browser.
126
  * Fixed: Leaflet icons were not setting scale properly, interfering with marker spiderfier
127
  * Fixed: error when saving map center of 0,0
128
  * Added: new marker class to enable effects
templates/map-directions.php CHANGED
@@ -1,19 +1,19 @@
1
  <# if (!map.editable && mappl10n.options.directions != 'google') { #>
2
- <div class='mapp-directions'>
3
- <span class='mapp-close' data-mapp-action='dir-cancel'></span>
4
- <div>
5
- <input class='mapp-dir-saddr' tabindex='1' placeholder='<?php _e("My location", 'mappress-google-maps-for-wordpress');?>' />
6
- <span data-mapp-action='dir-swap' class='mapp-dir-arrows'></span>
7
- </div>
8
 
9
- <div>
10
- <input class='mapp-dir-daddr' tabindex='2'/>
11
- </div>
12
 
13
- <div class='mapp-dir-toolbar'>
14
- <span class='mapp-button-submit' data-mapp-action='dir-get'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
15
- <span class='mapp-spinner'></span>
16
- </div>
17
- <div class='mapp-dir-renderer'></div>
18
- </div>
19
  <# } #>
1
  <# if (!map.editable && mappl10n.options.directions != 'google') { #>
2
+ <div class='mapp-directions'>
3
+ <span class='mapp-close' data-mapp-action='dir-cancel'></span>
4
+ <div>
5
+ <input class='mapp-dir-saddr' tabindex='1' placeholder='<?php _e("My location", 'mappress-google-maps-for-wordpress');?>' />
6
+ <span data-mapp-action='dir-swap' class='mapp-dir-arrows'></span>
7
+ </div>
8
 
9
+ <div>
10
+ <input class='mapp-dir-daddr' tabindex='2'/>
11
+ </div>
12
 
13
+ <div class='mapp-dir-toolbar'>
14
+ <span class='mapp-button-submit' data-mapp-action='dir-get'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
15
+ <span class='mapp-spinner'></span>
16
+ </div>
17
+ <div class='mapp-dir-renderer'></div>
18
+ </div>
19
  <# } #>
templates/map-filters.php CHANGED
@@ -1,17 +1,17 @@
1
  <?php if (Mappress::$pro) { ?>
2
  <# if (map.query && mappl10n.options.filter) { #>
3
- <div class='mapp-filters'>
4
- <div class='mapp-filters-list'>
5
- <?php $filter = new Mappress_Filter(array('key' => Mappress::$options->filter, 'format' => null)); ?>
6
- <div class='mapp-filter mapp-<?php echo $filter->key; ?>'>
7
- <div class='mapp-filter-label'><?php echo $filter->get_label(); ?></div>
8
- <div class='mapp-filter-values'><?php echo $filter->get_html(); ?></div>
9
- </div>
10
- </div>
11
- <div class='mapp-filters-toolbar'>
12
- <span class='mapp-button-submit mapp-filters-done' data-mapp-action='filters-toggle'><?php _e('Done', 'mappress-google-maps-for-wordpress');?></span>
13
- <span class='mapp-button mapp-filters-reset' data-mapp-action='filters-reset'><?php _e('Reset', 'mappress-google-maps-for-wordpress');?></span>
14
- </div>
15
- </div>
16
  <# } #>
17
  <?php } ?>
1
  <?php if (Mappress::$pro) { ?>
2
  <# if (map.query && mappl10n.options.filter) { #>
3
+ <div class='mapp-filters'>
4
+ <div class='mapp-filters-list'>
5
+ <?php $filter = new Mappress_Filter(array('key' => Mappress::$options->filter, 'format' => null)); ?>
6
+ <div class='mapp-filter mapp-<?php echo $filter->key; ?>'>
7
+ <div class='mapp-filter-label'><?php echo $filter->get_label(); ?></div>
8
+ <div class='mapp-filter-values'><?php echo $filter->get_html(); ?></div>
9
+ </div>
10
+ </div>
11
+ <div class='mapp-filters-toolbar'>
12
+ <span class='mapp-button-submit mapp-filters-done' data-mapp-action='filters-toggle'><?php _e('Done', 'mappress-google-maps-for-wordpress');?></span>
13
+ <span class='mapp-button mapp-filters-reset' data-mapp-action='filters-reset'><?php _e('Reset', 'mappress-google-maps-for-wordpress');?></span>
14
+ </div>
15
+ </div>
16
  <# } #>
17
  <?php } ?>
templates/map-loop.php CHANGED
@@ -5,7 +5,7 @@
5
  <# } #>
6
 
7
  <# if (map.layout != 'inline') { #>
8
- <div class='mapp-list-toggle' data-mapp-action='list-toggle'></div>
9
  <# } #>
10
 
11
  <div class="mapp-items">
5
  <# } #>
6
 
7
  <# if (map.layout != 'inline') { #>
8
+ <div class='mapp-list-toggle' data-mapp-action='list-toggle'></div>
9
  <# } #>
10
 
11
  <div class="mapp-items">
templates/map-popup.php CHANGED
@@ -1,3 +1,7 @@
1
- <div class='mapp-title'>{{{poi.title}}}</div>
2
- <div class='mapp-body'>{{{poi.body}}}</div>
3
- <div class='mapp-links'><a href='#' data-mapp-action='dir'><?php _e('Directions', 'mappress-google-maps-for-wordpress'); ?></a><div>
 
 
 
 
1
+ <div class='mapp-info'>
2
+ <div class='mapp-title'>{{{poi.title}}}</div>
3
+ <div class='mapp-body'>{{{poi.body}}}</div>
4
+ <div class='mapp-links'>
5
+ <div class='mapp-dir' data-mapp-action='dir'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></div>
6
+ </div>
7
+ </div>
templates/map.php CHANGED
@@ -7,7 +7,7 @@
7
  classes += (layout == 'left') ? ' mapp-left' : ' mapp-inline';
8
  classes += (mappl10n.options.engine == 'leaflet') ? ' mapp-leaflet ' : ' mapp-google ';
9
 
10
- let alignment = (map.alignment) ? map.alignment : mappl10n.options.alignment;
11
  classes += (alignment) ? ' mapp-align-' + alignment : '';
12
 
13
  classes += (mappl10n.options.isIE) ? ' mapp-ie' : '';
7
  classes += (layout == 'left') ? ' mapp-left' : ' mapp-inline';
8
  classes += (mappl10n.options.engine == 'leaflet') ? ' mapp-leaflet ' : ' mapp-google ';
9
 
10
+ let alignment = (typeof map.alignment != 'undefined') ? map.alignment : mappl10n.options.alignment;
11
  classes += (alignment) ? ' mapp-align-' + alignment : '';
12
 
13
  classes += (mappl10n.options.isIE) ? ' mapp-ie' : '';
templates/mashup-modal.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Default template for displaying a mashup post in a modal dialog
4
+ *
5
+ */
6
+ ?>
7
+
8
+ <div class="mapp-modal-featured">
9
+ <?php the_post_thumbnail(); ?>
10
+ </div>
11
+
12
+ <article tabindex="0" class="mapp-modal-article mapp-modal-focus">
13
+ <div class="mapp-modal-title">
14
+ <?php the_title('<h1>', '</h1>' ); ?>
15
+ </div>
16
+
17
+ <div class="mapp-modal-body">
18
+ <?php the_content(__('Continue reading', 'mappress-google-maps-for-wordpress') ); ?>
19
+ </div>
20
+
21
+ <div class="mapp-modal-meta">
22
+ <div>
23
+ <div><a href="<?php the_permalink(); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></div>
24
+ <div><?php printf(/* translators: %s: Author name. */ __( 'By %s' , 'mappress-google-maps-for-wordpress'), '<a href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author_meta( 'display_name' ) ) . '</a>');?></div>
25
+ </div>
26
+
27
+ <div>
28
+ <div><?php _e( 'In' , 'mappress-google-maps-for-wordpress'); ?> <?php the_category( ', ' ); ?></div>
29
+ <div><?php _e(' Tagged ' , 'mappress-google-maps-for-wordpress'); ?><?php the_tags( '', ', ', '' ); ?></div>
30
+ </div>
31
+ </div>
32
+ </article>
33
+
templates/mashup-popup.php CHANGED
@@ -1,6 +1,8 @@
1
- <div class='mapp-title'><a href='{{{poi.url}}}' target='_blank'>{{{poi.title}}}</a></div>
2
- <div class='mapp-body'>
3
- <a href='{{{poi.url}}}' target='_blank'>{{{poi.thumbnail}}}</a>
4
- {{{poi.body}}}
5
- </div>
6
- <div class='mapp-links'><a href='#' data-mapp-action='dir'><?php _e('Directions', 'mappress-google-maps-for-wordpress'); ?></a><div>
 
 
1
+ <div class='mapp-thumbnail'><a href='{{{poi.url}}}' target='_blank'>{{{poi.thumbnail}}}</a></div>
2
+ <div class='mapp-info'>
3
+ <div class='mapp-title'><a href='{{{poi.url}}}' target='_blank'>{{{poi.title}}}</a></div>
4
+ <div class='mapp-body'>{{{poi.body}}}</div>
5
+ <div class='mapp-links'>
6
+ <div class='mapp-dir' data-mapp-action='dir'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></div>
7
+ </div>
8
+ </div>
templates_admin/editor.php CHANGED
@@ -1,33 +1,18 @@
1
- <script type='text/template' id='mapp-tmpl-edit-loop'>
2
- <div class='mapp-list-toggle' data-mapp-action='list-toggle'></div>
3
- <div class='mapp-items'>
4
- <# _.forEach(pois, function(poi, i) { #>
5
- <div class='mapp-item' data-mapp-action='open' data-mapp-poi='{{{i}}}'><# print(poi.render('item')); #></div>
6
- <# }); #>
7
- </div>
8
- </script>
9
-
10
- <script type='text/template' id='mapp-tmpl-edit-item'>
11
- <img class="mapp-icon" src="{{{poi.icon}}}">
12
- <div class='mapp-title'>{{{poi.title}}}</div>
13
- </script>
14
-
15
  <script type='text/template' id='mapp-tmpl-edit-popup'>
16
  <div class='mapp-poi-header'>
17
  <input class='mapp-poi-title' type='text' value='{{poi.title}}'>
18
- <# if (!poi.type) { #>
19
- <img data-mapp-iconpicker data-mapp-iconid='{{{poi.iconid}}}' class='mapp-icon'>
20
  <# } else if (poi.isPoly()) { #>
21
- <# var colors = poi.getTemplateColors(); #>
22
- <span data-mapp-colorpicker class='mapp-colorpicker-toggle' data-mapp-color='{{{colors.color}}}' data-mapp-opacity='{{{colors.opacity}}}' data-mapp-weight='{{{colors.weight}}}' tabindex='0'></span>
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'>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <script type='text/template' id='mapp-tmpl-edit-popup'>
2
  <div class='mapp-poi-header'>
3
  <input class='mapp-poi-title' type='text' value='{{poi.title}}'>
4
+ <# if (mappl10n.options.pro && !poi.type) { #>
5
+ <div id='mapp-poi-iconpicker'></div>
6
  <# } else if (poi.isPoly()) { #>
7
+ <div id='mapp-poi-colorpicker'></div>
 
8
  <# } #>
9
  </div>
10
 
11
+ <# if (poi.type == 'kml') { #>
12
+ <div class='mapp-poi-kml'>
13
+ <input class='mapp-poi-url' type='text' readonly='readonly' value='<# print( (poi.kml) ? poi.kml.url : '' );#>'/>
14
+ </div>
15
+ <# } #>
16
 
17
  <div class='mapp-poi-editor-toolbar'>
18
  <div class='mapp-poi-editor-tabs'>
templates_admin/mce.php DELETED
@@ -1,109 +0,0 @@
1
- <script type='text/template' id='mapp-tmpl-mce'>
2
- <div class='mapp-mce'>
3
- <div class='mapp-mce-list-panel mapp-open'>
4
- <div class='mapp-mce-header'>
5
- <div class='mapp-mce-header-left'>
6
- <h1><?php _e('Select a map', 'mappress-google-maps-for-wordpress');?></h1>
7
- <input data-mapp-mce='add' class='button' type='button' value='<?php esc_attr_e('Add New', 'mappress-google-maps-for-wordpress')?>' />
8
- </div>
9
- </div>
10
- <div class='mapp-mce-filter-block'>
11
- <div class='mapp-mce-search-block'>
12
- <?php _e('Search', 'mappress-google-maps-for-wordpress'); ?>
13
- <input type='text' size="15" class='mapp-mce-search' placeholder='<?php _e('post title', 'mappress-google-maps-for-wordpress');?>'>
14
- <span class='spinner'></span>
15
- </div>
16
- <div class='mapp-mce-types-block'>
17
- <label><input type='radio' name='mapp-mce-list-type' checked value='post'><?php _e('Attached to this post', 'mappress-google-maps-for-wordpress');?></label>
18
- <label><input type='radio' name='mapp-mce-list-type' value='all'><?php _e('All maps', 'mappress-google-maps-for-wordpress');?></label>
19
- </div>
20
- </div>
21
- <div class='mapp-mce-list'></div>
22
- <div class='mapp-mce-toolbar'>
23
- <input data-mapp-mce='close' class='button' type='button' value='<?php esc_attr_e('Close', 'mappress-google-maps-for-wordpress'); ?>' />
24
- </div>
25
- </div>
26
-
27
- <div class='mapp-mce-edit-panel'>
28
- <div class='mapp-mce-header'>
29
- <input class='mapp-mce-title' type='text' placeholder='<?php _e('Untitled', 'mappress-google-maps-for-wordpress');?>' />
30
- </div>
31
- <div class='mapp-mce-settings'>
32
- <div class='mapp-mce-setting'>
33
- <div class='mapp-mce-label'><?php _e('Size', 'mappress-google-maps-for-wordpress');?></div>
34
- <div class='mapp-mce-sizes'>
35
- <?php
36
- $sizes = array();
37
- foreach(Mappress::$options->sizes as $i => $size)
38
- $sizes[] = "<a href='#' class='mapp-mce-size' data-width='{$size['width']}' data-height='{$size['height']}'>" . $size['width'] . 'x' . $size['height'] . "</a>";
39
- echo implode(' | ', $sizes);
40
- ?>
41
- </div>
42
- <div class='mapp-mce-custom'>
43
- <input type='text' class='mapp-mce-width' size='2' value='' /> x <input type='text' class='mapp-mce-height' size='2' value='' />
44
- </div>
45
- </div>
46
- <div class='mapp-mce-setting'>
47
- <div class='mapp-mce-label'><?php _e('Map ID', 'mappress-google-maps-for-wordpress');?></div>
48
- <div class='mapp-mce-mapid'></div>
49
- </div>
50
- </div>
51
- <div class='mapp-edit'></div>
52
- <div class='mapp-mce-toolbar'>
53
- <input data-mapp-mce='save' class='button button-primary' type='button' value='<?php esc_attr_e('Save', 'mappress-google-maps-for-wordpress'); ?>' />
54
- <input data-mapp-mce='cancel' class='button' type='button' value='<?php esc_attr_e('Cancel', 'mappress-google-maps-for-wordpress'); ?>' />
55
- <label class='mapp-mce-viewport-block'>
56
- <input type='checkbox' class='mapp-mce-viewport'>
57
- <?php _e('Save center / zoom', 'mappress-google-maps-for-wordpress');?>
58
- </label>
59
- </div>
60
- </div>
61
- </div>
62
- </script>
63
-
64
- <script type='text/template' id='mapp-tmpl-mce-list'>
65
- <div class='mapp-mce-list-header'>
66
- <div class='mapp-mce-col-map-title'><?php _e('Map title', 'mappress-google-maps-for-wordpress');?></div>
67
- <div class='mapp-mce-col-mapid'><?php _e('Map ID', 'mappress-google-maps-for-wordpress');?></div>
68
- <# if (type == 'all') { #>
69
- <div class='mapp-mce-col-post-title'><?php _e('Attached to', 'mappress-google-maps-for-wordpress');?></div>
70
- <# } #>
71
- <div class='mapp-mce-col-actions'><?php _e('Action', 'mappress-google-maps-for-wordpress');?></div>
72
- </div>
73
- <div class='mapp-mce-items'>
74
- <# _.forEach(items, function(item, i) { #>
75
- <# var className = (item.mapid == selected) ? 'mapp-mce-item mapp-selected' : 'mapp-mce-item'; #>
76
- <div class='{{className}}' data-mapp-mce-list='edit' data-mapp-mapid='{{ item.mapid }}'>
77
- <div class='mapp-mce-col-map-title'>
78
- <# if (item.map_title) { #>{{ item.map_title }}<# } else { #><?php _e('Untitled', 'mappress-google-maps-for-wordpress');?><# } #>
79
- </div>
80
-
81
- <div class='mapp-mce-col-mapid'>{{item.mapid}}</div>
82
-
83
- <# if (type == 'all') {
84
- var postTitle = (item.post_title) ? item.post_title : '<?php _e('Untitled', 'mappress-google-maps-for-wordpress');?>';
85
- postTitle = (item.postid == mappl10n.options.postid) ? '<?php _e('Current post', 'mappress-google-maps-for-wordpress');?>' : postTitle;
86
- var link = '';
87
- if (item.postid > 0) {
88
- link = (item.postid == mappl10n.options.postid) ? postTitle : '<a href="' + mappl10n.options.editurl + '?post=' + item.postid + '&action=edit" target="_blank">' + postTitle + '</a>';
89
- } else {
90
- link = '<?php _e('Unattached', 'mappress-google-maps-for-wordpress');?>';
91
- }
92
- #>
93
- <div class='mapp-mce-col-post-title'>{{{link}}}</div>
94
- <# } #>
95
-
96
- <div class='mapp-mce-col-actions'>
97
- <a href='#' data-mapp-mce-list='insert'><?php _e('Insert into post', 'mappress-google-maps-for-wordpress');?></a> |&nbsp;
98
- <a href='#' data-mapp-mce-list='remove'><?php _e('Delete', 'mappress-google-maps-for-wordpress');?></a>
99
- </div>
100
- </div>
101
- <# }); #>
102
- </div>
103
- <div class='mapp-mce-list-footer'>
104
- <# if (items.length == 0) { #>
105
- <?php _e('No maps found', 'mappress-google-maps-for-wordpress');?>
106
- <# } #>
107
- </div>
108
- </div>
109
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates_admin/widgets.php DELETED
@@ -1,98 +0,0 @@
1
- <script type='text/html' id='mapp-tmpl-color-picker'>
2
- <# var colors = ['#F4EB37','#CDDC39','#62AF44','#009D57','#0BA9CC','#4186F0','#3F5BA9','#7C3592','#A61B4A','#DB4436','#F8971B','#F4B400','#795046','#F9F7A6','#E6EEA3','#B7DBAB','#7CCFA9','#93D7E8','#9FC3FF','#A7B5D7','#C6A4CF','#D698AD','#EE9C96','#FAD199','#FFDD5E','#B29189','#FFFFFF','#CCCCCC','#777777','#000000']; #>
3
- <div class='mapp-colorpicker' tabindex='0'>
4
- <# _.each(colors, function(color, i) { #>
5
- <span data-mapp-color='{{color}}' class='mapp-color' style='background-color: {{color}}' tabindex='0'></span>
6
- <# }); #>
7
- <?php _e('Opacity', 'mappress-google-maps-for-wordpress'); ?>
8
- <select class='mapp-opacity'>
9
- <# for (var i = 100; i >= 0; i -= 10) { #>
10
- <option value='{{i}}'>{{i}}</option>
11
- <# } #>
12
- </select>
13
- <?php _e('Weight', 'mappress-google-maps-for-wordpress'); ?>
14
- <select class='mapp-weight'>
15
- <# for (var i = 1; i <= 20; i++) { #>
16
- <option value='{{i}}'>{{i}}</option>
17
- <# } #>
18
- </select>
19
- </div>
20
- </script>
21
-
22
- <script type='text/html' id='mapp-tmpl-icon-editor'>
23
- <div class='mapp-icon-editor'>
24
- <div class='mapp-icon-editor-wrapper'>
25
- <ul class='mapp-icon-editor-list'>
26
- <# if (!mappl10n.options.userIcons.length) { #>
27
- <h2 class='mapp-icon-editor-msg'>
28
- <?php _e('No custom icons have been added yet.', 'mappress-google-maps-for-wordpress');?>
29
- </h2>
30
- <# } #>
31
- <# _.each(mappl10n.options.userIcons, function(icon, i) { #>
32
- <li data-mapp-iconid='{{icon}}'>
33
- <span><img class='mapp-icon' title='{{icon}}' alt='{{icon}}' src='{{mappl10n.options.iconsUrl}}/{{icon}}'></span>
34
- <span>{{icon}}</span>
35
- <span data-mapp-action='delete' class='dashicons dashicons-trash'></span>
36
- </li>
37
- <# }); #>
38
- </ul>
39
- </div>
40
- <div class='mapp-icon-editor-toolbar'>
41
- <input type='file' multiple name='mapp-icon-files' class='mapp-icon-files'>
42
- <button data-mapp-action='add' class='button mapp-icon-add'><?php _e('Add', 'mappress-google-maps-for-wordpress');?></button>
43
- </div>
44
- </div>
45
- </script>
46
-
47
- <script type='text/html' id='mapp-tmpl-icon-picker'>
48
- <div class='mapp-iconpicker' tabindex='0'>
49
- <div class='mapp-iconpicker-wrapper'>
50
- <# _.each(mappl10n.options.userIcons, function(iconid, i) { #>
51
- <img class='mapp-icon' data-mapp-iconid='{{iconid}}' src='{{mappl10n.options.iconsUrl}}{{iconid}}' alt='iconid' title='iconid'>
52
- <# }); #>
53
- <br/>
54
- <# _.each(mappl10n.options.standardIcons, function(iconid, i) { #>
55
- <span data-mapp-iconid='{{iconid}}' class='mapp-icon-sprite' style='background-position: <# print(i * -24) #>px 0px' alt='{{iconid}}' title='{{iconid}}'></span>
56
- <# }); #>
57
- </div>
58
- <div class='mapp-iconpicker-toolbar'>
59
- <input class='button' data-mapp-iconid='' type='button' value='<?php _e('Use default icon', 'mappress-google-maps-for-wordpress');?>'>
60
- </div>
61
- </div>
62
- </div>
63
- </script>
64
-
65
- <script type='text/html' id='mapp-tmpl-tp-master'>
66
- <div class='mapp-tp-editor'>
67
- <?php echo Mappress_Controls::select('', array('map-popup' => __('Map popup', 'mappress-google-maps-for-wordpress'), 'map-item' => __('Map list item', 'mappress-google-maps-for-wordpress'), 'mashup-popup' => __('Mashup popup', 'mappress-google-maps-for-wordpress'), 'mashup-item' => __('Mashup list item', 'mappress-google-maps-for-wordpress')), 'map-tmpl-poi', array('class' => 'mapp-tp-select')); ?>
68
- <?php echo Mappress_Controls::button('', __('Edit', 'mappress-google-maps-for-wordpress'), array('class' => 'button button-primary', 'data-mapp-action' => 'edit')); ?>
69
- </div>
70
- </script>
71
-
72
- <script type='text/html' id='mapp-tmpl-tp-detail'>
73
- <div class='mapp-tp-detail'>
74
- <div class='mapp-tp-name'>{{ model.name }} <# if (!model.exists) { #>(<?php _e('New', 'mappress-google-maps-for-wordpress');?>)<# } else { #>(<?php _e('Custom', 'mappress-google-maps-for-wordpress');?>)<# } #></div>
75
- <div class='mapp-tp-path'>{{ model.path }}</div>
76
- <div class='mapp-tabs'>
77
- <div class='mapp-tab-label mapp-active' class='mapp-active'><?php _e('Editor', 'mappress-google-maps-for-wordpress');?></div>
78
- <div class='mapp-tab-label'><?php _e('Default', 'mappress-google-maps-for-wordpress');?></div>
79
- <div class='mapp-tab mapp-tab-content mapp-active'>
80
- <# _.each(tokens, function (token, i) { #>
81
- <code data-mapp-action='insert' data-mapp-insert='{{{i}}}' title='{{{i}}}'>{{{token}}}</code>
82
- <# }); #>
83
- <hr/>
84
- <textarea class='mapp-tp-content'>{{{ model.content }}}</textarea>
85
- </div>
86
- <div class='mapp-tab mapp-tab-standard'>
87
- <textarea readonly class='mapp-tp-standard'>{{{ model.standard }}}</textarea>
88
- </div>
89
- </div>
90
- <div class='mapp-tp-toolbar'>
91
- <input type='button' class='button button-primary' data-mapp-action='save' value='<?php _e('Save', 'mappress-google-maps-for-wordpress');?>'>
92
- <input type='button' class='button' data-mapp-action='cancel' value='<?php _e('Cancel', 'mappress-google-maps-for-wordpress');?>'>
93
- <# if (model.exists) { #>
94
- <a href='#' data-mapp-action='destroy'><?php _e('Delete', 'mappress-google-maps-for-wordpress');?></a>
95
- <# } #>
96
- </div>
97
- </div>
98
- </script>