Ubuntu
var updraft_restore_screen=!0;jQuery(function(p){var s,o,n,d=p("#updraftplus_ajax_restore_job_id").val(),e=p("#updraftplus_ajax_restore_action").val(),l=0,u=p("#updraftplus_ajax_restore_output"),i=p(".updraft_restore_components_list"),r=!1,_=0,c=0;function f(e,t){var r=new XMLHttpRequest,e="action="+t+"&updraftplus_ajax_restore=do_ajax_restore&job_id="+e,o=0,n=!0,d=p("#updraftplus_ajax_restore_debug").length;r.open("POST",ajaxurl,!0),r.onprogress=function(e){if(200<=e.currentTarget.status&&e.currentTarget.status<300){if(-1!==e.currentTarget.responseText.indexOf(""+e.data.fileindex+"").replace("%s2",""+e.data.total_files+"")),"db"==e.stage&&e.data.hasOwnProperty("stage")&&("table"==e.data.stage?t.find(".updraft_component--progress").html(" — "+updraftlion.restore_db_table_progress.replace("%s",""+e.data.table+"")):"stored_routine"==e.data.stage?t.find(".updraft_component--progress").html(" — "+updraftlion.restore_db_stored_routine_progress.replace("%s",""+e.data.routine_name+"")):"finished"==e.data.stage?t.find(".updraft_component--progress").html(" — "+updraftlion.finished):"begun"==e.data.stage&&t.find(".updraft_component--progress").html(" — "+updraftlion.begun+"...")),o!==n&&(o&&((r=i.find("[data-component="+o+"]")).find(".updraft_component--progress").html(""),r.removeClass("active").addClass("done")),"finished"==n?(t.addClass("done"),i.find("[data-component]").each(function(e,t){$el=p(t),$el.is(".done")||$el.addClass("error")}),e.data.hasOwnProperty("actions")&&"object"==typeof e.data.actions&&(r=e.data.urls,a=[],p.each(r,function(e,t){var r=new XMLHttpRequest;r.open("GET",t,!1),r.send(null),404==r.status&&a.push(t)}),p.isEmptyObject(r=a)||(p(".updraft_restore_result").before(updraftlion.ajax_restore_404_detected),p.each(r,function(e,t){p(".updraft_missing_pages").append(""+t+"")})),p.each(e.data.actions,function(e,t){i.after(''+e+"")}))):t.addClass("active")),o=n))}p("#updraft-restore-hidethis").remove(),f(d,e),p("#updraftplus_ajax_restore_progress").on("click","#updraft_restore_resume",function(e){e.preventDefault(),p("#updraftplus_ajax_restore_progress").slideUp(1e3,function(){p(this).remove()}),f(d,"updraft_ajaxrestore_continue")}),p(document).on("heartbeat-tick",function(e,t){t.hasOwnProperty("wp-auth-check")&&(t["wp-auth-check"]?(r&&t["wp-auth-check"]&&(l=Math.round(Date.now()/1e3),r=!1),!t.hasOwnProperty("updraftplus")||(t=t.updraftplus).hasOwnProperty("updraft_credentialtest_nonce")&&(updraft_credentialtest_nonce=t.updraft_credentialtest_nonce,l=Math.round(Date.now()/1e3))):r=!0)})});