Media Cleaner - Version 6.4.8

Version Description

(2022/10/24) = * Fix: Improved (and fixed) the accuracy of the explanation displayed before the scan. * Note: Please try my new Database Cleaner! You'll love it!

Download this release

Release Info

Developer TigrouMeow
Plugin Icon 128x128 Media Cleaner
Version 6.4.8
Comparing to
See all releases

Code changes from version 6.4.7 to 6.4.8

Files changed (2) hide show
  1. app/index.js +1 -1
  2. readme.txt +5 -2
app/index.js CHANGED
@@ -1,3 +1,3 @@
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(){"use strict";var e,t={9287:function(e,t,r){var n,a,o,i,c,l=r(3368),s=r(9714),u=wpmc_media_cleaner.prefix,f=wpmc_media_cleaner.domain,h=wpmc_media_cleaner.rest_url.replace(/\/+$/,""),p=wpmc_media_cleaner.api_url.replace(/\/+$/,""),m=wpmc_media_cleaner.plugin_url.replace(/\/+$/,""),d="1"===wpmc_media_cleaner.is_pro,y=d&&"1"===wpmc_media_cleaner.is_registered,v=wpmc_media_cleaner.rest_nonce,g=wpmc_media_cleaner.options,b="files"===g.method?g.filesystem_content:g.content,w="files"===g.method&&(null==g?void 0:g.media_library),E=r(2788);function R(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var x=E.ZP.div(n||(n=R(["\n color: white;\n padding: 15px;\n margin-bottom: -15px;\n\n a {\n color: #7dedff;\n text-decoration: none;\n }\n\n p {\n font-size: 15px;\n }\n"]))),_=(0,E.ZP)(s.vj)(a||(a=R(["\n\n .nui-block-title {\n display: none;\n }\n\n .nui-block-content {\n display: flex;\n padding: 10px;\n\n h2 {\n color: #055082;\n font-size: 16px;\n margin: 5px 0 5px 0;\n\n a {\n text-decoration: none;\n }\n }\n\n p {\n margin: 0px;\n line-height: 18px;\n }\n }\n"]))),k=E.ZP.img(o||(o=R(["\n width: 85px;\n height: 85px;\n padding-right: 10px;\n"]))),L=E.ZP.div(i||(i=R(["\n\n margin: 15px;\n\n .center {\n background: white;\n border-radius: 10px;\n padding: 10px;\n max-width: 100%\n overflow: none;\n\n h2 {\n font-size: 26px;\n }\n\n table {\n width: 100%;\n\n tr td:first-child {\n width: 220px;\n font-weight: bold;\n color: #1e7cba;\n }\n\n * {\n overflow-wrap: anywhere;\n }\n }\n }\n\n hr {\n border-color: #1e7cba;\n }\n"]))),S=E.ZP.ul(c||(c=R(["\n margin-top: 10px;\n background: rgb(0, 72, 88);\n padding: 10px;\n color: rgb(58, 212, 58);\n max-height: 600px;\n min-height: 200px;\n display: block;\n font-family: monospace;\n font-size: 12px;\n white-space: pre;\n overflow-x: auto;\n width: calc(100vw - 276px);\n\n .log-date {\n color: white;\n margin-left: 8px;\n }\n\n .log-type {\n background: #0000004d;\n padding: 2px 5px;\n border-radius: 8px;\n text-transform: uppercase;\n }\n\n .log-content {\n display: block;\n }\n\n .log-warning .log-type {\n background: #ccb028;\n color: white;\n }\n\n .log-fatal .log-type {\n background: #cc2828;\n color: white;\n }\n"])));function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function P(){P=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==O(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function T(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function j(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){T(o,n,a,i,c,"next",e)}function c(e){T(o,n,a,i,c,"throw",e)}i(void 0)}))}}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){if(e){if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var N=wp.element,M=N.useState,D=N.useEffect,F="".concat(h,"/meow-common/v1"),B=function(e){var t=e.request,r=e.title,n=e.max,a=A(M(!1),2),o=a[0],i=a[1],c=A(M([]),2),l=c[0],u=c[1],f=l.length>0?l.reduce((function(e,t){return e+t})):0,h=l.length>0?Math.ceil(f/l.length):0,p=!l.length&&o;return D((function(){o&&setTimeout(j(P().mark((function e(){var r,n,a;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(new Date).getTime(),e.next=3,(0,s.ZL)("".concat(F,"/").concat(t),{nonce:v});case 3:n=(new Date).getTime(),a=n-r,u((function(e){return[].concat(function(e){if(Array.isArray(e))return I(e)}(t=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||C(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[a]);var t}));case 6:case"end":return e.stop()}}),e)}))),1e3)}),[l]),React.createElement(x,{style:{width:200,textAlign:"center"}},React.createElement(s.O9,{h2:!0,style:{color:"white"}},r),React.createElement(s._h,{size:200,value:p?n:h,max:n},React.createElement("span",{style:{fontSize:20}},p?"START":h+" ms"),React.createElement("span",{style:{fontSize:12}},p?"YOUR ENGINE":l.length+" requests")),React.createElement(s._Z,{style:{width:"100%",marginTop:10},color:o?"#cc3627":"#ccb027",onClick:function(){o||u([]),i(!o)}},o?"Stop":"Start"))};function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function G(){G=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==Z(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){U(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function Q(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Y(o,n,a,i,c,"next",e)}function c(e){Y(o,n,a,i,c,"throw",e)}i(void 0)}))}}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var V=wp.element,$=V.useState,J=V.useEffect;p&&h&&m||console.error("[@common/dashboard] apiUrl, restUrl and pluginUrl are mandatory.");var K="".concat(h,"/meow-common/v1"),X=React.createElement(x,null,React.createElement(s.O9,{p:!0},"Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking ",React.createElement("a",{target:"_blank",href:"https://offbeatjapan.org"},"a lot of photos"),"). Meow Apps proposes a suite of plugins focusing on photography, imaging, optimization and SEO. The ultimate goal is to make your website better, faster, while making it easy. Meow Apps also teams up with the best players in the community. For more information, please check ",React.createElement("a",{href:"http://meowapps.com",target:"_blank"},"Meow Apps"),".")),ee=React.createElement(x,null,React.createElement(s.O9,{p:!0},"The ",React.createElement("b",null,"Empty Request Time")," helps you analyzing the raw performance of your install by giving you the average time it takes to run an empty request to your server. You can try to disable some plugins (or change their options) then Start this again to see how it influences the results. An excellent install would have an Empty Request Time of less than 500 ms. Keep it absolutely under 2,000 ms! For more information, ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/#Optimize_your_Empty_Request_Time",target:"_blank"},"click here"),"."),React.createElement(s.O9,{p:!0},React.createElement("b",null,"File Operation Time")," creates a temporary size of 10MB every time. ",React.createElement("b",null,"SQL Request Time")," counts the number of posts. Those two should be very fast, and almost the same as the ",React.createElement("b",null,"Empty Request Time"),".")),te=React.createElement(x,null,React.createElement(s.O9,{p:!0},"Too many WordPress installs are blown-up with useless and/or heavy plugins, and not aware of best practices. That's not the fault of the users; WordPress pretends to be simple but it is in fact very complex, and the immensity and diversity of the community around it makes it a real jungle where everything is possible."),React.createElement(s.O9,{p:!0},"A rule of thumb is to keep your WordPress install as simple as possible, with the least number of plugins installed (run away from the heavy ones) and an excellent hosting service. Avoid VPS or self-hosted solutions; you must be a professional to actually set them up so that they are actually performant."),React.createElement(s.O9,{p:!0},"On the Meow Apps website, you will find articles which are always updated with the latest recommendations.",React.createElement("ul",null,React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/how-to-debug-wordpress-errors/",target:"_blank"},"How To Debug WordPress")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-improve-seo-wordpress/",target:"_blank"},"SEO Checklist & Optimization")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-faster-wordpress-optimize/",target:"_blank"},"Optimize your WordPress Speed")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-optimize-images-wordpress/",target:"_blank"},"Optimize Images (CDN, and so on)")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-hosting-service-wordpress/",target:"_blank"},"Best Hosting Services for WordPress"))))),re=["".concat(K,"/all_settings/"),{headers:{"X-WP-Nonce":v}}],ne=function(){var e=H($(!1),2),t=e[0],r=e[1],n=(0,l.ZP)(re,s.SG),a=n.data,o=n.mutate,i=n.error,c=null==a?void 0:a.data,u=null==c?void 0:c.meowapps_hide_meowapps,f=null==c?void 0:c.force_sslverify,h=H($(!1),2),p=h[0],d=h[1],y=H($([]),2),g=y[0],b=y[1],w=H($(""),2),E=w[0],R=w[1];J((function(){i&&!t&&(r(!0),console.error("Error from UseSWR",i.message))}),[i]),J((function(){var e=document.getElementById("meow-common-phpinfo");R(e.innerHTML)}),[]);var O=function(){var e=Q(G().mark((function e(t,r){var n,i;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=q({},a.data))[r]=t,o(q(q({},a),{},{data:n}),!1),d(!0),e.next=6,(0,s.ZL)("".concat(K,"/update_option"),{json:{name:r,value:t},nonce:v});case 6:i=e.sent,d(!1),i.success||alert(i.message),o();case 10:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),P=function(){var e=Q(G().mark((function e(){var t,r;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.next=3,(0,s.ZL)("".concat(K,"/error_logs"),{nonce:v});case 3:t=e.sent,r=t&&t.data?t.data:[],b(r.reverse()),d(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=React.createElement(s.rR,{title:"Main Menu"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"meowapps_hide_meowapps",label:"Hide (Not Recommended)",description:React.createElement(s.O9,{p:!0},"This will hide the Meow Apps Menu (on the left side) and everything it contains. You can re-enable it through though an option that will be added in Settings → General."),value:"1",disabled:p,checked:u,onChange:O}))),j=React.createElement(s.rR,{title:"SSL Verify"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"force_sslverify",label:"Force (Not Recommended)",description:React.createElement(s.O9,{p:!0},"This will enforce the usage of SSL when checking the license or updating the plugin."),value:"1",disabled:p,checked:f,onChange:O})));return React.createElement(s.si,{showRestError:t},React.createElement(s.BP,{title:"The Dashboard"}),React.createElement(s.oY,null,React.createElement(s.zc,{full:!0},React.createElement(s.c4,null,React.createElement(s.Ps,{title:"Meow Apps"},X,React.createElement(s.oY,null,React.createElement(s.zc,{minimal:!0},React.createElement(_,{title:"Media Cleaner",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/media-cleaner.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-cleaner/"},"Media Cleaner")),React.createElement("p",null,"The Cleaner analyzes your WordPress entirely to find out which files are not used. You can trash them, before deleting them permanently. Your WordPress will breath again :)"))),React.createElement(_,{title:"Database Cleaner",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/database-cleaner.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/database-cleaner/"},"Database Cleaner")),React.createElement("p",null,"Clean your WordPress database. This plugin is simple, handles risk levels, and aims to work even on oversized databases on which other plugins fail to operate."))),React.createElement(_,{title:"Media File Renamer",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/media-file-renamer.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-file-renamer/"},"Media File Renamer")),React.createElement("p",null,"The Renamer will help you in getting nicer filenames for an improved SEO and a tidier filesystem. It's mostly automatic and very fun to use."))),React.createElement(_,{title:"Social Engine",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/social-engine.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/social-engine/"},"Social Engine")),React.createElement("p",null,"Organize, schedule and automate the publishing of your content and photos on social accounts. Similar to Buffer, TweetDeck, etc, but without all the limitations, and in your WordPress."))),React.createElement(_,{title:"Meow Analytics",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/meow-analytics.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-analytics/"},"Meow Analytics")),React.createElement("p",null,"Are you tired of those heavy plugins, accessing your Google Analytics deliberately? Switch to Meow Analytics!")))),React.createElement(s.zc,{minimal:!0},React.createElement(_,{title:"Photo Engine",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/wplr-sync.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wplr-sync/"},"Photo Engine")),React.createElement("p",null,"Are you using Lightroom? So you know Photo Engine already. Wait, you don't? You must try it! This plugin will be your favorite very soon."))),React.createElement(_,{title:"Meow Gallery",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/meow-gallery.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-gallery/"},"Meow Gallery")),React.createElement("p",null,"This is the fastest gallery system... and it is pretty as well! It is 100% compatible with the native WordPress galleries and therefore, works right away."))),React.createElement(_,{title:"Meow Lightbox",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/meow-lightbox.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-lightbox/"},"Meow Lightbox")),React.createElement("p",null,"A very sleek and performant Lightbox which will also display your EXIF data (camera, lens, aperture...). Photographers love it."))),React.createElement(_,{title:"Perfect Images (Retina)",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/wp-retina-2x.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wp-retina-2x/"},"Perfect Images + Retina")),React.createElement("p",null,"It handles Retina, help you managing the Image Sizes registered in your WP, and much more."))),React.createElement(_,{title:"Contact Form Block",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/contact-form-block.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/contact-form-block/"},"Contact Form Block")),React.createElement("p",null,"A simple, pretty and superlight contact form. If you simply want your visitors to get in touch with you, this contact form will be perfect for you and your WordPress.")))))),React.createElement(s.Ps,{title:"Performance"},ee,React.createElement("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:25}},React.createElement(B,{title:"Empty Request Time",request:"empty_request",max:2500}),React.createElement(B,{title:"File Operation Time",request:"file_operation",max:2600}),React.createElement(B,{title:"SQL Request Time",request:"sql_request",max:2800}))),React.createElement(s.Ps,{title:"Recommendations"},te),React.createElement(s.Ps,{title:"PHP Info"},React.createElement(L,{dangerouslySetInnerHTML:{__html:E}})),React.createElement(s.Ps,{title:"PHP Error Logs"},React.createElement(x,null,React.createElement(s._Z,{style:{marginBottom:10},color:"#ccb027",onClick:P},"Load PHP Error Logs"),React.createElement(S,null,g.map((function(e){return React.createElement("li",{class:"log-".concat(e.type)},React.createElement("span",{class:"log-type"},e.type),React.createElement("span",{class:"log-date"},e.date),React.createElement("span",{class:"log-content"},e.content))}))))),React.createElement(s.Ps,{title:"Settings"},React.createElement(s.vj,{title:"Settings",className:"primary"},T,j))))))};function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}function oe(){oe=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==ae(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function ie(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function ce(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){ie(o,n,a,i,c,"next",e)}function c(e){ie(o,n,a,i,c,"throw",e)}i(void 0)}))}}function le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return se(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?se(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ue=wp.element,fe=ue.useState,he=ue.useEffect,pe="".concat(h,"/meow-licenser/").concat(u,"/v1"),me=function(){var e=le(fe(!1),2),t=e[0],r=e[1],n=le(fe(!1),2),a=n[0],o=n[1],i=le(fe(null),2),c=i[0],l=i[1],u=le(fe(null),2),f=u[0],h=u[1],p=le(fe(""),2),m=p[0],g=p[1],b=y&&(!f||"valid"!==f.license),w=function(){var e=ce(oe().mark((function e(){var t;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d){e.next=2;break}return e.abrupt("return");case 2:return r(!0),e.next=5,(0,s.ZL)("".concat(pe,"/get_license"),{nonce:v});case 5:t=e.sent,h(t.data),t.data.key&&g(t.data.key),r(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=ce(oe().mark((function e(){return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(!0),e.next=3,(0,s.ZL)("".concat(pe,"/set_license"),{nonce:v,json:{serialKey:null}});case 3:e.sent.success&&(g(""),h(null),l("licenseRemoved")),r(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=ce(oe().mark((function e(){var t;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(!0),e.next=3,(0,s.ZL)("".concat(pe,"/set_license"),{nonce:v,json:{serialKey:m,override:!0}});case 3:(t=e.sent).success&&(h(t.data),t.data&&!t.data.issue&&l("licenseAdded")),r(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var e=ce(oe().mark((function e(){var t;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("MEOW_OVERRIDE"!==m){e.next=5;break}return o(!0),h(null),g(""),e.abrupt("return");case 5:return r(!0),e.next=8,(0,s.ZL)("".concat(pe,"/set_license"),{nonce:v,json:{serialKey:m}});case 8:(t=e.sent).success&&(h(t.data),t.data&&!t.data.issue&&l("licenseAdded")),r(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();he((function(){w()}),[]);var _=b?"Forced License":y?"Enabled":"Disabled",k=b||f&&"valid"===f.license,L="Your license is active. Thanks a lot for your support :)";b&&f&&f.check_url&&(L=React.createElement(React.Fragment,null,React.createElement("span",null,L),React.createElement("br",null),React.createElement("small",null,"This license was enabled manually. To check your license status, please click ",React.createElement("a",{target:"_blank",href:f.check_url+"&cache="+642e3*Math.random()},"here"),"."))),k||(f?"no_activations_left"===f.issue?L=React.createElement("span",null,"There are no activations left for this license. You can visit your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com"},"Meow Apps Store"),", unregister a site, and click on ",React.createElement("i",null,"Retry to validate"),"."):"expired"===f.issue?L=React.createElement("span",null,"Your license has expired. You can get another license or renew the current one by visiting your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com"},"Meow Apps Store"),"."):"missing"===f.issue?L="This license does not exist.":"disabled"===f.issue?L="This license has been disabled.":"item_name_mismatch"===f.issue?L="This license seems to be for a different plugin... isn't it? :)":"forced"===f.issue?L="ABC":(L=React.createElement("span",null,"There is an unknown error related to the system or this serial key. Really sorry about this! Make sure your security plugins and systems are off temporarily. If you are still experiencing an issue, please ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/contact/"},"contact us"),"."),console.error({license:f})):L="Unknown error :(");var S=React.createElement(s.vj,{title:"Pro Version (Not Installed)",className:"primary"},"You will find more information about the Pro Version ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com"},"here"),". If you actually bought the Pro Version already, please remove the current plugin and download the Pro Version from your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/"},"Meow Apps Store"),"."),O=React.createElement(s.vj,{title:"Pro Version (".concat(_,")"),busy:t,className:"primary"},React.createElement(s.rR,{title:"Serial Key",style:{fontWeight:"bold"}},React.createElement(s.Ay,{id:"mfrh_pro_serial",name:"mfrh_pro_serial",disabled:t,value:m,onChange:function(e){return g(e)},placeholder:""})),f&&!k&&React.createElement(s.Ge,null,L),f&&k&&React.createElement(s.CA,null,L),!f&&React.createElement(s.O9,{p:!0},"Insert your serial key above. If you don't have one yet, you can get one ",React.createElement("a",{href:"https://meowapps.com"},"here"),". If there was an error during the validation, try the ",React.createElement("i",null,"Retry")," to ",React.createElement("i",null,"validate")," button."),React.createElement(s.rR,{contentAlign:"right"},f&&!k&&React.createElement(s._Z,{className:"secondary",disabled:t||!m,onClick:x},"Retry to validate"),f&&f.key===m&&React.createElement(s._Z,{className:"secondary",disabled:t||!m,onClick:E},"Remove License"),React.createElement(s._Z,{disabled:t||!m||f&&f.key===m,onClick:x},"Validate License"),a&&!k&&React.createElement(s._Z,{disabled:t||!m||f&&f.key===m,onClick:R,className:"danger"},"Force License")),React.createElement(s.LI,{isOpen:"licenseAdded"===c,title:"Thank you :)",content:"The Pro features have been enabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}),React.createElement(s.LI,{isOpen:"licenseRemoved"===c,title:"Goodbye :(",content:"The Pro features have been disabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}));return d?O:S},de=wp.element.render;function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function ve(){ve=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==ye(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function ge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(r),!0).forEach((function(t){we(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function we(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ee(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function Re(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Ee(o,n,a,i,c,"next",e)}function c(e){Ee(o,n,a,i,c,"throw",e)}i(void 0)}))}}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_e(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}document.meowDashboardLoaded||(document.meowDashboardLoaded=!0,document.addEventListener("DOMContentLoaded",(function(e){var t=document.getElementById("meow-common-dashboard");t&&de(React.createElement(ne,null),t)})));var ke=wp.element.useState,Le={marginTop:10,background:"rgb(0, 72, 88)",padding:10,color:"rgb(58, 212, 58)",maxHeight:600,minHeight:200,display:"block",fontFamily:"monospace",fontSize:12,whiteSpace:"pre",overflowX:"auto",width:"calc(100vw - 276px)"},Se=function(){var e=xe(ke(g),2),t=e[0],r=e[1],n=xe(ke(!1),2),a=n[0],o=n[1],i=xe(ke(""),2),c=i[0],l=i[1],h=xe(ke(),2),m=h[0],b=h[1],w=a,E=t.content,R=t.filesystem_content,x=t.media_library,_=t.live_content,k=t.debuglogs,L=t.images_only,S=t.attach_is_use,O=t.thumbnails_only,P=t.dirs_filter,T=t.files_filter,j=t.hide_thumbnails,A=t.hide_warning,C=t.skip_trash,I=t.medias_buffer,N=t.posts_buffer,M=t.analysis_buffer,D=t.file_op_buffer,F=t.delay,B=t.shortcodes_disabled,Z=t.clean_uninstall,G=function(){var e=Re(ve().mark((function e(n,a){var i,c;return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=be(be({},t),{},we({},a,n)),o(!0),e.prev=2,e.next=5,(0,s.ZL)("".concat(p,"/update_options"),{json:{options:i},nonce:v});case 5:(c=e.sent).success&&r(c.options),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),alert(e.t0.message);case 12:return e.prev=12,o(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[2,9,12,15]])})));return function(t,r){return e.apply(this,arguments)}}(),z=function(){var e=Re(ve().mark((function e(){return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.next=3,(0,s.ZL)("".concat(p,"/reset_db"),{nonce:v});case 3:b("resetDb"),o(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=Re(ve().mark((function e(){var t;return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.next=3,(0,s.ZL)("".concat(p,"/refresh_logs"),{nonce:v});case 3:(t=e.sent).success&&l(t.data),o(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=Re(ve().mark((function e(){var t;return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.next=3,(0,s.ZL)("".concat(p,"/clear_logs"),{nonce:v});case 3:(t=e.sent).success&&l(t.data),o(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=React.createElement(s.rR,{title:"Content"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"content",label:"Check",description:"Checks if the media entries are used by the content (Posts, Pages and other Post Types, Metadata, Widgets, etc). Pagebuilders are only supported in the Pro Version.",value:"1",checked:E,onChange:G}))),Q=React.createElement(s.rR,{title:"Content"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"filesystem_content",label:"Check",description:"Checks if the files are used by the content (Posts, Pages and other Post Types, Metadata, Widgets, etc).",value:"1",checked:R,onChange:G}))),H=React.createElement(s.rR,{title:"Media Library"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"media_library",label:"Check",description:"Checks if the files are properly registered in the Media Library.",value:"1",checked:x,onChange:G}))),W=React.createElement(s.rR,{title:"Live Content"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"live_content",label:"Check",description:"The live version of the site will be also analyzed (as if a visitor was loading it). It increases the accuracy of the results but slows down the speed dramatically.",value:"1",requirePro:!y,checked:_,onChange:G}))),V=React.createElement(s.rR,{title:"Images Only"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"images_only",label:"Enable",description:"Restricts the scan to images. Nothing else will be scanned.",value:"1",checked:L,onChange:G}))),$=React.createElement(s.rR,{title:"Attached Images"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"attach_is_use",label:"Consider as In Use",description:React.createElement(React.Fragment,null,"If a media entry is attached (in the Media Library, it is the ",React.createElement("b",null,"Uploaded To")," field), it will be considered as being used."),value:"1",checked:S,onChange:G}))),J=React.createElement(s.rR,{title:"Thumbnails Only"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"thumbnails_only",label:"Enable",description:"Restricts Media Cleaner to scan thumbnails. With WordPress, those filenames contain the resolution.",value:"1",checked:O,onChange:G}))),K=React.createElement(s.rR,{title:"Directories Filter"},React.createElement(s.Ay,{id:"dirs_filter",name:"dirs_filter",onReset:function(){G("","dirs_filter")},value:P,placeholder:"/regex/",onEnter:G,onBlur:G})),X=React.createElement(s.rR,{title:"Files Filter"},React.createElement(s.Ay,{id:"files_filter",name:"files_filter",onReset:function(){G("","files_filter")},value:T,placeholder:"/regex/",onEnter:G,onBlur:G})),ee=React.createElement(s.rR,{title:"Thumbnails"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"hide_thumbnails",label:"Hide",description:"If you prefer not to see the thumbnails.",value:"1",checked:j,onChange:G}))),te=React.createElement(s.rR,{title:"Skip Trash"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"skip_trash",label:"Yes",description:"This will disable the trash and the restore related features.",value:"1",checked:C,onChange:G}))),re=React.createElement(s.rR,{title:"Warning Message"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"hide_warning",label:"Hide",description:"Have you read it twice? If yes, hide it :)",requirePro:!y,value:"1",checked:A,onChange:G}))),ne=React.createElement(s.rR,{title:"Plugin Data"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"clean_uninstall",label:"Delete all",description:"The database and all the options of the plugin will be removed on uninstall. This also includes the information about the plugin's trash.",value:"1",checked:Z,onChange:G}))),ae=React.createElement(s.rR,{title:"Medias Buffer"},React.createElement(s.Ay,{id:"medias_buffer",type:"number",value:I,min:"1",max:"1000",onEnter:G,onBlur:G,description:"The number of media entries to read at a time. This is fast, so the value should be between 50 and 1000."})),oe=React.createElement(s.rR,{title:"Posts Buffer"},React.createElement(s.Ay,{id:"posts_buffer",type:"number",value:N,min:"1",max:"100",onEnter:G,onBlur:G,description:"The number of posts (and any other post types) to analyze at a time. This is the most intense part of the process. Recommended value is between 1 (slow server) and 20 (excellent server)."})),ie=React.createElement(s.rR,{title:"Analysis Buffer"},React.createElement(s.Ay,{id:"analysis_buffer",type:"number",value:M,min:"1",max:"1000",onEnter:G,onBlur:G,description:"The number of media entries or files to analyze at a time. This is the main part of the process, but is is much faster than analyzing each post. Recommended value is between 20 (slow server) and 1000 (excellent server)."})),ce=React.createElement(s.rR,{title:"File Operation Buffer"},React.createElement(s.Ay,{id:"file_op_buffer",type:"number",value:D,min:"1",max:"100",onEnter:G,onBlur:G,description:"The number of media entries or files to delete at a time. This highly depends on your server, it is normally quite fast. Recommended value is between 5 (slow server) and 100 (excellent server). "})),le=React.createElement(s.rR,{title:"Delay (in ms)"},React.createElement(s.Ay,{id:"delay",type:"number",value:F,min:"0",max:"20000",onEnter:G,onBlur:G,description:"Time to wait between each request (in milliseconds). The overall process is intensive so this gives the chance to your server to chill out a bit. A very good server doesn't need it, but a slow/shared hosting might even reject requests if they are too fast and frequent. Recommended value is actually 0, 100 for safety, 2000 or 5000 if your hosting is kind of cheap."})),se=React.createElement(s.rR,{title:"Shortcodes"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"shortcodes_disabled",label:"Disable Analysis",description:"Resolving shortcodes increase accuracy, but makes the process slower and takes more memory.",value:"1",checked:B,onChange:G}))),ue=React.createElement(s.rR,{title:"Logs"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"debuglogs",label:"Enable",description:React.createElement(s.O9,{p:!0},"Simple logging that explains which actions has been run."),value:"1",checked:k,onChange:G}),React.createElement("div",{style:{marginTop:20}},React.createElement(s._Z,{onClick:q},"Refresh Logs"),React.createElement(s._Z,{className:"danger",onClick:U},"Clear Logs"))));return React.createElement(s.si,null,React.createElement(s.LI,{isOpen:"resetDb"===m,onRequestClose:function(){b(null)},title:"Done!",content:"The Media Cleaner's database has been deleted. It will be re-created automatically next time you visit the Media Cleaner Dashboard.",onOkClick:function(){b(null)}}),React.createElement(s.BP,{title:"Media Cleaner | Settings",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(s._Z,{className:"header",onClick:function(){return window.open("https://meowapps.com/media-cleaner-tutorial/","_blank")}},"Tutorial"),React.createElement(s._Z,{className:"header",icon:"dashboard",onClick:function(){return location.href="upload.php?page=wpmc_dashboard"}},"Dashboard"))),React.createElement(s.oY,null,React.createElement(s.zc,{full:!0},React.createElement(s.Hq,{footer:React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"primary",onClick:function(){return location.href="upload.php?page=wpmc_dashboard"}},"Access Media Cleaner Dashboard"),React.createElement(s._Z,{className:"danger",onClick:z},"Delete Cleaner DB"))},React.createElement(s.O9,{p:!0},"There are two kinds of scan. Usually, the ",React.createElement("b",null,"Media Library")," should be scanned first for images which are not used (Content = Check). Then, the ",React.createElement("b",null,"Filesystem")," should be scanned for images which aren't registered in the Media Library (Media Library = Check). Check the ",React.createElement("a",{target:"_blank",href:"https://meowapps.com/media-cleaner-tutorial/"},"tutorial")," tutorial for more information. If you wish to clean your ",React.createElement("b",null,"Database"),", try ",React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/database-cleaner/"},"Database Cleaner"),", you will love it! 💕")),React.createElement(s.c4,{keepTabOnReload:!0},React.createElement(s.Ps,{title:"Media Library Scan"},React.createElement(s.oY,null,React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Scanning",className:"primary"},Y,W,(E||_)&&React.createElement(s.O9,{p:!0},"If you would like Media Cleaner to analyze your Media Library for broken entries, uncheck everything above."),!E&&!_&&React.createElement(s.O9,{p:!0},React.createElement("b",null,"Since Content and Live Content are not checked, Media Cleaner will analyze your Media Library for ",React.createElement("u",null,"broken entries"),".")))),React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Filters",className:"primary"},V),React.createElement(s.vj,{busy:w,title:"Extra Rules",className:"primary"},$)))),React.createElement(s.Ps,{title:"Filesystem Scan",requirePro:!y},React.createElement(s.oY,null,React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Scanning",className:"primary"},H,Q,W,React.createElement(s.O9,{p:!0},"If none of the checks above are selected, you will get the list of all your files."))),React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Filters",className:"primary"},J,K,X)))),React.createElement(s.Ps,{title:"Advanced"},React.createElement(s.oY,null,React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"UI & Logs",className:"primary"},ee,te,re),React.createElement(s.vj,{busy:w,title:"On Uninstall",className:"primary"},ne)),React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Advanced Settings",className:"primary"},ae,oe,ie,ce,le,se)))),React.createElement(s.Ps,{title:"License"},React.createElement(me,{domain:f,prefix:u,isPro:d,isRegistered:y})),React.createElement(s.Ps,{title:"Logs & Debug"},React.createElement(s.vj,{busy:w,className:"primary"},ue),React.createElement("div",{style:Le},c))))))},Oe=r(7363);function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function Te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?je(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach((function(t){Ie(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ie(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ne(){Ne=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==Pe(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function Me(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function De(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Me(o,n,a,i,c,"next",e)}function c(e){Me(o,n,a,i,c,"throw",e)}i(void 0)}))}}var Fe,Be,Ze={issues:"-",ignored:"-",trash:"-"},Ge={accessor:"size",by:"desc"},ze=0,qe={filterBy:"issues",sort:Ge,page:1,limit:parseInt(g.posts_per_page),search:"",busy:!1,stats:Ze,apiErrors:null,status:"",options:g,entries:[],selectedItems:[],total:0,method:g.method,content:b,mediaLibrary:w,hideThumbnails:g.hide_thumbnails,skipTrash:g.skip_trash,postsBuffer:parseInt(g.posts_buffer),mediasBuffer:parseInt(g.medias_buffer),analysisBuffer:parseInt(g.analysis_buffer),fileOpBuffer:parseInt(g.file_op_buffer),delay:parseInt(g.delay),modals:{deleteAll:!1,trashAll:!1,recoverAll:!1},mutateEntries:(Be=De(Ne().mark((function e(){return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return Be.apply(this,arguments)}),mutateStats:(Fe=De(Ne().mark((function e(){return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return Fe.apply(this,arguments)})},Ue="PAGE_UPDATED",Ye="LIMIT_UPDATED",Qe="FILTER_UPDATED",He="SORT_UPDATED",We="SEARCH_UPDATED",Ve="TOTAL_UPDATED",$e="STATUS_UPDATED",Je="SETTINGS_UPDATED",Ke="TOGGLE_MODAL",Xe="PUSH_BUSY",et="POP_BUSY",tt="ENTRIES_UPDATED",rt="ITEMS_SELECTED",nt="STATS_UPDATED",at="ERROR_UPDATED",ot="SET_ENTRIES_MUTATE",it="SET_STATS_MUTATE",ct=function(e,t){switch(t.type){case tt:var r=t.entries;return Ce(Ce({},e),{},{entries:r});case nt:var n=t.stats;return Ce(Ce({},e),{},{stats:n});case at:var a=t.apiErrors;return Ce(Ce({},e),{},{apiErrors:a});case Ue:var o=t.page;return Ce(Ce({},e),{},{page:o});case ot:var i=t.mutateEntries;return Ce(Ce({},e),{},{mutateEntries:i});case it:var c=t.mutateStats;return Ce(Ce({},e),{},{mutateStats:c});case Ye:var l=t.limit;return Ce(Ce({},e),{},{limit:l});case Qe:var s=t.filter;return Ce(Ce({},e),{},{filterBy:s});case He:var u=t.sort,f=void 0===u?Ge:u;return Ce(Ce({},e),{},{sort:f});case We:var h=t.search;return Ce(Ce({},e),{},{search:h});case Ve:var p=t.total;return Ce(Ce({},e),{},{total:p});case Ke:var m=t.modal,d=t.enable;if(void 0===e.modals[m])return alert("The modal ".concat(m," doesn't exist.")),console.error("The modal ".concat(m," doesn't exist.")),e;void 0===d&&(d=!e.modals[m]);var y=Ce({},e);return y.modals=Ce({},y.modals),y.modals[m]=d,y;case Xe:var v=t.status,g=void 0===v?"":v;return Ce(Ce({},e),{},{busy:++ze>0,status:g});case et:var b=t.status,w=void 0===b?"":b;return Ce(Ce({},e),{},{busy:--ze>0,status:w});case $e:var E=t.status,R=void 0===E?"":E;return Ce(Ce({},e),{},{status:R});case Je:var x=t.options,_=x.method,k="files"===x.method?x.filesystem_content:x.content,L="files"===x.method&&(null==x?void 0:x.wpmc_media_library),S=x.hide_thumbnails,O=x.skip_trash,P=x.posts_buffer?parseInt(x.posts_buffer):5,T=x.medias_buffer?parseInt(x.medias_buffer):100,j=x.analysis_buffer?parseInt(x.analysis_buffer):100,A=x.file_op_buffer?parseInt(x.file_op_buffer):20,C=x.delay?parseInt(x.delay):0,I=x.posts_per_page?parseInt(x.posts_per_page):10;return Ce(Ce({},e),{},{options:x,method:_,content:k,mediaLibrary:L,hideThumbnails:S,skipTrash:O,postsBuffer:P,mediasBuffer:T,analysisBuffer:j,fileOpBuffer:A,delay:C,limit:I});case rt:var N=t.selectedItems;return Ce(Ce({},e),{},{selectedItems:N});default:return e}},lt=(0,Oe.createContext)(),st=function(e){var t=e.children,r=Te((0,Oe.useReducer)(ct,qe),2),n=r[0],a=r[1],o=n.filterBy,i=n.sort,c=n.search,u=n.page,f=n.limit,h=(0,Oe.useMemo)((function(){return[(0,s.Ln)("".concat(p,"/entries"),{limit:f,skip:(u-1)*f,filterBy:o,orderBy:i.accessor,order:i.by,search:c}),{headers:{"X-WP-Nonce":v}}]}),[o,i,c,u,f,p,v,s.Ln]),m=(0,Oe.useMemo)((function(){return[(0,s.Ln)("".concat(p,"/stats"),{search:c}),{headers:{"X-WP-Nonce":v}}]}),[c,p,v,s.Ln]),d=(0,l.ZP)(h,s.SG),y=d.data,g=d.mutate,b=(0,s.Fq)(y,[],!0),w=b.busy,E=b.data,R=b.total,x=b.error;(0,Oe.useEffect)((function(){a({type:ot,mutateEntries:g})}),[g]),(0,Oe.useEffect)((function(){a({type:w?Xe:et})}),[w]),(0,Oe.useEffect)((function(){a({type:tt,entries:E})}),[E]),(0,Oe.useEffect)((function(){a({type:Ve,total:R})}),[R]),(0,Oe.useEffect)((function(){a({type:at,apiError:x})}),[x]);var _=(0,l.ZP)(m,s.SG),k=_.data,L=_.mutate,S=(0,s.Fq)(k,Ze,!0),O=S.busy,P=S.data,T=S.error;return(0,Oe.useEffect)((function(){a({type:it,mutateStats:L})}),[L]),(0,Oe.useEffect)((function(){a({type:O?Xe:et})}),[O]),(0,Oe.useEffect)((function(){a({type:nt,stats:P})}),[P]),(0,Oe.useEffect)((function(){a({type:at,apiError:T})}),[T]),React.createElement(lt.Provider,{value:[n,a]},t)},ut=function(){var e={},t=Te((0,Oe.useContext)(lt),2),r=t[0],n=t[1];return e.setSelectedItems=function(e){n({type:rt,selectedItems:e})},e.setStatus=function(e){n({type:$e,status:e})},e.updateOption=function(){var e=De(Ne().mark((function e(t,a){var o,i;return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n({type:Xe}),o=Ce(Ce({},r.options),{},Ie({},a,t)),e.prev=2,e.next=5,(0,s.ZL)("".concat(p,"/update_options"),{json:{options:o},nonce:v});case 5:(i=e.sent).success&&n({type:Je,options:i.options}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),e.t0.message&&alert(e.t0.message);case 12:return e.prev=12,n({type:et}),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[2,9,12,15]])})));return function(t,r){return e.apply(this,arguments)}}(),e.setPage=function(e){n({type:Ue,page:e})},e.setLimit=function(e){n({type:Ye,limit:e})},e.setFilter=function(e){n({type:Qe,filter:e})},e.setSort=function(e){n({type:He,sort:e})},e.setSearch=function(e){n({type:We,search:e})},e.toggleModal=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;n({type:Ke,modal:e,enable:t})},e.pushBusy=function(){n({type:Xe})},e.popBusy=function(){n({type:et})},Ce(Ce({},r),e)};function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ht=wp.element.useState,pt={borderLeft:"4px solid #007bba"},mt={borderLeft:"4px solid #f1ad31"},dt={borderLeft:"4px solid #d85960"},yt=function(){var e,t,r=(e=ht(!1),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ft(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ft(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),n=(r[0],r[1],g.method),a="files"===g.method?g.filesystem_content:g.content,o="files"===g.method&&(null==g?void 0:g.wpmc_media_library),i=g.hide_warning,c=g.incompatible_plugins,l=React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"secondary",onClick:function(){return window.open("https://meowapps.com/plugin/media-cleaner/","_blank")}},"Get the Pro Version"),React.createElement(s._Z,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-cleaner-tutorial/","_blank")}},"Read the tutorial"));return React.createElement(React.Fragment,null,"media"===n&&!a&&React.createElement(s.Hq,{style:pt},React.createElement(s.O9,{p:!0,style:{fontSize:15}},"Media Cleaner will scan your Media Library for broken entries.")),"media"===n&&a&&React.createElement(s.Hq,{style:pt},React.createElement(s.O9,{p:!0,style:{fontSize:15}},"Media Cleaner will scan your Media Library for entries which aren't used in your content.")),"files"===n&&a&&o&&React.createElement(s.Hq,{style:pt},React.createElement(s.O9,{p:!0,style:{fontSize:15}},"Media Cleaner will scan your physical directories for files which are not registered in the Media Library or not used directly in your content.")),"files"===n&&!a&&o&&React.createElement(s.Hq,{style:pt},React.createElement(s.O9,{p:!0,style:{fontSize:15}},"Media Cleaner will scan your physical directories for files which are not registered in the Media Library.")),!i&&React.createElement(s.Hq,{style:mt},React.createElement(s.O9,{p:!0},React.createElement("p",null,React.createElement("b",null,React.createElement("span",{style:{color:"red"}},"This is important.")," Backup your DB and your /uploads directory before using Media Cleaner.")," The deleted files will be temporarily moved to the ",React.createElement("i",null,"uploads/wpmc-trash")," directory. After testing your site, you can check the ",React.createElement("i",null,"Trash")," in order to empty it or to recover your files. That said, you still must have a backup! If you don't know how, give a try to this: ",React.createElement("a",{href:"http://meow.click/blogvault",target:"_blank"},"BlogVault"),"."),React.createElement("p",null,React.createElement("b",null,React.createElement("span",{style:{color:"red"}},"Please be considerate.")," Don't blame Media Cleaner if it deleted too many (or not enough) of your files.")," WordPress being a very dynamic and pluggable system, it is impossible to predict all the situations in which your files are used. Please do not post a bad review because it broke your install; if you have a proper backup, there is no risk! You can disable this big warning in the options if you have the Pro Version. Read this warning twice. Media Cleaner is awesome and constantly gets better so I sincerely hope you will enjoy it. Thank you :)"))),!y&&React.createElement(s.Hq,{footer:l},React.createElement(s.O9,{p:!0},"You must ",React.createElement("b",null,"backup the uploads folder and DB")," before using the Cleaner. If you don't know how, give a try to ",React.createElement("a",{target:"_blank",href:"https://meow.click/blogvault"},"BlogVault"),". It is also highly recommanded to read the tutorial. Last but not least, check the ",React.createElement("b",null,"Pro Version"),", as it adds many features and also supports the development. This message is only displayed in the free version. Thank you!")),c&&c.length>0&&React.createElement(s.Hq,{style:dt},React.createElement(s.O9,{p:!0,style:{fontSize:15}},React.createElement("p",null,"Important note about the following plugin(s) which you are using:"),React.createElement("ul",null,c.map((function(e){return React.createElement("li",null,"- ",e)}))),React.createElement("p",null,"They require additional checks which are only implemented in ",React.createElement("a",{target:"_blank",href:"//meowapps.com/plugin/media-cleaner"},"Media Cleaner Pro"),"."))))},vt=function(e){return new Promise((function(t){return setTimeout(t,e)}))};function gt(e){return function(e){if(Array.isArray(e))return bt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return bt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var wt=wp.element,Et=wt.useMemo,Rt=wt.useCallback;function xt(e){return xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xt(e)}function _t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=jt(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw o}}}}function Lt(e){return function(e){if(Array.isArray(e))return At(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function St(){St=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==xt(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function Ot(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function Pt(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Ot(o,n,a,i,c,"next",e)}function c(e){Ot(o,n,a,i,c,"throw",e)}i(void 0)}))}}function Tt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||jt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jt(e,t){if(e){if("string"==typeof e)return At(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?At(e,t):void 0}}function At(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ct=wp.element,It=Ct.useState,Nt=Ct.useEffect,Mt=Ct.useMemo,Dt=[{id:"media",value:"media",label:"Media Library",requirePro:!1},{id:"files",value:"files",label:"Filesystem",requirePro:!y}],Ft={width:40,height:40,objectFit:"cover"},Bt={NO_CONTENT:"Not found in content",ORPHAN_MEDIA:"Not attached file",ORPHAN_FILE:"Not in library",ORPHAN_RETINA:"Orphan @2x",ORPHAN_WEBP:"Orphan WebP"},Zt=function(){var e,t,r,n,a,o,i,c,l,u=ut(),f=u.apiErrors,h=u.busy,m=u.selectedItems,d=u.entries,y=u.stats,g=u.total,b=u.filterBy,w=u.search,E=u.status,R=u.sort,x=u.page,_=u.limit,k=u.method,L=u.content,S=u.mediaLibrary,O=u.hideThumbnails,P=u.postsBuffer,T=(u.skipTrash,u.mediasBuffer),j=u.analysisBuffer,A=u.fileOpBuffer,C=u.delay,I=u.modals,N=ut(),M=N.setSelectedItems,D=N.setSearch,F=N.setStatus,B=N.setSort,Z=N.setPage,G=N.setLimit,z=N.setFilter,q=N.mutateEntries,U=N.mutateStats,Y=N.pushBusy,Q=N.popBusy,H=N.toggleModal,W=N.updateOption,V=(t={pressShift:(0,s.vU)().pressShift,list:d,selectedList:m,setSelectedList:M},n=t.list,a=t.selectedList,o=t.setSelectedList,c=void 0===(i=t.key)?"id":i,l=Et((function(){if(!r||!a.length)return null;var e=a[a.length-1];return n.findIndex((function(t){return t[c]===e}))}),[r=t.pressShift]),{onSelect:Rt((function(e){if(null!==l){var t=e[0],r=n.findIndex((function(e){return e[c]===t})),i=(l<r?l:r)+1,s=l<r?r:l,u=n.slice(i,s).map((function(e){return e[c]})).filter((function(e){return!a.some((function(t){return t===e}))}));o([].concat(gt(a),gt(u),gt(e)))}else o([].concat(gt(a),gt(e)))}),[a,l,n])}).onSelect,$=Tt(It(1),2),J=$[0],K=$[1],X=Tt(It(1),2),ee=X[0],te=X[1],re=Tt(It(""),2),ne=re[0],ae=re[1],oe=(0,s.qj)(),ie=Mt((function(){return d.map((function(e){var t="_blank",r="trash"===b?e.image_url:"/wp-admin/post.php?post=".concat(e.postId,"&action=edit");return{id:e.id,thumbnail_url:React.createElement(React.Fragment,null,"ORPHAN_MEDIA"!==e.issue&&React.createElement("a",{href:e.image_url,title:"Open Image",target:t},React.createElement("img",{src:e.thumbnail_url,style:Ft}))),type:React.createElement("span",null,0==e.type&&"Filesystem",1==e.type&&React.createElement("a",{href:r,target:t},"ID ",e.postId)),path:React.createElement("div",{style:{display:"flex",flexDirection:"column"}},e.title&&React.createElement("a",{href:r,target:t},React.createElement("span",null,e.title)),React.createElement("span",null,e.path)),issue:React.createElement("span",null,Bt[e.issue]?Bt[e.issue]:e.issue),size:React.createElement("span",null,(e.size/1e3).toFixed(2)," KB")}}))}),[d]),ce=[{accessor:"type",title:"Origin",sortable:!0},{accessor:"path",title:"Title & Path",sortable:!0},{accessor:"issue",title:"Issue",sortable:!0},{accessor:"size",title:"Size",sortable:!0}];O||ce.unshift({accessor:"thumbnail_url",title:"",style:{width:16}}),Nt((function(){M([]),B(),Z(1)}),[b]);var le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(e=null!==e?e:oe.getErrorCount())>0&&ae("The process has finished, but ".concat(e," error(s) occurred.")),oe.reset(),M([]),q(),U()},se=function(){var e=Pt(St().mark((function e(t){var r,n,a=arguments;return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:null,e.next=3,(0,s.ZL)("".concat(p,"/all_ids"),{json:{source:t,search:r},nonce:v});case 3:if((n=e.sent).success){e.next=7;break}return alert(n.message),e.abrupt("return",[]);case 7:return e.abrupt("return",n.data);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e=Pt(St().mark((function e(t){var r;return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(C>0)){e.next=3;break}return e.next=3,vt(C);case 3:return e.next=5,(0,s.ZL)("".concat(p,"/count"),{json:{source:t},nonce:v});case 5:return r=e.sent,e.abrupt("return",r.data);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=Pt(St().mark((function e(){var t,r,n,a,o,i,c=arguments;return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c.length>0&&void 0!==c[0]?c[0]:null,r=c.length>1&&void 0!==c[1]&&c[1],n=c.length>2&&void 0!==c[2]?c[2]:null,F("Getting IDs..."),Y(),!t){e.next=9;break}e.t0=t,e.next=12;break;case 9:return e.next=11,se(r?"trash":"issues",n);case 11:e.t0=e.sent;case 12:if(!(a=e.t0)){e.next=20;break}return F(r?"Emptying...":"Deleting..."),o=(0,s.wr)(a,A),i=o.map((function(e){return function(){var t=Pt(St().mark((function t(r){return St().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,vt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/delete"),{json:{entryIds:e},signal:r,nonce:v});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=19,oe.start(i);case 19:le();case 20:Q(),F();case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),he=function(){var e=Pt(St().mark((function e(){var t,r,n,a,o=arguments;return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.length>0&&void 0!==o[0]?o[0]:null,F("Getting IDs..."),Y(),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,se("trash");case 9:e.t0=e.sent;case 10:if(!(r=e.t0)){e.next=17;break}return n=(0,s.wr)(r,A),a=n.map((function(e){return function(){var t=Pt(St().mark((function t(r){return St().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(F("Recovering..."),!(C>0)){t.next=4;break}return t.next=4,vt(C);case 4:return t.next=6,(0,s.ZL)("".concat(p,"/recover"),{json:{entryIds:e},signal:r,nonce:v});case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=16,oe.start(a);case 16:le();case 17:Q(),F();case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pe=function(){var e=Pt(St().mark((function e(){var t,r,n,a,o,i=arguments;return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(i.length>0&&void 0!==i[0])||i[0],r=i.length>1&&void 0!==i[1]?i[1]:null,F("Getting IDs..."),Y(),!r){e.next=8;break}e.t0=r,e.next=11;break;case 8:return e.next=10,se("issues");case 10:e.t0=e.sent;case 11:if(!(n=e.t0)){e.next=19;break}return F("".concat(t?"Ignoring...":"Undoing...")),a=(0,s.wr)(n,j),o=a.map((function(e){return function(){var r=Pt(St().mark((function r(n){return St().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(C>0)){r.next=3;break}return r.next=3,vt(C);case 3:return r.next=5,(0,s.ZL)("".concat(p,"/set_ignore"),{json:{entryIds:e,ignore:t},signal:n,nonce:v});case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()})),e.next=18,oe.start(o);case 18:le();case 19:Q(),F();case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),me=function(){var e=Pt(St().mark((function e(t){return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:W(t,"posts_per_page");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),de=function(){var e=Pt(St().mark((function e(){return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:oe.stop();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=function(){de(),le(),Q(),F()},ve=function(){var e=Pt(St().mark((function e(){var t,r,n,a,o,i,c,l,u,f,h,m,d,y,g,b,w;return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=0,Y(),M([]),K(1),te(3+(L?1:0)+("files"===k&&S?1:0)),F("Resetting issues..."),e.next=8,(0,s.ZL)("".concat(p,"/reset_issues"),{nonce:v});case 8:if(K((function(e){return e+1})),!L){e.next=22;break}return F("Extract from content..."),e.next=13,ue("posts");case 13:for(r=e.sent,n=[],a=0;a<r;a+=P)n.push(a);return o=n.map((function(e){return function(){var t=Pt(St().mark((function t(r){return St().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,vt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/extract_references"),{json:{source:"content",limit:e},signal:r,nonce:v});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=19,oe.start(o);case 19:t+=oe.getErrorCount(),oe.reset(),K((function(e){return e+1}));case 22:if("files"!==k||!S){e.next=35;break}return F("Extract from library..."),e.next=26,ue("medias");case 26:for(i=e.sent,c=[],l=0;l<i;l+=P)c.push(l);return u=c.map((function(e){return function(){var t=Pt(St().mark((function t(r){return St().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,vt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/extract_references"),{json:{source:"media",limit:e},signal:r,nonce:v});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=32,oe.start(u);case 32:oe.reset(),t+=oe.getErrorCount(),K((function(e){return e+1}));case 35:if(f=[],"media"!==k){e.next=51;break}return F("Listing media..."),e.next=40,ue("medias");case 40:for(h=e.sent,m=[],d=0;d<h;d+=T)m.push(d);return y=m.map((function(e){return function(){var t=Pt(St().mark((function t(r){var n;return St().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,vt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/retrieve_medias"),{json:{limit:e},signal:r,nonce:v});case 5:return(n=t.sent).data&&(f=[].concat(Lt(f),Lt(n.data.results))),t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=46,oe.start(y);case 46:oe.reset(),t+=oe.getErrorCount(),K((function(e){return e+1})),e.next=62;break;case 51:if("files"!==k){e.next=61;break}return F("Listing files..."),g=function(){var e=Pt(St().mark((function e(t,r){var n,a,o,i,c;return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.ZL)("".concat(p,"/retrieve_files"),{json:{path:t},signal:r,nonce:v});case 2:n=e.sent,a=n.data,o=kt(a.results);try{for(c=function(){var e=i.value;"dir"===e.type?oe.addTask(Pt(St().mark((function t(){return St().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(e.path,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))):f.push(e.path)},o.s();!(i=o.n()).done;)c()}catch(e){o.e(e)}finally{o.f()}return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),e.next=56,oe.start([function(){var e=Pt(St().mark((function e(t){return St().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g("",t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()]);case 56:oe.reset(),t+=oe.getErrorCount(),K((function(e){return e+1})),e.next=62;break;case 61:alert("This method is not known!");case 62:if(!f){e.next=69;break}return F("Matching with content..."),b=(0,s.wr)(f,j),w=b.map((function(e){return function(){var t=Pt(St().mark((function t(r){return St().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,vt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/check_targets"),{json:{method:k,targets:e},signal:r,nonce:v});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=68,oe.start(w);case 68:t+=oe.getErrorCount();case 69:le(t),Q(),F();case 72:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement(s.si,{nekoErrors:[f]},React.createElement(s.BP,{title:"Media Cleaner | Dashboard",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(s._Z,{className:"header",onClick:function(){return window.open("https://meowapps.com/media-cleaner-tutorial/","_blank")}},"Tutorial"),React.createElement(s._Z,{icon:"cog",className:"header",onClick:function(){return location.href="admin.php?page=wpmc_settings"}},"Settings"))),React.createElement(s.oY,null,React.createElement(s.zc,{full:!0},React.createElement(yt,null),React.createElement(s.P$,null,!m.length&&React.createElement(React.Fragment,null,React.createElement(s._Z,{icon:"play",disabled:h,onClick:function(){return ve()}},"Scan"),!E&&React.createElement(s.Np,{id:"method",scrolldown:!0,disabled:h,name:"method",style:{width:200},onChange:W,value:k},Dt.map((function(e){return React.createElement(s.ZB,{key:e.id,id:e.id,value:e.value,label:e.label,requirePro:e.requirePro})})))),m.length>0&&React.createElement(s._Z,{disabled:h,onClick:function(){return M([])}},"Unselect All"),E&&React.createElement("div",{style:(e={display:"flex",fontFamily:"Lato",padding:"0 10px",flexDirection:"column",fontWeight:600,width:200},_t(e,"flexDirection","column"),_t(e,"height",30),_t(e,"lineHeight","16px"),_t(e,"justifyContent","center"),_t(e,"textTransform","uppercase"),e)},React.createElement("div",{style:{color:"#144675",fontSize:17}},"STEP ".concat(J,"/").concat(ee)),React.createElement("div",{style:{color:"#007bba"}},E)),!h&&"issues"===b&&m.length>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"secondary",onClick:function(){return pe(!0,m)}},"Ignore ",React.createElement("strong",null,m.length)," entries"),React.createElement(s._Z,{className:"danger",onClick:function(){return fe(m)}},"Delete ",React.createElement("strong",null,m.length)," entries")),!h&&"ignored"===b&&m.length>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"secondary",onClick:function(){return pe(!1,m)}},"Undo ",React.createElement("strong",null,m.length)," entries")),!h&&"trash"===b&&m.length>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{icon:"delete",className:"secondary",onClick:function(){return he(m)}},"Recover ",React.createElement("strong",null,m.length)," entries")),React.createElement("div",{style:{flex:1}},E&&React.createElement(s.UJ,{status:function(e){return"".concat(oe.max?"".concat(e,"%"):"+=")},busy:oe.busy,value:oe.value,max:oe.max,onStopClick:oe.stop})),!h&&React.createElement(React.Fragment,null,React.createElement(s.Ay,{onBlur:function(e){D(e)},onEnter:function(e){D(e)},value:w,onReset:function(){D("")}}),!w&&React.createElement(s.JH,{icon:"search",width:24,style:{position:"relative",left:-34,marginRight:-22},color:"#5a5a5a82"})),!h&&"issues"===b&&y.issues>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{icon:"delete",className:"danger",onClick:function(){return H("deleteAll")}},"Delete ",React.createElement("strong",null,"All"))),!h&&"trash"===b&&y.trash>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"primary",onClick:function(){return H("recoverAll")}},"Recover ",React.createElement("strong",null,"All")),React.createElement(s._Z,{icon:"delete",className:"danger",onClick:function(){return H("trashAll")}},"Empty Trash"))),React.createElement("p",null,"There are ",React.createElement("b",null,y.issues," issue",y.issues>1?"s":"")," with your files, accounting for ",React.createElement("b",null,(y.issues_size/1e6).toFixed(2)," MB"),". Your trash contains ",React.createElement("b",null,(y.trash_size/1e6).toFixed(2)," MB"),"."),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10}},React.createElement(s.h,{value:b,busy:h,onChange:function(e){z(e),Z(1)}},React.createElement(s.Sx,{title:"Issues",value:"issues",count:y.issues}),React.createElement(s.Sx,{title:"Ignored",value:"ignored",count:y.ignored}),React.createElement(s.Sx,{title:"Trash",value:"trash",count:y.trash})),React.createElement(s.Qo,{currentPage:x,limit:_,total:g,onClick:function(e){return Z(e)}})),React.createElement(s.aR,{busy:h,data:ie,columns:ce,sort:R,onSortChange:function(e,t){B({accessor:e,by:t})},onSelect:function(e){V(e)},onUnselect:function(e){M(Lt(m.filter((function(t){return!e.includes(t)}))))},selectedItems:m,emptyMessage:React.createElement(React.Fragment,null,"It's all clean & nice here! 👍",React.createElement("br",null),"Why not trying to give a boost to your database with ",React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/database-cleaner/"},"Database Cleaner"),"? 😌")}),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10}},React.createElement(s.Np,{scrolldown:!0,value:_,onChange:function(e){G(e),Z(1),me(e)}},React.createElement(s.ZB,{value:5,label:"5 items / page"}),React.createElement(s.ZB,{value:10,label:"10 items / page"}),React.createElement(s.ZB,{value:25,label:"25 items / page"}),React.createElement(s.ZB,{value:50,label:"50 items / page"}),React.createElement(s.ZB,{value:100,label:"100 items / page"}),React.createElement(s.ZB,{value:250,label:"250 items / page"}),React.createElement(s.ZB,{value:500,label:"500 items / page"}),React.createElement(s.ZB,{value:1e3,label:"1000 items / page"})),React.createElement(s.Qo,{currentPage:x,limit:_,total:g,onClick:function(e){return Z(e)}}))),React.createElement(s.LI,{isOpen:I.deleteAll,onRequestClose:function(){return H("deleteAll",!1)},title:"Delete All",content:React.createElement("span",null,"If you continue, ",React.createElement("b",null,g," issue",g<2?"":"s"," will be deleted"),". Make absolutely sure you have a backup of your site."),onOkClick:function(){H("deleteAll",!1),fe(null,!1,w)},onCancelClick:function(){H("deleteAll",!1)}}),React.createElement(s.LI,{isOpen:I.trashAll,onRequestClose:function(){return H("trashAll",!1)},title:"Delete All",content:React.createElement("span",null,"If you continue, ",React.createElement("b",null,"the trash will be entirely emptied"),". Make absolutely sure you have a backup of your site."),onOkClick:function(){H("trashAll",!1),fe(null,!0)},onCancelClick:function(){H("trashAll",!1)}}),React.createElement(s.LI,{isOpen:I.recoverAll,onRequestClose:function(){return H("recoverAll",!1)},title:"Recover All",content:"Are you sure you really want to recover all the files from the trash?",onOkClick:function(){H("recoverAll",!1),he()},onCancelClick:function(){H("recoverAll",!1)}}),React.createElement(s.LI,{isOpen:oe.error,onRequestClose:ye,title:"Error",content:React.createElement(React.Fragment,null,React.createElement("b",null,oe.error?oe.error.message:"N/A"),React.createElement("p",null)),customButtons:React.createElement("div",{style:{display:"flex",width:"100%",flexDirection:"column"}},React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(s._Z,{className:"primary",onClick:function(){oe.retry()}},"Retry"),React.createElement("small",{style:{marginLeft:5}},React.createElement("a",{href:"#",onClick:function(){oe.autoRetry(10)}},"AUTO RETRY")),React.createElement("div",{style:{flex:"auto"}}),React.createElement(s._Z,{className:"secondary",onClick:function(){oe.resume()}},"Skip"),React.createElement("small",{style:{marginLeft:5,marginRight:10}},React.createElement("a",{href:"#",onClick:function(){oe.setAlwaysSkip(),oe.resume()}},"ALWAYS SKIP")),React.createElement(s._Z,{className:"danger",onClick:ye},"Stop")),React.createElement("small",{style:{marginTop:10,lineHeight:"13px"}},"AUTO RETRY will retry the actions up to 10 times. At every retry, it will increase the delay (in order to avoid timeouts). Skipping errors is not recommended at all as it will result in a lot of false-positives. Check your browser console for more information."))}),React.createElement(s.LI,{isOpen:ne,title:"Finished",ok:"Close",content:ne,onOkClick:function(){ae(""),oe.reset()}})))},Gt=wp.element.render,zt={fetcher:s.SG,revalidateOnFocus:!1};document.addEventListener("DOMContentLoaded",(function(e){var t=document.getElementById("wpmc-admin-settings");t&&Gt(React.createElement(l.J$,{value:zt},React.createElement(Se,null)),t),(t=document.getElementById("wpmc-dashboard"))&&Gt(React.createElement(l.J$,{value:zt},React.createElement(st,null,React.createElement(Zt,null))),t)}))},9714:function(e,t,r){r.d(t,{Ay:function(){return h.A},BP:function(){return d.B},CA:function(){return E.C},Fq:function(){return L.Fq},Ge:function(){return E.G},Hq:function(){return c.H},JH:function(){return v.J},LI:function(){return R.L},Ln:function(){return S.Ln},Np:function(){return p.N},O9:function(){return g.O},P$:function(){return k.P},PQ:function(){return u.P},Ps:function(){return _.P},Qo:function(){return y.Q},SG:function(){return S.SG},Sx:function(){return b.S},UJ:function(){return m.U},ZB:function(){return p.Z},ZL:function(){return S.ZL},_Z:function(){return a._},_h:function(){return w._},aR:function(){return x.a},c4:function(){return _.c},h:function(){return b.h},lQ:function(){return f.l},oY:function(){return s.o},qj:function(){return L.qj},rR:function(){return l.r},si:function(){return o.s},vU:function(){return L.vU},vg:function(){return n.Z},vj:function(){return i.v},wr:function(){return S.wr},zc:function(){return s.z}});var n=r(5833),a=r(7818),o=(r(6071),r(1254)),i=r(537),c=r(9137),l=r(749),s=(r(3534),r(5979)),u=r(4694),f=r(1630),h=r(1492),p=(r(3895),r(3565)),m=(r(5235),r(9378),r(9422),r(4696),r(8725),r(8281)),d=r(7172),y=r(776),v=r(8972),g=r(6160),b=r(3103),w=r(8406),E=r(3506),R=(r(7198),r(2625),r(8519),r(5307),r(3545),r(1203)),x=(r(858),r(3676)),_=r(1488),k=(r(8263),r(5231)),L=(r(9995),r(4291)),S=r(9967)},7363:function(e){e.exports=React},1533:function(e){e.exports=ReactDOM}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.m=t,n.amdO={},e=[],n.O=function(t,r,a,o){if(!r){var i=1/0;for(u=0;u<e.length;u++){r=e[u][0],a=e[u][1],o=e[u][2];for(var c=!0,l=0;l<r.length;l++)(!1&o||i>=o)&&Object.keys(n.O).every((function(e){return n.O[e](r[l])}))?r.splice(l--,1):(c=!1,o<i&&(i=o));if(c){e.splice(u--,1);var s=a();void 0!==s&&(t=s)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={826:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var a,o,i=r[0],c=r[1],l=r[2],s=0;if(i.some((function(t){return 0!==e[t]}))){for(a in c)n.o(c,a)&&(n.m[a]=c[a]);if(l)var u=l(n)}for(t&&t(r);s<i.length;s++)o=i[s],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(u)},r=self.wpJsonWpmc=self.wpJsonWpmc||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var a=n.O(void 0,[736],(function(){return n(9287)}));a=n.O(a)}();
3
  //# sourceMappingURL=index.js.map
1
  /*! For license information please see index.js.LICENSE.txt */
2
+ !function(){"use strict";var e,t={9287:function(e,t,r){var n,a,o,i,c,l=r(3368),s=r(9714),u=wpmc_media_cleaner.prefix,f=wpmc_media_cleaner.domain,h=wpmc_media_cleaner.rest_url.replace(/\/+$/,""),p=wpmc_media_cleaner.api_url.replace(/\/+$/,""),m=wpmc_media_cleaner.plugin_url.replace(/\/+$/,""),d="1"===wpmc_media_cleaner.is_pro,y=d&&"1"===wpmc_media_cleaner.is_registered,v=wpmc_media_cleaner.rest_nonce,g=wpmc_media_cleaner.options,b="files"===g.method?g.filesystem_content:g.content,w="files"===g.method&&(null==g?void 0:g.media_library),E=r(2788);function R(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var x=E.ZP.div(n||(n=R(["\n color: white;\n padding: 15px;\n margin-bottom: -15px;\n\n a {\n color: #7dedff;\n text-decoration: none;\n }\n\n p {\n font-size: 15px;\n }\n"]))),_=(0,E.ZP)(s.vj)(a||(a=R(["\n\n .nui-block-title {\n display: none;\n }\n\n .nui-block-content {\n display: flex;\n padding: 10px;\n\n h2 {\n color: #055082;\n font-size: 16px;\n margin: 5px 0 5px 0;\n\n a {\n text-decoration: none;\n }\n }\n\n p {\n margin: 0px;\n line-height: 18px;\n }\n }\n"]))),k=E.ZP.img(o||(o=R(["\n width: 85px;\n height: 85px;\n padding-right: 10px;\n"]))),L=E.ZP.div(i||(i=R(["\n\n margin: 15px;\n\n .center {\n background: white;\n border-radius: 10px;\n padding: 10px;\n max-width: 100%\n overflow: none;\n\n h2 {\n font-size: 26px;\n }\n\n table {\n width: 100%;\n\n tr td:first-child {\n width: 220px;\n font-weight: bold;\n color: #1e7cba;\n }\n\n * {\n overflow-wrap: anywhere;\n }\n }\n }\n\n hr {\n border-color: #1e7cba;\n }\n"]))),S=E.ZP.ul(c||(c=R(["\n margin-top: 10px;\n background: rgb(0, 72, 88);\n padding: 10px;\n color: rgb(58, 212, 58);\n max-height: 600px;\n min-height: 200px;\n display: block;\n font-family: monospace;\n font-size: 12px;\n white-space: pre;\n overflow-x: auto;\n width: calc(100vw - 276px);\n\n .log-date {\n color: white;\n margin-left: 8px;\n }\n\n .log-type {\n background: #0000004d;\n padding: 2px 5px;\n border-radius: 8px;\n text-transform: uppercase;\n }\n\n .log-content {\n display: block;\n }\n\n .log-warning .log-type {\n background: #ccb028;\n color: white;\n }\n\n .log-fatal .log-type {\n background: #cc2828;\n color: white;\n }\n"])));function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function P(){P=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==O(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function T(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function j(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){T(o,n,a,i,c,"next",e)}function c(e){T(o,n,a,i,c,"throw",e)}i(void 0)}))}}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){if(e){if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var N=wp.element,M=N.useState,D=N.useEffect,F="".concat(h,"/meow-common/v1"),B=function(e){var t=e.request,r=e.title,n=e.max,a=A(M(!1),2),o=a[0],i=a[1],c=A(M([]),2),l=c[0],u=c[1],f=l.length>0?l.reduce((function(e,t){return e+t})):0,h=l.length>0?Math.ceil(f/l.length):0,p=!l.length&&o;return D((function(){o&&setTimeout(j(P().mark((function e(){var r,n,a;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(new Date).getTime(),e.next=3,(0,s.ZL)("".concat(F,"/").concat(t),{nonce:v});case 3:n=(new Date).getTime(),a=n-r,u((function(e){return[].concat(function(e){if(Array.isArray(e))return I(e)}(t=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||C(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[a]);var t}));case 6:case"end":return e.stop()}}),e)}))),1e3)}),[l]),React.createElement(x,{style:{width:200,textAlign:"center"}},React.createElement(s.O9,{h2:!0,style:{color:"white"}},r),React.createElement(s._h,{size:200,value:p?n:h,max:n},React.createElement("span",{style:{fontSize:20}},p?"START":h+" ms"),React.createElement("span",{style:{fontSize:12}},p?"YOUR ENGINE":l.length+" requests")),React.createElement(s._Z,{style:{width:"100%",marginTop:10},color:o?"#cc3627":"#ccb027",onClick:function(){o||u([]),i(!o)}},o?"Stop":"Start"))};function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function G(){G=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==Z(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){U(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function Q(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Y(o,n,a,i,c,"next",e)}function c(e){Y(o,n,a,i,c,"throw",e)}i(void 0)}))}}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var V=wp.element,$=V.useState,J=V.useEffect;p&&h&&m||console.error("[@common/dashboard] apiUrl, restUrl and pluginUrl are mandatory.");var K="".concat(h,"/meow-common/v1"),X=React.createElement(x,null,React.createElement(s.O9,{p:!0},"Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking ",React.createElement("a",{target:"_blank",href:"https://offbeatjapan.org"},"a lot of photos"),"). Meow Apps proposes a suite of plugins focusing on photography, imaging, optimization and SEO. The ultimate goal is to make your website better, faster, while making it easy. Meow Apps also teams up with the best players in the community. For more information, please check ",React.createElement("a",{href:"http://meowapps.com",target:"_blank"},"Meow Apps"),".")),ee=React.createElement(x,null,React.createElement(s.O9,{p:!0},"The ",React.createElement("b",null,"Empty Request Time")," helps you analyzing the raw performance of your install by giving you the average time it takes to run an empty request to your server. You can try to disable some plugins (or change their options) then Start this again to see how it influences the results. An excellent install would have an Empty Request Time of less than 500 ms. Keep it absolutely under 2,000 ms! For more information, ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/#Optimize_your_Empty_Request_Time",target:"_blank"},"click here"),"."),React.createElement(s.O9,{p:!0},React.createElement("b",null,"File Operation Time")," creates a temporary size of 10MB every time. ",React.createElement("b",null,"SQL Request Time")," counts the number of posts. Those two should be very fast, and almost the same as the ",React.createElement("b",null,"Empty Request Time"),".")),te=React.createElement(x,null,React.createElement(s.O9,{p:!0},"Too many WordPress installs are blown-up with useless and/or heavy plugins, and not aware of best practices. That's not the fault of the users; WordPress pretends to be simple but it is in fact very complex, and the immensity and diversity of the community around it makes it a real jungle where everything is possible."),React.createElement(s.O9,{p:!0},"A rule of thumb is to keep your WordPress install as simple as possible, with the least number of plugins installed (run away from the heavy ones) and an excellent hosting service. Avoid VPS or self-hosted solutions; you must be a professional to actually set them up so that they are actually performant."),React.createElement(s.O9,{p:!0},"On the Meow Apps website, you will find articles which are always updated with the latest recommendations.",React.createElement("ul",null,React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/how-to-debug-wordpress-errors/",target:"_blank"},"How To Debug WordPress")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-improve-seo-wordpress/",target:"_blank"},"SEO Checklist & Optimization")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-faster-wordpress-optimize/",target:"_blank"},"Optimize your WordPress Speed")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-optimize-images-wordpress/",target:"_blank"},"Optimize Images (CDN, and so on)")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-hosting-service-wordpress/",target:"_blank"},"Best Hosting Services for WordPress"))))),re=["".concat(K,"/all_settings/"),{headers:{"X-WP-Nonce":v}}],ne=function(){var e=W($(!1),2),t=e[0],r=e[1],n=(0,l.ZP)(re,s.SG),a=n.data,o=n.mutate,i=n.error,c=null==a?void 0:a.data,u=null==c?void 0:c.meowapps_hide_meowapps,f=null==c?void 0:c.force_sslverify,h=W($(!1),2),p=h[0],d=h[1],y=W($([]),2),g=y[0],b=y[1],w=W($(""),2),E=w[0],R=w[1];J((function(){i&&!t&&(r(!0),console.error("Error from UseSWR",i.message))}),[i]),J((function(){var e=document.getElementById("meow-common-phpinfo");R(e.innerHTML)}),[]);var O=function(){var e=Q(G().mark((function e(t,r){var n,i;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=q({},a.data))[r]=t,o(q(q({},a),{},{data:n}),!1),d(!0),e.next=6,(0,s.ZL)("".concat(K,"/update_option"),{json:{name:r,value:t},nonce:v});case 6:i=e.sent,d(!1),i.success||alert(i.message),o();case 10:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),P=function(){var e=Q(G().mark((function e(){var t,r;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.next=3,(0,s.ZL)("".concat(K,"/error_logs"),{nonce:v});case 3:t=e.sent,r=t&&t.data?t.data:[],b(r.reverse()),d(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=React.createElement(s.rR,{title:"Main Menu"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"meowapps_hide_meowapps",label:"Hide (Not Recommended)",description:React.createElement(s.O9,{p:!0},"This will hide the Meow Apps Menu (on the left side) and everything it contains. You can re-enable it through though an option that will be added in Settings → General."),value:"1",disabled:p,checked:u,onChange:O}))),j=React.createElement(s.rR,{title:"SSL Verify"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"force_sslverify",label:"Force (Not Recommended)",description:React.createElement(s.O9,{p:!0},"This will enforce the usage of SSL when checking the license or updating the plugin."),value:"1",disabled:p,checked:f,onChange:O})));return React.createElement(s.si,{showRestError:t},React.createElement(s.BP,{title:"The Dashboard"}),React.createElement(s.oY,null,React.createElement(s.zc,{full:!0},React.createElement(s.c4,null,React.createElement(s.Ps,{title:"Meow Apps"},X,React.createElement(s.oY,null,React.createElement(s.zc,{minimal:!0},React.createElement(_,{title:"Media Cleaner",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/media-cleaner.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-cleaner/"},"Media Cleaner")),React.createElement("p",null,"The Cleaner analyzes your WordPress entirely to find out which files are not used. You can trash them, before deleting them permanently. Your WordPress will breath again :)"))),React.createElement(_,{title:"Database Cleaner",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/database-cleaner.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/database-cleaner/"},"Database Cleaner")),React.createElement("p",null,"Clean your WordPress database. This plugin is simple, handles risk levels, and aims to work even on oversized databases on which other plugins fail to operate."))),React.createElement(_,{title:"Media File Renamer",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/media-file-renamer.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-file-renamer/"},"Media File Renamer")),React.createElement("p",null,"The Renamer will help you in getting nicer filenames for an improved SEO and a tidier filesystem. It's mostly automatic and very fun to use."))),React.createElement(_,{title:"Social Engine",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/social-engine.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/social-engine/"},"Social Engine")),React.createElement("p",null,"Organize, schedule and automate the publishing of your content and photos on social accounts. Similar to Buffer, TweetDeck, etc, but without all the limitations, and in your WordPress."))),React.createElement(_,{title:"Meow Analytics",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/meow-analytics.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-analytics/"},"Meow Analytics")),React.createElement("p",null,"Are you tired of those heavy plugins, accessing your Google Analytics deliberately? Switch to Meow Analytics!")))),React.createElement(s.zc,{minimal:!0},React.createElement(_,{title:"Photo Engine",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/wplr-sync.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wplr-sync/"},"Photo Engine")),React.createElement("p",null,"Are you using Lightroom? So you know Photo Engine already. Wait, you don't? You must try it! This plugin will be your favorite very soon."))),React.createElement(_,{title:"Meow Gallery",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/meow-gallery.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-gallery/"},"Meow Gallery")),React.createElement("p",null,"This is the fastest gallery system... and it is pretty as well! It is 100% compatible with the native WordPress galleries and therefore, works right away."))),React.createElement(_,{title:"Meow Lightbox",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/meow-lightbox.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-lightbox/"},"Meow Lightbox")),React.createElement("p",null,"A very sleek and performant Lightbox which will also display your EXIF data (camera, lens, aperture...). Photographers love it."))),React.createElement(_,{title:"Perfect Images (Retina)",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/wp-retina-2x.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wp-retina-2x/"},"Perfect Images + Retina")),React.createElement("p",null,"It handles Retina, help you managing the Image Sizes registered in your WP, and much more."))),React.createElement(_,{title:"Contact Form Block",className:"primary"},React.createElement(k,{src:"".concat(m,"/common/img/contact-form-block.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/contact-form-block/"},"Contact Form Block")),React.createElement("p",null,"A simple, pretty and superlight contact form. If you simply want your visitors to get in touch with you, this contact form will be perfect for you and your WordPress.")))))),React.createElement(s.Ps,{title:"Performance"},ee,React.createElement("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:25}},React.createElement(B,{title:"Empty Request Time",request:"empty_request",max:2500}),React.createElement(B,{title:"File Operation Time",request:"file_operation",max:2600}),React.createElement(B,{title:"SQL Request Time",request:"sql_request",max:2800}))),React.createElement(s.Ps,{title:"Recommendations"},te),React.createElement(s.Ps,{title:"PHP Info"},React.createElement(L,{dangerouslySetInnerHTML:{__html:E}})),React.createElement(s.Ps,{title:"PHP Error Logs"},React.createElement(x,null,React.createElement(s._Z,{style:{marginBottom:10},color:"#ccb027",onClick:P},"Load PHP Error Logs"),React.createElement(S,null,g.map((function(e){return React.createElement("li",{class:"log-".concat(e.type)},React.createElement("span",{class:"log-type"},e.type),React.createElement("span",{class:"log-date"},e.date),React.createElement("span",{class:"log-content"},e.content))}))))),React.createElement(s.Ps,{title:"Settings"},React.createElement(s.vj,{title:"Settings",className:"primary"},T,j))))))};function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}function oe(){oe=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==ae(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function ie(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function ce(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){ie(o,n,a,i,c,"next",e)}function c(e){ie(o,n,a,i,c,"throw",e)}i(void 0)}))}}function le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return se(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?se(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ue=wp.element,fe=ue.useState,he=ue.useEffect,pe="".concat(h,"/meow-licenser/").concat(u,"/v1"),me=function(){var e=le(fe(!1),2),t=e[0],r=e[1],n=le(fe(!1),2),a=n[0],o=n[1],i=le(fe(null),2),c=i[0],l=i[1],u=le(fe(null),2),f=u[0],h=u[1],p=le(fe(""),2),m=p[0],g=p[1],b=y&&(!f||"valid"!==f.license),w=function(){var e=ce(oe().mark((function e(){var t;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d){e.next=2;break}return e.abrupt("return");case 2:return r(!0),e.next=5,(0,s.ZL)("".concat(pe,"/get_license"),{nonce:v});case 5:t=e.sent,h(t.data),t.data.key&&g(t.data.key),r(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=ce(oe().mark((function e(){return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(!0),e.next=3,(0,s.ZL)("".concat(pe,"/set_license"),{nonce:v,json:{serialKey:null}});case 3:e.sent.success&&(g(""),h(null),l("licenseRemoved")),r(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=ce(oe().mark((function e(){var t;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(!0),e.next=3,(0,s.ZL)("".concat(pe,"/set_license"),{nonce:v,json:{serialKey:m,override:!0}});case 3:(t=e.sent).success&&(h(t.data),t.data&&!t.data.issue&&l("licenseAdded")),r(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var e=ce(oe().mark((function e(){var t;return oe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("MEOW_OVERRIDE"!==m){e.next=5;break}return o(!0),h(null),g(""),e.abrupt("return");case 5:return r(!0),e.next=8,(0,s.ZL)("".concat(pe,"/set_license"),{nonce:v,json:{serialKey:m}});case 8:(t=e.sent).success&&(h(t.data),t.data&&!t.data.issue&&l("licenseAdded")),r(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();he((function(){w()}),[]);var _=b?"Forced License":y?"Enabled":"Disabled",k=b||f&&"valid"===f.license,L="Your license is active. Thanks a lot for your support :)";b&&f&&f.check_url&&(L=React.createElement(React.Fragment,null,React.createElement("span",null,L),React.createElement("br",null),React.createElement("small",null,"This license was enabled manually. To check your license status, please click ",React.createElement("a",{target:"_blank",href:f.check_url+"&cache="+642e3*Math.random()},"here"),"."))),k||(f?"no_activations_left"===f.issue?L=React.createElement("span",null,"There are no activations left for this license. You can visit your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com"},"Meow Apps Store"),", unregister a site, and click on ",React.createElement("i",null,"Retry to validate"),"."):"expired"===f.issue?L=React.createElement("span",null,"Your license has expired. You can get another license or renew the current one by visiting your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com"},"Meow Apps Store"),"."):"missing"===f.issue?L="This license does not exist.":"disabled"===f.issue?L="This license has been disabled.":"item_name_mismatch"===f.issue?L="This license seems to be for a different plugin... isn't it? :)":"forced"===f.issue?L="ABC":(L=React.createElement("span",null,"There is an unknown error related to the system or this serial key. Really sorry about this! Make sure your security plugins and systems are off temporarily. If you are still experiencing an issue, please ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/contact/"},"contact us"),"."),console.error({license:f})):L="Unknown error :(");var S=React.createElement(s.vj,{title:"Pro Version (Not Installed)",className:"primary"},"You will find more information about the Pro Version ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com"},"here"),". If you actually bought the Pro Version already, please remove the current plugin and download the Pro Version from your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/"},"Meow Apps Store"),"."),O=React.createElement(s.vj,{title:"Pro Version (".concat(_,")"),busy:t,className:"primary"},React.createElement(s.rR,{title:"Serial Key",style:{fontWeight:"bold"}},React.createElement(s.Ay,{id:"mfrh_pro_serial",name:"mfrh_pro_serial",disabled:t,value:m,onChange:function(e){return g(e)},placeholder:""})),f&&!k&&React.createElement(s.Ge,null,L),f&&k&&React.createElement(s.CA,null,L),!f&&React.createElement(s.O9,{p:!0},"Insert your serial key above. If you don't have one yet, you can get one ",React.createElement("a",{href:"https://meowapps.com"},"here"),". If there was an error during the validation, try the ",React.createElement("i",null,"Retry")," to ",React.createElement("i",null,"validate")," button."),React.createElement(s.rR,{contentAlign:"right"},f&&!k&&React.createElement(s._Z,{className:"secondary",disabled:t||!m,onClick:x},"Retry to validate"),f&&f.key===m&&React.createElement(s._Z,{className:"secondary",disabled:t||!m,onClick:E},"Remove License"),React.createElement(s._Z,{disabled:t||!m||f&&f.key===m,onClick:x},"Validate License"),a&&!k&&React.createElement(s._Z,{disabled:t||!m||f&&f.key===m,onClick:R,className:"danger"},"Force License")),React.createElement(s.LI,{isOpen:"licenseAdded"===c,title:"Thank you :)",content:"The Pro features have been enabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}),React.createElement(s.LI,{isOpen:"licenseRemoved"===c,title:"Goodbye :(",content:"The Pro features have been disabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}));return d?O:S},de=wp.element.render;function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function ve(){ve=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==ye(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function ge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(r),!0).forEach((function(t){we(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function we(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ee(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function Re(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Ee(o,n,a,i,c,"next",e)}function c(e){Ee(o,n,a,i,c,"throw",e)}i(void 0)}))}}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_e(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}document.meowDashboardLoaded||(document.meowDashboardLoaded=!0,document.addEventListener("DOMContentLoaded",(function(e){var t=document.getElementById("meow-common-dashboard");t&&de(React.createElement(ne,null),t)})));var ke=wp.element.useState,Le={marginTop:10,background:"rgb(0, 72, 88)",padding:10,color:"rgb(58, 212, 58)",maxHeight:600,minHeight:200,display:"block",fontFamily:"monospace",fontSize:12,whiteSpace:"pre",overflowX:"auto",width:"calc(100vw - 276px)"},Se=function(){var e=xe(ke(g),2),t=e[0],r=e[1],n=xe(ke(!1),2),a=n[0],o=n[1],i=xe(ke(""),2),c=i[0],l=i[1],h=xe(ke(),2),m=h[0],b=h[1],w=a,E=t.content,R=t.filesystem_content,x=t.media_library,_=t.live_content,k=t.debuglogs,L=t.images_only,S=t.attach_is_use,O=t.thumbnails_only,P=t.dirs_filter,T=t.files_filter,j=t.hide_thumbnails,A=t.hide_warning,C=t.skip_trash,I=t.medias_buffer,N=t.posts_buffer,M=t.analysis_buffer,D=t.file_op_buffer,F=t.delay,B=t.shortcodes_disabled,Z=t.clean_uninstall,G=function(){var e=Re(ve().mark((function e(n,a){var i,c;return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=be(be({},t),{},we({},a,n)),o(!0),e.prev=2,e.next=5,(0,s.ZL)("".concat(p,"/update_options"),{json:{options:i},nonce:v});case 5:(c=e.sent).success&&r(c.options),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),alert(e.t0.message);case 12:return e.prev=12,o(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[2,9,12,15]])})));return function(t,r){return e.apply(this,arguments)}}(),z=function(){var e=Re(ve().mark((function e(){return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.next=3,(0,s.ZL)("".concat(p,"/reset_db"),{nonce:v});case 3:b("resetDb"),o(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=Re(ve().mark((function e(){var t;return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.next=3,(0,s.ZL)("".concat(p,"/refresh_logs"),{nonce:v});case 3:(t=e.sent).success&&l(t.data),o(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=Re(ve().mark((function e(){var t;return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.next=3,(0,s.ZL)("".concat(p,"/clear_logs"),{nonce:v});case 3:(t=e.sent).success&&l(t.data),o(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=React.createElement(s.rR,{title:"Content"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"content",label:"Check",description:"Checks if the media entries are used by the content (Posts, Pages and other Post Types, Metadata, Widgets, etc). Pagebuilders are only supported in the Pro Version.",value:"1",checked:E,onChange:G}))),Q=React.createElement(s.rR,{title:"Content"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"filesystem_content",label:"Check",description:"Checks if the files are used by the content (Posts, Pages and other Post Types, Metadata, Widgets, etc).",value:"1",checked:R,onChange:G}))),W=React.createElement(s.rR,{title:"Media Library"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"media_library",label:"Check",description:"Checks if the files are properly registered in the Media Library.",value:"1",checked:x,onChange:G}))),H=React.createElement(s.rR,{title:"Live Content"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"live_content",label:"Check",description:"The live version of the site will be also analyzed (as if a visitor was loading it). It increases the accuracy of the results but slows down the speed dramatically.",value:"1",requirePro:!y,checked:_,onChange:G}))),V=React.createElement(s.rR,{title:"Images Only"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"images_only",label:"Enable",description:"Restricts the scan to images. Nothing else will be scanned.",value:"1",checked:L,onChange:G}))),$=React.createElement(s.rR,{title:"Attached Images"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"attach_is_use",label:"Consider as In Use",description:React.createElement(React.Fragment,null,"If a media entry is attached (in the Media Library, it is the ",React.createElement("b",null,"Uploaded To")," field), it will be considered as being used."),value:"1",checked:S,onChange:G}))),J=React.createElement(s.rR,{title:"Thumbnails Only"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"thumbnails_only",label:"Enable",description:"Restricts Media Cleaner to scan thumbnails. With WordPress, those filenames contain the resolution.",value:"1",checked:O,onChange:G}))),K=React.createElement(s.rR,{title:"Directories Filter"},React.createElement(s.Ay,{id:"dirs_filter",name:"dirs_filter",onReset:function(){G("","dirs_filter")},value:P,placeholder:"/regex/",onEnter:G,onBlur:G})),X=React.createElement(s.rR,{title:"Files Filter"},React.createElement(s.Ay,{id:"files_filter",name:"files_filter",onReset:function(){G("","files_filter")},value:T,placeholder:"/regex/",onEnter:G,onBlur:G})),ee=React.createElement(s.rR,{title:"Thumbnails"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"hide_thumbnails",label:"Hide",description:"If you prefer not to see the thumbnails.",value:"1",checked:j,onChange:G}))),te=React.createElement(s.rR,{title:"Skip Trash"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"skip_trash",label:"Yes",description:"This will disable the trash and the restore related features.",value:"1",checked:C,onChange:G}))),re=React.createElement(s.rR,{title:"Warning Message"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"hide_warning",label:"Hide",description:"Have you read it twice? If yes, hide it :)",requirePro:!y,value:"1",checked:A,onChange:G}))),ne=React.createElement(s.rR,{title:"Plugin Data"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"clean_uninstall",label:"Delete all",description:"The database and all the options of the plugin will be removed on uninstall. This also includes the information about the plugin's trash.",value:"1",checked:Z,onChange:G}))),ae=React.createElement(s.rR,{title:"Medias Buffer"},React.createElement(s.Ay,{id:"medias_buffer",type:"number",value:I,min:"1",max:"1000",onEnter:G,onBlur:G,description:"The number of media entries to read at a time. This is fast, so the value should be between 50 and 1000."})),oe=React.createElement(s.rR,{title:"Posts Buffer"},React.createElement(s.Ay,{id:"posts_buffer",type:"number",value:N,min:"1",max:"100",onEnter:G,onBlur:G,description:"The number of posts (and any other post types) to analyze at a time. This is the most intense part of the process. Recommended value is between 1 (slow server) and 20 (excellent server)."})),ie=React.createElement(s.rR,{title:"Analysis Buffer"},React.createElement(s.Ay,{id:"analysis_buffer",type:"number",value:M,min:"1",max:"1000",onEnter:G,onBlur:G,description:"The number of media entries or files to analyze at a time. This is the main part of the process, but is is much faster than analyzing each post. Recommended value is between 20 (slow server) and 1000 (excellent server)."})),ce=React.createElement(s.rR,{title:"File Operation Buffer"},React.createElement(s.Ay,{id:"file_op_buffer",type:"number",value:D,min:"1",max:"100",onEnter:G,onBlur:G,description:"The number of media entries or files to delete at a time. This highly depends on your server, it is normally quite fast. Recommended value is between 5 (slow server) and 100 (excellent server). "})),le=React.createElement(s.rR,{title:"Delay (in ms)"},React.createElement(s.Ay,{id:"delay",type:"number",value:F,min:"0",max:"20000",onEnter:G,onBlur:G,description:"Time to wait between each request (in milliseconds). The overall process is intensive so this gives the chance to your server to chill out a bit. A very good server doesn't need it, but a slow/shared hosting might even reject requests if they are too fast and frequent. Recommended value is actually 0, 100 for safety, 2000 or 5000 if your hosting is kind of cheap."})),se=React.createElement(s.rR,{title:"Shortcodes"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"shortcodes_disabled",label:"Disable Analysis",description:"Resolving shortcodes increase accuracy, but makes the process slower and takes more memory.",value:"1",checked:B,onChange:G}))),ue=React.createElement(s.rR,{title:"Logs"},React.createElement(s.lQ,{max:"1"},React.createElement(s.PQ,{id:"debuglogs",label:"Enable",description:React.createElement(s.O9,{p:!0},"Simple logging that explains which actions has been run."),value:"1",checked:k,onChange:G}),React.createElement("div",{style:{marginTop:20}},React.createElement(s._Z,{onClick:q},"Refresh Logs"),React.createElement(s._Z,{className:"danger",onClick:U},"Clear Logs"))));return React.createElement(s.si,null,React.createElement(s.LI,{isOpen:"resetDb"===m,onRequestClose:function(){b(null)},title:"Done!",content:"The Media Cleaner's database has been deleted. It will be re-created automatically next time you visit the Media Cleaner Dashboard.",onOkClick:function(){b(null)}}),React.createElement(s.BP,{title:"Media Cleaner | Settings",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(s._Z,{className:"header",onClick:function(){return window.open("https://meowapps.com/media-cleaner-tutorial/","_blank")}},"Tutorial"),React.createElement(s._Z,{className:"header",icon:"dashboard",onClick:function(){return location.href="upload.php?page=wpmc_dashboard"}},"Dashboard"))),React.createElement(s.oY,null,React.createElement(s.zc,{full:!0},React.createElement(s.Hq,{footer:React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"primary",onClick:function(){return location.href="upload.php?page=wpmc_dashboard"}},"Access Media Cleaner Dashboard"),React.createElement(s._Z,{className:"danger",onClick:z},"Delete Cleaner DB"))},React.createElement(s.O9,{p:!0},"There are two kinds of scan. Usually, the ",React.createElement("b",null,"Media Library")," should be scanned first for images which are not used (Content = Check). Then, the ",React.createElement("b",null,"Filesystem")," should be scanned for images which aren't registered in the Media Library (Media Library = Check). Check the ",React.createElement("a",{target:"_blank",href:"https://meowapps.com/media-cleaner-tutorial/"},"tutorial")," tutorial for more information. If you wish to clean your ",React.createElement("b",null,"Database"),", try ",React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/database-cleaner/"},"Database Cleaner"),", you will love it! 💕")),React.createElement(s.c4,{keepTabOnReload:!0},React.createElement(s.Ps,{title:"Media Library Scan"},React.createElement(s.oY,null,React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Scanning",className:"primary"},Y,H,(E||_)&&React.createElement(s.O9,{p:!0},"If you would like Media Cleaner to analyze your Media Library for broken entries, uncheck everything above."),!E&&!_&&React.createElement(s.O9,{p:!0},React.createElement("b",null,"Since Content and Live Content are not checked, Media Cleaner will analyze your Media Library for ",React.createElement("u",null,"broken entries"),".")))),React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Filters",className:"primary"},V),React.createElement(s.vj,{busy:w,title:"Extra Rules",className:"primary"},$)))),React.createElement(s.Ps,{title:"Filesystem Scan",requirePro:!y},React.createElement(s.oY,null,React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Scanning",className:"primary"},W,Q,H,React.createElement(s.O9,{p:!0},"If none of the checks above are selected, you will get the list of all your files."))),React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Filters",className:"primary"},J,K,X)))),React.createElement(s.Ps,{title:"Advanced"},React.createElement(s.oY,null,React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"UI & Logs",className:"primary"},ee,te,re),React.createElement(s.vj,{busy:w,title:"On Uninstall",className:"primary"},ne)),React.createElement(s.zc,{minimal:!0},React.createElement(s.vj,{busy:w,title:"Advanced Settings",className:"primary"},ae,oe,ie,ce,le,se)))),React.createElement(s.Ps,{title:"License"},React.createElement(me,{domain:f,prefix:u,isPro:d,isRegistered:y})),React.createElement(s.Ps,{title:"Logs & Debug"},React.createElement(s.vj,{busy:w,className:"primary"},ue),React.createElement("div",{style:Le},c))))))},Oe=r(7363);function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function Te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?je(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach((function(t){Ie(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ie(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ne(){Ne=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==Pe(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function Me(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function De(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Me(o,n,a,i,c,"next",e)}function c(e){Me(o,n,a,i,c,"throw",e)}i(void 0)}))}}var Fe,Be,Ze={issues:"-",ignored:"-",trash:"-"},Ge={accessor:"size",by:"desc"},ze=0,qe={filterBy:"issues",sort:Ge,page:1,limit:parseInt(g.posts_per_page),search:"",busy:!1,stats:Ze,apiErrors:null,status:"",options:g,entries:[],selectedItems:[],total:0,method:g.method,content:b,mediaLibrary:w,hideThumbnails:g.hide_thumbnails,hideWarning:g.hide_warning,skipTrash:g.skip_trash,postsBuffer:parseInt(g.posts_buffer),mediasBuffer:parseInt(g.medias_buffer),analysisBuffer:parseInt(g.analysis_buffer),fileOpBuffer:parseInt(g.file_op_buffer),delay:parseInt(g.delay),modals:{deleteAll:!1,trashAll:!1,recoverAll:!1},mutateEntries:(Be=De(Ne().mark((function e(){return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return Be.apply(this,arguments)}),mutateStats:(Fe=De(Ne().mark((function e(){return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return Fe.apply(this,arguments)})},Ue="PAGE_UPDATED",Ye="LIMIT_UPDATED",Qe="FILTER_UPDATED",We="SORT_UPDATED",He="SEARCH_UPDATED",Ve="TOTAL_UPDATED",$e="STATUS_UPDATED",Je="SETTINGS_UPDATED",Ke="TOGGLE_MODAL",Xe="PUSH_BUSY",et="POP_BUSY",tt="ENTRIES_UPDATED",rt="ITEMS_SELECTED",nt="STATS_UPDATED",at="ERROR_UPDATED",ot="SET_ENTRIES_MUTATE",it="SET_STATS_MUTATE",ct=function(e,t){switch(t.type){case tt:var r=t.entries;return Ce(Ce({},e),{},{entries:r});case nt:var n=t.stats;return Ce(Ce({},e),{},{stats:n});case at:var a=t.apiErrors;return Ce(Ce({},e),{},{apiErrors:a});case Ue:var o=t.page;return Ce(Ce({},e),{},{page:o});case ot:var i=t.mutateEntries;return Ce(Ce({},e),{},{mutateEntries:i});case it:var c=t.mutateStats;return Ce(Ce({},e),{},{mutateStats:c});case Ye:var l=t.limit;return Ce(Ce({},e),{},{limit:l});case Qe:var s=t.filter;return Ce(Ce({},e),{},{filterBy:s});case We:var u=t.sort,f=void 0===u?Ge:u;return Ce(Ce({},e),{},{sort:f});case He:var h=t.search;return Ce(Ce({},e),{},{search:h});case Ve:var p=t.total;return Ce(Ce({},e),{},{total:p});case Ke:var m=t.modal,d=t.enable;if(void 0===e.modals[m])return alert("The modal ".concat(m," doesn't exist.")),console.error("The modal ".concat(m," doesn't exist.")),e;void 0===d&&(d=!e.modals[m]);var y=Ce({},e);return y.modals=Ce({},y.modals),y.modals[m]=d,y;case Xe:var v=t.status,g=void 0===v?"":v;return Ce(Ce({},e),{},{busy:++ze>0,status:g});case et:var b=t.status,w=void 0===b?"":b;return Ce(Ce({},e),{},{busy:--ze>0,status:w});case $e:var E=t.status,R=void 0===E?"":E;return Ce(Ce({},e),{},{status:R});case Je:var x=t.options,_=x.method,k="files"===x.method?x.filesystem_content:x.content,L="files"===x.method&&(null==x?void 0:x.media_library),S=x.hide_thumbnails,O=x.hide_warning,P=x.skip_trash,T=x.posts_buffer?parseInt(x.posts_buffer):5,j=x.medias_buffer?parseInt(x.medias_buffer):100,A=x.analysis_buffer?parseInt(x.analysis_buffer):100,C=x.file_op_buffer?parseInt(x.file_op_buffer):20,I=x.delay?parseInt(x.delay):0,N=x.posts_per_page?parseInt(x.posts_per_page):10;return Ce(Ce({},e),{},{options:x,method:_,content:k,mediaLibrary:L,hideThumbnails:S,hideWarning:O,skipTrash:P,postsBuffer:T,mediasBuffer:j,analysisBuffer:A,fileOpBuffer:C,delay:I,limit:N});case rt:var M=t.selectedItems;return Ce(Ce({},e),{},{selectedItems:M});default:return e}},lt=(0,Oe.createContext)(),st=function(e){var t=e.children,r=Te((0,Oe.useReducer)(ct,qe),2),n=r[0],a=r[1],o=n.filterBy,i=n.sort,c=n.search,u=n.page,f=n.limit,h=(0,Oe.useMemo)((function(){return[(0,s.Ln)("".concat(p,"/entries"),{limit:f,skip:(u-1)*f,filterBy:o,orderBy:i.accessor,order:i.by,search:c}),{headers:{"X-WP-Nonce":v}}]}),[o,i,c,u,f,p,v,s.Ln]),m=(0,Oe.useMemo)((function(){return[(0,s.Ln)("".concat(p,"/stats"),{search:c}),{headers:{"X-WP-Nonce":v}}]}),[c,p,v,s.Ln]),d=(0,l.ZP)(h,s.SG),y=d.data,g=d.mutate,b=(0,s.Fq)(y,[],!0),w=b.busy,E=b.data,R=b.total,x=b.error;(0,Oe.useEffect)((function(){a({type:ot,mutateEntries:g})}),[g]),(0,Oe.useEffect)((function(){a({type:w?Xe:et})}),[w]),(0,Oe.useEffect)((function(){a({type:tt,entries:E})}),[E]),(0,Oe.useEffect)((function(){a({type:Ve,total:R})}),[R]),(0,Oe.useEffect)((function(){a({type:at,apiError:x})}),[x]);var _=(0,l.ZP)(m,s.SG),k=_.data,L=_.mutate,S=(0,s.Fq)(k,Ze,!0),O=S.busy,P=S.data,T=S.error;return(0,Oe.useEffect)((function(){a({type:it,mutateStats:L})}),[L]),(0,Oe.useEffect)((function(){a({type:O?Xe:et})}),[O]),(0,Oe.useEffect)((function(){a({type:nt,stats:P})}),[P]),(0,Oe.useEffect)((function(){a({type:at,apiError:T})}),[T]),React.createElement(lt.Provider,{value:[n,a]},t)},ut=function(){var e={},t=Te((0,Oe.useContext)(lt),2),r=t[0],n=t[1];return e.setSelectedItems=function(e){n({type:rt,selectedItems:e})},e.setStatus=function(e){n({type:$e,status:e})},e.updateOption=function(){var e=De(Ne().mark((function e(t,a){var o,i;return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n({type:Xe}),o=Ce(Ce({},r.options),{},Ie({},a,t)),e.prev=2,e.next=5,(0,s.ZL)("".concat(p,"/update_options"),{json:{options:o},nonce:v});case 5:(i=e.sent).success&&n({type:Je,options:i.options}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),e.t0.message&&alert(e.t0.message);case 12:return e.prev=12,n({type:et}),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[2,9,12,15]])})));return function(t,r){return e.apply(this,arguments)}}(),e.setPage=function(e){n({type:Ue,page:e})},e.setLimit=function(e){n({type:Ye,limit:e})},e.setFilter=function(e){n({type:Qe,filter:e})},e.setSort=function(e){n({type:We,sort:e})},e.setSearch=function(e){n({type:He,search:e})},e.toggleModal=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;n({type:Ke,modal:e,enable:t})},e.pushBusy=function(){n({type:Xe})},e.popBusy=function(){n({type:et})},Ce(Ce({},r),e)},ft={borderLeft:"4px solid #007bba"},ht={borderLeft:"4px solid #f1ad31"},pt={borderLeft:"4px solid #d85960"},mt=function(){var e=ut(),t=e.hideWarning,r=e.method,n=e.content,a=e.mediaLibrary,o=g.incompatible_plugins,i=React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"secondary",onClick:function(){return window.open("https://meowapps.com/plugin/media-cleaner/","_blank")}},"Get the Pro Version"),React.createElement(s._Z,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-cleaner-tutorial/","_blank")}},"Read the tutorial"));return React.createElement(React.Fragment,null,"media"===r&&!n&&React.createElement(s.Hq,{style:ft},React.createElement(s.O9,{p:!0,style:{fontSize:15}},"Media Cleaner will scan your Media Library for broken entries.")),"media"===r&&n&&React.createElement(s.Hq,{style:ft},React.createElement(s.O9,{p:!0,style:{fontSize:15}},"Media Cleaner will scan your Media Library for entries which aren't used in your content.")),"files"===r&&n&&a&&React.createElement(s.Hq,{style:ft},React.createElement(s.O9,{p:!0,style:{fontSize:15}},"Media Cleaner will scan your physical directories for files which are not registered in the Media Library or not used directly in your content.")),"files"===r&&!n&&a&&React.createElement(s.Hq,{style:ft},React.createElement(s.O9,{p:!0,style:{fontSize:15}},"Media Cleaner will scan your physical directories for files which are not registered in the Media Library.")),"files"===r&&!n&&!a&&React.createElement(s.Hq,{style:ft},React.createElement(s.O9,{p:!0,style:{fontSize:15}},"Media Cleaner will return all the files from your physical directories, without checking if the files are used or not.")),!t&&React.createElement(s.Hq,{style:ht},React.createElement(s.O9,{p:!0},React.createElement("p",null,React.createElement("b",null,React.createElement("span",{style:{color:"red"}},"This is important.")," Backup your DB and your /uploads directory before using Media Cleaner.")," The deleted files will be temporarily moved to the ",React.createElement("i",null,"uploads/wpmc-trash")," directory. After testing your site, you can check the ",React.createElement("i",null,"Trash")," in order to empty it or to recover your files. That said, you still must have a backup! If you don't know how, give a try to this: ",React.createElement("a",{href:"http://meow.click/blogvault",target:"_blank"},"BlogVault"),"."),React.createElement("p",null,React.createElement("b",null,React.createElement("span",{style:{color:"red"}},"Please be considerate.")," Don't blame Media Cleaner if it deleted too many (or not enough) of your files.")," WordPress being a very dynamic and pluggable system, it is impossible to predict all the situations in which your files are used. Please do not post a bad review because it broke your install; if you have a proper backup, there is no risk! You can disable this big warning in the options if you have the Pro Version. Read this warning twice. Media Cleaner is awesome and constantly gets better so I sincerely hope you will enjoy it. Thank you :)"))),!y&&React.createElement(s.Hq,{footer:i},React.createElement(s.O9,{p:!0},"You must ",React.createElement("b",null,"backup the uploads folder and DB")," before using the Cleaner. If you don't know how, give a try to ",React.createElement("a",{target:"_blank",href:"https://meow.click/blogvault"},"BlogVault"),". It is also highly recommanded to read the tutorial. Last but not least, check the ",React.createElement("b",null,"Pro Version"),", as it adds many features and also supports the development. This message is only displayed in the free version. Thank you!")),o&&o.length>0&&React.createElement(s.Hq,{style:pt},React.createElement(s.O9,{p:!0,style:{fontSize:15}},React.createElement("p",null,"Important note about the following plugin(s) which you are using:"),React.createElement("ul",null,o.map((function(e){return React.createElement("li",null,"- ",e)}))),React.createElement("p",null,"They require additional checks which are only implemented in ",React.createElement("a",{target:"_blank",href:"//meowapps.com/plugin/media-cleaner"},"Media Cleaner Pro"),"."))))},dt=function(e){return new Promise((function(t){return setTimeout(t,e)}))};function yt(e){return function(e){if(Array.isArray(e))return vt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return vt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var gt=wp.element,bt=gt.useMemo,wt=gt.useCallback;function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function Rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Pt(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw o}}}}function _t(e){return function(e){if(Array.isArray(e))return Tt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Pt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kt(){kt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function h(){}function p(){}var m={};c(m,a,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==t&&r.call(y,a)&&(m=y);var v=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==Et(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function _(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,c(v,"constructor",p),c(p,"constructor",h),h.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(v),c(v,i,"Generator"),c(v,a,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=_,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function Lt(e,t,r,n,a,o,i){try{var c=e[o](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,a)}function St(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Lt(o,n,a,i,c,"next",e)}function c(e){Lt(o,n,a,i,c,"throw",e)}i(void 0)}))}}function Ot(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}(e,t)||Pt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pt(e,t){if(e){if("string"==typeof e)return Tt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tt(e,t):void 0}}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var jt=wp.element,At=jt.useState,Ct=jt.useEffect,It=jt.useMemo,Nt=[{id:"media",value:"media",label:"Media Library",requirePro:!1},{id:"files",value:"files",label:"Filesystem",requirePro:!y}],Mt={width:40,height:40,objectFit:"cover"},Dt={NO_CONTENT:"Not found in content",ORPHAN_MEDIA:"Not attached file",ORPHAN_FILE:"Not in library",ORPHAN_RETINA:"Orphan @2x",ORPHAN_WEBP:"Orphan WebP"},Ft=function(){var e,t,r,n,a,o,i,c,l,u=ut(),f=u.apiErrors,h=u.busy,m=u.selectedItems,d=u.entries,y=u.stats,g=u.total,b=u.filterBy,w=u.search,E=(u.hideWarning,u.status),R=u.sort,x=u.page,_=u.limit,k=u.method,L=u.content,S=u.mediaLibrary,O=u.hideThumbnails,P=u.postsBuffer,T=(u.skipTrash,u.mediasBuffer),j=u.analysisBuffer,A=u.fileOpBuffer,C=u.delay,I=u.modals,N=ut(),M=N.setSelectedItems,D=N.setSearch,F=N.setStatus,B=N.setSort,Z=N.setPage,G=N.setLimit,z=N.setFilter,q=N.mutateEntries,U=N.mutateStats,Y=N.pushBusy,Q=N.popBusy,W=N.toggleModal,H=N.updateOption,V=(t={pressShift:(0,s.vU)().pressShift,list:d,selectedList:m,setSelectedList:M},n=t.list,a=t.selectedList,o=t.setSelectedList,c=void 0===(i=t.key)?"id":i,l=bt((function(){if(!r||!a.length)return null;var e=a[a.length-1];return n.findIndex((function(t){return t[c]===e}))}),[r=t.pressShift]),{onSelect:wt((function(e){if(null!==l){var t=e[0],r=n.findIndex((function(e){return e[c]===t})),i=(l<r?l:r)+1,s=l<r?r:l,u=n.slice(i,s).map((function(e){return e[c]})).filter((function(e){return!a.some((function(t){return t===e}))}));o([].concat(yt(a),yt(u),yt(e)))}else o([].concat(yt(a),yt(e)))}),[a,l,n])}).onSelect,$=Ot(At(1),2),J=$[0],K=$[1],X=Ot(At(1),2),ee=X[0],te=X[1],re=Ot(At(""),2),ne=re[0],ae=re[1],oe=(0,s.qj)(),ie=It((function(){return d.map((function(e){var t="_blank",r="trash"===b?e.image_url:"/wp-admin/post.php?post=".concat(e.postId,"&action=edit");return{id:e.id,thumbnail_url:React.createElement(React.Fragment,null,"ORPHAN_MEDIA"!==e.issue&&React.createElement("a",{href:e.image_url,title:"Open Image",target:t},React.createElement("img",{src:e.thumbnail_url,style:Mt}))),type:React.createElement("span",null,0==e.type&&"Filesystem",1==e.type&&React.createElement("a",{href:r,target:t},"ID ",e.postId)),path:React.createElement("div",{style:{display:"flex",flexDirection:"column"}},e.title&&React.createElement("a",{href:r,target:t},React.createElement("span",null,e.title)),React.createElement("span",null,e.path)),issue:React.createElement("span",null,Dt[e.issue]?Dt[e.issue]:e.issue),size:React.createElement("span",null,(e.size/1e3).toFixed(2)," KB")}}))}),[d]),ce=[{accessor:"type",title:"Origin",sortable:!0},{accessor:"path",title:"Title & Path",sortable:!0},{accessor:"issue",title:"Issue",sortable:!0},{accessor:"size",title:"Size",sortable:!0}];O||ce.unshift({accessor:"thumbnail_url",title:"",style:{width:16}}),Ct((function(){M([]),B(),Z(1)}),[b]);var le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(e=null!==e?e:oe.getErrorCount())>0&&ae("The process has finished, but ".concat(e," error(s) occurred.")),oe.reset(),M([]),q(),U()},se=function(){var e=St(kt().mark((function e(t){var r,n,a=arguments;return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:null,e.next=3,(0,s.ZL)("".concat(p,"/all_ids"),{json:{source:t,search:r},nonce:v});case 3:if((n=e.sent).success){e.next=7;break}return alert(n.message),e.abrupt("return",[]);case 7:return e.abrupt("return",n.data);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e=St(kt().mark((function e(t){var r;return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(C>0)){e.next=3;break}return e.next=3,dt(C);case 3:return e.next=5,(0,s.ZL)("".concat(p,"/count"),{json:{source:t},nonce:v});case 5:return r=e.sent,e.abrupt("return",r.data);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=St(kt().mark((function e(){var t,r,n,a,o,i,c=arguments;return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c.length>0&&void 0!==c[0]?c[0]:null,r=c.length>1&&void 0!==c[1]&&c[1],n=c.length>2&&void 0!==c[2]?c[2]:null,F("Getting IDs..."),Y(),!t){e.next=9;break}e.t0=t,e.next=12;break;case 9:return e.next=11,se(r?"trash":"issues",n);case 11:e.t0=e.sent;case 12:if(!(a=e.t0)){e.next=20;break}return F(r?"Emptying...":"Deleting..."),o=(0,s.wr)(a,A),i=o.map((function(e){return function(){var t=St(kt().mark((function t(r){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,dt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/delete"),{json:{entryIds:e},signal:r,nonce:v});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=19,oe.start(i);case 19:le();case 20:Q(),F();case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),he=function(){var e=St(kt().mark((function e(){var t,r,n,a,o=arguments;return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.length>0&&void 0!==o[0]?o[0]:null,F("Getting IDs..."),Y(),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,se("trash");case 9:e.t0=e.sent;case 10:if(!(r=e.t0)){e.next=17;break}return n=(0,s.wr)(r,A),a=n.map((function(e){return function(){var t=St(kt().mark((function t(r){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(F("Recovering..."),!(C>0)){t.next=4;break}return t.next=4,dt(C);case 4:return t.next=6,(0,s.ZL)("".concat(p,"/recover"),{json:{entryIds:e},signal:r,nonce:v});case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=16,oe.start(a);case 16:le();case 17:Q(),F();case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pe=function(){var e=St(kt().mark((function e(){var t,r,n,a,o,i=arguments;return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(i.length>0&&void 0!==i[0])||i[0],r=i.length>1&&void 0!==i[1]?i[1]:null,F("Getting IDs..."),Y(),!r){e.next=8;break}e.t0=r,e.next=11;break;case 8:return e.next=10,se("issues");case 10:e.t0=e.sent;case 11:if(!(n=e.t0)){e.next=19;break}return F("".concat(t?"Ignoring...":"Undoing...")),a=(0,s.wr)(n,j),o=a.map((function(e){return function(){var r=St(kt().mark((function r(n){return kt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(C>0)){r.next=3;break}return r.next=3,dt(C);case 3:return r.next=5,(0,s.ZL)("".concat(p,"/set_ignore"),{json:{entryIds:e,ignore:t},signal:n,nonce:v});case 5:return r.abrupt("return",r.sent);case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()})),e.next=18,oe.start(o);case 18:le();case 19:Q(),F();case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),me=function(){var e=St(kt().mark((function e(t){return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:H(t,"posts_per_page");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),de=function(){var e=St(kt().mark((function e(){return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:oe.stop();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=function(){de(),le(),Q(),F()},ve=function(){var e=St(kt().mark((function e(){var t,r,n,a,o,i,c,l,u,f,h,m,d,y,g,b,w;return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=0,Y(),M([]),K(1),te(3+(L?1:0)+("files"===k&&S?1:0)),F("Resetting issues..."),e.next=8,(0,s.ZL)("".concat(p,"/reset_issues"),{nonce:v});case 8:if(K((function(e){return e+1})),!L){e.next=22;break}return F("Extract from content..."),e.next=13,ue("posts");case 13:for(r=e.sent,n=[],a=0;a<r;a+=P)n.push(a);return o=n.map((function(e){return function(){var t=St(kt().mark((function t(r){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,dt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/extract_references"),{json:{source:"content",limit:e},signal:r,nonce:v});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=19,oe.start(o);case 19:t+=oe.getErrorCount(),oe.reset(),K((function(e){return e+1}));case 22:if("files"!==k||!S){e.next=35;break}return F("Extract from library..."),e.next=26,ue("medias");case 26:for(i=e.sent,c=[],l=0;l<i;l+=P)c.push(l);return u=c.map((function(e){return function(){var t=St(kt().mark((function t(r){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,dt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/extract_references"),{json:{source:"media",limit:e},signal:r,nonce:v});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=32,oe.start(u);case 32:oe.reset(),t+=oe.getErrorCount(),K((function(e){return e+1}));case 35:if(f=[],"media"!==k){e.next=51;break}return F("Listing media..."),e.next=40,ue("medias");case 40:for(h=e.sent,m=[],d=0;d<h;d+=T)m.push(d);return y=m.map((function(e){return function(){var t=St(kt().mark((function t(r){var n;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,dt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/retrieve_medias"),{json:{limit:e},signal:r,nonce:v});case 5:return(n=t.sent).data&&(f=[].concat(_t(f),_t(n.data.results))),t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=46,oe.start(y);case 46:oe.reset(),t+=oe.getErrorCount(),K((function(e){return e+1})),e.next=62;break;case 51:if("files"!==k){e.next=61;break}return F("Listing files..."),g=function(){var e=St(kt().mark((function e(t,r){var n,a,o,i,c;return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.ZL)("".concat(p,"/retrieve_files"),{json:{path:t},signal:r,nonce:v});case 2:n=e.sent,a=n.data,o=xt(a.results);try{for(c=function(){var e=i.value;"dir"===e.type?oe.addTask(St(kt().mark((function t(){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(e.path,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))):f.push(e.path)},o.s();!(i=o.n()).done;)c()}catch(e){o.e(e)}finally{o.f()}return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),e.next=56,oe.start([function(){var e=St(kt().mark((function e(t){return kt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g("",t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()]);case 56:oe.reset(),t+=oe.getErrorCount(),K((function(e){return e+1})),e.next=62;break;case 61:alert("This method is not known!");case 62:if(!f){e.next=69;break}return F("Matching with content..."),b=(0,s.wr)(f,j),w=b.map((function(e){return function(){var t=St(kt().mark((function t(r){return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(C>0)){t.next=3;break}return t.next=3,dt(C);case 3:return t.next=5,(0,s.ZL)("".concat(p,"/check_targets"),{json:{method:k,targets:e},signal:r,nonce:v});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=68,oe.start(w);case 68:t+=oe.getErrorCount();case 69:le(t),Q(),F();case 72:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return React.createElement(s.si,{nekoErrors:[f]},React.createElement(s.BP,{title:"Media Cleaner | Dashboard",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(s._Z,{className:"header",onClick:function(){return window.open("https://meowapps.com/media-cleaner-tutorial/","_blank")}},"Tutorial"),React.createElement(s._Z,{icon:"cog",className:"header",onClick:function(){return location.href="admin.php?page=wpmc_settings"}},"Settings"))),React.createElement(s.oY,null,React.createElement(s.zc,{full:!0},React.createElement(mt,null),React.createElement(s.P$,null,!m.length&&React.createElement(React.Fragment,null,React.createElement(s._Z,{icon:"play",disabled:h,onClick:function(){return ve()}},"Scan"),!E&&React.createElement(s.Np,{id:"method",scrolldown:!0,disabled:h,name:"method",style:{width:200},onChange:H,value:k},Nt.map((function(e){return React.createElement(s.ZB,{key:e.id,id:e.id,value:e.value,label:e.label,requirePro:e.requirePro})})))),m.length>0&&React.createElement(s._Z,{disabled:h,onClick:function(){return M([])}},"Unselect All"),E&&React.createElement("div",{style:(e={display:"flex",fontFamily:"Lato",padding:"0 10px",flexDirection:"column",fontWeight:600,width:200},Rt(e,"flexDirection","column"),Rt(e,"height",30),Rt(e,"lineHeight","16px"),Rt(e,"justifyContent","center"),Rt(e,"textTransform","uppercase"),e)},React.createElement("div",{style:{color:"#144675",fontSize:17}},"STEP ".concat(J,"/").concat(ee)),React.createElement("div",{style:{color:"#007bba"}},E)),!h&&"issues"===b&&m.length>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"secondary",onClick:function(){return pe(!0,m)}},"Ignore ",React.createElement("strong",null,m.length)," entries"),React.createElement(s._Z,{className:"danger",onClick:function(){return fe(m)}},"Delete ",React.createElement("strong",null,m.length)," entries")),!h&&"ignored"===b&&m.length>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"secondary",onClick:function(){return pe(!1,m)}},"Undo ",React.createElement("strong",null,m.length)," entries")),!h&&"trash"===b&&m.length>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{icon:"delete",className:"secondary",onClick:function(){return he(m)}},"Recover ",React.createElement("strong",null,m.length)," entries")),React.createElement("div",{style:{flex:1}},E&&React.createElement(s.UJ,{status:function(e){return"".concat(oe.max?"".concat(e,"%"):"+=")},busy:oe.busy,value:oe.value,max:oe.max,onStopClick:oe.stop})),!h&&React.createElement(React.Fragment,null,React.createElement(s.Ay,{onBlur:function(e){D(e)},onEnter:function(e){D(e)},value:w,onReset:function(){D("")}}),!w&&React.createElement(s.JH,{icon:"search",width:24,style:{position:"relative",left:-34,marginRight:-22},color:"#5a5a5a82"})),!h&&"issues"===b&&y.issues>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{icon:"delete",className:"danger",onClick:function(){return W("deleteAll")}},"Delete ",React.createElement("strong",null,"All"))),!h&&"trash"===b&&y.trash>0&&React.createElement(React.Fragment,null,React.createElement(s._Z,{className:"primary",onClick:function(){return W("recoverAll")}},"Recover ",React.createElement("strong",null,"All")),React.createElement(s._Z,{icon:"delete",className:"danger",onClick:function(){return W("trashAll")}},"Empty Trash"))),React.createElement("p",null,"There are ",React.createElement("b",null,y.issues," issue",y.issues>1?"s":"")," with your files, accounting for ",React.createElement("b",null,(y.issues_size/1e6).toFixed(2)," MB"),". Your trash contains ",React.createElement("b",null,(y.trash_size/1e6).toFixed(2)," MB"),"."),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10}},React.createElement(s.h,{value:b,busy:h,onChange:function(e){z(e),Z(1)}},React.createElement(s.Sx,{title:"Issues",value:"issues",count:y.issues}),React.createElement(s.Sx,{title:"Ignored",value:"ignored",count:y.ignored}),React.createElement(s.Sx,{title:"Trash",value:"trash",count:y.trash})),React.createElement(s.Qo,{currentPage:x,limit:_,total:g,onClick:function(e){return Z(e)}})),React.createElement(s.aR,{busy:h,data:ie,columns:ce,sort:R,onSortChange:function(e,t){B({accessor:e,by:t})},onSelect:function(e){V(e)},onUnselect:function(e){M(_t(m.filter((function(t){return!e.includes(t)}))))},selectedItems:m,emptyMessage:React.createElement(React.Fragment,null,"It's all clean & nice here! 👍",React.createElement("br",null),"Why not trying to give a boost to your database with ",React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/database-cleaner/"},"Database Cleaner"),"? 😌")}),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10}},React.createElement(s.Np,{scrolldown:!0,value:_,onChange:function(e){G(e),Z(1),me(e)}},React.createElement(s.ZB,{value:5,label:"5 items / page"}),React.createElement(s.ZB,{value:10,label:"10 items / page"}),React.createElement(s.ZB,{value:25,label:"25 items / page"}),React.createElement(s.ZB,{value:50,label:"50 items / page"}),React.createElement(s.ZB,{value:100,label:"100 items / page"}),React.createElement(s.ZB,{value:250,label:"250 items / page"}),React.createElement(s.ZB,{value:500,label:"500 items / page"}),React.createElement(s.ZB,{value:1e3,label:"1000 items / page"})),React.createElement(s.Qo,{currentPage:x,limit:_,total:g,onClick:function(e){return Z(e)}}))),React.createElement(s.LI,{isOpen:I.deleteAll,onRequestClose:function(){return W("deleteAll",!1)},title:"Delete All",content:React.createElement("span",null,"If you continue, ",React.createElement("b",null,g," issue",g<2?"":"s"," will be deleted"),". Make absolutely sure you have a backup of your site."),onOkClick:function(){W("deleteAll",!1),fe(null,!1,w)},onCancelClick:function(){W("deleteAll",!1)}}),React.createElement(s.LI,{isOpen:I.trashAll,onRequestClose:function(){return W("trashAll",!1)},title:"Delete All",content:React.createElement("span",null,"If you continue, ",React.createElement("b",null,"the trash will be entirely emptied"),". Make absolutely sure you have a backup of your site."),onOkClick:function(){W("trashAll",!1),fe(null,!0)},onCancelClick:function(){W("trashAll",!1)}}),React.createElement(s.LI,{isOpen:I.recoverAll,onRequestClose:function(){return W("recoverAll",!1)},title:"Recover All",content:"Are you sure you really want to recover all the files from the trash?",onOkClick:function(){W("recoverAll",!1),he()},onCancelClick:function(){W("recoverAll",!1)}}),React.createElement(s.LI,{isOpen:oe.error,onRequestClose:ye,title:"Error",content:React.createElement(React.Fragment,null,React.createElement("b",null,oe.error?oe.error.message:"N/A"),React.createElement("p",null)),customButtons:React.createElement("div",{style:{display:"flex",width:"100%",flexDirection:"column"}},React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(s._Z,{className:"primary",onClick:function(){oe.retry()}},"Retry"),React.createElement("small",{style:{marginLeft:5}},React.createElement("a",{href:"#",onClick:function(){oe.autoRetry(10)}},"AUTO RETRY")),React.createElement("div",{style:{flex:"auto"}}),React.createElement(s._Z,{className:"secondary",onClick:function(){oe.resume()}},"Skip"),React.createElement("small",{style:{marginLeft:5,marginRight:10}},React.createElement("a",{href:"#",onClick:function(){oe.setAlwaysSkip(),oe.resume()}},"ALWAYS SKIP")),React.createElement(s._Z,{className:"danger",onClick:ye},"Stop")),React.createElement("small",{style:{marginTop:10,lineHeight:"13px"}},"AUTO RETRY will retry the actions up to 10 times. At every retry, it will increase the delay (in order to avoid timeouts). Skipping errors is not recommended at all as it will result in a lot of false-positives. Check your browser console for more information."))}),React.createElement(s.LI,{isOpen:ne,title:"Finished",ok:"Close",content:ne,onOkClick:function(){ae(""),oe.reset()}})))},Bt=wp.element.render,Zt={fetcher:s.SG,revalidateOnFocus:!1};document.addEventListener("DOMContentLoaded",(function(e){var t=document.getElementById("wpmc-admin-settings");t&&Bt(React.createElement(l.J$,{value:Zt},React.createElement(Se,null)),t),(t=document.getElementById("wpmc-dashboard"))&&Bt(React.createElement(l.J$,{value:Zt},React.createElement(st,null,React.createElement(Ft,null))),t)}))},9714:function(e,t,r){r.d(t,{Ay:function(){return h.A},BP:function(){return d.B},CA:function(){return E.C},Fq:function(){return L.Fq},Ge:function(){return E.G},Hq:function(){return c.H},JH:function(){return v.J},LI:function(){return R.L},Ln:function(){return S.Ln},Np:function(){return p.N},O9:function(){return g.O},P$:function(){return k.P},PQ:function(){return u.P},Ps:function(){return _.P},Qo:function(){return y.Q},SG:function(){return S.SG},Sx:function(){return b.S},UJ:function(){return m.U},ZB:function(){return p.Z},ZL:function(){return S.ZL},_Z:function(){return a._},_h:function(){return w._},aR:function(){return x.a},c4:function(){return _.c},h:function(){return b.h},lQ:function(){return f.l},oY:function(){return s.o},qj:function(){return L.qj},rR:function(){return l.r},si:function(){return o.s},vU:function(){return L.vU},vg:function(){return n.Z},vj:function(){return i.v},wr:function(){return S.wr},zc:function(){return s.z}});var n=r(5833),a=r(7818),o=(r(6071),r(1254)),i=r(537),c=r(9137),l=r(749),s=(r(3534),r(5979)),u=r(4694),f=r(1630),h=r(1492),p=(r(3895),r(3565)),m=(r(5235),r(9378),r(9422),r(4696),r(8725),r(8281)),d=r(7172),y=r(776),v=r(8972),g=r(6160),b=r(3103),w=r(8406),E=r(3506),R=(r(7198),r(2625),r(8519),r(5307),r(3545),r(1203)),x=(r(858),r(3676)),_=r(1488),k=(r(8263),r(5231)),L=(r(9995),r(4291)),S=r(9967)},7363:function(e){e.exports=React},1533:function(e){e.exports=ReactDOM}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.m=t,n.amdO={},e=[],n.O=function(t,r,a,o){if(!r){var i=1/0;for(u=0;u<e.length;u++){r=e[u][0],a=e[u][1],o=e[u][2];for(var c=!0,l=0;l<r.length;l++)(!1&o||i>=o)&&Object.keys(n.O).every((function(e){return n.O[e](r[l])}))?r.splice(l--,1):(c=!1,o<i&&(i=o));if(c){e.splice(u--,1);var s=a();void 0!==s&&(t=s)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={826:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var a,o,i=r[0],c=r[1],l=r[2],s=0;if(i.some((function(t){return 0!==e[t]}))){for(a in c)n.o(c,a)&&(n.m[a]=c[a]);if(l)var u=l(n)}for(t&&t(r);s<i.length;s++)o=i[s],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(u)},r=self.wpJsonWpmc=self.wpJsonWpmc||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var a=n.O(void 0,[736],(function(){return n(9287)}));a=n.O(a)}();
3
  //# sourceMappingURL=index.js.map
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://meowapps.com/donation/
5
  Requires at least: 5.0
6
  Tested up to: 6.0.1
7
  Requires PHP: 7.0
8
- Stable tag: 6.4.7
9
 
10
  Clean your WordPress from unused files, broken media entries. Powerful engine and beautiful UI!
11
 
@@ -84,9 +84,12 @@ To make everything perfect, you will also need to clean and optimize your databa
84
 
85
  == Changelog ==
86
 
 
 
 
 
87
  = 6.4.7 (2022/10/10) =
88
  * Add: Fixed a potential issue while scanning the widgets.
89
- * Note: Please try my new [Database Cleaner](https://wordpress.org/plugins/database-cleaner/)! You'll love it.
90
 
91
  = 6.4.6 (2022/09/27) =
92
  * Add: Option to skip trash.
5
  Requires at least: 5.0
6
  Tested up to: 6.0.1
7
  Requires PHP: 7.0
8
+ Stable tag: 6.4.8
9
 
10
  Clean your WordPress from unused files, broken media entries. Powerful engine and beautiful UI!
11
 
84
 
85
  == Changelog ==
86
 
87
+ = 6.4.8 (2022/10/24) =
88
+ * Fix: Improved (and fixed) the accuracy of the explanation displayed before the scan.
89
+ * Note: Please try my new [Database Cleaner](https://wordpress.org/plugins/database-cleaner/)! You'll love it!
90
+
91
  = 6.4.7 (2022/10/10) =
92
  * Add: Fixed a potential issue while scanning the widgets.
 
93
 
94
  = 6.4.6 (2022/09/27) =
95
  * Add: Option to skip trash.