text: jQuery(document).ready(function(e){var r=e("#progressbar"),t=e(".progress-label");if(r.progressbar({value:!1,change:function(){var e=parseInt(r.progressbar("value"));90==e?s.currentLabel=1:e%10==0&&s.changeTextLabel();var a=s.getTextLabel();t.text(a+" "+r.progressbar("value")+"%")},complete:function(){t.text("Complete!")}}),"none"!=nfProcessingAction){var s={labels:nf_processing.step_labels,currentLabel:0,getTextLabel:function(){var e=this.labels[this.currentLabel];return e},changeTextLabel:function(){var e=Object.keys(this.labels).length;1==e&&(e=0);var r=Math.floor(Math.random()*(e-2+1))+1;this.currentLabel=r}},a={setup:function(){this.interval=Math.floor(100/parseInt(this.totalSteps))},process:function(){e.post(ajaxurl,{step:this.step,total_steps:a.totalSteps,args:this.args,action:nfProcessingAction},function(t){t=e.parseJSON(t),a.step=t.step,a.totalSteps=t.total_steps,a.args=t.args,a.errors=t.errors,a.errors&&(e("#nf-upgrade-errors").removeClass("hidden"),e.each(a.errors,function(r,t){e(".nf-upgrade-errors-list").append("<li>ERROR: "+t+"</li>")})),1==a.runSetup&&(a.setup(),a.runSetup=0),t.complete?(r.progressbar("value",100),"undefined"!=typeof t.redirect&&""!=t.redirect&&(document.location.href=t.redirect)):(a.progress(),a.process())})},progress:function(){var e=r.progressbar("value")||0;r.progressbar("value",e+this.interval)},step:"loading",totalSteps:0,runSetup:1,interval:0,args:nfProcessingArgs};a.process()}});