'use strict';(function(a,l,m,n){function e(b){a(".prompt-box .show-login").show();a(".prompt-box .show-error").hide();"error"==b?0==a(".prompt-box .prompt-error").length&&a(".prompt-box .prompt-msg").after('<p class="prompt-error">'+themify_lang.invalid_login+"</p>"):a(".prompt-box .prompt-error").remove();a(".overlay, .prompt-box").fadeIn(500)}function h(){a(".overlay, .prompt-box").fadeOut(500)}function f(b){"error"==b?(b="error",a(".overlay, .prompt-box").delay(900).fadeIn(500),a(".prompt-box .show-error").show(),
a(".prompt-box .show-error p").remove(),a(".prompt-box .error-msg").after('<p class="prompt-error">undefined</p>'),a(".prompt-box .show-login").hide()):b="done";a(".alert").removeClass("busy").addClass(b).delay(800).fadeOut(800,function(){a(this).removeClass(b)})}var g;a(function(){a(".themify-builder-upgrade-plugin").on("click",function(b){b.preventDefault();g=a(this);e()});a(".upgrade-login").on("click",function(b){b.preventDefault();var c=a(this);b=c.parent().parent().find(".username").val();c=
c.parent().parent().find(".password").val();var k=a(".themify-builder-upgrade-plugin").parent().hasClass("login");""!=b&&""!=c?(h(),a(".alert").addClass("busy").fadeIn(800),a.post(ajaxurl,{action:"themify_tiles_validate_login",type:"plugin",login:k,username:b,password:c},function(d){d=a.trim(d);"true"==d?(f(),a("#themify_update_form").append('<input type="hidden" name="plugin" value="'+g.data("plugin")+'" /><input type="hidden" name="package_url" value="'+g.data("package_url")+'" />').submit()):"false"==
d&&(f("error"),e("error"))})):(f("error"),e("error"))});a(".overlay").on("click",function(){h()})})})(jQuery,window,document);
