function pageGeneratorProQuickTagsRegister(e){for(const a in e)QTags.addButton("page_generator_pro_"+a,e[a].title,(function(){pageGeneratorProQuickTagsLoadModal(e[a],"quicktags")}))}function pageGeneratorProQuickTagsLoadModal(e,a){var $;($=jQuery).post(ajaxurl,{action:"page_generator_pro_output_tinymce_modal",nonce:page_generator_pro_tinymce.nonces.tinymce,editor_type:a,shortcode:e.name},(function(a){wpZincModal.open(),$("div.wpzinc-modal div.media-modal.wp-core-ui").css({width:e.modal.width+"px",height:e.modal.height+20+"px"}),$("#wpzinc-modal .media-frame-title h1").text(e.title),$("#wpzinc-modal .media-frame-content").html(a),$("div.wpzinc-modal div.media-modal.wp-core-ui div.wpzinc-vertical-tabbed-ui").css({height:e.modal.height-50+"px"});var o=e.render_callback?"insert":"run";switch($("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").removeClass("insert"),$("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").removeClass("run"),$("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").addClass(o),o){case"insert":$("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").text("Insert");break;case"run":$("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").text("Run");break}wp_zinc_tabs_init(),page_generator_pro_reinit_selectize(),"undefined"!=typeof wp_zinc_autocomplete_initialize&&wp_zinc_autocomplete_initialize(".wpzinc-tinymce-popup"),page_generator_pro_conditional_fields_initialize(),$("select.wpzinc-conditional, .wpzinc-conditional select").trigger("change"),$('form.wpzinc-tinymce-popup select[name="maptype"]').trigger("change.page-generator-pro")}))}pageGeneratorProQuickTagsRegister(page_generator_pro_quicktags);