Ubuntu
!function(e){var t={};function r(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(s,n,function(t){return e[t]}.bind(null,n));return s},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}([function(e,t,r){"use strict";e.exports=r(2)},function(e,t,r){e.exports=r(4)()},function(e,t,r){"use strict";
/** @license React v16.14.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var s=r(3),n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,u=n?Symbol.for("react.fragment"):60107,c=n?Symbol.for("react.strict_mode"):60108,i=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,p=n?Symbol.for("react.context"):60110,f=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;rk.length&&k.push(e)}function N(e,t,r){return null==e?0:function e(t,r,s,n){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var c=!1;if(null===t)c=!0;else switch(u){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case o:case a:c=!0}}if(c)return s(n,t,""===r?"."+M(t,0):r),1;if(c=0,r=""===r?".":r+":",Array.isArray(t))for(var i=0;ithis.setState({scan_status:void 0!==e.data.scan_status?e.data.scan_status:this.state.scan_status,warmup_status:void 0!==e.data.warmup_status?e.data.warmup_status:this.state.warmup_status,code:void 0!==e.code?e.code:this.state.code,success:void 0!==e.success?e.success:this.state.success,error_message:void 0!==e.message?e.message:this.state.error_message,allow_optimization:void 0!==e.data.allow_optimization?e.data.allow_optimization:this.state.allow_optimization}))}computeProgress(){if("rest_forbidden"==this.state.code||0==this.state.success)return clearInterval(this.timeout),void this.setState({error_message:this.state.error_message});let e=this.step1ProgressA(),t=this.step1ProgressB(),r=this.step1MaxProgress(),s=this.step2Progress(),n=this.step2MaxProgress(),o=(r>0?Math.ceil(50*e/r):0)+(r>0?Math.ceil(50*t/r):0);o>100&&(o=100);let a=o+(n>0?Math.ceil(100*s/n):0);a>200&&(a=200);this.step1Completed()&&this.step2Completed()&&(clearInterval(this.timeout),a=200),this.setState({progress1a:e,progress1b:t,max1:r,progress2:s,max2:n,progress:a,max:200})}componentDidMount(){this.getStatus(),this.computeProgress(),this.timeout=setInterval(()=>{this.getStatus(),this.computeProgress(),this.state.progress>=200&&clearInterval(this.timeout)},3e3)}step1Completed(){return this.state.scan_status.completed}step1ProgressA(){return this.state.scan_status.scanned}step1ProgressB(){return this.state.scan_status.fetched}step1MaxProgress(){return this.state.scan_status.total_pages}step2Completed(){return this.state.warmup_status.completed}step2Progress(){return this.state.warmup_status.warmed_count}step2MaxProgress(){return this.state.warmup_status.total}renderError(){let e;return this.state.success||""==this.state.error_message||(e=n.a.createElement("div",{className:"rucss-progress-error wpr-fieldWarning-title wpr-icon-important"},this.state.error_message)),e}renderScanStep(){let e;if(this.state.success&&this.props.wpRUCSSObject.api_debug){let t=this.props.wpRUCSSObject.wpr_rucss_translations.step1_txt;t=t.replace("{count}",this.state.scan_status.fetched),t=t.replace("{total}",this.state.scan_status.total_pages);let r=this.step1Completed()?"rucss-progress-step completed step1 wpr-icon-check":"rucss-progress-step step1";e=n.a.createElement("div",{className:r},n.a.createElement("div",{className:"spinner"}),t)}return e}renderWarmupStep(){let e;if(this.state.success&&this.props.wpRUCSSObject.api_debug&&this.step1Completed()){let t=this.props.wpRUCSSObject.wpr_rucss_translations.step2_txt;t=t.replace("{count}",this.state.warmup_status.warmed_count),t=t.replace("{total}",this.state.warmup_status.total);let r=this.step2Completed()?"rucss-progress-step completed step2 wpr-icon-check":"rucss-progress-step step2";e=n.a.createElement("div",{className:r},n.a.createElement("div",{className:"spinner"}),t)}return e}renderRUCSSEnabled(){let e;return this.state.allow_optimization&&(e=n.a.createElement("div",{className:"rucss-progress-step completed wpr-icon-check"},this.props.wpRUCSSObject.wpr_rucss_translations.rucss_working)),e}renderNotWarmedResourcesList(){let e;return this.state.success&&this.props.wpRUCSSObject.api_debug&&this.step1Completed()&&this.state.warmup_status.notwarmed_resources.length>0&&(e=n.a.createElement("div",{className:"rucss-progress-step wpr-icon-important rucss-progress-step2-list"},this.props.wpRUCSSObject.wpr_rucss_translations.warmed_list,n.a.createElement("ul",{className:"rucss-notwarmed-resources"},this.state.warmup_status.notwarmed_resources.map(e=>n.a.createElement("li",{key:e,className:"list-group-item list-group-item-primary"},e))))),e}renderRUCSSProgress(){let e;return this.state.allow_optimization||(e=n.a.createElement("div",null,n.a.createElement("div",{className:"rucss-progress-bar"},n.a.createElement(u,{value:this.state.progress,max:this.state.max})))),e}renderRUCSSSingleStep(){let e;if(this.state.success&&!this.props.wpRUCSSObject.api_debug&&!this.state.allow_optimization){let t=this.step2Completed()?"rucss-progress-step completed step2 wpr-icon-check":"rucss-progress-step step2";e=n.a.createElement("div",{className:t},n.a.createElement("div",{className:"spinner"}),n.a.createElement("span",{dangerouslySetInnerHTML:{__html:this.props.wpRUCSSObject.wpr_rucss_translations.rucss_info_txt}}))}return e}render(){return n.a.createElement("div",{className:"rucss-status wpr-field-description"},this.renderRUCSSProgress(),this.renderError(),this.renderRUCSSSingleStep(),this.renderScanStep(),this.renderWarmupStep(),this.renderNotWarmedResourcesList(),this.renderRUCSSEnabled())}}c.propTypes={wpRUCSSObject:a.a.object},document.addEventListener("DOMContentLoaded",(function(){ReactDOM.render(React.createElement(c,{wpRUCSSObject:window.rocket_rucss_ajax_data}),document.getElementById("rucss-progressbar"))}))}]);