function asyncGeneratorStep(B,x,N,M,J,G,E){try{var K=B[G](E),F=K.value}catch(O){N(O);return}K.done?x(F):Promise.resolve(F).then(M,J)}function _asyncToGenerator(B){return function(){var x=this,N=arguments;return new Promise(function(M,J){function G(F){asyncGeneratorStep(K,M,J,G,E,"next",F)}function E(F){asyncGeneratorStep(K,M,J,G,E,"throw",F)}var K=B.apply(x,N);G(void 0)})}}
function _typeof(B){_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(x){return typeof x}:function(x){return x&&"function"===typeof Symbol&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x};return _typeof(B)}var _regenerator;
(function(){var B=function(x){function N(a,b,d,n){b=Object.create((b&&b.prototype instanceof J?b:J).prototype);n=new P(n||[]);b._invoke=O(a,d,n);return b}function M(a,b,d){try{return{type:"normal",arg:a.call(b,d)}}catch(n){return{type:"throw",arg:n}}}function J(){}function G(){}function E(){}function K(a){["next","throw","return"].forEach(function(b){a[b]=function(d){return this._invoke(b,d)}})}function F(a,b){function d(e,t,v,z){e=M(a[e],a,t);if("throw"===e.type)z(e.arg);else{var w=e.arg;return(e=
w.value)&&"object"===_typeof(e)&&D.call(e,"__await")?b.resolve(e.__await).then(function(y){d("next",y,v,z)},function(y){d("throw",y,v,z)}):b.resolve(e).then(function(y){w.value=y;v(w)},function(y){return d("throw",y,v,z)})}}var n;this._invoke=function(e,t){function v(){return new b(function(z,w){d(e,t,z,w)})}return n=n?n.then(v,v):v()}}function O(a,b,d){var n=m;return function(e,t){if(n===p)throw Error("Generator is already running");if(n===c){if("throw"===e)throw t;return S()}d.method=e;for(d.arg=
t;;){if(e=d.delegate)if(e=T(e,d)){if(e===g)continue;return e}if("next"===d.method)d.sent=d._sent=d.arg;else if("throw"===d.method){if(n===m)throw n=c,d.arg;d.dispatchException(d.arg)}else"return"===d.method&&d.abrupt("return",d.arg);n=p;e=M(a,b,d);if("normal"===e.type){n=d.done?c:l;if(e.arg===g)continue;return{value:e.arg,done:d.done}}"throw"===e.type&&(n=c,d.method="throw",d.arg=e.arg)}}}function T(a,b){var d=a.iterator[b.method];if(d===H){b.delegate=null;if("throw"===b.method){if(a.iterator["return"]&&
(b.method="return",b.arg=H,T(a,b),"throw"===b.method))return g;b.method="throw";b.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}d=M(d,a.iterator,b.arg);if("throw"===d.type)return b.method="throw",b.arg=d.arg,b.delegate=null,g;d=d.arg;if(!d)return b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,g;if(d.done)b[a.resultName]=d.value,b.next=a.nextLoc,"return"!==b.method&&(b.method="next",b.arg=H);else return d;b.delegate=null;return g}
function U(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]);2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]);this.tryEntries.push(b)}function Q(a){var b=a.completion||{};b.type="normal";delete b.arg;a.completion=b}function P(a){this.tryEntries=[{tryLoc:"root"}];a.forEach(U,this);this.reset(!0)}function R(a){if(a){var b=a[q];if(b)return b.call(a);if("function"===typeof a.next)return a;if(!isNaN(a.length)){var d=-1;b=function e(){for(;++d<a.length;)if(D.call(a,d))return e.value=a[d],e.done=!1,e;e.value=
H;e.done=!0;return e};return b.next=b}}return{next:S}}function S(){return{value:H,done:!0}}var V=Object.prototype,D=V.hasOwnProperty,H,u="function"===typeof Symbol?Symbol:{},q=u.iterator||"@@iterator",r=u.asyncIterator||"@@asyncIterator",k=u.toStringTag||"@@toStringTag";x.wrap=N;var m="suspendedStart",l="suspendedYield",p="executing",c="completed",g={};u={};u[q]=function(){return this};var f=Object.getPrototypeOf;(f=f&&f(f(R([]))))&&f!==V&&D.call(f,q)&&(u=f);var h=E.prototype=J.prototype=Object.create(u);
G.prototype=h.constructor=E;E.constructor=G;E[k]=G.displayName="GeneratorFunction";x.isGeneratorFunction=function(a){return(a="function"===typeof a&&a.constructor)?a===G||"GeneratorFunction"===(a.displayName||a.name):!1};x.mark=function(a){Object.setPrototypeOf?Object.setPrototypeOf(a,E):(a.__proto__=E,k in a||(a[k]="GeneratorFunction"));a.prototype=Object.create(h);return a};x.awrap=function(a){return{__await:a}};K(F.prototype);F.prototype[r]=function(){return this};x.AsyncIterator=F;x.async=function(a,
b,d,n,e){void 0===e&&(e=Promise);var t=new F(N(a,b,d,n),e);return x.isGeneratorFunction(b)?t:t.next().then(function(v){return v.done?v.value:t.next()})};K(h);h[k]="Generator";h[q]=function(){return this};h.toString=function(){return"[object Generator]"};x.keys=function(a){var b=[],d;for(d in a)b.push(d);b.reverse();return function e(){for(;b.length;){var t=b.pop();if(t in a)return e.value=t,e.done=!1,e}e.done=!0;return e}};x.values=R;P.prototype={constructor:P,reset:function(a){this.next=this.prev=
0;this.sent=this._sent=H;this.done=!1;this.delegate=null;this.method="next";this.arg=H;this.tryEntries.forEach(Q);if(!a)for(var b in this)"t"===b.charAt(0)&&D.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=H)},stop:function(){this.done=!0;var a=this.tryEntries[0].completion;if("throw"===a.type)throw a.arg;return this.rval},dispatchException:function(a){function b(w,y){t.type="throw";t.arg=a;d.next=w;y&&(d.method="next",d.arg=H);return!!y}if(this.done)throw a;for(var d=this,n=this.tryEntries.length-1;0<=
n;--n){var e=this.tryEntries[n],t=e.completion;if("root"===e.tryLoc)return b("end");if(e.tryLoc<=this.prev){var v=D.call(e,"catchLoc"),z=D.call(e,"finallyLoc");if(v&&z){if(this.prev<e.catchLoc)return b(e.catchLoc,!0);if(this.prev<e.finallyLoc)return b(e.finallyLoc)}else if(v){if(this.prev<e.catchLoc)return b(e.catchLoc,!0)}else if(z){if(this.prev<e.finallyLoc)return b(e.finallyLoc)}else throw Error("try statement without catch or finally");}}},abrupt:function(a,b){for(var d=this.tryEntries.length-
1;0<=d;--d){var n=this.tryEntries[d];if(n.tryLoc<=this.prev&&D.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var e=n;break}}e&&("break"===a||"continue"===a)&&e.tryLoc<=b&&b<=e.finallyLoc&&(e=null);d=e?e.completion:{};d.type=a;d.arg=b;return e?(this.method="next",this.next=e.finallyLoc,g):this.complete(d)},complete:function(a,b){if("throw"===a.type)throw a.arg;"break"===a.type||"continue"===a.type?this.next=a.arg:"return"===a.type?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):"normal"===
a.type&&b&&(this.next=b);return g},finish:function(a){for(var b=this.tryEntries.length-1;0<=b;--b){var d=this.tryEntries[b];if(d.finallyLoc===a)return this.complete(d.completion,d.afterLoc),Q(d),g}},"catch":function(a){for(var b=this.tryEntries.length-1;0<=b;--b){var d=this.tryEntries[b];if(d.tryLoc===a){a=d.completion;if("throw"===a.type){var n=a.arg;Q(d)}return n}}throw Error("illegal catch attempt");},delegateYield:function(a,b,d){this.delegate={iterator:R(a),resultName:b,nextLoc:d};"next"===this.method&&
(this.arg=H);return g}};return x}("object"===("undefined"===typeof module?"undefined":_typeof(module))?module.exports:{});try{_regenerator=B}catch(x){Function("r","_regenerator = r")(B)}})();
(function(){function B(u){var q=null;u==seraph_accel.Gen.hr.E_CONTEXT_EXPIRED?q=D("OpSrvCtxExpired","admin.Manage","seraphinite-accelerator"):seraph_accel.Gen.hr.Fail(u)&&(q=H(D("OpSrvErr_%1$08X","admin.Manage","seraphinite-accelerator"),u));return q}function x(){x=_asyncToGenerator(_regenerator.mark(function r(q){return _regenerator.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return jQuery(q).attr("disabled",!0),k.prev=1,k.next=4,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+
"LogClear",{}),type:"POST",data:"",dataType:"json",cache:!1});case 4:k.next=8;break;case 6:k.prev=6,k.t0=k["catch"](1);case 8:jQuery(q).attr("disabled",!1);case 9:case "end":return k.stop()}},r,this,[[1,6]])}));return x.apply(this,arguments)}function N(){N=_asyncToGenerator(_regenerator.mark(function k(q,r){var m,l,p,c,g,f;return _regenerator.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:m=jQuery(q.parentNode).closest(".blck").first();l=m.find(".seraph_accel_spinner");m.find(".content");p=
m.find('input[type="button"]:not(.cancel)');c=m.find('input[type="button"].cancel');if(!r){h.next=23;break}p.prop("disabled",!0);l.show();seraph_accel.Manager._int.notRefreshStat=!0;g=null;h.prev=10;h.next=13;return jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"UpdateStatBegin",{}),cache:!1,dataType:"json"});case 13:f=h.sent;seraph_accel.Gen.hr.Fail(f)&&(g=H(D("OpSrvErr_%1$08X","admin.Manage","seraphinite-accelerator"),f));h.next=20;break;case 17:h.prev=17,
h.t0=h["catch"](10),g="HTTP "+h.t0.status;case 20:return g&&(alert(g),p.prop("disabled",!1),l.hide()),delete seraph_accel.Manager._int.notRefreshStat,h.abrupt("return");case 23:return c.prop("disabled",!0),seraph_accel.Manager._int.notRefreshStat=!0,g=null,h.prev=26,h.next=29,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"UpdateStatCancel",{}),type:"POST",data:"",cache:!1,dataType:"json"});case 29:f=h.sent;g=B(f);h.next=37;break;case 33:h.prev=33,h.t1=h["catch"](26),
g="HTTP "+h.t1.status,c.prop("disabled",!1);case 37:g&&alert(g),delete seraph_accel.Manager._int.notRefreshStat;case 39:case "end":return h.stop()}},k,this,[[10,17],[26,33]])}));return N.apply(this,arguments)}function M(u){switch(u){case 0:return D("OpDescr_Invalidate","admin.Manage","seraphinite-accelerator");case 3:return D("OpDescr_CheckInvalidate","admin.Manage","seraphinite-accelerator");case 2:return D("OpDescr_Delete","admin.Manage","seraphinite-accelerator");case 10:return D("OpDescr_SrvDel",
"admin.Manage","seraphinite-accelerator")}return""+u}function J(){J=_asyncToGenerator(_regenerator.mark(function r(q){var k,m,l,p;return _regenerator.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return k=jQuery(q.parentNode).closest(".blck").first(),m=k.find('input[type="button"].cancel'),m.prop("disabled",!0),l=null,c.prev=4,c.next=7,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"PostUpdCancel",{}),type:"POST",data:"",cache:!1,dataType:"json"});case 7:p=
c.sent;l=B(p);c.next=14;break;case 11:c.prev=11,c.t0=c["catch"](4),l="HTTP "+c.t0.status;case 14:l&&alert(l);case 15:case "end":return c.stop()}},r,this,[[4,11]])}));return J.apply(this,arguments)}function G(){G=_asyncToGenerator(_regenerator.mark(function r(q){var k,m,l,p;return _regenerator.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return k=jQuery(q.parentNode).closest(".blck").first(),m=k.find('input[type="button"].cancel'),m.prop("disabled",!0),l=null,c.prev=4,c.next=7,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+
"ScheUpdCancel",{}),type:"POST",data:"",cache:!1,dataType:"json"});case 7:p=c.sent;l=B(p);c.next=14;break;case 11:c.prev=11,c.t0=c["catch"](4),l="HTTP "+c.t0.status;case 14:l&&alert(l);case 15:case "end":return c.stop()}},r,this,[[4,11]])}));return G.apply(this,arguments)}function E(){E=_asyncToGenerator(_regenerator.mark(function r(q){var k,m,l,p,c,g;return _regenerator.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return k=jQuery(q.parentNode).closest(".blck").first(),m=k.find(".seraph_accel_spinner"),
l=k.find('input[type="button"]:not(.cancel)'),p=k.find('input[type="button"].cancel'),m.show(),l.prop("disabled",!0),p.prop("disabled",!1),seraph_accel.Manager._int.notRefreshExtDp=!0,c=null,f.prev=9,f.next=12,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"ExtDbUpdBegin",{}),type:"POST",data:"",cache:!1,dataType:"json"});case 12:g=f.sent;c=B(g);f.next=19;break;case 16:f.prev=16,f.t0=f["catch"](9),c="HTTP "+f.t0.status;case 19:c&&alert(c),delete seraph_accel.Manager._int.notRefreshExtDp;
case 21:case "end":return f.stop()}},r,this,[[9,16]])}));return E.apply(this,arguments)}function K(){K=_asyncToGenerator(_regenerator.mark(function r(q){var k,m,l,p;return _regenerator.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return k=jQuery(q.parentNode).closest(".blck").first(),m=k.find('input[type="button"].cancel'),m.prop("disabled",!0),l=null,c.prev=4,c.next=7,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"ExtDbUpdCancel",{}),type:"POST",data:"",
cache:!1,dataType:"json"});case 7:p=c.sent;l=B(p);c.next=14;break;case 11:c.prev=11,c.t0=c["catch"](4),l="HTTP "+c.t0.status;case 14:l&&alert(l);case 15:case "end":return c.stop()}},r,this,[[4,11]])}));return K.apply(this,arguments)}function F(){F=_asyncToGenerator(_regenerator.mark(function m(q,r,k){var l,p,c,g,f,h,a,b,d,n,e,t,v,z,w,y;return _regenerator.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return l=jQuery(q.parentNode).closest(".blck").first(),p=l.find(".seraph_accel_spinner"),c=
l.find(".descr"),g=l.find('input[type="button"]:not(.cancel)'),f=l.find('input[type="button"].cancel'),h=l.find("#seraph_accel_views"),a=l.find("#seraph_accel_geos"),b=l.find("#seraph_accel_langs"),d=[],h.get()&&(seraph_accel.Ui.TokensMetaTree.Apply(h.get()),d=seraph_accel.Ui.TokensList.GetVal(h.get())),n=[],a.get()&&(seraph_accel.Ui.TokensMetaTree.Apply(a.get()),n=seraph_accel.Ui.TokensList.GetVal(a.get()).filter(function(I){return"_"!==I})),e=[],b.get()&&(seraph_accel.Ui.TokensMetaTree.Apply(b.get()),
e=seraph_accel.Ui.TokensList.GetVal(b.get())),v=String(l.find(".type").val()),"uri"===v?t=l.find(".uri").val():0===v.indexOf("uri:")&&(t=v.substr(4),v="uri"),t="string"==typeof t?seraph_accel.Gen.StrReplaceAll(t,["\r","\n","*"],["",";","{ASTRSK}"]):"",p.show(),c.show(),c.text(M(r)),g.prop("disabled",!0),f.prop("disabled",!1),seraph_accel.Manager._int.notRefreshOp=!0,z={cache:!1,dataType:"json"},512>t.length?z.url=seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"CacheOpBegin",
{type:v,op:r,uri:t,v:d.join(),g:n.length?n.join():void 0,l:e.length?e.join():void 0,_wpnonce:k}):(z.url=seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"CacheOpBegin",{type:v,op:r,v:d.join(),g:n.length?n.join():void 0,l:e.length?e.join():void 0,_wpnonce:k}),z.type="POST",z.contentType="application/x-www-form-urlencoded",z.data="uri="+encodeURIComponent(t)),w=null,A.prev=26,A.next=29,jQuery.ajax(z);case 29:y=A.sent;w=B(y);A.next=36;break;case 33:A.prev=33,A.t0=A["catch"](26),
w="HTTP "+A.t0.status;case 36:w&&alert(w),delete seraph_accel.Manager._int.notRefreshOp;case 38:case "end":return A.stop()}},m,this,[[26,33]])}));return F.apply(this,arguments)}function O(){O=_asyncToGenerator(_regenerator.mark(function m(q,r,k){var l,p,c,g;return _regenerator.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=jQuery(q.parentNode).closest(".blck").first(),p=l.find('input[type="button"].cancel'),p.prop("disabled",!0),c=null,f.prev=4,f.next=7,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+
"CacheOpCancel",{op:r,_wpnonce:k}),type:"POST",data:"",cache:!1,dataType:"json"});case 7:g=f.sent;c=B(g);f.next=14;break;case 11:f.prev=11,f.t0=f["catch"](4),c="HTTP "+f.t0.status;case 14:c&&alert(c);case 15:case "end":return f.stop()}},m,this,[[4,11]])}));return O.apply(this,arguments)}function T(){T=_asyncToGenerator(_regenerator.mark(function m(q,r,k){var l,p,c,g,f;return _regenerator.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return l=jQuery(q.parentNode).closest(".blck").first(),p=
l.find(".seraph_accel_spinner"),c=l.find('input[type="button"]'),p.show(),c.prop("disabled",!0),seraph_accel.Manager._int.notRefreshQueueDeleting=!0,g=null,h.prev=7,h.next=10,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"QueueDelete",{allSites:r?!0:void 0,_wpnonce:k}),type:"GET",cache:!1,dataType:"json"});case 10:f=h.sent;g=B(f);h.next=17;break;case 14:h.prev=14,h.t0=h["catch"](7),g="HTTP "+h.t0.status;case 17:g&&(alert(g),p.hide(),c.prop("disabled",!1)),
delete seraph_accel.Manager._int.notRefreshQueueDeleting;case 19:case "end":return h.stop()}},m,this,[[7,14]])}));return T.apply(this,arguments)}function U(){U=_asyncToGenerator(_regenerator.mark(function m(q,r,k){var l,p,c,g,f;return _regenerator.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return l=jQuery(q.parentNode).closest(".blck").first(),p=l.find(".seraph_accel_spinner"),c=l.find('input[type="button"]'),p.show(),c.prop("disabled",!0),seraph_accel.Manager._int.notRefreshQueueDeleting=
!0,g=null,h.prev=7,h.next=10,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"QueuePause",{v:r,_wpnonce:k}),type:"POST",cache:!1,dataType:"json"});case 10:f=h.sent;g=B(f);h.next=17;break;case 14:h.prev=14,h.t0=h["catch"](7),g="HTTP "+h.t0.status;case 17:g&&(alert(g),p.hide(),c.prop("disabled",!1)),delete seraph_accel.Manager._int.notRefreshQueueDeleting;case 19:case "end":return h.stop()}},m,this,[[7,14]])}));return U.apply(this,arguments)}function Q(){Q=_asyncToGenerator(_regenerator.mark(function l(q,
r,k,m){var p,c,g,f,h;return _regenerator.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(confirm(D("ItemCancelConfirm","admin.Manage_Queue","seraphinite-accelerator"))){a.next=2;break}return a.abrupt("return");case 2:return p=jQuery(q.parentNode).closest(".blck").first(),c=p.find(".seraph_accel_spinner"),g=p.find('input[type="button"]'),c.show(),g.prop("disabled",!0),seraph_accel.Manager._int.notRefreshQueueDeleting=!0,f=null,a.prev=9,a.next=12,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+
"QueueItemCancel",{siteId:r,id:k,_wpnonce:m}),type:"GET",cache:!1,dataType:"json"});case 12:h=a.sent;f=B(h);a.next=19;break;case 16:a.prev=16,a.t0=a["catch"](9),f="HTTP "+a.t0.status;case 19:f&&alert(f),c.hide(),g.prop("disabled",!1),delete seraph_accel.Manager._int.notRefreshQueueDeleting;case 23:case "end":return a.stop()}},l,this,[[9,16]])}));return Q.apply(this,arguments)}function P(){P=_asyncToGenerator(_regenerator.mark(function k(q,r){var m,l,p,c;return _regenerator.wrap(function(g){for(;;)switch(g.prev=
g.next){case 0:c=function(){c=_asyncToGenerator(_regenerator.mark(function h(){return _regenerator.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,seraph_accel.Manager._int.OnDataRefresh(q,r);case 2:l();case 3:case "end":return a.stop()}},h,this)}));return c.apply(this,arguments)},p=function(){return c.apply(this,arguments)},l=function(){var f=1E3*parseInt(m.val(),10);100>f&&(f=100);clearTimeout(seraph_accel.Manager._int.refreshTimer);seraph_accel.Manager._int.refreshTimer=setTimeout(p,
f)},m=jQuery("#seraph_accel_manage .tmDataRefresh"),m.on("change",l),p();case 6:case "end":return g.stop()}},k,this)}));return P.apply(this,arguments)}function R(){R=_asyncToGenerator(_regenerator.mark(function k(q,r){var m,l,p,c,g,f,h,a,b,d,n,e,t,v,z,w,y,A,I,C,W;return _regenerator.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return m=jQuery(q).find("#status").first(),l=jQuery(q).find("#stat").first(),p=l.find(".seraph_accel_spinner"),c=l.find('input[type="button"]:not(.cancel)'),g=l.find('input[type="button"].cancel'),
f=jQuery(q).find("#operate").first(),h=f.find(".seraph_accel_spinner"),a=f.find(".descr"),b=f.find('input[type="button"]:not(.cancel)'),d=f.find('input[type="button"].cancel'),n=jQuery(q).find("#queue").first(),e=n.find(".content"),t=n.find(".maxItems"),v=n.find(".seraph_accel_spinner"),z=n.find('input[type="button"]'),w=n.find(".descrNums"),L.prev=16,L.next=19,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"GetData",{nMaxQueueItems:t.val(),allSites:r?!0:void 0}),
type:"GET",cache:!1,dataType:"json"});case 19:C=L.sent;L.next=24;break;case 22:L.prev=22,L.t0=L["catch"](16);case 24:if(C){L.next=26;break}return L.abrupt("return");case 26:if(!r){for(W in C.status.cont)m.find('[data-id-cont="'+W+'"]').html(C.status.cont[W]);seraph_accel.Manager._int.notRefreshPostUpd||(y=m.find(".blck.postupd .seraph_accel_spinner"),A=m.find('.blck.postupd input[type="button"]:not(.cancel)'),I=m.find('.blck.postupd input[type="button"].cancel'),C.status.postUpd?(y.show(),A.prop("disabled",
!0),I.prop("disabled",!1)):(y.hide(),A.prop("disabled",!1),I.prop("disabled",!0)));seraph_accel.Manager._int.notRefreshScheUpd||(y=m.find(".blck.scheupd .seraph_accel_spinner"),A=m.find('.blck.scheupd input[type="button"]:not(.cancel)'),I=m.find('.blck.scheupd input[type="button"].cancel'),C.status.scheUpd?(y.show(),A.prop("disabled",!0),I.prop("disabled",!1)):(y.hide(),A.prop("disabled",!1),I.prop("disabled",!0)));seraph_accel.Manager._int.notRefreshCleanup||(y=m.find(".blck.cleanup .seraph_accel_spinner"),
A=m.find('.blck.cleanup input[type="button"]:not(.cancel)'),I=m.find('.blck.cleanup input[type="button"].cancel'),C.status.cleanUp?(y.show(),A.prop("disabled",!0),I.prop("disabled",!1)):(y.hide(),A.prop("disabled",!1),I.prop("disabled",!0)))}r||seraph_accel.Manager._int.notRefreshExtDp||(y=m.find(".blck.extdb .seraph_accel_spinner"),A=m.find('.blck.extdb input[type="button"]:not(.cancel)'),I=m.find('.blck.extdb input[type="button"].cancel'),C.extDb.isUpdating?(y.show(),A.prop("disabled",!0),I.prop("disabled",
!1)):(y.hide(),A.prop("disabled",!1),I.prop("disabled",!0)));r||seraph_accel.Manager._int.notRefreshStat||(C.stat.isUpdating?(p.show(),c.prop("disabled",!0),g.prop("disabled",!1)):(p.hide(),c.prop("disabled",!1),g.prop("disabled",!0)),l.find('[data-id-cont="stat"]').html(C.stat.cont));r||seraph_accel.Manager._int.notRefreshOp||(null===C.curOp&&(C.curOp=void 0),void 0!==C.curOp?(h.show(),a.show(),a.text(M(C.curOp)),b.prop("disabled",!0),d.prop("disabled",!1)):(h.hide(),a.hide(),b.prop("disabled",!1),
d.prop("disabled",!0),a.text("")));e.html(C.queue.content);w.text(H(D("QueueNumsDescr_%1$u%2$u","admin.Manage","seraphinite-accelerator"),C.queue.nums.nInitial,C.queue.nums.nInProgress));seraph_accel.Manager._int.notRefreshQueueDeleting||(v.hide(),z.prop("disabled",!1),C.queue.isPaused?(n.find('input[type="button"].pause').hide(),n.find('input[type="button"].resume').show()):(n.find('input[type="button"].pause').show(),n.find('input[type="button"].resume').hide()));case 33:case "end":return L.stop()}},
k,this,[[16,22]])}));return R.apply(this,arguments)}function S(){S=_asyncToGenerator(_regenerator.mark(function r(q){var k,m,l,p,c,g,f,h,a;return _regenerator.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return k=jQuery(q.parentNode).closest(".blck").first(),m=k.find(".url"),l=k.find(".seraph_accel_spinner"),p=k.find('input[type="button"]'),c=k.find(".messages"),g=k.find(".info"),f=0,k.find(".liteChk").prop("checked")&&(f|=1),k.find(".medChk").prop("checked")&&(f|=2),k.find(".tidyChk").prop("checked")&&
(f|=524288),c.empty(),l.show(),p.prop("disabled",!0),b.prev=13,b.next=16,jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+"HtmlCheck",{url:m.val(),norm:f}),type:"POST",data:"",dataType:"json",cache:!1});case 16:h=b.sent;b.next=22;break;case 19:b.prev=19,b.t0=b["catch"](13),h={err:b.t0.statusText};case 22:l.hide();p.prop("disabled",!1);if(!h.err){b.next=27;break}c.append(seraph_accel.Ui.LogItem("error",h.err));return b.abrupt("return");case 27:for(a in g.html(h.info),
h.list)a=h.list[a],c.append(seraph_accel.Ui.LogItem(a.severity,a.text));case 29:case "end":return b.stop()}},r,this,[[13,19]])}));return S.apply(this,arguments)}var V=seraph_accel.Wp.Loc.GetApi(),D=V._x,H=V.sprintf;seraph_accel.Settings={_int:{OnUpdateCssAuto:function(u){seraph_accel.Ui.ComboShowDependedItems(u,jQuery(u.parentNode).closest(".blck").first().get(0))},OnLogClear:function(u){return x.apply(this,arguments)}}};seraph_accel.Manager={_int:{OnStatOp:function(u,q){return N.apply(this,arguments)},
OnCacheOp:function(u,q,r){return F.apply(this,arguments)},OnCacheOpCancel:function(u,q,r){return O.apply(this,arguments)},OnPostUpdCancel:function(u){return J.apply(this,arguments)},OnScheUpdCancel:function(u){return G.apply(this,arguments)},OnExtDbUpdBegin:function(u){return E.apply(this,arguments)},OnExtDbUpdCancel:function(u){return K.apply(this,arguments)},OnQueueDel:function(u,q,r){return T.apply(this,arguments)},OnQueuePause:function(u,q,r){return U.apply(this,arguments)},OnQueueItemCancel:function(u,
q,r,k){return Q.apply(this,arguments)},OnDataRefreshInit:function(u,q){return P.apply(this,arguments)},OnDataRefresh:function(u,q){return R.apply(this,arguments)},OnHtmlCheck:function(u){return S.apply(this,arguments)}}};(function(){function u(m){return q.apply(this,arguments)}function q(){q=_asyncToGenerator(_regenerator.mark(function p(l){var c,g;return _regenerator.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return c={},f.prev=1,seraph_accel.SelfDiag._int.curAjax=jQuery.ajax({url:seraph_accel.Net.UpdateQueryArgs(seraph_accel.Plugin.GetAdminApiUrl()+
"SelfDiag_"+l,{}),cache:!1,dataType:"json"}),f.next=5,seraph_accel.SelfDiag._int.curAjax;case 5:c=f.sent;delete seraph_accel.SelfDiag._int.curAjax;f.next=14;break;case 9:f.prev=9,f.t0=f["catch"](1),delete seraph_accel.SelfDiag._int.curAjax,0===f.t0.status?c.hr=seraph_accel.Gen.hr.S_ABORTED:(c.hr=seraph_accel.Gen.hr.E_FAIL,c.descr="HTTP "+f.t0.status),500==f.t0.status&&(g=document.implementation.createHTMLDocument(""),g.documentElement.innerHTML=f.t0.responseText,g=g.body.textContent,g=seraph_accel.Gen.StrReplaceAll(g,
"\r",""),g=seraph_accel.Gen.StrReplaceAll(g,["\t","\v"]," "),g=seraph_accel.Gen.StrReplaceAll(g,"\n",". "),(g=seraph_accel.Gen.StrReplaceAllWhileChanging(g,["  ",". . "],[" ",". "]).trim())&&"."!=g&&(c.descr+="<br>"+g));case 14:return f.abrupt("return",c);case 15:case "end":return f.stop()}},p,this,[[1,9]])}));return q.apply(this,arguments)}function r(){r=_asyncToGenerator(_regenerator.mark(function p(l){var c,g,f,h,a,b,d,n,e,t,v,z=arguments;return _regenerator.wrap(function(w){for(;;)switch(w.prev=
w.next){case 0:c=1<z.length&&void 0!==z[1]?z[1]:!1;g=jQuery(l.parentNode).closest(".blck").first();f=g.find(".seraph_accel_spinner");h=g.find('input[type="button"]:not(.cancel)');a=g.find('input[type="button"].cancel');b=g.find(".log");d=[{id:"3rdPartySettCompat",name:k("TestName_3rdPartySettCompat","admin.SelfDiag","seraphinite-accelerator")},{id:"AsyncRequest",name:k("TestName_AsyncRequest","admin.SelfDiag","seraphinite-accelerator")},{id:"SetMaxExecTime",name:k("TestName_SetMaxExecTime","admin.SelfDiag",
"seraphinite-accelerator")},{id:"PageOptimize",name:k("TestName_PageOptimize","admin.SelfDiag","seraphinite-accelerator")},{id:"VendorSrv",name:k("TestName_VendorSrv","admin.SelfDiag","seraphinite-accelerator")},{id:"ExtCache",name:k("TestName_ExtCache","admin.SelfDiag","seraphinite-accelerator")}];b.empty();for(n=0;n<d.length;n++)e=d[n],b.append(seraph_accel.Ui.LogItem("none",seraph_accel.Ui.Tag("strong",e.name?e.name:e.id),!1));if(!c){w.next=11;break}return w.abrupt("return");case 11:f.show(),h.prop("disabled",
!0),a.prop("disabled",!1),seraph_accel.SelfDiag._int.inProgress=!0,n=0;case 16:if(!(n<d.length)){w.next=31;break}e=d[n];jQuery(b.children().get(n)).replaceWith(seraph_accel.Ui.LogItem("info",seraph_accel.Ui.Tag("strong",e.name?e.name:e.id)+k("TestRunning","admin.SelfDiag","seraphinite-accelerator"),!1));w.next=21;return u(e.id);case 21:t=w.sent;v=k("TestSucc","admin.SelfDiag","seraphinite-accelerator");t.hr!=seraph_accel.Gen.hr.S_OK&&(v=seraph_accel.Gen.hr.Succ(t.hr)?t.hr==seraph_accel.Gen.hr.S_ABORTED?
k("TestAbort","admin.SelfDiag","seraphinite-accelerator"):t.hr==seraph_accel.Gen.hr.S_FALSE?k("TestNotice","admin.SelfDiag","seraphinite-accelerator"):k("TestWarn","admin.SelfDiag","seraphinite-accelerator"):k("TestError","admin.SelfDiag","seraphinite-accelerator"));t.descr&&(v+="<br>"+t.descr);jQuery(b.children().get(n)).replaceWith(seraph_accel.Ui.LogItem(t.hr==seraph_accel.Gen.hr.S_OK?"success":seraph_accel.Gen.hr.Succ(t.hr)?t.hr==seraph_accel.Gen.hr.S_FALSE?"normal":"warning":"error",seraph_accel.Ui.Tag("strong",
e.name?e.name:e.id)+v,!1));if(seraph_accel.SelfDiag._int.inProgress){w.next=28;break}return w.abrupt("break",31);case 28:n++;w.next=16;break;case 31:f.hide(),h.prop("disabled",!1),a.prop("disabled",!0);case 34:case "end":return w.stop()}},p,this)}));return r.apply(this,arguments)}var k=seraph_accel.Wp.Loc.GetApi()._x;seraph_accel.SelfDiag={_int:{OnStart:function(m){return r.apply(this,arguments)},OnCancel:function(m){m=jQuery(m.parentNode).closest(".blck").first();m.find(".seraph_accel_spinner");
m.find('input[type="button"]:not(.cancel)');m.find('input[type="button"].cancel').prop("disabled",!0);seraph_accel.SelfDiag._int.inProgress=!1;seraph_accel.SelfDiag._int.curAjax&&seraph_accel.SelfDiag._int.curAjax.abort()},inProgress:!1}}})()})();
