rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions

View File

@@ -1 +1 @@
jQuery(function(r){({init:function(){r(document.body).on("click","a.help_tip, a.woocommerce-help-tip, woocommerce-product-type-tip",this.preventTipTipClick).on("click","a.debug-report",this.generateReport).on("click","#copy-for-support",this.copyReport).on("aftercopy","#copy-for-support",this.copySuccess).on("aftercopyfailure","#copy-for-support",this.copyFail).on("click","#download-for-support",this.downloadReport)},preventTipTipClick:function(){return!1},generateReport:function(){var n="";r(".wc_status_table thead, .wc_status_table tbody").each(function(){var t;r(this).is("thead")?(t=r(this).find("th:eq(0)").data("exportLabel")||r(this).text(),n=n+"\n### "+t.trim()+" ###\n\n"):r("tr",r(this)).each(function(){var o,t=(r(this).find("td:eq(0)").data("exportLabel")||r(this).find("td:eq(0)").text()).trim().replace(/(<([^>]+)>)/gi,""),e=r(this).find("td:eq(2)").clone(),e=(e.find(".private").remove(),e.find(".dashicons-yes").replaceWith("&#10004;"),e.find(".dashicons-no-alt, .dashicons-warning").replaceWith("&#10060;"),e.text().trim()),i=e.split(", ");1<i.length&&(o="",r.each(i,function(t,e){o=o+e+"\n"}),e=o),n=n+""+t+": "+e+"\n"})});try{r("#debug-report").slideDown(),r("#debug-report").find("textarea").val("`"+n+"`").trigger("focus").trigger("select"),r(this).fadeOut()}catch(t){console.log(t)}return!1},copyReport:function(t){wcClearClipboard(),wcSetClipboard(r("#debug-report").find("textarea").val(),r(this)),t.preventDefault()},copySuccess:function(){r("#copy-for-support").tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).trigger("focus")},copyFail:function(){r(".copy-error").removeClass("hidden"),r("#debug-report").find("textarea").trigger("focus").trigger("select")},downloadReport:function(){var t=new Blob([r("#debug-report").find("textarea").val()],{type:"text/plain"}),e=window.location.hostname,o=(new Date).toISOString().slice(0,19).replace(/:/g,"-"),i=document.createElement("a");i.download="SystemStatusReport_"+e+"_"+o+".txt",i.href=window.URL.createObjectURL(t),i.textContent="Download ready",i.style="display:none",i.click(),i.remove()}}).init(),r(".wc_status_table").on("click",".run-tool .button",function(t){return t.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.run_tool_confirmation)}),r("#log-viewer-select").on("click","h2 a.page-title-action",function(t){return t.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.delete_log_confirmation)})});
jQuery(function(t){({init:function(){t(document.body).on("click","a.help_tip, a.woocommerce-help-tip, woocommerce-product-type-tip",this.preventTipTipClick).on("click","a.debug-report",this.generateReport).on("click","#copy-for-support",this.copyReport).on("aftercopy","#copy-for-support",this.copySuccess).on("aftercopyfailure","#copy-for-support",this.copyFail).on("click","#download-for-support",this.downloadReport)},preventTipTipClick:function(){return!1},generateReport:function(){var e="";t(".wc_status_table thead, .wc_status_table tbody").each(function(){if(t(this).is("thead")){var o=t(this).find("th:eq(0)").data("exportLabel")||t(this).text();e=e+"\n### "+o.trim()+" ###\n\n"}else t("tr",t(this)).each(function(){var o=(t(this).find("td:eq(0)").data("exportLabel")||t(this).find("td:eq(0)").text()).trim().replace(/(<([^>]+)>)/gi,""),i=t(this).find("td:eq(2)").clone();i.find(".private").remove(),i.find(".dashicons-yes").replaceWith("&#10004;"),i.find(".dashicons-no-alt, .dashicons-warning").replaceWith("&#10060;");var n=i.text().trim(),r=n.split(", ");if(r.length>1){var a="";t.each(r,function(t,e){a=a+e+"\n"}),n=a}e=e+""+o+": "+n+"\n"})});try{return t("#debug-report").slideDown(),t("#debug-report").find("textarea").val("`"+e+"`").trigger("focus").trigger("select"),t(this).fadeOut(),!1}catch(o){console.log(o)}return!1},copyReport:function(e){wcClearClipboard(),wcSetClipboard(t("#debug-report").find("textarea").val(),t(this)),e.preventDefault()},copySuccess:function(){t("#copy-for-support").tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).trigger("focus")},copyFail:function(){t(".copy-error").removeClass("hidden"),t("#debug-report").find("textarea").trigger("focus").trigger("select")},downloadReport:function(){var e=new Blob([t("#debug-report").find("textarea").val()],{type:"text/plain"}),o=window.location.hostname,i=(new Date).toISOString().slice(0,19).replace(/:/g,"-"),n=document.createElement("a");n.download="SystemStatusReport_"+o+"_"+i+".txt",n.href=window.URL.createObjectURL(e),n.textContent="Download ready",n.style="display:none",n.click(),n.remove()}}).init(),t(".wc_status_table").on("click",".run-tool .button",function(t){return t.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.run_tool_confirmation)}),t("#log-viewer-select").on("click","h2 a.page-title-action",function(t){return t.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.delete_log_confirmation)})});