"use strict";var editor,element="",code="";jQuery(document).on("click",".tiny_button_tags_placeholders .item",function(){code=element="",element=jQuery(this).attr("element"),code=jQuery(this).attr("code"),editor.selection.setContent("{{"+code+"}}"),code=""}),tinymce.create("tinymce.plugins.nf_tags_button",{init:function(s,e){s.addButton("nf_tags_button",{title:"Add an element",classes:"flight_shortcodes btn nf_mce_button",text:"+ Add field tag",onclick:function(e){editor=s;var t=jQuery("#"+e.control._id),n=t.offset();n.top,n.left;jQuery(".tags_opened").removeClass("tags_opened");var o=jQuery(".tiny_button_tags_placeholders").detach(),n=t.closest(".wp-editor-wrap");n.prepend(o),code=e="",t.hasClass("is_opened")?(t.removeClass("is_opened"),jQuery(".tiny_button_tags_placeholders").hide(),jQuery(".tags_opened").removeClass("tags_opened")):(t.addClass("is_opened"),jQuery(".tiny_button_tags_placeholders").slideDown("fast"),n.addClass("tags_opened"))}})},createControl:function(e,t){return null}}),tinymce.PluginManager.add("nf_tags_button",tinymce.plugins.nf_tags_button);