!function(e){function t(a){if(n[a])return n[a].exports;var l=n[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";var a=n(2),l=(n.n(a),n(3)),r=(n.n(l),n(4)),__=(n.n(r),wp.i18n.__),o=wp.blocks.registerBlockType,p=function(e){var t=e.attributes,n=t.mapUrl,a=t.showTraveledMapLink;return wp.element.createElement("div",{className:"d-flex flex-center flex-column"},wp.element.createElement("iframe",{className:"map-iframe",src:n,frameBorder:"0",allow:"fullscreen"}),a&&wp.element.createElement("p",null,wp.element.createElement("small",null,wp.element.createElement("a",{href:"https://www.traveledmap.com",target:"_blank"},"Created on TraveledMap"))))};o("traveledmap/embedded-map-block",{title:__("Embedded Map"),icon:"location-alt",category:"common",keywords:[__("Embedded Map"),__("TraveledMap"),__("Traveled Map"),__("Embedded"),__("Embed")],attributes:{showTraveledMapLink:{type:"boolean",default:!0},mapUrl:{type:"string"},mapUrlInputVal:{type:"string"}},edit:function(e){var t=e.attributes,n=t.mapUrl,a=t.mapUrlInputVal,l=t.showTraveledMapLink,o=e.setAttributes,c=(e.className,function(e){o({mapUrlInputVal:e})}),m=function(){o({mapUrl:a})};return wp.element.createElement("div",null,wp.element.createElement("p",null,"To get the link of your Map, go to the ",wp.element.createElement("a",{href:"https://www.traveledmap.com/embed",target:"_blank"},"Embed page"),"\xa0 and follow the instructions."),wp.element.createElement("div",{className:"input-with-button"},wp.element.createElement(r.TextControl,{label:"Link of your TraveledMap",value:a,onChange:c}),wp.element.createElement(r.Button,{isPrimary:!0,onClick:m},"Validate")),n&&p(e),wp.element.createElement(r.ToggleControl,{label:"Show TraveledMap link",className:"mt-10",checked:l,onChange:function(){return o({showTraveledMapLink:!l})}}))},save:function(e){return p(e)}})},function(e,t){},function(e,t){},function(e,t){e.exports=wp.components}]);