!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},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";function o(e){var t=e.shortcode;return t.length>0?wp.element.createElement("div",null,t):""}var r=n(2),c=(n.n(r),n(3)),i=(n.n(c),n(4)),l=(n.n(i),wp.i18n.__),s=wp.blocks.registerBlockType;wp.editor.RichText;s("sbd/block-sbd-block",{title:l("SBD - Shortcode Generator"),icon:"shield",category:"common",keywords:[l("SBD \u2014 Shortcode Generator"),l("SBD \u2014 Shortcode Generator")],attributes:{shortcode:{type:"string",default:""}},edit:function(e){function t(e){jQuery("#sbd_shortcode_generator_meta").prop("disabled",!0),jQuery(e.target).addClass("currently_editing"),jQuery.post(ajaxurl,{action:"show_qcpnd_shortcodes"},function(e){jQuery("#sm-modal").length<1&&jQuery("#wpwrap").append(e)})}function n(e){var t=jQuery("#wpwrap").find(" #sbd_shortcode_container").val();r({shortcode:t}),console.log(t)}var o=e.attributes.shortcode,r=e.setAttributes;return jQuery(document).on("click",".sbd_copy_close",function(e){e.preventDefault(),jQuery(".currently_editing").next("#sbd_insert_shortcode").trigger("click"),jQuery(document).find(" .modal-content .close").trigger("click")}),jQuery(document).on("click"," .modal-content .close",function(){jQuery(".currently_editing").removeClass("currently_editing"),jQuery("#sbd_shortcode_generator_meta").prop("disabled",!1),jQuery(this).parent().parent().remove()}),wp.element.createElement("div",{className:e.className},wp.element.createElement("input",{type:"button",id:"sbd_shortcode_generator_meta",onClick:t,className:"button button-primary button-large",value:"Generate SBD Shortcode"}),wp.element.createElement("input",{type:"button",id:"sbd_insert_shortcode",onClick:n,className:"button button-primary button-large",value:"Test SBD Shortcode"}),wp.element.createElement("br",null),o)},save:function(e){var t=e.attributes.shortcode;return wp.element.createElement("div",null,wp.element.createElement(o,{shortcode:t}))}})},function(e,t){},function(e,t){},function(e,t){e.exports=wp.components}]);