MapPress Easy Google Maps - Version 2.56.5

Version Description

  • Fixed: fixed version incompatibility in plugin header
Download this release

Release Info

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

Code changes from version 2.56.3 to 2.56.5

build/index_mappress_admin.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=19)}([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 r(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 o(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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(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 s(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 s(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 O}));var p=window.mapp||{},l=wp.element.createElement,c=wp.i18n,u=c.__,m=(c._x,c._n,c.sprintf,wp.element),d=m.Fragment,f=m.useEffect,h=(m.useLayoutEffect,m.useRef),y=m.useState,b=wp.components,v=b.Button,g=b.Modal,w=(b.Popover,b.Spinner,b.TextControl);function O(t){var e=o(y({isFetchingMap:!!t.mapid,isSavingMap:!1,map:null}),2),n=e[0],i=e[1],a=h(null);function s(t){i((function(e){return r(r({},e),t)}))}function c(e,i){switch(e){case"change-title":n.map.set({dirty:!0,title:i}),s({map:n.map});break;case"close":t.onAction("edit-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(p.store.destroyMap({mapid:t.mapid}),t.onAction("edit-destroy"));break;case"save":p.store.saveMap({mapdata:n.map.toJSON(),success:function(e){n.map.set({dirty:!1}),t.onAction("edit-save",e.mapid)}})}}function m(){if(n.map&&!n.isFetchingMap){var t=n.map.title?n.map.title:"";return l(w,{className:"mapp-edit-title",placeholder:u("Untitled"),value:t,onChange:function(t){return c("change-title",t)}})}}function b(){return l("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:function(t){return t.stopPropagation()}},l(v,{isPrimary:!0,isBusy:n.isSavingMap,onClick:function(){return c("save")}},u("Save")),l(v,{disabled:n.isSavingMap,onClick:function(){return c("close")}},u("Cancel")),l(v,{disabled:!t.mapid||n.isSavingMap,isDestructive:!0,className:"mapp-edit-delete",onClick:function(){return c("destroy")}},u("Delete")))}return f((function(){var e=function(e){s({mapdata:e.maps[t.mapid],isFetchingMap:e.isFetchingMap,isSavingMap:e.isSavingMap})};return p.store.subscribe(e),function(){return p.store.unsubscribe(e)}})),f((function(){t.mapid&&p.store.fetchMap({mapid:t.mapid})}),[]),f((function(){n.isFetchingMap||function(t){var e=new p.Map(t,{center:null,editable:!0,embed:!0,iwType:"ib",layout:"left",mapOpts:{streetViewControl:!1},menu:!1,name:"media-map",poiList:!0,sel:jQuery(a.current),zoom:null});new p.Editor(e);s({map:e})}(n.mapdata)}),[n.mapdata]),"library"==t.context?l(d,null,m(),l("div",{className:"mapp-edit",ref:a}),b()):l(g,{className:"mapp-edit-modal",focusOnMount:!0,isDismissible:!1,title:m(),shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!1,onRequestClose:function(){c("close")}},l("div",{className:"mapp-edit",ref:a,onKeyDown:function(t){return t.stopPropagation()},tabIndex:-1}),b())}},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 r(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 o(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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(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 s(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 s(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 S}));var p=window.mapp||{},l=wp.element.createElement,c=wp.i18n,u=c.__,m=(c._x,c._n,c.sprintf,wp.data.select),d=wp.element,f=d.Fragment,h=d.useEffect,y=(d.useLayoutEffect,d.useRef),b=d.useState,v=wp.components,g=(v.BaseControl,v.Button),w=(v.Dashicon,v.Modal),O=(v.PanelBody,v.RadioControl),j=v.Spinner,k=v.TextControl;function S(t){var e=o(b({isFetchingItems:!0,items:null,search:"",type:"all"}),2),n=e[0],i=e[1],a=y(null),s=y(null);function c(t){i((function(e){return r(r({},e),t)}))}function d(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 v(e,n){switch(e){case"close":t.onAction("list-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(p.store.destroyMap({mapid:n}),n==t.mapid&&t.onAction("list-destroy",n)),a.current.focus();break;case"select":t.onAction("list-select",n)}}function S(){var e="library"==t.context?null:l(O,{className:"mapp-pick-type",options:[{label:u("All maps"),value:"all"},{label:u("Attached to this post"),value:"post"}],onChange:function(t){return c({type:t})},selected:n.type});return l("div",{className:"mapp-pick-filter"},l(k,{ref:a,className:"mapp-pick-search",tabIndex:1,label:u("Search"),placeholder:u("post title, map title, or map id"),onChange:function(t){return c({search:t})}}),n.isFetchingItems&&l(j,null),e)}function C(){var t=_.filter(n.items,d);return n.isFetchingItems?null:t.length?l("div",{className:"mapp-pick-items"},l("div",{className:"mapp-pick-header"},l("div",{className:"mapp-pick-col-map-title"},u("Map title")),l("div",{className:"mapp-pick-col-mapid"},u("Map ID")),l("div",{className:"mapp-pick-col-post-title"},u("Attached to")),l("div",{className:"mapp-pick-col-actions"},u("Action"))),_.map(t,P)):void l("div",{className:"mapp-pick-items"},l("div",{className:"mapp-pick-message"},u("No maps found")))}function P(e){var i,r,a,o=e.mapid==t.mapid;r=e.postid==mappl10n.options.postid?m("core/editor").getEditedPostAttribute("title"):e.post_title,i=e.map_title?e.map_title:u("Untitled"),r=r||u("Untitled"),e.postid>0&&e.postid==mappl10n.options.postid&&"all"==n.type&&(r+=" ("+u("current post")+")"),a=e.postid>0?e.postid==mappl10n.options.postid?r:l("a",{onClick:function(t){return t.stopPropagation()},href:mappl10n.options.editurl+"?post="+e.postid+"&action=edit",target:"_blank",title:u("Edit post")},r):u("Unattached");var p=l("div",{className:"mapp-pick-col-actions"},"library"==t.context&&l(g,{onClick:function(t){var n,i;t.stopPropagation(),n=e.mapid,i=jQuery("<input>"),jQuery("body").append(i),i.val('[mappress mapid="'+n+'"]').select(),document.execCommand("copy"),i.remove(),alert(u("Shortcode copied"))},title:u("Copy shortcode"),icon:"admin-page"}),l(g,{onClick:function(t){t.stopPropagation(),v("destroy",e.mapid)},title:u("Delete map"),icon:"trash"}));"library"==t.context&&e.mapid;return l("div",{className:"mapp-pick-item"+(o?" mapp-selected":""),ref:o?s:null,key:e.mapid+"|"+e.postid,onClick:function(){return v("select",e.mapid)}},l("div",{className:"mapp-pick-col-map-title"},i),l("div",{className:"mapp-pick-col-mapid"},e.mapid),l("div",{className:"mapp-pick-col-post-title"},a),p)}return h((function(){var t=function(t){c({isFetchingItems:t.isFetchingItems,items:t.items})};return p.store.subscribe(t),function(){return p.store.unsubscribe(t)}})),h((function(){a.current&&a.current.focus(),p.store.fetchItems({})}),[]),h((function(){n.items&&(t.scrollTop>=0?jQuery(".mapp-pick-items").scrollTop(t.scrollTop):s.current&&s.current.scrollIntoView(!0))}),[n.items]),"library"==t.context?l(f,null,S(),C()):l(w,{className:"mapp-pick-modal",title:u("Select a map"),onRequestClose:function(){return v("close")}},S(),C())}},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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(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 r(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 r(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 v}));window.mapp;var a=wp.element.createElement,o=wp.i18n,s=o.__,p=(o._x,o._n,o.sprintf,wp.element),l=p.Fragment,c=(p.useEffect,p.useLayoutEffect,p.useRef,p.useState),u=wp.components,m=u.BaseControl,d=u.Button,f=u.ButtonGroup,h=(u.Dashicon,u.Dropdown,u.ExternalLink,u.Panel,u.PanelBody,u.PanelRow),y=(u.RadioControl,u.SelectControl),b=u.TextControl;function v(t){var e,n=i(c({}),2);n[0],n[1];function r(t){if(!t||"string"!=typeof t)return t;var e={px:2048,vw:100,vh:100,"%":100},n=parseInt(t),i=2048,r="";for(var a in e)t.includes(a)&&(r=a,i=e[a]);return n>i?i+r:t}function o(e,n){var i=null;switch(e){case"poiList":t.map.set({poiList:n}),i={poiList:n};break;case"size":n.hasOwnProperty("height")&&(n.height=r(n.height)),n.hasOwnProperty("width")&&(n.width=r(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",s("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:s("Untitled"),a(h,null,a(m,{className:"mapp-settings-title"},e),a(m,{className:"mapp-settings-id",label:s("Map ID")},t.map.mapid))),function(){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=mappl10n.options.sizes.map((function(t,e){return{label:t.width+"x"+t.height,height:t.height,width:t.width,value:e+1}}));n.unshift({height:"",label:s("Default"),value:0,width:""}),n.push({label:s("Custom"),value:"custom",disabled:!0});for(var i="custom",r=0;r<n.length-1;r++)n[r].width==t.width&&n[r].height==t.height&&(i=r);return a(l,null,a(y,{className:"mapp-settings-dims-select",help:"",label:s("Size"),value:i,options:n,onChange:function(t){return o("size",{width:n[t].width,height:n[t].height})}}),a(h,null,a(b,{className:"mapp-settings-dims-custom",help:s("px, %, vw"),label:s("Width"),onChange:function(t){return o("size",{width:t})},placeholder:e.width,value:t.width}),a(b,{className:"mapp-settings-dims-custom",help:s("px, %, vh"),label:s("Height"),onChange:function(t){return o("size",{height:t})},placeholder:e.height,value:t.height})))}(),(t.center&&(t.center.lat,t.center.lng,s("Zoom"),t.zoom),a(h,null,a(m,{label:s("Center/Zoom")}),a(m,null,a(f,null,a(d,{onClick:function(){return o("viewport-reset")},isPressed:!t.center,isSmall:!0},s("Automatic")),a(d,{onClick:function(){return o("viewport-save")},isPressed:t.center,isSmall:!0},s("Save")))))))}},function(t,e,n){"use strict";function i(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||p(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 r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function 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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||p(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){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,"MappMultiSelect",(function(){return O}));var c=wp.element.createElement,u=wp.i18n,m=u.__,d=(u._x,u._n,u.sprintf,wp.element),f=(d.Fragment,d.useEffect),h=(d.useLayoutEffect,d.useRef),y=d.useState,b=wp.components,v=b.BaseControl,g=(b.Button,b.CheckboxControl),w=(b.Panel,b.PanelBody,b.PanelRow,b.Spinner,b.TextControl);function O(t){var e,n=h(null),r=h(null),o=s(y({isOpen:!1,filter:"",filteredOptions:[]}),2),p=o[0],l=o[1];function u(t){l((function(e){return a(a({},e),t)}))}function d(e){var n=_.findWhere(t.options,{value:e});return n?n.label:e}function b(){var e;return t.values instanceof Array?e=i(t.values):t.values&&(e=[t.values]),e||[]}function O(e,n){var i=b(),r=i.indexOf(e);(n=void 0!==n?n:-1==r)?i.push(e):i.splice(r,1),t.onChange(i)}function j(){return p.isOpen?c("div",{className:"mapp-select-dropdown-wrapper"},c("div",{className:"mapp-select-dropdown"},!p.isOpen||!t.options||t.options.length<10?null:c("div",{className:"mapp-select-filter",ref:r},c(w,{autocomplete:"off",placeholder:m("Search"),value:p.filter,onChange:function(t){return u({filter:t})}})),c("div",{className:"mapp-select-dropdown-list"},(e=b(),0==p.filteredOptions.length?c("div",{className:"mapp-select-dropdown-item"},m("No results")):p.filteredOptions.map((function(t){return c(g,{className:"mapp-select-dropdown-item",checked:e.includes(t.value),onChange:function(e){return O(t.value,e)},label:t.label})})))))):null;var e}return f((function(){if(t.options)if(p.filter){var e=p.filter.toUpperCase();u({filteredOptions:t.options.filter((function(t){return 0==t.label.toUpperCase().indexOf(e)}))})}else u({filteredOptions:t.options})}),[t.options,p.filter]),f((function(){p.isOpen&&r.current&&(jQuery("input",jQuery(r.current)).focus(),u({filter:""}))}),[p.isOpen]),c(v,{className:"mapp-select",label:t.label},c("div",{ref:n,tabIndex:0,onBlur:function(t){return function(t){event.relatedTarget||document.activeElement,n.current.contains(t.relatedTarget)||u({isOpen:!1})}(t)}},((e=b())instanceof Array&&e.map((function(t){return d(t)})),void 0===t.options?c("div",{className:"mapp-select-input"},c("div",{className:"mapp-select-tokens"}),c("span",{className:"dashicons dashicons-arrow-down-alt2"})):c("div",{className:"mapp-select-input",onClick:function(){return u({isOpen:!p.isOpen})}},c("div",{className:"mapp-select-tokens"},e.map((function(t){return c("span",{className:"mapp-select-token",onClick:function(e){e.stopPropagation(),O(t,!1)}},d(t))}))),c("span",{className:"dashicons "+(p.isOpen?"dashicons-arrow-up-alt2":"dashicons-arrow-down-alt2")}))),j()))}},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 r(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 o(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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(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 s(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 s(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 w}));var p=window.mapp||{},l=wp.element.createElement,c=wp.i18n,u=c.__,m=(c._x,c._n,c.sprintf,wp.element),d=(m.Fragment,m.useEffect,m.useLayoutEffect,m.useRef,m.useState),f=wp.components,h=f.BaseControl,y=f.Button,b=f.ButtonGroup,v=(f.Dashicon,f.Dropdown,f.ExternalLink,f.Panel,f.PanelBody,f.PanelRow),g=(f.RadioControl,f.SelectControl,f.TextControl);function w(t){var e=o(d({apiKey:mappl10n.options.apiKey,engine:mappl10n.options.engine}),2),n=e[0],i=e[1];function a(t){i((function(e){return r(r({},e),t)}))}function s(t,e){switch(t){case"apikey":a({apiKey:e});break;case"engine":a({engine:e});break;case"save":p.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",u("Options saved."),{type:"snackbar",isDismissible:!0,actions:[{url:window.location,label:"Refresh page"}]})}})}}return l("div",{className:"mapp-options"},null,l(v,null,l(h,{label:u("Mapping Engine")}),l(h,null,l(b,null,l(y,{onClick:function(){return s("engine","leaflet")},isPressed:"google"!=n.engine,isSmall:!0},u("Leaflet")),l(y,{onClick:function(){return s("engine","google")},isPressed:"google"==n.engine,isSmall:!0},u("Google"))))),"google"!=n.engine?null:l(g,{className:"mapp-settings-apikey",label:l("a",{href:"https://mappresspro.com/mappress-faq/#toc-google-maps-api-keys"},u("Google API key")),onChange:function(t){return s("apikey",t)},value:n.apiKey}),l(y,{onClick:function(){return s("save")},isPrimary:!0},u("Save options")))}},,,,,,,,,,,,,,,function(t,e,n){n(0),n(20),n(21),n(22),n(4),n(1),n(2),n(25),n(3),n(26),n(27),n(28)},function(t,e,n){"use strict";n.r(e);var i=n(1),r=n(0);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 o(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){s(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}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.i18n,m=u.__,d=(u._x,u._n,u.sprintf,wp.element),f=(d.Fragment,d.render),h=d.useEffect,y=(d.useLayoutEffect,d.useRef,d.useState),b=wp.components.Button;document.getElementById("mapp-library")&&(mappl10n.options.postid=0,f(c((function(t){var e=p(y({mode:"list",mapid:null,scrollTop:null}),2),n=e[0],a=e[1];function s(t){a((function(e){return o(o({},e),t)}))}function l(t,e){switch(t){case"add-new":s({mode:"edit",mapid:null});break;case"edit-close":s({mode:"list"});break;case"edit-destroy":s({mode:"list",mapid:null});break;case"edit-save":s({mode:"list"});break;case"list-select":s({mode:"edit",mapid:e,scrollTop:jQuery(".mapp-pick-items").scrollTop()})}}return h((function(){}),[]),"list"==n.mode?c("div",{className:"wrap"},c("div",null,c("h1",null,m("Map Library")),c(b,{className:"button button-default",onClick:function(){return l("add-new")}},m("Add New"))),c("div",{className:"mapp-library-wrapper"},c(i.default,{context:"library",mapid:n.mapid,onAction:l,scrollTop:n.scrollTop}))):c("div",{className:"wrap"},c("div",{className:"mapp-library-wrapper"},c(r.default,{context:"library",mapid:n.mapid,onAction:l})))}),null),document.getElementById("mapp-library")))},function(t,e,n){"use strict";n.r(e);var i=n(2),r=n(4),a=n(1),o=n(0);function s(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}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.i18n,h=f.__,y=(f._x,f._n,f.sprintf,wp.element),b=y.Fragment,v=y.useEffect,g=(y.useLayoutEffect,y.useRef),w=y.useState;function O(t){var e=wp.components,n=(e.BaseControl,e.Button),s=(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,y=(e.ToolbarGroup,wp.blockEditor),O=y.BlockControls,j=y.InspectorControls,k=c(w({editMapid:null,isListOpen:!1,isEditorOpen:!1,map:null,mapdata:null,scrollTop:null}),2),S=k[0],C=k[1],P=g(null);function _(t){C((function(e){return p(p({},e),t)}))}function M(e,n){switch(e){case"add":_({isEditorOpen:!0,editMapid:null});break;case"change-settings":t.setAttributes(n);break;case"edit":_({isEditorOpen:!0,editMapid:t.attributes.mapid});break;case"edit-close":_({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}),_({isEditorOpen:!1,isListOpen:!1});break;case"edit-save":_({isEditorOpen:!1,editMapid:null}),t.setAttributes({mapid:n});break;case"list-close":_({isListOpen:!1,scrollTop:jQuery(".mapp-pick-items").scrollTop()});break;case"list-select":n!=t.attributes.mapid&&t.setAttributes({center:void 0,mapid:n,zoom:void 0}),M("list-close");break;case"open-list":_({isListOpen:!0})}}function E(){var e=void 0!==e?e:u,n=mappl10n.options.block?null:d(f,{icon:"portfolio",label:h("Map Library"),onClick:function(){return M("open-list")}});return d(O,null,d(e,null,d(f,{icon:"insert",label:h("New map"),onClick:function(){return M("add")}}),t.attributes.mapid&&d(f,{icon:"edit",label:h("Edit map"),onClick:function(){return M("edit")}}),n))}function A(){if(S.isEditorOpen)return d(o.default,{mapid:S.editMapid,onAction:M})}function x(){if(S.isListOpen)return d(a.default,{mapid:t.attributes.mapid,onAction:M,scrollTop:S.scrollTop})}return v((function(){var e=function(e){var n=e.maps[t.attributes.mapid];n&&_({mapdata:n})};return m.store.subscribe(e),function(){return m.store.unsubscribe(e)}})),v((function(){t.attributes.mapid&&m.store.fetchMap({mapid:t.attributes.mapid,failure:function(){return _({mapdata:void 0})}})}),[t.attributes.mapid]),v((function(){var e;t.attributes.mapid&&P.current&&S.mapdata&&((e=new m.Map(S.mapdata,{center:t.attributes.center,height:t.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:t.attributes.poiList,sel:jQuery(P.current),width:t.attributes.width,zoom:t.attributes.zoom})).display(),_({map:e}))}),[S.mapdata]),t.attributes.preview?d("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"}):t.attributes.mapid&&void 0!==S.mapdata?d(b,null,E(),function(){if(!S.map)return null;var e,a;mappl10n.options.block&&(a=d("div",null,d("p",null,h("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"},h("MapPress Pro")),d(n,{isSecondary:!0,href:"https://wordpress.org/plugins/mappress-google-maps-for-wordpress"},h("Free plugin")))),e=d(s,{title:h("MapPress options"),initialOpen:!1},d(r.MappOptions,{onAction:M})));var o=t.attributes,p=o.center,l=o.height,c=o.poiList,u=o.width,m=o.zoom;return d(j,null,d("div",{className:"mapp-gt-inspector"},d(s,{title:h("Map settings")},d(i.MappSettings,{map:S.map,context:"map",onAction:M,center:p,height:l,poiList:c,width:u,zoom:m}),a),e))}(),d("div",{className:"mapp-gt",ref:P}),x(),A()):d(b,null,d(b,null,E(),d(l,{className:"mapp-gt-placeholder",icon:"location",label:h("MapPress Map"),instructions:h("Create a new map or choose one from the map library.")},d(n,{icon:"insert",isSecondary:!0,onClick:function(){return M("add")}},h("New map")),!mappl10n.options.block&&d(n,{icon:"portfolio",isSecondary:!0,onClick:function(){return M("open-list")}},h("Map Library")))),x(),A())}mappl10n.options.gt&&wp.blocks.registerBlockType("mappress/map",{title:"MapPress Map",icon:"location",description:h("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(O,t)},save:function(t){return t},example:{attributes:{preview:!0}}})},function(t,e,n){"use strict";n.r(e);n(2),n(3),n(23);window.mapp,wp.element.createElement;var i=wp.i18n,r=(i.__,i._x,i._n,i.sprintf,wp.element),a=(r.Fragment,r.useEffect,r.useLayoutEffect,r.useRef,r.useState,wp.components);a.BaseControl,a.Button,a.ButtonGroup,a.Card,a.CardBody,a.CardFooter,a.CardHeader,a.CheckboxControl,a.ExternalLink,a.HorizontalRule,a.Panel,a.PanelBody,a.PanelRow,a.Placeholder,a.RadioControl,a.SelectControl,a.TabPanel,a.TextControl,a.TextareaControl,a.ToggleControl,a.Toolbar,wp.data.useSelect},function(t,e,n){"use strict";(function(e){t.exports=function(t,n){var i,r,a,o,s,p,l,c,u,m,d,f,h,y=String(t).replace(/^&/,"").replace(/&$/,"").split("&"),b=y.length,v=function(t){return decodeURIComponent(t.replace(/\+/g,"%20"))},g="undefined"!=typeof window?window:e;g.$locutus=g.$locutus||{};var w=g.$locutus;for(w.php=w.php||{},n||(n=g),i=0;i<b&&(u=v((c=y[i].split("="))[0]),m=c.length<2?"":v(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,r=0;r<u.length;r++)if("["!==u.charAt(r)||d){if("]"===u.charAt(r)&&d&&(f.length||f.push(u.slice(0,d-1)),f.push(u.substr(d,r-d)),d=0,"["!==u.charAt(r+1)))break}else d=r+1;for(f.length||(f=[u]),r=0;r<f[0].length&&(" "!==(l=f[0].charAt(r))&&"."!==l&&"["!==l||(f[0]=f[0].substr(0,r)+"_"+f[0].substr(r+1)),"["!==l);r++);for(p=n,r=0,h=f.length;r<h;r++){if(s=p,(""===(u=f[r].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==r){for(o in a=-1,p)p.hasOwnProperty(o)&&+o>a&&o.match(/^\d+$/g)&&(a=+o);u=a+1}Object(p[u])!==p[u]&&(p[u]={}),p=p[u]}s[u]=m}}}}).call(this,n(24))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){function n(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 i(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){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)||a(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 a(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 s=window.mapp||{},p=wp.i18n,l=p.__;p._x,p._n,p.sprintf;s.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,maps:{},items:[]}},s.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,r=this;s.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(delete r.state.maps[e],r.destroyItem(e),i(e)):failure(),r.publish()}})},fetchMap:function(t){var e=t.mapid,n=t.success,i=void 0===n?function(){}:n,r=t.failure,a=void 0===r?function(){}:r,o=this;if(void 0!==this.state.maps[e])return o.publish(),void i(this.state.maps[e]);this.state.isFetchingMap=!0,o.publish(),s.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(o.state.maps[e]=t.data,i(t.data)):a(),o.state.isFetchingMap=!1,o.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,r=t.failure,a=void 0===r?function(){}:r,o=this;this.state.isSavingMap=!0,this.publish(),s.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;o.state.maps[n]=e,o.saveItem(e),i(e)}else a();o.state.isSavingMap=!1,o.publish()}})},destroyItem:function(t){var e=this.state.items?this.state.items:[],n=_.findIndex(e,{mapid:t});n>-1&&e.splice(n,1),this.state.items=r(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,r=void 0===i?function(){}:i,a=this;if(this.state.itemsFetched)return n(this.state.items),void a.publish();this.state.isFetchingItems=!0,a.publish(),s.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(a.state.items=t.data,a.sortItems(),n(a.state.items),a.state.itemsFetched=!0):r(),a.state.isFetchingItems=!1,a.sortItems(),a.publish()}})},saveItem:function(t){var e=this.state.items?this.state.items:[],r=_.findWhere(e,{mapid:t.mapid});r?(r.map_title=t.title,r=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},r)):(r={mapid:t.mapid,map_title:t.title,postid:mappl10n.options.postid,post_title:null},e.unshift(r))},sortItems:function(){var t=l("Untitled");this.state.items=_.sortBy(this.state.items,(function(t){return parseInt(t.mapid)})),this.state.items=_.sortBy(this.state.items,(function(e){return e.map_title?e.map_title:t}))},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=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}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 o,s=!0,p=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){p=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(p)throw o}}}}(r(this.subs));try{for(e.s();!(t=e.n()).done;){(0,t.value)(this.state)}}catch(t){e.e(t)}finally{e.f()}}},s.store=new s.Store},function(t,e,n){var i,r=window.mapp||{};i=jQuery,r.Editor=function(t){this.drawingManager=null,this.map=t,this.poiEditor=null;var e=this;this.initialize=function(){this.map.display(),this.poiEditor=new r.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 r.Poi({address:e,body:n,iconid:this.poiEditor.lastIcon,point:t.geometry.location,title:t.name,viewport:t.geometry.viewport?t.geometry.viewport:null});this.map.poiInsert(i),i.center()}else t.overlay?(i=new r.Poi({body:"",iconid:"marker"==t.type?null:"poly",overlay:t.overlay,title:"marker"==t.type?t.overlay.getPosition().toUrlValue(6):mappl10n.shape,type:"marker"==t.type?null:t.type}),this.map.poiInsert(i)):"string"==typeof t&&t.substring(0,4)},this.initDrawingManager=function(){},this.initialize.apply(this)},r.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&&t.target!=i("#mapp-poi-body")&&(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:"75px",convert_urls:!1,language:t,menubar:!1,plugins:"wordpress,paste,wplink,textcolor,image",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link,unlink,image",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)}},function(t,e){var n,i=window.mapp||{};n=jQuery,i.Media=function(){this.editor=null,this.map=null,this.settings={editable:!0,layout:"left",poiList:!0,sel:n(".mapp-edit")},this.sel=n(".mapp-mce"),this.items=null;var t=this;this.initialize=function(){this.sel.length&&(this.find(),this.sel.on("change",".mapp-mce-list-type",(function(){var e=n(".mapp-mce-list-type",this.sel).val();n(".mapp-mce-search").val(""),n(".mapp-mce-search").toggle("all"==e),t.find()})),this.sel.on("keydown",".mapp-mce-search",(function(t){if(13==t.which)return!1})),this.sel.on("input",".mapp-mce-search",(function(e){t.find()})),this.sel.on("click","[data-mapp-mce]",(function(e){e.preventDefault();var i=n(this).attr("data-mapp-mce");t[i]()})),this.sel.on("click",".mapp-mce-item",(function(){n(".mapp-mce-list .mapp-mce-item",this.sel).removeClass("mapp-active"),n(this).addClass("mapp-active")})),this.sel.on("click",".mapp-mce-list [data-mapp-mce-list]",(function(e){e.preventDefault();var i=n(this).attr("data-mapp-mce-list"),r=n(this).closest(".mapp-mce-item").attr("data-mapp-mapid");return t[i](r),!1})),this.sel.on("change",".mapp-mce-viewport",(function(){n(this).is(":checked")||(t.map.center=t.map.zoom=null,t.map.recenter())})),n(".mapp-mce-size").click((function(t){var e=n(this).data("width"),i=n(this).data("height");n(".mapp-mce-width").val(e),n(".mapp-mce-height").val(i),t.preventDefault()})),n("#publish, #post-preview").click((function(){t.save()})),n(".mapp-mce-title").keydown((function(e){13==e.which&&(e.preventDefault(),t.save())})))},this.add=function(){var e=new i.Map({},this.settings);e.width=mappl10n.options.sizes[mappl10n.options.size].width,e.height=mappl10n.options.sizes[mappl10n.options.size].height,t.open(e)},this.cancel=function(){t.closeEditor()},this.closeEditor=function(){this.map.poiClose(),this.map=null,this.editor=null,n(".mapp-mce-edit-panel").hide(),n(".mapp-mce-list-panel").show()},this.edit=function(e){i.Map.ajaxGet(e,(function(e){var n=new i.Map(e,t.settings);t.open(n)}))},this.find=function(){var t=this;null!==this.items?this.renderList():(n(".spinner",this.sel).css("visibility","visible"),i.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&(n(".spinner",this.sel).css("visibility","hidden"),t.items=_.sortBy(e.data,"post_title"),t.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.open=function(t){this.map=t,n(".mapp-edit",this.sel).html(i.lib.template("edit-map"));var e=this.map.mapid;e?n(".mapp-mce-mapid").text(e):n(".mapp-mce-mapid").text(""),n(".mapp-mce-title").val(this.map.title),n(".mapp-mce-width").val(this.map.width),n(".mapp-mce-height").val(this.map.height),n(".mapp-mce-viewport").prop("checked",!(!this.map.center||!this.map.zoom)),n(".mapp-mce-edit-panel").show(),n(".mapp-mce-list-panel").hide(),this.editor=new i.Editor(this.map)},this.remove=function(t){if(confirm(mappl10n.delete_map_prompt)){var e=_.findIndex(this.items,{mapid:t});e>-1&&(this.items.splice(e,1),i.Map.ajaxDelete(t),this.renderList())}},this.renderList=function(){var t=null,e=n(".mapp-mce-list-type",this.sel).val(),r=n(".mapp-mce-search",this.sel).val().toLowerCase();t="all"==e?_.filter(this.items,(function(t){return t.post_title&&-1!=t.post_title.toLowerCase().indexOf(r)||t.map_title&&-1!=t.map_title.toLowerCase().indexOf(r)})):_.filter(this.items,(function(t){return t.postid==mappl10n.options.postid})),n(".mapp-mce-list",this.sel).html(i.lib.template("mce-list",{items:t,type:e,limit:400}))},this.save=function(){var t=this;this.map&&(this.map.title=n.trim(n(".mapp-mce-title").val()),this.map.width=n(".mapp-mce-width").val(),this.map.height=n(".mapp-mce-height").val(),n(".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 e=t.map.mapid?t.map.mapid.toString():null,i=_.findIndex(t.items,(function(t){return t.mapid==e}));-1==i?t.items.unshift({mapid:e,map_title:t.map.title,postid:mappl10n.options.postid,post_title:n("#title").val()||n("#post-title-0").val()}):t.items[i].map_title=t.map.title,t.renderList(),t.closeEditor()})))},this.initialize.apply(this)},i.media=new i.Media},function(t,e){var n;(n=jQuery)(document).ready((function(){n('input[name="mappress_options[engine]"]').on("change",(function(){n('input[name="save"]').click()})),n('input[name="mappress_options[geocoder]"]').on("change",(function(){n('input[name="save"]').click()})),n("[data-mapp-grid]").each((function(t,e){new mapp.widgets.Grid(e)})),n(document).on("focus",".mapp-expand",(function(){n(this).parent().width("100%"),n(this).attr("rows",20)})),n(document).on("blur",".mapp-expand",(function(){n(this).parent().width("auto"),n(this).attr("rows",1)})),n(".mapp-autoicons").on("change","#mapp-autoicons-key",(function(t){mapp.lib.ajax({data:{action:"mapp_autoicons_form",key:n(this).val()},callback:function(t){t&&t.status&&(n(".mapp-autoicons").html(t.data),new mapp.widgets.Grid(n("[data-mapp-grid]",".mapp-autoicons")))}})})),n("#mapp-filters tbody").sortable({handle:".mapp-handle"}),n(".mapp-confirm").on("change",(function(){var t=n(".mapp-confirm").is(":checked");n(".mapp-import").prop("disabled",!t)}))}))}]);
1
+ !function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=19)}([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 r(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 o(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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(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 s(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 s(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 O}));var p=window.mapp||{},l=wp.element.createElement,c=wp.i18n,u=c.__,m=(c._x,c._n,c.sprintf,wp.element),d=m.Fragment,f=m.useEffect,h=(m.useLayoutEffect,m.useRef),y=m.useState,b=wp.components,v=b.Button,g=b.Modal,w=(b.Popover,b.Spinner,b.TextControl);function O(t){var e=o(y({isFetchingMap:!!t.mapid,isSavingMap:!1,map:null}),2),n=e[0],i=e[1],a=h(null);function s(t){i((function(e){return r(r({},e),t)}))}function c(e,i){switch(e){case"change-title":n.map.set({dirty:!0,title:i}),s({map:n.map});break;case"close":t.onAction("edit-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(p.store.destroyMap({mapid:t.mapid}),t.onAction("edit-destroy"));break;case"save":p.store.saveMap({mapdata:n.map.toJSON(),success:function(e){n.map.set({dirty:!1}),t.onAction("edit-save",e.mapid)}})}}function m(){if(n.map&&!n.isFetchingMap){var t=n.map.title?n.map.title:"";return l(w,{className:"mapp-edit-title",placeholder:u("Untitled"),value:t,onChange:function(t){return c("change-title",t)}})}}function b(){return l("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:function(t){return t.stopPropagation()}},l(v,{isPrimary:!0,isBusy:n.isSavingMap,onClick:function(){return c("save")}},u("Save")),l(v,{disabled:n.isSavingMap,onClick:function(){return c("close")}},u("Cancel")),l(v,{disabled:!t.mapid||n.isSavingMap,isDestructive:!0,className:"mapp-edit-delete",onClick:function(){return c("destroy")}},u("Delete")))}return f((function(){var e=function(e){s({mapdata:e.maps[t.mapid],isFetchingMap:e.isFetchingMap,isSavingMap:e.isSavingMap})};return p.store.subscribe(e),function(){return p.store.unsubscribe(e)}})),f((function(){t.mapid&&p.store.fetchMap({mapid:t.mapid})}),[]),f((function(){n.isFetchingMap||function(t){var e=new p.Map(t,{center:null,editable:!0,embed:!0,iwType:"ib",layout:"left",mapOpts:{streetViewControl:!1},menu:!1,name:"media-map",poiList:!0,sel:jQuery(a.current),zoom:null});new p.Editor(e);s({map:e})}(n.mapdata)}),[n.mapdata]),"library"==t.context?l(d,null,m(),l("div",{className:"mapp-edit",ref:a}),b()):l(g,{className:"mapp-edit-modal",focusOnMount:!0,isDismissible:!1,title:m(),shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!1,onRequestClose:function(){c("close")}},l("div",{className:"mapp-edit",ref:a,onKeyDown:function(t){return t.stopPropagation()},tabIndex:-1}),b())}},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 r(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 o(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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(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 s(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 s(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 S}));var p=window.mapp||{},l=wp.element.createElement,c=wp.i18n,u=c.__,m=(c._x,c._n,c.sprintf,wp.data.select),d=wp.element,f=d.Fragment,h=d.useEffect,y=(d.useLayoutEffect,d.useRef),b=d.useState,v=wp.components,g=(v.BaseControl,v.Button),w=(v.Dashicon,v.Modal),O=(v.PanelBody,v.RadioControl),j=v.Spinner,k=v.TextControl;function S(t){var e=o(b({isFetchingItems:!0,items:null,search:"",type:"all"}),2),n=e[0],i=e[1],a=y(null),s=y(null);function c(t){i((function(e){return r(r({},e),t)}))}function d(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 v(e,n){switch(e){case"close":t.onAction("list-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(p.store.destroyMap({mapid:n}),n==t.mapid&&t.onAction("list-destroy",n)),a.current.focus();break;case"select":t.onAction("list-select",n)}}function S(){var e="library"==t.context?null:l(O,{className:"mapp-pick-type",options:[{label:u("All maps"),value:"all"},{label:u("Attached to this post"),value:"post"}],onChange:function(t){return c({type:t})},selected:n.type});return l("div",{className:"mapp-pick-filter"},l(k,{ref:a,className:"mapp-pick-search",tabIndex:1,label:u("Search"),placeholder:u("post title, map title, or map id"),onChange:function(t){return c({search:t})}}),n.isFetchingItems&&l(j,null),e)}function C(){var t=_.filter(n.items,d);return n.isFetchingItems?null:t.length?l("div",{className:"mapp-pick-items"},l("div",{className:"mapp-pick-header"},l("div",{className:"mapp-pick-col-map-title"},u("Map title")),l("div",{className:"mapp-pick-col-mapid"},u("Map ID")),l("div",{className:"mapp-pick-col-post-title"},u("Attached to")),l("div",{className:"mapp-pick-col-actions"},u("Action"))),_.map(t,P)):void l("div",{className:"mapp-pick-items"},l("div",{className:"mapp-pick-message"},u("No maps found")))}function P(e){var i,r,a,o=e.mapid==t.mapid;r=e.postid==mappl10n.options.postid?m("core/editor").getEditedPostAttribute("title"):e.post_title,i=e.map_title?e.map_title:u("Untitled"),r=r||u("Untitled"),e.postid>0&&e.postid==mappl10n.options.postid&&"all"==n.type&&(r+=" ("+u("current post")+")"),a=e.postid>0?e.postid==mappl10n.options.postid?r:l("a",{onClick:function(t){return t.stopPropagation()},href:mappl10n.options.editurl+"?post="+e.postid+"&action=edit",target:"_blank",title:u("Edit post")},r):u("Unattached");var p=l("div",{className:"mapp-pick-col-actions"},"library"==t.context&&l(g,{onClick:function(t){var n,i;t.stopPropagation(),n=e.mapid,i=jQuery("<input>"),jQuery("body").append(i),i.val('[mappress mapid="'+n+'"]').select(),document.execCommand("copy"),i.remove(),alert(u("Shortcode copied"))},title:u("Copy shortcode"),icon:"admin-page"}),l(g,{onClick:function(t){t.stopPropagation(),v("destroy",e.mapid)},title:u("Delete map"),icon:"trash"}));"library"==t.context&&e.mapid;return l("div",{className:"mapp-pick-item"+(o?" mapp-selected":""),ref:o?s:null,key:e.mapid+"|"+e.postid,onClick:function(){return v("select",e.mapid)}},l("div",{className:"mapp-pick-col-map-title"},i),l("div",{className:"mapp-pick-col-mapid"},e.mapid),l("div",{className:"mapp-pick-col-post-title"},a),p)}return h((function(){var t=function(t){c({isFetchingItems:t.isFetchingItems,items:t.items})};return p.store.subscribe(t),function(){return p.store.unsubscribe(t)}})),h((function(){a.current&&a.current.focus(),p.store.fetchItems({})}),[]),h((function(){n.items&&(t.scrollTop>=0?jQuery(".mapp-pick-items").scrollTop(t.scrollTop):s.current&&s.current.scrollIntoView(!0))}),[n.items]),"library"==t.context?l(f,null,S(),C()):l(w,{className:"mapp-pick-modal",title:u("Select a map"),onRequestClose:function(){return v("close")}},S(),C())}},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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(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 r(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 r(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 v}));window.mapp;var a=wp.element.createElement,o=wp.i18n,s=o.__,p=(o._x,o._n,o.sprintf,wp.element),l=p.Fragment,c=(p.useEffect,p.useLayoutEffect,p.useRef,p.useState),u=wp.components,m=u.BaseControl,d=u.Button,f=u.ButtonGroup,h=(u.Dashicon,u.Dropdown,u.ExternalLink,u.Panel,u.PanelBody,u.PanelRow),y=(u.RadioControl,u.SelectControl),b=u.TextControl;function v(t){var e,n=i(c({}),2);n[0],n[1];function r(t){if(!t||"string"!=typeof t)return t;var e={px:2048,vw:100,vh:100,"%":100},n=parseInt(t),i=2048,r="";for(var a in e)t.includes(a)&&(r=a,i=e[a]);return n>i?i+r:t}function o(e,n){var i=null;switch(e){case"poiList":t.map.set({poiList:n}),i={poiList:n};break;case"size":n.hasOwnProperty("height")&&(n.height=r(n.height)),n.hasOwnProperty("width")&&(n.width=r(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",s("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:s("Untitled"),a(h,null,a(m,{className:"mapp-settings-title"},e),a(m,{className:"mapp-settings-id",label:s("Map ID")},t.map.mapid))),function(){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=mappl10n.options.sizes.map((function(t,e){return{label:t.width+"x"+t.height,height:t.height,width:t.width,value:e+1}}));n.unshift({height:"",label:s("Default"),value:0,width:""}),n.push({label:s("Custom"),value:"custom",disabled:!0});for(var i="custom",r=0;r<n.length-1;r++)n[r].width==t.width&&n[r].height==t.height&&(i=r);return a(l,null,a(y,{className:"mapp-settings-dims-select",help:"",label:s("Size"),value:i,options:n,onChange:function(t){return o("size",{width:n[t].width,height:n[t].height})}}),a(h,null,a(b,{className:"mapp-settings-dims-custom",help:s("px, %, vw"),label:s("Width"),onChange:function(t){return o("size",{width:t})},placeholder:e.width,value:t.width}),a(b,{className:"mapp-settings-dims-custom",help:s("px, %, vh"),label:s("Height"),onChange:function(t){return o("size",{height:t})},placeholder:e.height,value:t.height})))}(),(t.center&&(t.center.lat,t.center.lng,s("Zoom"),t.zoom),a(h,null,a(m,{label:s("Center/Zoom")}),a(m,null,a(f,null,a(d,{onClick:function(){return o("viewport-reset")},isPressed:!t.center,isSmall:!0},s("Automatic")),a(d,{onClick:function(){return o("viewport-save")},isPressed:t.center,isSmall:!0},s("Save")))))))}},function(t,e,n){"use strict";function i(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||p(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 r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function 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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||p(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){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,"MappMultiSelect",(function(){return O}));var c=wp.element.createElement,u=wp.i18n,m=u.__,d=(u._x,u._n,u.sprintf,wp.element),f=(d.Fragment,d.useEffect),h=(d.useLayoutEffect,d.useRef),y=d.useState,b=wp.components,v=b.BaseControl,g=(b.Button,b.CheckboxControl),w=(b.Panel,b.PanelBody,b.PanelRow,b.Spinner,b.TextControl);function O(t){var e,n=h(null),r=h(null),o=s(y({isOpen:!1,filter:"",filteredOptions:[]}),2),p=o[0],l=o[1];function u(t){l((function(e){return a(a({},e),t)}))}function d(e){var n=_.findWhere(t.options,{value:e});return n?n.label:e}function b(){var e;return t.values instanceof Array?e=i(t.values):t.values&&(e=[t.values]),e||[]}function O(e,n){var i=b(),r=i.indexOf(e);(n=void 0!==n?n:-1==r)?i.push(e):i.splice(r,1),t.onChange(i)}function j(){return p.isOpen?c("div",{className:"mapp-select-dropdown-wrapper"},c("div",{className:"mapp-select-dropdown"},!p.isOpen||!t.options||t.options.length<10?null:c("div",{className:"mapp-select-filter",ref:r},c(w,{autocomplete:"off",placeholder:m("Search"),value:p.filter,onChange:function(t){return u({filter:t})}})),c("div",{className:"mapp-select-dropdown-list"},(e=b(),0==p.filteredOptions.length?c("div",{className:"mapp-select-dropdown-item"},m("No results")):p.filteredOptions.map((function(t){return c(g,{className:"mapp-select-dropdown-item",checked:e.includes(t.value),onChange:function(e){return O(t.value,e)},label:t.label})})))))):null;var e}return f((function(){if(t.options)if(p.filter){var e=p.filter.toUpperCase();u({filteredOptions:t.options.filter((function(t){return 0==t.label.toUpperCase().indexOf(e)}))})}else u({filteredOptions:t.options})}),[t.options,p.filter]),f((function(){p.isOpen&&r.current&&(jQuery("input",jQuery(r.current)).focus(),u({filter:""}))}),[p.isOpen]),c(v,{className:"mapp-select",label:t.label},c("div",{ref:n,tabIndex:0,onBlur:function(t){return function(t){event.relatedTarget||document.activeElement,n.current.contains(t.relatedTarget)||u({isOpen:!1})}(t)}},((e=b())instanceof Array&&e.map((function(t){return d(t)})),void 0===t.options?c("div",{className:"mapp-select-input"},c("div",{className:"mapp-select-tokens"}),c("span",{className:"dashicons dashicons-arrow-down-alt2"})):c("div",{className:"mapp-select-input",onClick:function(){return u({isOpen:!p.isOpen})}},c("div",{className:"mapp-select-tokens"},e.map((function(t){return c("span",{className:"mapp-select-token",onClick:function(e){e.stopPropagation(),O(t,!1)}},d(t))}))),c("span",{className:"dashicons "+(p.isOpen?"dashicons-arrow-up-alt2":"dashicons-arrow-down-alt2")}))),j()))}},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 r(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 o(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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(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 s(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 s(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 w}));var p=window.mapp||{},l=wp.element.createElement,c=wp.i18n,u=c.__,m=(c._x,c._n,c.sprintf,wp.element),d=(m.Fragment,m.useEffect,m.useLayoutEffect,m.useRef,m.useState),f=wp.components,h=f.BaseControl,y=f.Button,b=f.ButtonGroup,v=(f.Dashicon,f.Dropdown,f.ExternalLink,f.Panel,f.PanelBody,f.PanelRow),g=(f.RadioControl,f.SelectControl,f.TextControl);function w(t){var e=o(d({apiKey:mappl10n.options.apiKey,engine:mappl10n.options.engine}),2),n=e[0],i=e[1];function a(t){i((function(e){return r(r({},e),t)}))}function s(t,e){switch(t){case"apikey":a({apiKey:e});break;case"engine":a({engine:e});break;case"save":p.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",u("Options saved."),{type:"snackbar",isDismissible:!0,actions:[{url:window.location,label:"Refresh page"}]})}})}}return l("div",{className:"mapp-options"},null,l(v,null,l(h,{label:u("Mapping Engine")}),l(h,null,l(b,null,l(y,{onClick:function(){return s("engine","leaflet")},isPressed:"google"!=n.engine,isSmall:!0},u("Leaflet")),l(y,{onClick:function(){return s("engine","google")},isPressed:"google"==n.engine,isSmall:!0},u("Google"))))),"google"!=n.engine?null:l(g,{className:"mapp-settings-apikey",label:l("a",{href:"https://mappresspro.com/mappress-faq/#toc-google-maps-api-keys"},u("Google API key")),onChange:function(t){return s("apikey",t)},value:n.apiKey}),l(y,{onClick:function(){return s("save")},isPrimary:!0},u("Save options")))}},,,,,,,,,,,,,,,function(t,e,n){n(0),n(20),n(21),n(22),n(4),n(1),n(2),n(25),n(3),n(26),n(27),n(28)},function(t,e,n){"use strict";n.r(e);var i=n(1),r=n(0);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 o(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){s(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}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.i18n,m=u.__,d=(u._x,u._n,u.sprintf,wp.element),f=(d.Fragment,d.render),h=d.useEffect,y=(d.useLayoutEffect,d.useRef,d.useState),b=wp.components.Button;document.getElementById("mapp-library")&&(mappl10n.options.postid=0,f(c((function(t){var e=p(y({mode:"list",mapid:null,scrollTop:null}),2),n=e[0],a=e[1];function s(t){a((function(e){return o(o({},e),t)}))}function l(t,e){switch(t){case"add-new":s({mode:"edit",mapid:null});break;case"edit-close":s({mode:"list"});break;case"edit-destroy":s({mode:"list",mapid:null});break;case"edit-save":s({mode:"list"});break;case"list-select":s({mode:"edit",mapid:e,scrollTop:jQuery(".mapp-pick-items").scrollTop()})}}return h((function(){}),[]),"list"==n.mode?c("div",{className:"wrap"},c("div",null,c("h1",null,m("Map Library")),c(b,{className:"button button-default",onClick:function(){return l("add-new")}},m("Add New"))),c("div",{className:"mapp-library-wrapper"},c(i.default,{context:"library",mapid:n.mapid,onAction:l,scrollTop:n.scrollTop}))):c("div",{className:"wrap"},c("div",{className:"mapp-library-wrapper"},c(r.default,{context:"library",mapid:n.mapid,onAction:l})))}),null),document.getElementById("mapp-library")))},function(t,e,n){"use strict";n.r(e);var i=n(2),r=n(4),a=n(1),o=n(0);function s(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(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=[],i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}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.i18n,h=f.__,y=(f._x,f._n,f.sprintf,wp.element),b=y.Fragment,v=y.useEffect,g=(y.useLayoutEffect,y.useRef),w=y.useState;function O(t){var e=wp.components,n=(e.BaseControl,e.Button),s=(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,y=(e.ToolbarGroup,wp.blockEditor),O=y.BlockControls,j=y.InspectorControls,k=c(w({editMapid:null,isListOpen:!1,isEditorOpen:!1,map:null,mapdata:null,scrollTop:null}),2),S=k[0],C=k[1],P=g(null);function _(t){C((function(e){return p(p({},e),t)}))}function M(e,n){switch(e){case"add":_({isEditorOpen:!0,editMapid:null});break;case"change-settings":t.setAttributes(n);break;case"edit":_({isEditorOpen:!0,editMapid:t.attributes.mapid});break;case"edit-close":_({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}),_({isEditorOpen:!1,isListOpen:!1});break;case"edit-save":_({isEditorOpen:!1,editMapid:null}),t.setAttributes({mapid:n});break;case"list-close":_({isListOpen:!1,scrollTop:jQuery(".mapp-pick-items").scrollTop()});break;case"list-select":n!=t.attributes.mapid&&t.setAttributes({center:void 0,mapid:n,zoom:void 0}),M("list-close");break;case"open-list":_({isListOpen:!0})}}function E(){var e=void 0!==e?e:u,n=mappl10n.options.block?null:d(f,{icon:"portfolio",label:h("Map Library"),onClick:function(){return M("open-list")}});return d(O,null,d(e,null,d(f,{icon:"insert",label:h("New map"),onClick:function(){return M("add")}}),t.attributes.mapid&&d(f,{icon:"edit",label:h("Edit map"),onClick:function(){return M("edit")}}),n))}function A(){if(S.isEditorOpen)return d(o.default,{mapid:S.editMapid,onAction:M})}function x(){if(S.isListOpen)return d(a.default,{mapid:t.attributes.mapid,onAction:M,scrollTop:S.scrollTop})}return v((function(){var e=function(e){var n=e.maps[t.attributes.mapid];n&&_({mapdata:n})};return m.store.subscribe(e),function(){return m.store.unsubscribe(e)}})),v((function(){t.attributes.mapid&&m.store.fetchMap({mapid:t.attributes.mapid,failure:function(){return _({mapdata:void 0})}})}),[t.attributes.mapid]),v((function(){var e;t.attributes.mapid&&P.current&&S.mapdata&&((e=new m.Map(S.mapdata,{center:t.attributes.center,height:t.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:t.attributes.poiList,sel:jQuery(P.current),width:t.attributes.width,zoom:t.attributes.zoom})).display(),_({map:e}))}),[S.mapdata]),t.attributes.preview?d("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"}):t.attributes.mapid&&void 0!==S.mapdata?d(b,null,E(),function(){if(!S.map)return null;var e,a;mappl10n.options.block&&(a=d("div",null,d("p",null,h("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"},h("MapPress Pro")),d(n,{isSecondary:!0,href:"https://wordpress.org/plugins/mappress-google-maps-for-wordpress"},h("Free plugin")))),e=d(s,{title:h("MapPress options"),initialOpen:!1},d(r.MappOptions,{onAction:M})));var o=t.attributes,p=o.center,l=o.height,c=o.poiList,u=o.width,m=o.zoom;return d(j,null,d("div",{className:"mapp-gt-inspector"},d(s,{title:h("Map settings")},d(i.MappSettings,{map:S.map,context:"map",onAction:M,center:p,height:l,poiList:c,width:u,zoom:m}),a),e))}(),d("div",{className:"mapp-gt",ref:P}),x(),A()):d(b,null,d(b,null,E(),d(l,{className:"mapp-gt-placeholder",icon:"location",label:h("MapPress Map"),instructions:h("Create a new map or choose one from the map library.")},d(n,{icon:"insert",isSecondary:!0,onClick:function(){return M("add")}},h("New map")),!mappl10n.options.block&&d(n,{icon:"portfolio",isSecondary:!0,onClick:function(){return M("open-list")}},h("Map Library")))),x(),A())}wp.blocks.registerBlockType("mappress/map",{title:"MapPress Map",icon:"location",description:h("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(O,t)},save:function(t){return t},example:{attributes:{preview:!0}}})},function(t,e,n){"use strict";n.r(e);n(2),n(3),n(23);window.mapp,wp.element.createElement;var i=wp.i18n,r=(i.__,i._x,i._n,i.sprintf,wp.element),a=(r.Fragment,r.useEffect,r.useLayoutEffect,r.useRef,r.useState,wp.components);a.BaseControl,a.Button,a.ButtonGroup,a.Card,a.CardBody,a.CardFooter,a.CardHeader,a.CheckboxControl,a.ExternalLink,a.HorizontalRule,a.Panel,a.PanelBody,a.PanelRow,a.Placeholder,a.RadioControl,a.SelectControl,a.TabPanel,a.TextControl,a.TextareaControl,a.ToggleControl,a.Toolbar,wp.data.useSelect},function(t,e,n){"use strict";(function(e){t.exports=function(t,n){var i,r,a,o,s,p,l,c,u,m,d,f,h,y=String(t).replace(/^&/,"").replace(/&$/,"").split("&"),b=y.length,v=function(t){return decodeURIComponent(t.replace(/\+/g,"%20"))},g="undefined"!=typeof window?window:e;g.$locutus=g.$locutus||{};var w=g.$locutus;for(w.php=w.php||{},n||(n=g),i=0;i<b&&(u=v((c=y[i].split("="))[0]),m=c.length<2?"":v(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,r=0;r<u.length;r++)if("["!==u.charAt(r)||d){if("]"===u.charAt(r)&&d&&(f.length||f.push(u.slice(0,d-1)),f.push(u.substr(d,r-d)),d=0,"["!==u.charAt(r+1)))break}else d=r+1;for(f.length||(f=[u]),r=0;r<f[0].length&&(" "!==(l=f[0].charAt(r))&&"."!==l&&"["!==l||(f[0]=f[0].substr(0,r)+"_"+f[0].substr(r+1)),"["!==l);r++);for(p=n,r=0,h=f.length;r<h;r++){if(s=p,(""===(u=f[r].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==r){for(o in a=-1,p)p.hasOwnProperty(o)&&+o>a&&o.match(/^\d+$/g)&&(a=+o);u=a+1}Object(p[u])!==p[u]&&(p[u]={}),p=p[u]}s[u]=m}}}}).call(this,n(24))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){function n(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 i(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){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)||a(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 a(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 s=window.mapp||{},p=wp.i18n,l=p.__;p._x,p._n,p.sprintf;s.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,maps:{},items:[]}},s.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,r=this;s.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(delete r.state.maps[e],r.destroyItem(e),i(e)):failure(),r.publish()}})},fetchMap:function(t){var e=t.mapid,n=t.success,i=void 0===n?function(){}:n,r=t.failure,a=void 0===r?function(){}:r,o=this;if(void 0!==this.state.maps[e])return o.publish(),void i(this.state.maps[e]);this.state.isFetchingMap=!0,o.publish(),s.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(o.state.maps[e]=t.data,i(t.data)):a(),o.state.isFetchingMap=!1,o.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,r=t.failure,a=void 0===r?function(){}:r,o=this;this.state.isSavingMap=!0,this.publish(),s.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;o.state.maps[n]=e,o.saveItem(e),i(e)}else a();o.state.isSavingMap=!1,o.publish()}})},destroyItem:function(t){var e=this.state.items?this.state.items:[],n=_.findIndex(e,{mapid:t});n>-1&&e.splice(n,1),this.state.items=r(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,r=void 0===i?function(){}:i,a=this;if(this.state.itemsFetched)return n(this.state.items),void a.publish();this.state.isFetchingItems=!0,a.publish(),s.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(a.state.items=t.data,a.sortItems(),n(a.state.items),a.state.itemsFetched=!0):r(),a.state.isFetchingItems=!1,a.sortItems(),a.publish()}})},saveItem:function(t){var e=this.state.items?this.state.items:[],r=_.findWhere(e,{mapid:t.mapid});r?(r.map_title=t.title,r=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},r)):(r={mapid:t.mapid,map_title:t.title,postid:mappl10n.options.postid,post_title:null},e.unshift(r))},sortItems:function(){var t=l("Untitled");this.state.items=_.sortBy(this.state.items,(function(t){return parseInt(t.mapid)})),this.state.items=_.sortBy(this.state.items,(function(e){return e.map_title?e.map_title:t}))},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=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}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 o,s=!0,p=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){p=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(p)throw o}}}}(r(this.subs));try{for(e.s();!(t=e.n()).done;){(0,t.value)(this.state)}}catch(t){e.e(t)}finally{e.f()}}},s.store=new s.Store},function(t,e,n){var i,r=window.mapp||{};i=jQuery,r.Editor=function(t){this.drawingManager=null,this.map=t,this.poiEditor=null;var e=this;this.initialize=function(){this.map.display(),this.poiEditor=new r.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 r.Poi({address:e,body:n,iconid:this.poiEditor.lastIcon,point:t.geometry.location,title:t.name,viewport:t.geometry.viewport?t.geometry.viewport:null});this.map.poiInsert(i),i.center()}else t.overlay?(i=new r.Poi({body:"",iconid:"marker"==t.type?null:"poly",overlay:t.overlay,title:"marker"==t.type?t.overlay.getPosition().toUrlValue(6):mappl10n.shape,type:"marker"==t.type?null:t.type}),this.map.poiInsert(i)):"string"==typeof t&&t.substring(0,4)},this.initDrawingManager=function(){},this.initialize.apply(this)},r.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&&t.target!=i("#mapp-poi-body")&&(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:"75px",convert_urls:!1,language:t,menubar:!1,plugins:"wordpress,paste,wplink,textcolor,image",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link,unlink,image",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)}},function(t,e){var n,i=window.mapp||{};n=jQuery,i.Media=function(){this.editor=null,this.map=null,this.settings={editable:!0,layout:"left",poiList:!0,sel:n(".mapp-edit")},this.sel=n(".mapp-mce"),this.items=null;var t=this;this.initialize=function(){this.sel.length&&(this.find(),this.sel.on("change",".mapp-mce-list-type",(function(){var e=n(".mapp-mce-list-type",this.sel).val();n(".mapp-mce-search").val(""),n(".mapp-mce-search").toggle("all"==e),t.find()})),this.sel.on("keydown",".mapp-mce-search",(function(t){if(13==t.which)return!1})),this.sel.on("input",".mapp-mce-search",(function(e){t.find()})),this.sel.on("click","[data-mapp-mce]",(function(e){e.preventDefault();var i=n(this).attr("data-mapp-mce");t[i]()})),this.sel.on("click",".mapp-mce-item",(function(){n(".mapp-mce-list .mapp-mce-item",this.sel).removeClass("mapp-active"),n(this).addClass("mapp-active")})),this.sel.on("click",".mapp-mce-list [data-mapp-mce-list]",(function(e){e.preventDefault();var i=n(this).attr("data-mapp-mce-list"),r=n(this).closest(".mapp-mce-item").attr("data-mapp-mapid");return t[i](r),!1})),this.sel.on("change",".mapp-mce-viewport",(function(){n(this).is(":checked")||(t.map.center=t.map.zoom=null,t.map.recenter())})),n(".mapp-mce-size").click((function(t){var e=n(this).data("width"),i=n(this).data("height");n(".mapp-mce-width").val(e),n(".mapp-mce-height").val(i),t.preventDefault()})),n("#publish, #post-preview").click((function(){t.save()})),n(".mapp-mce-title").keydown((function(e){13==e.which&&(e.preventDefault(),t.save())})))},this.add=function(){var e=new i.Map({},this.settings);e.width=mappl10n.options.sizes[mappl10n.options.size].width,e.height=mappl10n.options.sizes[mappl10n.options.size].height,t.open(e)},this.cancel=function(){t.closeEditor()},this.closeEditor=function(){this.map.poiClose(),this.map=null,this.editor=null,n(".mapp-mce-edit-panel").hide(),n(".mapp-mce-list-panel").show()},this.edit=function(e){i.Map.ajaxGet(e,(function(e){var n=new i.Map(e,t.settings);t.open(n)}))},this.find=function(){var t=this;null!==this.items?this.renderList():(n(".spinner",this.sel).css("visibility","visible"),i.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&(n(".spinner",this.sel).css("visibility","hidden"),t.items=_.sortBy(e.data,"post_title"),t.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.open=function(t){this.map=t,n(".mapp-edit",this.sel).html(i.lib.template("edit-map"));var e=this.map.mapid;e?n(".mapp-mce-mapid").text(e):n(".mapp-mce-mapid").text(""),n(".mapp-mce-title").val(this.map.title),n(".mapp-mce-width").val(this.map.width),n(".mapp-mce-height").val(this.map.height),n(".mapp-mce-viewport").prop("checked",!(!this.map.center||!this.map.zoom)),n(".mapp-mce-edit-panel").show(),n(".mapp-mce-list-panel").hide(),this.editor=new i.Editor(this.map)},this.remove=function(t){if(confirm(mappl10n.delete_map_prompt)){var e=_.findIndex(this.items,{mapid:t});e>-1&&(this.items.splice(e,1),i.Map.ajaxDelete(t),this.renderList())}},this.renderList=function(){var t=null,e=n(".mapp-mce-list-type",this.sel).val(),r=n(".mapp-mce-search",this.sel).val().toLowerCase();t="all"==e?_.filter(this.items,(function(t){return t.post_title&&-1!=t.post_title.toLowerCase().indexOf(r)||t.map_title&&-1!=t.map_title.toLowerCase().indexOf(r)})):_.filter(this.items,(function(t){return t.postid==mappl10n.options.postid})),n(".mapp-mce-list",this.sel).html(i.lib.template("mce-list",{items:t,type:e,limit:400}))},this.save=function(){var t=this;this.map&&(this.map.title=n.trim(n(".mapp-mce-title").val()),this.map.width=n(".mapp-mce-width").val(),this.map.height=n(".mapp-mce-height").val(),n(".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 e=t.map.mapid?t.map.mapid.toString():null,i=_.findIndex(t.items,(function(t){return t.mapid==e}));-1==i?t.items.unshift({mapid:e,map_title:t.map.title,postid:mappl10n.options.postid,post_title:n("#title").val()||n("#post-title-0").val()}):t.items[i].map_title=t.map.title,t.renderList(),t.closeEditor()})))},this.initialize.apply(this)},i.media=new i.Media},function(t,e){var n;(n=jQuery)(document).ready((function(){n('input[name="mappress_options[engine]"]').on("change",(function(){n('input[name="save"]').click()})),n('input[name="mappress_options[geocoder]"]').on("change",(function(){n('input[name="save"]').click()})),n("[data-mapp-grid]").each((function(t,e){new mapp.widgets.Grid(e)})),n(document).on("focus",".mapp-expand",(function(){n(this).parent().width("100%"),n(this).attr("rows",20)})),n(document).on("blur",".mapp-expand",(function(){n(this).parent().width("auto"),n(this).attr("rows",1)})),n(".mapp-autoicons").on("change","#mapp-autoicons-key",(function(t){mapp.lib.ajax({data:{action:"mapp_autoicons_form",key:n(this).val()},callback:function(t){t&&t.status&&(n(".mapp-autoicons").html(t.data),new mapp.widgets.Grid(n("[data-mapp-grid]",".mapp-autoicons")))}})})),n("#mapp-filters tbody").sortable({handle:".mapp-handle"}),n(".mapp-confirm").on("change",(function(){var t=n(".mapp-confirm").is(":checked");n(".mapp-import").prop("disabled",!t)}))}))}]);
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.56.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-11-09T16:30:37+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
@@ -34,15 +34,15 @@ msgid "https://www.mappresspro.com/chris-contact"
34
  msgstr ""
35
 
36
  #: mappress.php:158
37
- #: mappress.php:630
38
  #: src/mappress_gt_mashup.js:152
39
  msgid "Settings"
40
  msgstr ""
41
 
42
  #: mappress.php:159
43
  #: src/mappress_gt_library.js:65
44
- #: src/mappress_gt_map.js:186
45
- #: src/mappress_gt_map.js:277
46
  msgid "Map Library"
47
  msgstr ""
48
 
@@ -63,7 +63,7 @@ msgid "MapPress Settings"
63
  msgstr ""
64
 
65
  #: mappress.php:344
66
- #: mappress.php:860
67
  msgid "Version"
68
  msgstr ""
69
 
@@ -129,32 +129,32 @@ msgstr ""
129
  msgid "Shape"
130
  msgstr ""
131
 
132
- #: mappress.php:502
133
  msgid "Improve this map"
134
  msgstr ""
135
 
136
- #: mappress.php:518
137
- #: mappress.php:537
138
  msgid "Streets"
139
  msgstr ""
140
 
141
- #: mappress.php:519
142
  msgid "Outdoors"
143
  msgstr ""
144
 
145
- #: mappress.php:520
146
  msgid "Light"
147
  msgstr ""
148
 
149
- #: mappress.php:521
150
  msgid "Dark"
151
  msgstr ""
152
 
153
- #: mappress.php:522
154
  msgid "Satellite"
155
  msgstr ""
156
 
157
- #: mappress.php:523
158
  msgid "Satellite Streets"
159
  msgstr ""
160
 
@@ -1098,44 +1098,44 @@ msgstr ""
1098
  msgid "Add New"
1099
  msgstr ""
1100
 
1101
- #: src/mappress_gt_map.js:16
1102
  msgid "Insert a map"
1103
  msgstr ""
1104
 
1105
- #: src/mappress_gt_map.js:190
1106
- #: src/mappress_gt_map.js:276
1107
  msgid "New map"
1108
  msgstr ""
1109
 
1110
- #: src/mappress_gt_map.js:191
1111
  msgid "Edit map"
1112
  msgstr ""
1113
 
1114
- #: src/mappress_gt_map.js:212
1115
  msgid "Like the block? Upgrade to the free plugin or MapPress Pro for more features!"
1116
  msgstr ""
1117
 
1118
- #: src/mappress_gt_map.js:214
1119
  msgid "MapPress Pro"
1120
  msgstr ""
1121
 
1122
- #: src/mappress_gt_map.js:215
1123
  msgid "Free plugin"
1124
  msgstr ""
1125
 
1126
- #: src/mappress_gt_map.js:218
1127
  msgid "MapPress options"
1128
  msgstr ""
1129
 
1130
- #: src/mappress_gt_map.js:228
1131
  msgid "Map settings"
1132
  msgstr ""
1133
 
1134
- #: src/mappress_gt_map.js:275
1135
  msgid "MapPress Map"
1136
  msgstr ""
1137
 
1138
- #: src/mappress_gt_map.js:275
1139
  msgid "Create a new map or choose one from the map library."
1140
  msgstr ""
1141
 
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.56.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-11-09T21:04:49+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
34
  msgstr ""
35
 
36
  #: mappress.php:158
37
+ #: mappress.php:629
38
  #: src/mappress_gt_mashup.js:152
39
  msgid "Settings"
40
  msgstr ""
41
 
42
  #: mappress.php:159
43
  #: src/mappress_gt_library.js:65
44
+ #: src/mappress_gt_map.js:184
45
+ #: src/mappress_gt_map.js:275
46
  msgid "Map Library"
47
  msgstr ""
48
 
63
  msgstr ""
64
 
65
  #: mappress.php:344
66
+ #: mappress.php:859
67
  msgid "Version"
68
  msgstr ""
69
 
129
  msgid "Shape"
130
  msgstr ""
131
 
132
+ #: mappress.php:501
133
  msgid "Improve this map"
134
  msgstr ""
135
 
136
+ #: mappress.php:517
137
+ #: mappress.php:536
138
  msgid "Streets"
139
  msgstr ""
140
 
141
+ #: mappress.php:518
142
  msgid "Outdoors"
143
  msgstr ""
144
 
145
+ #: mappress.php:519
146
  msgid "Light"
147
  msgstr ""
148
 
149
+ #: mappress.php:520
150
  msgid "Dark"
151
  msgstr ""
152
 
153
+ #: mappress.php:521
154
  msgid "Satellite"
155
  msgstr ""
156
 
157
+ #: mappress.php:522
158
  msgid "Satellite Streets"
159
  msgstr ""
160
 
1098
  msgid "Add New"
1099
  msgstr ""
1100
 
1101
+ #: src/mappress_gt_map.js:15
1102
  msgid "Insert a map"
1103
  msgstr ""
1104
 
1105
+ #: src/mappress_gt_map.js:188
1106
+ #: src/mappress_gt_map.js:274
1107
  msgid "New map"
1108
  msgstr ""
1109
 
1110
+ #: src/mappress_gt_map.js:189
1111
  msgid "Edit map"
1112
  msgstr ""
1113
 
1114
+ #: src/mappress_gt_map.js:210
1115
  msgid "Like the block? Upgrade to the free plugin or MapPress Pro for more features!"
1116
  msgstr ""
1117
 
1118
+ #: src/mappress_gt_map.js:212
1119
  msgid "MapPress Pro"
1120
  msgstr ""
1121
 
1122
+ #: src/mappress_gt_map.js:213
1123
  msgid "Free plugin"
1124
  msgstr ""
1125
 
1126
+ #: src/mappress_gt_map.js:216
1127
  msgid "MapPress options"
1128
  msgstr ""
1129
 
1130
+ #: src/mappress_gt_map.js:226
1131
  msgid "Map settings"
1132
  msgstr ""
1133
 
1134
+ #: src/mappress_gt_map.js:273
1135
  msgid "MapPress Map"
1136
  msgstr ""
1137
 
1138
+ #: src/mappress_gt_map.js:273
1139
  msgid "Create a new map or choose one from the map library."
1140
  msgstr ""
1141
 
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.56.4
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/)
@@ -36,7 +36,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
36
  }
37
 
38
  class Mappress {
39
- const VERSION = '2.56.3';
40
 
41
  static
42
  $baseurl,
@@ -481,7 +481,6 @@ class Mappress {
481
  'debug' => self::$debug,
482
  'editurl' => admin_url('post.php'),
483
  'iconsUrl' => (self::$pro) ? Mappress_Icons::$icons_url : null,
484
- 'gt' => self::is_gt($post),
485
  'language' => self::get_language(),
486
  'mapbox' => self::get_api_keys()->mapbox,
487
  'nonce' => wp_create_nonce('mappress'),
@@ -548,7 +547,7 @@ class Mappress {
548
  }
549
 
550
  // Global settings
551
- $options = array('alignment', 'clustering', 'country', 'defaultIcon', 'directions', 'directionsServer', 'engine', 'filter', 'geocoder', 'gt', 'iconScale', 'initialOpenInfo', 'iwType', 'layout', 'mashupClick', 'mini', 'poiList', 'poiZoom', 'radius', 'search', 'size', 'sizes', 'style');
552
  foreach($options as $option) {
553
  if (isset(self::$options->$option)) {
554
  $l10n['options'][$option] = self::$options->$option;
4
  Plugin URI: https://www.mappresspro.com/mappress
5
  Author URI: https://www.mappresspro.com/chris-contact
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
+ Version: 2.56.5
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/)
36
  }
37
 
38
  class Mappress {
39
+ const VERSION = '2.56.5';
40
 
41
  static
42
  $baseurl,
481
  'debug' => self::$debug,
482
  'editurl' => admin_url('post.php'),
483
  'iconsUrl' => (self::$pro) ? Mappress_Icons::$icons_url : null,
 
484
  'language' => self::get_language(),
485
  'mapbox' => self::get_api_keys()->mapbox,
486
  'nonce' => wp_create_nonce('mappress'),
547
  }
548
 
549
  // Global settings
550
+ $options = array('alignment', 'clustering', 'country', 'defaultIcon', 'directions', 'directionsServer', 'engine', 'filter', 'geocoder', 'iconScale', 'initialOpenInfo', 'iwType', 'layout', 'mashupClick', 'mini', 'poiList', 'poiZoom', 'radius', 'search', 'size', 'sizes', 'style');
551
  foreach($options as $option) {
552
  if (isset(self::$options->$option)) {
553
  $l10n['options'][$option] = self::$options->$option;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: google, leaflet, openstreetmap, osm, mapbox, map, maps, mapping, mapper, gps, geocoder, geocoding, georss, mashup, wpml, multisite
5
  Requires at least: 5.3
6
  Tested up to: 5.6
7
- Stable tag: 2.56.3
8
 
9
  == Description ==
10
  MapPress adds beautiful interfactive Google and Leaflet maps to WordPress.
@@ -73,6 +73,12 @@ Please see the plugin documentation pages:
73
 
74
  == Changelog ==
75
 
 
 
 
 
 
 
76
  = 2.56.3 =
77
  * Fixed: directions form not working
78
  * Fixed: fatal error for missing icon upload
4
  Tags: google, leaflet, openstreetmap, osm, mapbox, map, maps, mapping, mapper, gps, geocoder, geocoding, georss, mashup, wpml, multisite
5
  Requires at least: 5.3
6
  Tested up to: 5.6
7
+ Stable tag: 2.56.5
8
 
9
  == Description ==
10
  MapPress adds beautiful interfactive Google and Leaflet maps to WordPress.
73
 
74
  == Changelog ==
75
 
76
+ = 2.56.5 =
77
+ * Fixed: fixed version incompatibility in plugin header
78
+
79
+ = 2.56.4 =
80
+ * Changed: enabled Gutenberg blocks for blogs that did not use beta versions
81
+
82
  = 2.56.3 =
83
  * Fixed: directions form not working
84
  * Fixed: fatal error for missing icon upload