!function(e){"use strict";let n=function(e,n){let t=e.find(".sifency-registration-form"),i=e.find(".sifency-reg-submit"),s=e.find(".sifency-reg-message"),r=e.find(".sifency-pass-toggle");r.length&&r.on("click",function(){let e=n(this).siblings("input"),t="password"===e.attr("type")?"text":"password";e.attr("type",t),n(this).find("i").toggleClass("eicon-preview-medium eicon-preview-hide")}),t.on("submit",function(e){e.preventDefault(),i.find(".sifency-btn-text").hide(),i.find(".sifency-btn-loader").show(),s.hide().removeClass("error success"),n.ajax({url:sifency_vars.ajax_url,type:"POST",data:t.serialize(),success:function(e){i.find(".sifency-btn-text").show(),i.find(".sifency-btn-loader").hide(),e.success?(s.addClass("success").html(e.data.message).slideDown(),e.data.redirect&&(window.location.href=e.data.redirect)):s.addClass("error").html(e.data.message).slideDown()},error:function(){i.find(".sifency-btn-text").show(),i.find(".sifency-btn-loader").hide(),s.addClass("error").text("An error occurred. Please try again.").slideDown()}})})};e(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/sifency-registration-form.default",n)})}(jQuery);