| 2 |
!function(){"use strict";var e={228:function(e){var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(e){c[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},c)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,n,i=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var l in a=Object(arguments[s]))r.call(a,l)&&(i[l]=a[l]);if(t){n=t(a);for(var p=0;p<n.length;p++)c.call(a,n[p])&&(i[n[p]]=a[n[p]])}}return i}},287:function(e,t,r){var c=r(228),o=60103,a=60106;var n=60109,i=60110,s=60112;var l=60115,p=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;o=d("react.element"),a=d("react.portal"),d("react.fragment"),d("react.strict_mode"),d("react.profiler"),n=d("react.provider"),i=d("react.context"),s=d("react.forward_ref"),d("react.suspense"),l=d("react.memo"),p=d("react.lazy")}var _="function"===typeof Symbol&&Symbol.iterator;function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function b(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||f}function w(){}function y(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||f}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(u(85));this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=b.prototype;var m=y.prototype=new w;m.constructor=y,c(m,b.prototype),m.isPureReactComponent=!0;var v={current:null},g=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,r){var c,a={},n=null,i=null;if(null!=t)for(c in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(n=""+t.key),t)g.call(t,c)&&!j.hasOwnProperty(c)&&(a[c]=t[c]);var s=arguments.length-2;if(1===s)a.children=r;else if(1<s){for(var l=Array(s),p=0;p<s;p++)l[p]=arguments[p+2];a.children=l}if(e&&e.defaultProps)for(c in s=e.defaultProps)void 0===a[c]&&(a[c]=s[c]);return{$$typeof:o,type:e,key:n,ref:i,props:a,_owner:v.current}}function k(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var C=/\/+/g;function P(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function O(e,t,r,c,n){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case o:case a:s=!0}}if(s)return n=n(s=e),e=""===c?"."+P(s,0):c,Array.isArray(n)?(r="",null!=e&&(r=e.replace(C,"$&/")+"/"),O(n,t,r,"",function(e){return e})):null!=n&&(k(n)&&(n=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(n,r+(!n.key||s&&s.key===n.key?"":(""+n.key).replace(C,"$&/")+"/")+e)),t.push(n)),1;if(s=0,c=""===c?".":c+":",Array.isArray(e))for(var l=0;l<e.length;l++){var p=c+P(i=e[l],l);s+=O(i,t,r,p,n)}else if(p=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=_&&e[_]||e["@@iterator"])?e:null}(e),"function"===typeof p)for(e=p.call(e),l=0;!(i=e.next()).done;)s+=O(i=i.value,t,r,p=c+P(i,l++),n);else if("object"===i)throw t=""+e,Error(u(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function E(e,t,r){if(null==e)return e;var c=[],o=0;return O(e,c,"","",function(e){return t.call(r,e,o++)}),c}function z(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)})}if(1===e._status)return e._result;throw e._result}var x={current:null};function $(){var e=x.current;if(null===e)throw Error(u(321));return e}t.createElement=S},540:function(e,t,r){e.exports=r(287)}},t={};var r=function r(c){var o=t[c];if(void 0!==o)return o.exports;var a=t[c]={exports:{}};return e[c](a,a.exports,r),a.exports}(540);const{__:c}=wp.i18n,{PluginDocumentSettingPanel:o}=wp.editPost,{CheckboxControl:a}=wp.components,{dispatch:n,useSelect:i}=wp.data,{registerPlugin:s}=wp.plugins;s("powered-cache-post-meta",{render:()=>{const e=i(e=>e("core/editor").getEditedPostAttribute("meta"));if(!e)return null;if(!("powered_cache_disable_cache"in e)&&!("powered_cache_disable_lazyload"in e)&&!("powered_cache_disable_css_optimization"in e)&&!("powered_cache_disable_js_optimization"in e)&&!("powered_cache_disable_js_defer"in e)&&!("powered_cache_disable_js_delay"in e)&&!("powered_cache_disable_critical_css"in e)&&!("powered_cache_specific_critical_css"in e)&&!("powered_cache_disable_ucss"in e)&&!("powered_cache_specific_ucss"in e))return null;const t=e.powered_cache_disable_cache||!1,s=e.powered_cache_disable_lazyload||!1,l=e.powered_cache_disable_css_optimization||!1,p=e.powered_cache_disable_js_optimization||!1,d=e.powered_cache_disable_js_defer||!1,_=e.powered_cache_disable_js_delay||!1,u=e.powered_cache_disable_critical_css||!1,f=e.powered_cache_specific_critical_css||!1,h=e.powered_cache_disable_ucss||!1,b=e.powered_cache_specific_ucss||!1;return(0,r.createElement)(o,{icon:"superhero",title:c("Powered Cache","powered-cache"),className:"powered-cache-panel",name:"cache-panel"},"powered_cache_disable_cache"in e&&(0,r.createElement)(a,{label:c("Don't cache this post","powered-cache"),checked:t,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_disable_cache:!t}})}}),"powered_cache_disable_lazyload"in e&&(0,r.createElement)(a,{label:c("Disable lazy loading for this post","powered-cache"),checked:s,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_disable_lazyload:!s}})}}),"powered_cache_disable_css_optimization"in e&&(0,r.createElement)(a,{label:c("Disable CSS optimization","powered-cache"),checked:l,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_disable_css_optimization:!l}})}}),"powered_cache_disable_js_optimization"in e&&(0,r.createElement)(a,{label:c("Disable JS optimization","powered-cache"),checked:p,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_disable_js_optimization:!p}})}}),"powered_cache_disable_js_defer"in e&&(0,r.createElement)(a,{label:c("Disable JS defer for this post","powered-cache"),checked:d,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_disable_js_defer:!d}})}}),"powered_cache_disable_js_delay"in e&&(0,r.createElement)(a,{label:c("Disable JS delay for this post","powered-cache"),checked:_,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_disable_js_delay:!_}})}}),"powered_cache_disable_critical_css"in e&&!f&&(0,r.createElement)(a,{label:c("Disable Critical CSS for this post","powered-cache"),checked:u,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_disable_critical_css:!u}})}}),"powered_cache_specific_critical_css"in e&&!u&&(0,r.createElement)(a,{label:c("Generate specific Critical CSS","powered-cache"),checked:f,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_specific_critical_css:!f}})}}),"powered_cache_disable_ucss"in e&&!b&&(0,r.createElement)(a,{label:c("Disable UCSS for this post","powered-cache"),checked:h,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_disable_ucss:!h}})}}),"powered_cache_specific_ucss"in e&&!h&&(0,r.createElement)(a,{label:c("Generate specific UCSS","powered-cache"),checked:b,onChange:()=>{n("core/editor").editPost({meta:{powered_cache_specific_ucss:!b}})}}))}})}(); |