!function($){"use strict";"object"==typeof mceThemifyPopup&&($('<script type="text/html" id="tmpl-themify-popup-shortcode">'+mceThemifyPopup.fields.template+"</script>").appendTo("body"),tinymce.PluginManager.add("mceThemifyPopup",function(n,e){n.addButton("mceThemifyPopup",{title:mceThemifyPopup.labels.menuName,image:e+"/icon.svg",onclick:function(){var o=[];$.each(mceThemifyPopup.fields.fields,function(e,t){"colorbox"===t.type&&(t.onaction=function(){const e=n.settings.color_picker_callback;if(e)return function(){const t=this;e.call(n,function(e){t.value(e).fire("change")},t.value())}}()),o.push(t)}),n.windowManager.open({title:mceThemifyPopup.labels.menuName,body:o,onSubmit:function(e){const t=wp.template("themify-popup-shortcode"),o=this.toJSON();o.selectedContent=n.selection.getContent(),n.insertContent(t(o))}})}})}))}(jQuery);