function pageGeneratorProGutenbergButtonSpintaxGenerate(e){!function(e,n,t,o,a){const{createElement:r}=t,{registerFormatType:i,getTextContent:c,applyFormat:g,toggleFormat:p,slice:_,insert:l,create:u}=n,{BlockControls:s}=e,{ToolbarGroup:w,ToolbarButton:d}=o;var m="dashicons-tablet";void 0!==a.gutenberg_icon&&(m=a.gutenberg_icon.search("svg")>=0?t.RawHTML({children:a.gutenberg_icon}):a.gutenberg_icon),i("page-generator-pro/"+a.name,{title:a.title,tagName:a.tag,className:a.name,edit:function(e){var n=c(_(e.value));return r(s,{},r(w,{},r(d,{key:"page_generator_pro_"+a.name+"_toolbar_button",icon:m,title:a.title,onClick:function(){wpzinc_modal_open("Generating..."),jQuery.post(ajaxurl,{action:"page_generator_pro_tinymce_spintax_generate",nonce:a.nonce,content:n},(function(n){return n.success?(wpzinc_modal_show_success_and_exit("Done!"),e.onChange(l(e.value,u({html:n.data.replace(/(<([^>]+)>)/gi,"")})))):wpzinc_modal_show_error_message(n.data)}))}})))}})}(window.wp.blockEditor,window.wp.richText,window.wp.element,window.wp.components,e)}"undefined"!=typeof wp&&void 0!==wp.blocks&&pageGeneratorProGutenbergButtonSpintaxGenerate(page_generator_pro_gutenberg_button_spintax_generate);