!function(o,t){"use strict";!function(){o(document).ready(function(){e.init()})}();var e={init:function(){o("body").addClass("wpmudev-ui"),o(".wpmudev-tabs").tabs(),this.init_select2(),o(document).on("click","#forminator-generate-shortcode",this.open_modal),o(document).on("click","#forminator-popup-close",this.close_modal),o(document).on("click",".wpmudev-insert-cform",this.insert_form),o(document).on("click",".wpmudev-insert-poll",this.insert_poll),o(document).on("click",".wpmudev-insert-quiz",this.insert_quiz)},init_select2:function(){setTimeout(function(){o(".wpmudev-select").wpmuiSelect({allowClear:!1,minimumResultsForSearch:1/0,containerCssClass:"wpmudev-select2",dropdownCssClass:"wpmudev-select-dropdown"})},10)},open_modal:function(t){t.preventDefault(),t.stopPropagation();var e=(o(this),o("#forminator-popup")),n=e.find(".wpmudev-box-modal");e.addClass("wpmudev-modal-active"),o("body").addClass("wpmudev-modal-is_active"),setTimeout(function(){n.addClass("wpmudev-show")})},close_modal:function(o){o.preventDefault(),o.stopPropagation(),e.close()},close:function(){var t=o(".wpmudev-modal"),e=t.find(".wpmudev-box-section");t.removeClass("wpmudev-modal-active"),o("body").removeClass("wpmudev-modal-is_active"),e.removeClass("wpmudev-hide")},insert_form:function(t){t.preventDefault(),t.stopPropagation();var n=o(".forminator-custom-form-list").val();e.insert_shortcode("forminator_form",n)},insert_poll:function(t){t.preventDefault(),t.stopPropagation();var n=o(".forminator-insert-poll").val();e.insert_shortcode("forminator_poll",n)},insert_quiz:function(t){t.preventDefault(),t.stopPropagation();var n=o(".forminator-quiz-list").val();e.insert_shortcode("forminator_quiz",n)},insert_shortcode:function(o,t){var n="["+o+' id="'+t+'"]';window.parent.send_to_editor(n),e.close()}}}(jQuery,document);