(()=>{"use strict";window.jQuery(document).ready(function(e){var n=wp.i18n.__;function o(t,o){var e=new URL(window.location.href),n=e.searchParams;return n.set(t,o),e.search=n.toString(),n.set("paged",1),e.search=n.toString(),e.toString()}e(".tutor-zoom-accordion-panel").on("click",function(t){t.preventDefault(),e(this).find("i").toggleClass("tutor-icon-angle-down tutor-icon-angle-up"),e(this).parent().find(".tutor-zoom-accordion-body").slideToggle()}),e("#tutor-zoom-settings").on("change",'input[type="checkbox"], input[type="radio"]',function(t){e(this).closest("form").submit()}),e("#tutor-zoom-settings").submit(function(t){t.preventDefault();var o=e(this),t=o.serializeObject();e.ajax({url:window._tutorobject.ajaxurl,type:"POST",data:t,beforeSend:function(){o.find("#save-changes").attr("disabled","disabled").addClass("is-loading")},success:function(t){var o=t.success?n("Success","tutor-pro"):n("Error","tutor-pro");tutor_toast(o,((t,o)=>{var e=wp.i18n["__"],{data:t={}}=t||{},{message:t=o||e("Something Went Wrong!","tutor")}=t;return t})(t),t.success?"success":"error")},complete:function(){o.find("#save-changes").removeAttr("disabled").removeClass("is-loading")}})}),e("#tutor-zoom-search-filter-form").on("keypress",'[name="search"]',function(t){console.log(t,"on submit"),"13"==(t.keyCode||t.which)&&(t=e(this).val(),window.location=o("search",t))}).find(".tutor-zoom-course, .tutor-zoom-date").on("change",function(t){window.location=o(e(this).attr("name"),e(this).val())})})})();