(this.webpackJsonpui=this.webpackJsonpui||[]).push([[0],{802:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),c=a(28),s=a.n(c),i=a(886),o=a(26),l=a(112),u=a(2),d=a(6),j=a(40),b=a(42),p=a(844),h=a(878),O=a(883),f=a(884),x=a(876),g=a(810),k=a(811),v=a(873),y=a(874),m=a(885),S=a(813),T=a(117),_=a(847),A=a(812),E=a(347),C=a.n(E),R=a(349),I=a.n(R),w=a(352),q=a.n(w),P=a(353),N=a.n(P),D=a(351),L=a.n(D),B=a(354),H=a.n(B),U=a(350),K=a.n(U),z=a(348),G=a.n(z),V={HOME:"".concat(window.ROOT_PATH,"/"),SETTINGS:"".concat(window.ROOT_PATH,"/settings"),SERVERS:"".concat(window.ROOT_PATH,"/servers"),SCHEDULERS:"".concat(window.ROOT_PATH,"/schedulers"),QUEUE_DETAILS:"".concat(window.ROOT_PATH,"/queues/:qname"),REDIS:"".concat(window.ROOT_PATH,"/redis"),TASK_DETAILS:"".concat(window.ROOT_PATH,"/queues/:qname/tasks/:taskId")};function M(e,t){var a=V.QUEUE_DETAILS.replace(":qname",e);return t?"".concat(a,"?status=").concat(t):a}function Q(e,t){return V.TASK_DETAILS.replace(":qname",e).replace(":taskId",t)}var W=a(355),F="POLL_INTERVAL_CHANGE",Y="THEME_PREFERENCE_CHANGE",J="TOGGLE_DRAWER",X="TASK_ROWS_PER_PAGE_CHANGE",$="DAILY_STATS_KEY_CHANGE";function Z(e){return{type:X,value:e}}var ee=a(846),te=a(45),ae=a(245),ne=a.n(ae),re=a(247),ce=a.n(re),se=a(246),ie=a.n(se),oe=a(244),le=a.n(oe),ue=a(1),de=Object(p.a)((function(e){return Object(ee.a)({root:{flexShrink:0,marginLeft:e.spacing(2.5)}})}));var je=function(e){var t=de(),a=Object(te.a)(),n=e.count,r=e.page,c=e.rowsPerPage,s=e.onPageChange;return Object(ue.jsxs)("div",{className:t.root,children:[Object(ue.jsx)(_.a,{onClick:function(e){s(e,0)},disabled:0===r,"aria-label":"first page",children:"rtl"===a.direction?Object(ue.jsx)(le.a,{}):Object(ue.jsx)(ne.a,{})}),Object(ue.jsx)(_.a,{onClick:function(e){s(e,r-1)},disabled:0===r,"aria-label":"previous page",children:"rtl"===a.direction?Object(ue.jsx)(ie.a,{}):Object(ue.jsx)(ce.a,{})}),Object(ue.jsx)(_.a,{onClick:function(e){s(e,r+1)},disabled:r>=Math.ceil(n/c)-1,"aria-label":"next page",children:"rtl"===a.direction?Object(ue.jsx)(ce.a,{}):Object(ue.jsx)(ie.a,{})}),Object(ue.jsx)(_.a,{onClick:function(e){s(e,Math.max(0,Math.ceil(n/c)-1))},disabled:r>=Math.ceil(n/c)-1,"aria-label":"last page",children:"rtl"===a.direction?Object(ue.jsx)(ne.a,{}):Object(ue.jsx)(le.a,{})})]})},be=[10,20,30,60,100],pe=a(869),he=a(870),Oe=a(167),fe=a(250),xe=a.n(fe),ge=a(889),ke=a(871),ve=a(4),ye=a.n(ve),me=a(10),Se=a(19),Te=a.n(Se),_e=a(126),Ae=a.n(_e),Ee="".concat(window.ROOT_PATH,"/api");function Ce(){return Re.apply(this,arguments)}function Re(){return(Re=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/queues")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ie(e){return we.apply(this,arguments)}function we(){return(we=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qe(e){return Pe.apply(this,arguments)}function Pe(){return(Pe=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,":pause")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ne(e){return De.apply(this,arguments)}function De(){return(De=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,":resume")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Le(){return Be.apply(this,arguments)}function Be(){return(Be=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/queue_stats")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function He(e,t){return Ue.apply(this,arguments)}function Ue(){return(Ue=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/tasks/").concat(a),e.next=3,Te()({method:"get",url:n});case 3:return r=e.sent,e.abrupt("return",r.data);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ke(e,t){return ze.apply(this,arguments)}function ze(){return(ze=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/active_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ge(e,t){return Ve.apply(this,arguments)}function Ve(){return(Ve=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/active_tasks/").concat(a,":cancel")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Me(e){return Qe.apply(this,arguments)}function Qe(){return(Qe=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/active_tasks:cancel_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e,t){return Fe.apply(this,arguments)}function Fe(){return(Fe=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/active_tasks:batch_cancel"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ye(e,t){return Je.apply(this,arguments)}function Je(){return(Je=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/pending_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xe(e,t){return $e.apply(this,arguments)}function $e(){return($e=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/scheduled_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ze(e,t){return et.apply(this,arguments)}function et(){return(et=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/retry_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tt(e,t){return at.apply(this,arguments)}function at(){return(at=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/archived_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nt(e,t){return rt.apply(this,arguments)}function rt(){return(rt=Object(me.a)(ye.a.mark((function e(t,a){var n,r;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Ee,"/queues/").concat(t,"/completed_tasks"),a&&(n+="?".concat(Ae.a.stringify(a))),e.next=4,Te()({method:"get",url:n});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ct(e,t){return st.apply(this,arguments)}function st(){return(st=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks/").concat(a,":archive")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function it(e,t){return ot.apply(this,arguments)}function ot(){return(ot=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks:batch_archive"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lt(e){return ut.apply(this,arguments)}function ut(){return(ut=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks:archive_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dt(e,t){return jt.apply(this,arguments)}function jt(){return(jt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bt(e,t){return pt.apply(this,arguments)}function pt(){return(pt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ht(e){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ft(e,t){return xt.apply(this,arguments)}function xt(){return(xt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks/").concat(a,":run")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gt(e,t){return kt.apply(this,arguments)}function kt(){return(kt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks/").concat(a,":archive")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vt(e,t){return yt.apply(this,arguments)}function yt(){return(yt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mt(e,t){return St.apply(this,arguments)}function St(){return(St=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Tt(e){return _t.apply(this,arguments)}function _t(){return(_t=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function At(e,t){return Et.apply(this,arguments)}function Et(){return(Et=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:batch_run"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ct(e){return Rt.apply(this,arguments)}function Rt(){return(Rt=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function It(e,t){return wt.apply(this,arguments)}function wt(){return(wt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:batch_archive"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qt(e){return Pt.apply(this,arguments)}function Pt(){return(Pt=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:archive_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nt(e,t){return Dt.apply(this,arguments)}function Dt(){return(Dt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks/").concat(a,":run")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lt(e,t){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks/").concat(a,":archive")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ht(e,t){return Ut.apply(this,arguments)}function Ut(){return(Ut=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Kt(e,t){return zt.apply(this,arguments)}function zt(){return(zt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gt(e){return Vt.apply(this,arguments)}function Vt(){return(Vt=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mt(e,t){return Qt.apply(this,arguments)}function Qt(){return(Qt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:batch_run"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(e){return Ft.apply(this,arguments)}function Ft(){return(Ft=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yt(e,t){return Jt.apply(this,arguments)}function Jt(){return(Jt=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:batch_archive"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xt(e){return $t.apply(this,arguments)}function $t(){return($t=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:archive_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Zt(e,t){return ea.apply(this,arguments)}function ea(){return(ea=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks/").concat(a,":run")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ta(e,t){return aa.apply(this,arguments)}function aa(){return(aa=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function na(e,t){return ra.apply(this,arguments)}function ra(){return(ra=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ca(e){return sa.apply(this,arguments)}function sa(){return(sa=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ia(e,t){return oa.apply(this,arguments)}function oa(){return(oa=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks:batch_run"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function la(e){return ua.apply(this,arguments)}function ua(){return(ua=Object(me.a)(ye.a.mark((function e(t){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function da(e,t){return ja.apply(this,arguments)}function ja(){return(ja=Object(me.a)(ye.a.mark((function e(t,a){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/completed_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ba(e,t){return pa.apply(this,arguments)}function pa(){return(pa=Object(me.a)(ye.a.mark((function e(t,a){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/completed_tasks:batch_delete"),data:{task_ids:a}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ha(e){return Oa.apply(this,arguments)}function Oa(){return(Oa=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/completed_tasks:delete_all")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fa(){return xa.apply(this,arguments)}function xa(){return(xa=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/servers")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ga(){return ka.apply(this,arguments)}function ka(){return(ka=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/scheduler_entries")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function va(e){return ya.apply(this,arguments)}function ya(){return(ya=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/scheduler_entries/").concat(t,"/enqueue_events")});case 2:return a=e.sent,e.abrupt("return",a.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ma(){return Sa.apply(this,arguments)}function Sa(){return(Sa=Object(me.a)(ye.a.mark((function e(){var t;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te()({method:"get",url:"".concat(Ee,"/redis_info")});case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ta(e){var t=e.response;return t?"".concat(t.status," (").concat(t.statusText,"): ").concat(t.data):"error: no error response data available"}function _a(e){var t=e.response;return t?t.data:"Unknown error occurred. See the logs for details."}function Aa(e){var t=Math.floor(e/3600),a=Math.floor((e-3600*t)/60);return{hour:t,minute:a,second:e-3600*t-60*a,totalSeconds:e}}function Ea(e,t){var a=e-t;return Aa(Math.floor(a/1e3))}function Ca(e){if(e.hour>24){var t=Math.floor(e.hour/24);return t+(1===t?" day":" days")}return(0!==e.hour?"".concat(e.hour,"h"):"")+(0!==e.minute?"".concat(e.minute,"m"):"")+"".concat(e.second,"s")}function Ra(e){try{var t=Ea(Date.parse(e),Date.now());return t.totalSeconds<1?"now":"in "+Ca(t)}catch(a){return"-"}}function Ia(e){try{return wa(Date.parse(e)/1e3)}catch(t){return console.error("Could not parse timestamp: ",e,t),"-"}}function wa(e){return 0===e?"":Ca(Ea(Date.now(),1e3*e))+" ago"}function qa(e){var t=e.indexOf("-");return-1===t?e:e.substr(0,t)}function Pa(e,t){if(0===t)return"0.00%";var a=(e/t*100).toFixed(2);return"".concat(a," %")}var Na="LIST_QUEUES_BEGIN",Da="LIST_QUEUES_SUCCESS",La="LIST_QUEUES_ERROR",Ba="DELETE_QUEUE_BEGIN",Ha="DELETE_QUEUE_SUCCESS",Ua="DELETE_QUEUE_ERROR",Ka="PAUSE_QUEUE_BEGIN",za="PAUSE_QUEUE_SUCCESS",Ga="PAUSE_QUEUE_ERROR",Va="RESUME_QUEUE_BEGIN",Ma="RESUME_QUEUE_SUCCESS",Qa="RESUME_QUEUE_ERROR";function Wa(){return function(){var e=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:Na}),e.prev=1,e.next=4,Ce();case 4:a=e.sent,t({type:Da,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listQueuesAsync: ".concat(Ta(e.t0))),t({type:La,error:_a(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}function Fa(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ba,queue:e}),t.prev=1,t.next=4,Ie(e);case 4:a({type:Ha,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0),a({type:Ua,queue:e,error:_a(t.t0)});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()}var Ya="LIST_QUEUE_STATS_BEGIN",Ja="LIST_QUEUE_STATS_SUCCESS",Xa="LIST_QUEUE_STATS_ERROR";var $a=a(848),Za=a(849),en=a(852),tn=a(203),an=a(204),nn=a(165),rn=a(162),cn=a(359);var sn=function(e){var t=Object(b.f)();return Object(ue.jsx)($a.a,{children:Object(ue.jsxs)(Za.a,{data:e.data,maxBarSize:120,onClick:function(a){var n=e.data.map((function(e){return e.queue}));a&&a.activeLabel&&n.includes(a.activeLabel)&&t.push(M(a.activeLabel))},style:{cursor:"pointer"},children:[Object(ue.jsx)(en.a,{strokeDasharray:"3 3"}),Object(ue.jsx)(tn.a,{dataKey:"queue"}),Object(ue.jsx)(an.a,{}),Object(ue.jsx)(nn.a,{}),Object(ue.jsx)(rn.a,{}),Object(ue.jsx)(cn.a,{dataKey:"active",stackId:"a",fill:"#1967d2"}),Object(ue.jsx)(cn.a,{dataKey:"pending",stackId:"a",fill:"#669df6"}),Object(ue.jsx)(cn.a,{dataKey:"scheduled",stackId:"a",fill:"#fdd663"}),Object(ue.jsx)(cn.a,{dataKey:"retry",stackId:"a",fill:"#f666a9"}),Object(ue.jsx)(cn.a,{dataKey:"archived",stackId:"a",fill:"#ac4776"}),Object(ue.jsx)(cn.a,{dataKey:"completed",stackId:"a",fill:"#4bb543"})]})})};var on=function(e){var t=Object(te.a)();return Object(ue.jsx)($a.a,{children:Object(ue.jsxs)(Za.a,{data:e.data,maxBarSize:120,children:[Object(ue.jsx)(en.a,{strokeDasharray:"3 3"}),Object(ue.jsx)(tn.a,{dataKey:"queue"}),Object(ue.jsx)(an.a,{}),Object(ue.jsx)(nn.a,{}),Object(ue.jsx)(rn.a,{}),Object(ue.jsx)(cn.a,{dataKey:"succeeded",stackId:"a",fill:t.palette.success.light}),Object(ue.jsx)(cn.a,{dataKey:"failed",stackId:"a",fill:t.palette.error.light})]})})},ln=a(14),un=a(98),dn=a(859),jn=a(863),bn=a(862),pn=a(858),hn=a(860),On=a(861),fn=a(895),xn=a(864),gn=a(332),kn=a.n(gn),vn=a(331),yn=a.n(vn),mn=a(53),Sn=a.n(mn),Tn=a(56),_n=a.n(Tn),An=a(807),En=a(853),Cn=a(857),Rn=a(855),In=a(856),wn=a(854);var qn,Pn=Object(o.b)((function(e,t){var a=!1;if(null!==t.queue){var n=e.queues.data.find((function(e){var a;return e.name===(null===(a=t.queue)||void 0===a?void 0:a.queue)}));void 0!==n&&(a=n.requestPending)}return{requestPending:a}}),{deleteQueueAsync:Fa})((function(e){return Object(ue.jsx)(En.a,{open:null!==e.queue,onClose:e.onClose,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:null!==e.queue&&(e.queue.size>0?Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsx)(wn.a,{id:"alert-dialog-title",children:"Queue is not empty"}),Object(ue.jsx)(Rn.a,{children:Object(ue.jsxs)(In.a,{id:"alert-dialog-description",children:['You are trying to delete a non-emtpy queue "',e.queue.queue,'". Please empty the queue first before deleting.']})}),Object(ue.jsx)(Cn.a,{children:Object(ue.jsx)(An.a,{onClick:e.onClose,color:"primary",children:"OK"})})]}):Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)(wn.a,{id:"alert-dialog-title",children:['Are you sure you want to delete "',e.queue.queue,'"?']}),Object(ue.jsx)(Rn.a,{children:Object(ue.jsx)(In.a,{id:"alert-dialog-description",children:"You can't undo this action."})}),Object(ue.jsxs)(Cn.a,{children:[Object(ue.jsx)(An.a,{onClick:e.onClose,disabled:e.requestPending,color:"primary",children:"Cancel"}),Object(ue.jsx)(An.a,{onClick:function(){e.queue&&(e.deleteQueueAsync(e.queue.queue),e.onClose())},disabled:e.requestPending,color:"primary",autoFocus:!0,children:"Delete"})]})]}))})}));!function(e){e.Asc="asc",e.Desc="desc"}(qn||(qn={}));var Nn,Dn=a(207),Ln=a.n(Dn),Bn=Object(p.a)((function(e){return{table:{minWidth:650},fixedCell:{position:"sticky",zIndex:1,left:0,background:e.palette.background.paper}}}));!function(e){e[e.Queue=0]="Queue",e[e.State=1]="State",e[e.Size=2]="Size",e[e.MemoryUsage=3]="MemoryUsage",e[e.Processed=4]="Processed",e[e.Failed=5]="Failed",e[e.ErrorRate=6]="ErrorRate",e[e.None=7]="None"}(Nn||(Nn={}));var Hn=[{label:"Queue",key:"queue",sortBy:Nn.Queue,align:"left"},{label:"State",key:"state",sortBy:Nn.State,align:"left"},{label:"Size",key:"size",sortBy:Nn.Size,align:"right"},{label:"Memory usage",key:"memory_usage",sortBy:Nn.MemoryUsage,align:"right"},{label:"Processed",key:"processed",sortBy:Nn.Processed,align:"right"},{label:"Failed",key:"failed",sortBy:Nn.Failed,align:"right"},{label:"Error rate",key:"error_rate",sortBy:Nn.ErrorRate,align:"right"},{label:"Actions",key:"actions",sortBy:Nn.None,align:"center"}];function Un(e,t){var a=Object(un.a)(e);return a.sort(t),a}function Kn(e){var t=Bn(),a=Object(n.useState)(Nn.Queue),c=Object(ln.a)(a,2),s=c[0],i=c[1],o=Object(n.useState)(qn.Asc),l=Object(ln.a)(o,2),u=l[0],j=l[1],b=Object(n.useState)(null),p=Object(ln.a)(b,2),h=p[0],O=p[1];return Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(pn.a,{children:Object(ue.jsxs)(dn.a,{className:t.table,"aria-label":"queues overview table",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsx)(On.a,{children:Hn.map((function(e,a){return Object(ue.jsx)(bn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:e.sortBy!==Nn.None?Object(ue.jsx)(fn.a,{active:s===e.sortBy,direction:u,onClick:(n=e.sortBy,function(e){if(n===s){var t=u===qn.Asc?qn.Desc:qn.Asc;j(t)}else i(n)}),children:e.label}):Object(ue.jsx)("div",{children:e.label})},e.key);var n}))})}),Object(ue.jsx)(jn.a,{children:Un(e.queues,(function(e,t){var a;switch(s){case Nn.Queue:if(e.queue===t.queue)return 0;a=e.queue0&&Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ke.a,{children:"Error"}),"Could not retrieve queues live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsxs)(Oe.a,{className:i.paper,variant:"outlined",children:[Object(ue.jsx)("div",{className:i.chartHeader,children:Object(ue.jsxs)("div",{className:i.chartHeaderTitle,children:[Object(ue.jsx)(T.a,{variant:"h6",children:"Queue Size"}),Object(ue.jsx)(Mn,{title:Object(ue.jsxs)("div",{children:[Object(ue.jsx)("div",{className:i.tooltipSection,children:"Total number of tasks in the queue"}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Active"}),": number of tasks currently being processed"]}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Pending"}),": number of tasks ready to be processed"]}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Scheduled"}),": number of tasks scheduled to be processed in the future"]}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Retry"}),": number of tasks scheduled to be retried in the future"]}),Object(ue.jsxs)("div",{children:[Object(ue.jsx)("strong",{children:"Archived"}),": number of tasks exhausted their retries"]})]}),children:Object(ue.jsx)(xe.a,{fontSize:"small",className:i.infoIcon})})]})}),Object(ue.jsx)("div",{className:i.chartContainer,children:Object(ue.jsx)(sn,{data:r})})]})}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsxs)(Oe.a,{className:i.paper,variant:"outlined",children:[Object(ue.jsxs)("div",{className:i.chartHeader,children:[Object(ue.jsxs)("div",{className:i.chartHeaderTitle,children:[Object(ue.jsx)(T.a,{variant:"h6",children:"Tasks Processed"}),Object(ue.jsx)(Mn,{title:Object(ue.jsxs)("div",{children:[Object(ue.jsx)("div",{className:i.tooltipSection,children:"Total number of tasks processed in a given day (UTC)"}),Object(ue.jsxs)("div",{className:i.tooltipSection,children:[Object(ue.jsx)("strong",{children:"Succeeded"}),": number of tasks successfully processed"]}),Object(ue.jsxs)("div",{children:[Object(ue.jsx)("strong",{children:"Failed"}),": number of tasks failed to be processed"]})]}),children:Object(ue.jsx)(xe.a,{fontSize:"small",className:i.infoIcon})})]}),Object(ue.jsx)("div",{children:Object(ue.jsx)(tr,{options:[{label:"Today",key:"today"},{label:"Last 7d",key:"last-7d"},{label:"Last 30d",key:"last-30d"},{label:"Last 90d",key:"last-90d"}],initialSelectedKey:s,onSelect:function(t){return e.dailyStatsKeyChange(t)}})})]}),Object(ue.jsxs)("div",{className:i.chartContainer,children:["today"===s&&Object(ue.jsx)(on,{data:l}),"last-7d"===s&&Object(ue.jsx)(sr,{data:e.queueStats,numDays:7}),"last-30d"===s&&Object(ue.jsx)(sr,{data:e.queueStats,numDays:30}),"last-90d"===s&&Object(ue.jsx)(sr,{data:e.queueStats,numDays:90})]})]})}),Object(ue.jsx)(he.a,{item:!0,xs:12,className:i.tableContainer,children:Object(ue.jsx)(Oe.a,{className:i.paper,variant:"outlined",children:Object(ue.jsx)(Kn,{queues:r,onPauseClick:e.pauseQueueAsync,onResumeClick:e.resumeQueueAsync,onDeleteClick:e.deleteQueueAsync})})})]})})}));!function(e){e[e.SystemDefault=0]="SystemDefault",e[e.Always=1]="Always",e[e.Never=2]="Never"}(ur||(ur={}));var jr={pollInterval:8,themePreference:ur.SystemDefault,isDrawerOpen:!0,taskRowsPerPage:20,dailyStatsChartType:"last-7d"};var br=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case F:return Object(u.a)(Object(u.a)({},e),{},{pollInterval:t.value});case Y:return Object(u.a)(Object(u.a)({},e),{},{themePreference:t.value});case J:return Object(u.a)(Object(u.a)({},e),{},{isDrawerOpen:!e.isDrawerOpen});case X:return Object(u.a)(Object(u.a)({},e),{},{taskRowsPerPage:t.value});case $:return Object(u.a)(Object(u.a)({},e),{},{dailyStatsChartType:t.value});default:return e}},pr=a(872);function hr(e){return"dark"===e.palette.type}var Or="CLOSE_SNACKBAR";var fr=Object(p.a)((function(e){return{listItem:{borderTopRightRadius:"24px",borderBottomRightRadius:"24px"},selected:{backgroundColor:hr(e)?"".concat(e.palette.secondary.main,"30"):"".concat(e.palette.primary.main,"30")},selectedText:{fontWeight:600,color:hr(e)?e.palette.secondary.main:e.palette.primary.main},selectedIcon:{color:hr(e)?e.palette.secondary.main:e.palette.primary.main}}}));var xr=function(e){var t=fr(),a=e.icon,n=e.primary,c=e.to,s=Object(b.i)({path:c,strict:!0,sensitive:!0,exact:!0}),i=r.a.useMemo((function(){return r.a.forwardRef((function(e,t){return Object(ue.jsx)(j.b,Object(u.a)({to:c,ref:t},e))}))}),[c]);return Object(ue.jsx)("li",{children:Object(ue.jsx)(xn.a,{title:n,placement:"right",children:Object(ue.jsxs)(k.a,{button:!0,component:i,className:Object(d.default)(t.listItem,s&&t.selected),children:[a&&Object(ue.jsx)(v.a,{className:Object(d.default)(s&&t.selectedIcon),children:a}),Object(ue.jsx)(y.a,{primary:n,classes:{primary:s?t.selectedText:void 0}})]})})})},gr=a(367),kr=a(340),vr=a.n(kr),yr=a(890),mr=a(335),Sr=a(336);function Tr(e){var t=hr(Object(te.a)())?mr.a:Sr.a;return Object(ue.jsx)(yr.a,{language:e.language,style:t,customStyle:e.customStyle,children:e.children})}var _r=a(339),Ar=a.n(_r),Er="LIST_SCHEDULER_ENTRIES_BEGIN",Cr="LIST_SCHEDULER_ENTRIES_SUCCESS",Rr="LIST_SCHEDULER_ENTRIES_ERROR",Ir="LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN",wr="LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS",qr="LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR";function Pr(e,t){return e.enqueueEventsByEntryId[t]||{data:[],loading:!1}}var Nr={loading:!1,data:[],error:"",enqueueEventsByEntryId:{}};var Dr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Nr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Er:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Cr:return Object(u.a)(Object(u.a)({},e),{},{error:"",loading:!1,data:t.payload.entries});case Rr:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case Ir:var a=Pr(e,t.entryId);return Object(u.a)(Object(u.a)({},e),{},{enqueueEventsByEntryId:Object(u.a)(Object(u.a)({},e.enqueueEventsByEntryId),{},Object(l.a)({},t.entryId,Object(u.a)(Object(u.a)({},a),{},{loading:!0})))});case wr:var n=function(e,t){return Date.parse(t.enqueued_at)-Date.parse(e.enqueued_at)},r=Pr(e,t.entryId),c=Ar()([].concat(Object(un.a)(r.data),Object(un.a)(t.payload.events)),"task_id").sort(n);return Object(u.a)(Object(u.a)({},e),{},{enqueueEventsByEntryId:Object(u.a)(Object(u.a)({},e.enqueueEventsByEntryId),{},Object(l.a)({},t.entryId,{loading:!1,data:c}))});case qr:var s=Pr(e,t.entryId);return Object(u.a)(Object(u.a)({},e),{},{enqueueEventsByEntryId:Object(u.a)(Object(u.a)({},e.enqueueEventsByEntryId),{},Object(l.a)({},t.entryId,Object(u.a)(Object(u.a)({},s),{},{loading:!1})))});default:return e}},Lr=Object(p.a)((function(e){return{table:{height:"80vh"},stickyHeaderCell:{background:e.palette.background.paper}}}));var Br,Hr=Object(o.b)((function(e,t){return{events:Pr(e.schedulerEntries,t.entryId)}}),{listSchedulerEnqueueEventsAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ir,entryId:e}),t.prev=1,t.next=4,va(e);case 4:n=t.sent,a({type:wr,payload:n,entryId:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("listSchedulerEnqueueEventsAsync: ",Ta(t.t0)),a({type:qr,error:_a(t.t0),entryId:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()}})((function(e){var t=Lr(),a=e.listSchedulerEnqueueEventsAsync,r=e.entryId,c=e.events;return Object(n.useEffect)((function(){a(r)}),[r,a]),Object(ue.jsx)(pn.a,{className:t.table,children:Object(ue.jsxs)(dn.a,{stickyHeader:!0,"aria-label":"scheduler enqueue events table",size:"small",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{classes:{stickyHeader:t.stickyHeaderCell},children:"Enqueued"}),Object(ue.jsx)(bn.a,{classes:{stickyHeader:t.stickyHeaderCell},children:"Task ID"})]})}),Object(ue.jsx)(jn.a,{children:c.data.map((function(e){return Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{component:"th",scope:"row",children:Ia(e.enqueued_at)}),Object(ue.jsx)(bn.a,{children:e.task_id})]},e.task_id)}))})]})})})),Ur=Object(p.a)((function(e){return{table:{minWidth:650},noBorder:{border:"none"},fixedCell:{position:"sticky",zIndex:1,left:0,background:e.palette.background.paper},modal:{display:"flex",alignItems:"center",justifyContent:"center"},modalContent:{background:e.palette.background.paper,padding:e.spacing(2),width:"540px",outline:"none",borderRadius:e.shape.borderRadius},eventsTable:{maxHeight:"80vh"}}}));!function(e){e[e.EntryId=0]="EntryId",e[e.Spec=1]="Spec",e[e.Type=2]="Type",e[e.Payload=3]="Payload",e[e.Options=4]="Options",e[e.NextEnqueue=5]="NextEnqueue",e[e.PrevEnqueue=6]="PrevEnqueue",e[e.None=7]="None"}(Br||(Br={}));var Kr=[{label:"Entry ID",key:"entry_id",sortBy:Br.EntryId,align:"left"},{label:"Spec",key:"spec",sortBy:Br.Spec,align:"left"},{label:"Type",key:"type",sortBy:Br.Type,align:"left"},{label:"Payload",key:"task_payload",sortBy:Br.Payload,align:"left"},{label:"Options",key:"options",sortBy:Br.Options,align:"left"},{label:"Next Enqueue",key:"next_enqueue",sortBy:Br.NextEnqueue,align:"left"},{label:"Prev Enqueue",key:"prev_enqueue",sortBy:Br.PrevEnqueue,align:"left"},{label:"",key:"show_history",sortBy:Br.None,align:"left"}];function zr(e,t){var a=Object(un.a)(e);return a.sort(t),a}function Gr(e){var t=Ur(),a=Object(n.useState)(Br.EntryId),r=Object(ln.a)(a,2),c=r[0],s=r[1],i=Object(n.useState)(qn.Asc),o=Object(ln.a)(i,2),l=o[0],u=o[1],j=Object(n.useState)(""),b=Object(ln.a)(j,2),p=b[0],h=b[1];return 0===e.entries.length?Object(ue.jsxs)(ge.a,{severity:"info",children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No entries found at this time."]}):Object(ue.jsx)(ue.Fragment,{children:Object(ue.jsxs)(pn.a,{children:[Object(ue.jsxs)(dn.a,{className:t.table,"aria-label":"scheduler entries table",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsx)(On.a,{children:Kr.map((function(e,a){return Object(ue.jsx)(bn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:Object(ue.jsx)(fn.a,{active:e.sortBy===c,direction:l,onClick:(n=e.sortBy,function(e){if(n===c){var t=l===qn.Asc?qn.Desc:qn.Asc;u(t)}else s(n)}),children:e.label})},e.key);var n}))})}),Object(ue.jsx)(jn.a,{children:zr(e.entries,(function(e,t){var a;switch(c){case Br.EntryId:if(e.id===t.id)return 0;a=e.id *":{borderBottom:"unset"}},noBorder:{border:"none"}}}));function Mr(e){var t=e.entry,a=e.isLastRow,n=Vr();return Object(ue.jsxs)(On.a,{className:n.rowRoot,children:[Object(ue.jsx)(bn.a,{component:"th",scope:"row",className:Object(d.default)(a&&n.noBorder),children:t.id}),Object(ue.jsx)(bn.a,{className:Object(d.default)(a&&n.noBorder),children:t.spec}),Object(ue.jsx)(bn.a,{className:Object(d.default)(a&&n.noBorder),children:t.task_type}),Object(ue.jsx)(bn.a,{className:Object(d.default)(a&&n.noBorder),children:Object(ue.jsx)(Tr,{language:"json",children:t.task_payload})}),Object(ue.jsx)(bn.a,{className:Object(d.default)(a&&n.noBorder),children:Object(ue.jsx)(Tr,{language:"go",children:t.options.length>0?t.options.join(", "):"No options"})}),Object(ue.jsx)(bn.a,{className:Object(d.default)(a&&n.noBorder),children:Ra(t.next_enqueue_at)}),Object(ue.jsx)(bn.a,{className:Object(d.default)(a&&n.noBorder),children:t.prev_enqueue_at?Ia(t.prev_enqueue_at):"N/A"}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(xn.a,{title:"See History",children:Object(ue.jsx)(_.a,{"aria-label":"expand row",size:"small",onClick:e.onShowHistoryClick,children:Object(ue.jsx)(vr.a,{})})})})]})}var Qr=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column"},heading:{paddingLeft:e.spacing(2),marginBottom:e.spacing(1)}}}));var Wr=Object(o.b)((function(e){return{loading:e.schedulerEntries.loading,error:e.schedulerEntries.error,entries:e.schedulerEntries.data,pollInterval:e.settings.pollInterval}}),{listSchedulerEntriesAsync:function(){return function(){var e=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:Er}),e.prev=1,e.next=4,ga();case 4:a=e.sent,t({type:Cr,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listSchedulerEnqueueEventsAsync: ".concat(Ta(e.t0))),t({type:Rr,error:_a(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}})((function(e){var t=e.pollInterval,a=e.listSchedulerEntriesAsync,n=Qr();return ar(a,t),Object(ue.jsx)(pe.a,{maxWidth:"lg",className:n.container,children:Object(ue.jsx)(he.a,{container:!0,spacing:3,children:""===e.error?Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(Oe.a,{className:n.paper,variant:"outlined",children:[Object(ue.jsx)(T.a,{variant:"h6",className:n.heading,children:"Scheduler Entries"}),Object(ue.jsx)(Gr,{entries:e.entries})]})}):Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ke.a,{children:"Error"}),"Could not retrieve scheduler entries live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})})})})})),Fr=a(358),Yr=a(897),Jr=a(896),Xr=a(341),$r=a.n(Xr),Zr=a(875),ec=a(892),tc=a(891),ac=a(251),nc=a.n(ac),rc="GET_TASK_INFO_BEGIN",cc="GET_TASK_INFO_SUCCESS",sc="GET_TASK_INFO_ERROR",ic="LIST_ACTIVE_TASKS_BEGIN",oc="LIST_ACTIVE_TASKS_SUCCESS",lc="LIST_ACTIVE_TASKS_ERROR",uc="LIST_PENDING_TASKS_BEGIN",dc="LIST_PENDING_TASKS_SUCCESS",jc="LIST_PENDING_TASKS_ERROR",bc="LIST_SCHEDULED_TASKS_BEGIN",pc="LIST_SCHEDULED_TASKS_SUCCESS",hc="LIST_SCHEDULED_TASKS_ERROR",Oc="LIST_RETRY_TASKS_BEGIN",fc="LIST_RETRY_TASKS_SUCCESS",xc="LIST_RETRY_TASKS_ERROR",gc="LIST_ARCHIVED_TASKS_BEGIN",kc="LIST_ARCHIVED_TASKS_SUCCESS",vc="LIST_ARCHIVED_TASKS_ERROR",yc="LIST_COMPLETED_TASKS_BEGIN",mc="LIST_COMPLETED_TASKS_SUCCESS",Sc="LIST_COMPLETED_TASKS_ERROR",Tc="CANCEL_ACTIVE_TASK_BEGIN",_c="CANCEL_ACTIVE_TASK_SUCCESS",Ac="CANCEL_ACTIVE_TASK_ERROR",Ec="CANCEL_ALL_ACTIVE_TASKS_BEGIN",Cc="CANCEL_ALL_ACTIVE_TASKS_SUCCESS",Rc="CANCEL_ALL_ACTIVE_TASKS_ERROR",Ic="BATCH_CANCEL_ACTIVE_TASKS_BEGIN",wc="BATCH_CANCEL_ACTIVE_TASKS_SUCCESS",qc="BATCH_CANCEL_ACTIVE_TASKS_ERROR",Pc="RUN_SCHEDULED_TASK_BEGIN",Nc="RUN_SCHEDULED_TASK_SUCCESS",Dc="RUN_SCHEDULED_TASK_ERROR",Lc="RUN_RETRY_TASK_BEGIN",Bc="RUN_RETRY_TASK_SUCCESS",Hc="RUN_RETRY_TASK_ERROR",Uc="RUN_ARCHIVED_TASK_BEGIN",Kc="RUN_ARCHIVED_TASK_SUCCESS",zc="RUN_ARCHIVED_TASK_ERROR",Gc="DELETE_PENDING_TASK_BEGIN",Vc="DELETE_PENDING_TASK_SUCCESS",Mc="DELETE_PENDING_TASK_ERROR",Qc="ARCHIVE_PENDING_TASK_BEGIN",Wc="ARCHIVE_PENDING_TASK_SUCCESS",Fc="ARCHIVE_PENDING_TASK_ERROR",Yc="DELETE_SCHEDULED_TASK_BEGIN",Jc="DELETE_SCHEDULED_TASK_SUCCESS",Xc="DELETE_SCHEDULED_TASK_ERROR",$c="ARCHIVE_SCHEDULED_TASK_BEGIN",Zc="ARCHIVE_SCHEDULED_TASK_SUCCESS",es="ARCHIVE_SCHEDULED_TASK_ERROR",ts="ARCHIVE_RETRY_TASK_BEGIN",as="ARCHIVE_RETRY_TASK_SUCCESS",ns="ARCHIVE_RETRY_TASK_ERROR",rs="BATCH_ARCHIVE_PENDING_TASKS_BEGIN",cs="BATCH_ARCHIVE_PENDING_TASKS_SUCCESS",ss="BATCH_RUN_PENDING_TASKS_ERROR",is="BATCH_DELETE_PENDING_TASKS_BEGIN",os="BATCH_DELETE_PENDING_TASKS_SUCCESS",ls="BATCH_DELETE_PENDING_TASKS_ERROR",us="DELETE_ALL_PENDING_TASKS_BEGIN",ds="DELETE_ALL_PENDING_TASKS_SUCCESS",js="DELETE_ALL_PENDING_TASKS_ERROR",bs="ARCHIVE_ALL_PENDING_TASKS_BEGIN",ps="ARCHIVE_ALL_PENDING_TASKS_SUCCESS",hs="ARCHIVE_ALL_PENDING_TASKS_ERROR",Os="BATCH_RUN_SCHEDULED_TASKS_BEGIN",fs="BATCH_RUN_SCHEDULED_TASKS_SUCCESS",xs="BATCH_RUN_SCHEDULED_TASKS_ERROR",gs="BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN",ks="BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS",vs="BATCH_RUN_SCHEDULED_TASKS_ERROR",ys="BATCH_DELETE_SCHEDULED_TASKS_BEGIN",ms="BATCH_DELETE_SCHEDULED_TASKS_SUCCESS",Ss="BATCH_DELETE_SCHEDULED_TASKS_ERROR",Ts="RUN_ALL_SCHEDULED_TASKS_BEGIN",_s="RUN_ALL_SCHEDULED_TASKS_SUCCESS",As="RUN_ALL_SCHEDULED_TASKS_ERROR",Es="ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN",Cs="ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS",Rs="ARCHIVE_ALL_SCHEDULED_TASKS_ERROR",Is="DELETE_ALL_SCHEDULED_TASKS_BEGIN",ws="DELETE_ALL_SCHEDULED_TASKS_SUCCESS",qs="DELETE_ALL_SCHEDULED_TASKS_ERROR",Ps="DELETE_RETRY_TASK_BEGIN",Ns="DELETE_RETRY_TASK_SUCCESS",Ds="DELETE_RETRY_TASK_ERROR",Ls="BATCH_RUN_RETRY_TASKS_BEGIN",Bs="BATCH_RUN_RETRY_TASKS_SUCCESS",Hs="BATCH_RUN_RETRY_TASKS_ERROR",Us="BATCH_ARCHIVE_RETRY_TASKS_BEGIN",Ks="BATCH_ARCHIVE_RETRY_TASKS_SUCCESS",zs="BATCH_ARCHIVE_RETRY_TASKS_ERROR",Gs="BATCH_DELETE_RETRY_TASKS_BEGIN",Vs="BATCH_DELETE_RETRY_TASKS_SUCCESS",Ms="BATCH_DELETE_RETRY_TASKS_ERROR",Qs="RUN_ALL_RETRY_TASKS_BEGIN",Ws="RUN_ALL_RETRY_TASKS_SUCCESS",Fs="RUN_ALL_RETRY_TASKS_ERROR",Ys="ARCHIVE_ALL_RETRY_TASKS_BEGIN",Js="ARCHIVE_ALL_RETRY_TASKS_SUCCESS",Xs="ARCHIVE_ALL_RETRY_TASKS_ERROR",$s="DELETE_ALL_RETRY_TASKS_BEGIN",Zs="DELETE_ALL_RETRY_TASKS_SUCCESS",ei="DELETE_ALL_RETRY_TASKS_ERROR",ti="DELETE_ARCHIVED_TASK_BEGIN",ai="DELETE_ARCHIVED_TASK_SUCCESS",ni="DELETE_ARCHIVED_TASK_ERROR",ri="BATCH_RUN_ARCHIVED_TASKS_BEGIN",ci="BATCH_RUN_ARCHIVED_TASKS_SUCCESS",si="BATCH_RUN_ARCHIVED_TASKS_ERROR",ii="BATCH_DELETE_ARCHIVED_TASKS_BEGIN",oi="BATCH_DELETE_ARCHIVED_TASKS_SUCCESS",li="BATCH_DELETE_ARCHIVED_TASKS_ERROR",ui="RUN_ALL_ARCHIVED_TASKS_BEGIN",di="RUN_ALL_ARCHIVED_TASKS_SUCCESS",ji="RUN_ALL_ARCHIVED_TASKS_ERROR",bi="DELETE_ALL_ARCHIVED_TASKS_BEGIN",pi="DELETE_ALL_ARCHIVED_TASKS_SUCCESS",hi="DELETE_ALL_ARCHIVED_TASKS_ERROR",Oi="DELETE_COMPLETED_TASK_BEGIN",fi="DELETE_COMPLETED_TASK_SUCCESS",xi="DELETE_COMPLETED_TASK_ERROR",gi="DELETE_ALL_COMPLETED_TASKS_BEGIN",ki="DELETE_ALL_COMPLETED_TASKS_SUCCESS",vi="DELETE_ALL_COMPLETED_TASKS_ERROR",yi="BATCH_DELETE_COMPLETED_TASKS_BEGIN",mi="BATCH_DELETE_COMPLETED_TASKS_SUCCESS",Si="BATCH_DELETE_COMPLETED_TASKS_ERROR";var Ti=a(360),_i=Object(p.a)((function(e){return{actionsContainer:{display:"flex",padding:"4px"},moreIcon:{marginRight:"8px"},iconGroup:{paddingLeft:e.spacing(1),borderLeft:"1px solid ".concat(e.palette.grey[100])}}}));function Ai(e){var t=_i(),a=Object(n.useState)(null),r=Object(ln.a)(a,2),c=r[0],s=r[1],i=function(){return s(null)};return Object(ue.jsxs)("div",{className:t.actionsContainer,children:[Object(ue.jsx)(xn.a,{title:"More Actions",children:Object(ue.jsx)(_.a,{"aria-label":"actions",className:t.moreIcon,onClick:function(e){s(e.currentTarget)},children:Object(ue.jsx)(_n.a,{})})}),Object(ue.jsx)(Ti.a,{id:"action-menu",keepMounted:!0,anchorEl:c,open:Boolean(c),onClose:i,children:e.menuItemActions.map((function(e){return Object(ue.jsx)($n.a,{onClick:function(){e.onClick(),i()},disabled:e.disabled,children:e.label},e.label)}))}),e.showIconButtons&&Object(ue.jsx)("div",{className:t.iconGroup,children:e.iconButtonActions.map((function(e){return Object(ue.jsx)(xn.a,{title:e.tooltip,children:Object(ue.jsx)(_.a,{onClick:e.onClick,disabled:e.disabled,children:e.icon})},e.tooltip)}))})]})}var Ei=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Ci={listActiveTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ic,queue:e}),a.prev=1,a.next=4,Ke(e,t);case 4:r=a.sent,n({type:oc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listActiveTasksAsync: ",Ta(a.t0)),n({type:lc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},cancelActiveTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Tc,queue:e,taskId:t}),a.prev=1,a.next=4,Ge(e,t);case 4:n({type:_c,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("cancelActiveTaskAsync: ",Ta(a.t0)),n({type:Ac,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},batchCancelActiveTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Ic,queue:e,taskIds:t}),a.prev=1,a.next=4,We(e,t);case 4:r=a.sent,n({type:wc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchCancelActiveTasksAsync: ",Ta(a.t0)),n({type:qc,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},cancelAllActiveTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ec,queue:e}),t.prev=1,t.next=4,Me(e);case 4:a({type:Cc,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("cancelAllActiveTasksAsync: ",Ta(t.t0)),a({type:Rc,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},taskRowsPerPageChange:Z},Ri=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"status",label:"Status",align:"left"},{key:"start-time",label:"Started",align:"left"},{key:"deadline",label:"Deadline",align:"left"},{key:"actions",label:"Actions",align:"center"}],Ii=Object(o.b)((function(e){return{loading:e.tasks.activeTasks.loading,error:e.tasks.activeTasks.error,tasks:e.tasks.activeTasks.data,batchActionPending:e.tasks.activeTasks.batchActionPending,allActionPending:e.tasks.activeTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),Ci);var wi=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}}}}));function qi(e){var t=e.task,a=wi(),n=Object(b.f)();return Object(ue.jsxs)(On.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(bn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(bn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(bn.a,{children:t.type}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(bn.a,{children:t.canceling?"Canceling":"Running"}),Object(ue.jsx)(bn.a,{children:"-"===t.start_time?"just now":Ia(t.start_time)}),Object(ue.jsx)(bn.a,{children:"-"===t.deadline?"-":Ra(t.deadline)}),Object(ue.jsx)(bn.a,{align:"center",onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsx)(r.a.Fragment,{children:Object(ue.jsx)(xn.a,{title:"Cancel",children:Object(ue.jsx)(_.a,{onClick:e.onCancelClick,disabled:t.requestPending||t.canceling,size:"small",children:Object(ue.jsx)(nc.a,{fontSize:"small"})})})}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(_n.a,{fontSize:"small"})})})]},t.id)}var Pi=Ii((function(e){var t=e.pollInterval,a=e.listActiveTasksAsync,r=e.queue,c=e.pageSize,s=Ei(),i=Object(n.useState)(0),o=Object(ln.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(ln.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(ln.a)(h,2),f=O[0],x=O[1];if(ar(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No active tasks at this time."]});var g=e.tasks.length,k=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ai,{showIconButtons:k>0,iconButtonActions:[{tooltip:"Cancel",icon:Object(ue.jsx)(nc.a,{}),onClick:function(){e.batchCancelActiveTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Cancel All",onClick:function(){e.cancelAllActiveTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(pn.a,{component:Oe.a,children:Object(ue.jsxs)(dn.a,{stickyHeader:!0,className:s.table,"aria-label":"active tasks table",size:"small",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{indeterminate:k>0&&k0&&k===g,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),Ri.map((function(e){return Object(ue.jsx)(bn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(jn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(qi,{task:t,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onCancelClick:function(){e.cancelActiveTaskAsync(r,t.id)},onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(Zr.a,{children:Object(ue.jsx)(On.a,{children:Object(ue.jsx)(ec.a,{rowsPerPageOptions:be,colSpan:Ri.length+1,count:e.tasks.length,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),Ni=a(99),Di=a.n(Ni),Li=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Bi={listPendingTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:uc,queue:e}),a.prev=1,a.next=4,Ye(e,t);case 4:r=a.sent,n({type:dc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listPendingTasksAsync: ",Ta(a.t0)),n({type:jc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deletePendingTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Gc,queue:e,taskId:t}),a.prev=1,a.next=4,dt(e,t);case 4:n({type:Vc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deletePendingTaskAsync: ",Ta(a.t0)),n({type:Mc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},batchDeletePendingTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:is,queue:e,taskIds:t}),a.prev=1,a.next=4,bt(e,t);case 4:r=a.sent,n({type:os,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeletePendingTasksAsync: ",Ta(a.t0)),n({type:ls,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllPendingTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:us,queue:e}),t.prev=1,t.next=4,ht(e);case 4:n=t.sent,a({type:ds,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllPendingTasksAsync: ",Ta(t.t0)),a({type:js,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},archivePendingTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Qc,queue:e,taskId:t}),a.prev=1,a.next=4,ct(e,t);case 4:n({type:Wc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("archivePendingTaskAsync: ",Ta(a.t0)),n({type:Fc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},batchArchivePendingTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:rs,queue:e,taskIds:t}),a.prev=1,a.next=4,it(e,t);case 4:r=a.sent,n({type:cs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchArchivePendingTasksAsync: ",Ta(a.t0)),n({type:ss,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},archiveAllPendingTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:bs,queue:e}),t.prev=1,t.next=4,lt(e);case 4:a({type:ps,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllPendingTasksAsync: ",Ta(t.t0)),a({type:hs,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},taskRowsPerPageChange:Z},Hi=Object(o.b)((function(e){return{loading:e.tasks.pendingTasks.loading,error:e.tasks.pendingTasks.error,tasks:e.tasks.pendingTasks.data,batchActionPending:e.tasks.pendingTasks.batchActionPending,allActionPending:e.tasks.pendingTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),Bi);var Ui=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"96px"},actionButton:{marginLeft:3,marginRight:3}}}));function Ki(e){var t=e.task,a=Ui(),n=Object(b.f)();return Object(ue.jsxs)(On.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(bn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(bn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(bn.a,{children:t.type}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(bn.a,{align:"right",children:t.retried}),Object(ue.jsx)(bn.a,{align:"right",children:t.max_retry}),Object(ue.jsx)(bn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(xn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Sn.a,{fontSize:"small"})})}),Object(ue.jsx)(xn.a,{title:"Archive",children:Object(ue.jsx)(_.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Di.a,{fontSize:"small"})})})]}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(_n.a,{fontSize:"small"})})})]},t.id)}var zi=Hi((function(e){var t=e.pollInterval,a=e.listPendingTasksAsync,r=e.queue,c=e.pageSize,s=Li(),i=Object(n.useState)(0),o=Object(ln.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(ln.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(ln.a)(h,2),f=O[0],x=O[1];if(ar(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No pending tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"paylod",label:"Payload",align:"left"},{key:"retried",label:"Retried",align:"right"},{key:"max_retry",label:"Max Retry",align:"right"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ai,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Sn.a,{}),onClick:function(){e.batchDeletePendingTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(ue.jsx)(Di.a,{}),onClick:function(){e.batchArchivePendingTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllPendingTasksAsync(r)},disabled:e.allActionPending},{label:"Archive All",onClick:function(){e.archiveAllPendingTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(pn.a,{component:Oe.a,children:Object(ue.jsxs)(dn.a,{stickyHeader:!0,className:s.table,"aria-label":"pending tasks table",size:"small",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(bn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(jn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(Ki,{task:t,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},allActionPending:e.allActionPending,onDeleteClick:function(){return e.deletePendingTaskAsync(r,t.id)},onArchiveClick:function(){e.archivePendingTaskAsync(r,t.id)},onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(Zr.a,{children:Object(ue.jsx)(On.a,{children:Object(ue.jsx)(ec.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),Gi=a(100),Vi=a.n(Gi),Mi=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Qi={listScheduledTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:bc,queue:e}),a.prev=1,a.next=4,Xe(e,t);case 4:r=a.sent,n({type:pc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listScheduledTasksAsync: ",Ta(a.t0)),n({type:hc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchDeleteScheduledTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ys,queue:e,taskIds:t}),a.prev=1,a.next=4,mt(e,t);case 4:r=a.sent,n({type:ms,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteScheduledTasksAsync: ",Ta(a.t0)),n({type:Ss,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchRunScheduledTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Os,queue:e,taskIds:t}),a.prev=1,a.next=4,At(e,t);case 4:r=a.sent,n({type:fs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunScheduledTasksAsync: ",Ta(a.t0)),n({type:xs,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchArchiveScheduledTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:gs,queue:e,taskIds:t}),a.prev=1,a.next=4,It(e,t);case 4:r=a.sent,n({type:ks,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchArchiveScheduledTasksAsync: ",Ta(a.t0)),n({type:vs,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllScheduledTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Is,queue:e}),t.prev=1,t.next=4,Tt(e);case 4:n=t.sent,a({type:ws,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllScheduledTasksAsync: ",Ta(t.t0)),a({type:qs,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},runAllScheduledTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ts,queue:e}),t.prev=1,t.next=4,Ct(e);case 4:a({type:_s,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllScheduledTasksAsync: ",Ta(t.t0)),a({type:As,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},archiveAllScheduledTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Es,queue:e}),t.prev=1,t.next=4,qt(e);case 4:a({type:Cs,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllScheduledTasksAsync: ",Ta(t.t0)),a({type:Rs,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},deleteScheduledTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Yc,queue:e,taskId:t}),a.prev=1,a.next=4,vt(e,t);case 4:n({type:Jc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteScheduledTaskAsync: ",Ta(a.t0)),n({type:Xc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},runScheduledTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Pc,queue:e,taskId:t}),a.prev=1,a.next=4,ft(e,t);case 4:n({type:Nc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runScheduledTaskAsync: ",Ta(a.t0)),n({type:Dc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},archiveScheduledTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:$c,queue:e,taskId:t}),a.prev=1,a.next=4,gt(e,t);case 4:n({type:Zc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("archiveScheduledTaskAsync: ",Ta(a.t0)),n({type:es,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},taskRowsPerPageChange:Z},Wi=Object(o.b)((function(e){return{loading:e.tasks.scheduledTasks.loading,error:e.tasks.scheduledTasks.error,tasks:e.tasks.scheduledTasks.data,batchActionPending:e.tasks.scheduledTasks.batchActionPending,allActionPending:e.tasks.scheduledTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),Qi);var Fi=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"140px"},actionButton:{marginLeft:3,marginRight:3}}}));function Yi(e){var t=e.task,a=Fi(),n=Object(b.f)();return Object(ue.jsxs)(On.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(bn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(bn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(bn.a,{children:t.type}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(bn.a,{children:Ra(t.next_process_at)}),Object(ue.jsx)(bn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(xn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Sn.a,{fontSize:"small"})})}),Object(ue.jsx)(xn.a,{title:"Archive",children:Object(ue.jsx)(_.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Di.a,{fontSize:"small"})})}),Object(ue.jsx)(xn.a,{title:"Run",children:Object(ue.jsx)(_.a,{onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Vi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(_n.a,{fontSize:"small"})})})]},t.id)}var Ji=Wi((function(e){var t=e.pollInterval,a=e.listScheduledTasksAsync,r=e.queue,c=e.pageSize,s=Mi(),i=Object(n.useState)(0),o=Object(ln.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(ln.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(ln.a)(h,2),f=O[0],x=O[1];if(ar(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No scheduled tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"process_in",label:"Process In",align:"left"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ai,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Sn.a,{}),onClick:function(){e.batchDeleteScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(ue.jsx)(Di.a,{}),onClick:function(){e.batchArchiveScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(ue.jsx)(Vi.a,{}),onClick:function(){e.batchRunScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllScheduledTasksAsync(r)},disabled:e.allActionPending},{label:"Archive All",onClick:function(){e.archiveAllScheduledTasksAsync(r)},disabled:e.allActionPending},{label:"Run All",onClick:function(){e.runAllScheduledTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(pn.a,{component:Oe.a,children:Object(ue.jsxs)(dn.a,{stickyHeader:!0,className:s.table,"aria-label":"scheduled tasks table",size:"small",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(bn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.label)}))]})}),Object(ue.jsx)(jn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(Yi,{task:t,allActionPending:e.allActionPending,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onRunClick:function(){e.runScheduledTaskAsync(r,t.id)},onDeleteClick:function(){e.deleteScheduledTaskAsync(r,t.id)},onArchiveClick:function(){e.archiveScheduledTaskAsync(r,t.id)},onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(Zr.a,{children:Object(ue.jsx)(On.a,{children:Object(ue.jsx)(ec.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),Xi=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var $i={batchDeleteRetryTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Gs,queue:e,taskIds:t}),a.prev=1,a.next=4,Kt(e,t);case 4:r=a.sent,n({type:Vs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteRetryTasksAsync: ",Ta(a.t0)),n({type:Ms,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchRunRetryTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Ls,queue:e,taskIds:t}),a.prev=1,a.next=4,Mt(e,t);case 4:r=a.sent,n({type:Bs,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunRetryTasksAsync: ",Ta(a.t0)),n({type:Hs,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchArchiveRetryTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Us,queue:e,taskIds:t}),a.prev=1,a.next=4,Yt(e,t);case 4:r=a.sent,n({type:Ks,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchArchiveRetryTasksAsync: ",Ta(a.t0)),n({type:zs,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllRetryTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:$s,queue:e}),t.prev=1,t.next=4,Gt(e);case 4:n=t.sent,a({type:Zs,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllRetryTasksAsync: ",Ta(t.t0)),a({type:ei,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},runAllRetryTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Qs,queue:e}),t.prev=1,t.next=4,Wt(e);case 4:a({type:Ws,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllRetryTasksAsync: ",Ta(t.t0)),a({type:Fs,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},archiveAllRetryTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:Ys,queue:e}),t.prev=1,t.next=4,Xt(e);case 4:a({type:Js,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllRetryTasksAsync: ",Ta(t.t0)),a({type:Xs,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},listRetryTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Oc,queue:e}),a.prev=1,a.next=4,Ze(e,t);case 4:r=a.sent,n({type:fc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listRetryTasksAsync: ",Ta(a.t0)),n({type:xc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteRetryTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Ps,queue:e,taskId:t}),a.prev=1,a.next=4,Ht(e,t);case 4:n({type:Ns,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteRetryTaskAsync: ",Ta(a.t0)),n({type:Ds,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},runRetryTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Lc,queue:e,taskId:t}),a.prev=1,a.next=4,Nt(e,t);case 4:n({type:Bc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runRetryTaskAsync: ",Ta(a.t0)),n({type:Hc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},archiveRetryTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ts,queue:e,taskId:t}),a.prev=1,a.next=4,Lt(e,t);case 4:n({type:as,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("archiveRetryTaskAsync: ",Ta(a.t0)),n({type:ns,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},taskRowsPerPageChange:Z},Zi=Object(o.b)((function(e){return{loading:e.tasks.retryTasks.loading,error:e.tasks.retryTasks.error,tasks:e.tasks.retryTasks.data,batchActionPending:e.tasks.retryTasks.batchActionPending,allActionPending:e.tasks.retryTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),$i);var eo=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"140px"},actionButton:{marginLeft:3,marginRight:3}}}));function to(e){var t=e.task,a=eo(),n=Object(b.f)();return Object(ue.jsxs)(On.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(bn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(bn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(bn.a,{children:t.type}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(bn.a,{children:Ra(t.next_process_at)}),Object(ue.jsx)(bn.a,{children:t.error_message}),Object(ue.jsx)(bn.a,{align:"right",children:t.retried}),Object(ue.jsx)(bn.a,{align:"right",children:t.max_retry}),Object(ue.jsx)(bn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(xn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Sn.a,{fontSize:"small"})})}),Object(ue.jsx)(xn.a,{title:"Archive",children:Object(ue.jsx)(_.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Di.a,{fontSize:"small"})})}),Object(ue.jsx)(xn.a,{title:"Run",children:Object(ue.jsx)(_.a,{onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(Vi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(_n.a,{fontSize:"small"})})})]},t.id)}var ao=Zi((function(e){var t=e.pollInterval,a=e.listRetryTasksAsync,r=e.queue,c=e.pageSize,s=Xi(),i=Object(n.useState)(0),o=Object(ln.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(ln.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(ln.a)(h,2),f=O[0],x=O[1];if(ar(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No retry tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"retry_in",label:"Retry In",align:"left"},{key:"last_error",label:"Last Error",align:"left"},{key:"retried",label:"Retried",align:"right"},{key:"max_retry",label:"Max Retry",align:"right"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ai,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Sn.a,{}),onClick:function(){e.batchDeleteRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(ue.jsx)(Di.a,{}),onClick:function(){e.batchArchiveRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(ue.jsx)(Vi.a,{}),onClick:function(){e.batchRunRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllRetryTasksAsync(r)},disabled:e.allActionPending},{label:"Archive All",onClick:function(){e.archiveAllRetryTasksAsync(r)},disabled:e.allActionPending},{label:"Run All",onClick:function(){e.runAllRetryTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(pn.a,{component:Oe.a,children:Object(ue.jsxs)(dn.a,{stickyHeader:!0,className:s.table,"aria-label":"retry tasks table",size:"small",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(bn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.label)}))]})}),Object(ue.jsx)(jn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(to,{task:t,allActionPending:e.allActionPending,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onRunClick:function(){e.runRetryTaskAsync(t.queue,t.id)},onDeleteClick:function(){e.deleteRetryTaskAsync(t.queue,t.id)},onArchiveClick:function(){e.archiveRetryTaskAsync(t.queue,t.id)},onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(Zr.a,{children:Object(ue.jsx)(On.a,{children:Object(ue.jsx)(ec.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),no=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var ro={listArchivedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:gc,queue:e}),a.prev=1,a.next=4,tt(e,t);case 4:r=a.sent,n({type:kc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listArchivedTasksAsync: ",Ta(a.t0)),n({type:vc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},runArchivedTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Uc,queue:e,taskId:t}),a.prev=1,a.next=4,Zt(e,t);case 4:n({type:Kc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runArchivedTaskAsync: ",Ta(a.t0)),n({type:zc,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},runAllArchivedTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:ui,queue:e}),t.prev=1,t.next=4,la(e);case 4:a({type:di,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllArchivedTasksAsync: ",Ta(t.t0)),a({type:ji,error:_a(t.t0),queue:e});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},deleteArchivedTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ti,queue:e,taskId:t}),a.prev=1,a.next=4,ta(e,t);case 4:n({type:ai,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteArchivedTaskAsync: ",Ta(a.t0)),n({type:ni,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllArchivedTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:bi,queue:e}),t.prev=1,t.next=4,ca(e);case 4:n=t.sent,a({type:pi,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllArchivedTasksAsync: ",Ta(t.t0)),a({type:hi,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},batchRunArchivedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ri,queue:e,taskIds:t}),a.prev=1,a.next=4,ia(e,t);case 4:r=a.sent,n({type:ci,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunArchivedTasksAsync: ",Ta(a.t0)),n({type:si,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},batchDeleteArchivedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:ii,queue:e,taskIds:t}),a.prev=1,a.next=4,na(e,t);case 4:r=a.sent,n({type:oi,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteArchivedTasksAsync: ",Ta(a.t0)),n({type:li,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},taskRowsPerPageChange:Z},co=Object(o.b)((function(e){return{loading:e.tasks.archivedTasks.loading,error:e.tasks.archivedTasks.error,tasks:e.tasks.archivedTasks.data,batchActionPending:e.tasks.archivedTasks.batchActionPending,allActionPending:e.tasks.archivedTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),ro);var so=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"96px"},actionButton:{marginLeft:3,marginRight:3}}}));function io(e){var t=e.task,a=so(),n=Object(b.f)();return Object(ue.jsxs)(On.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(bn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(bn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(bn.a,{children:t.type}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(bn.a,{children:Ia(t.last_failed_at)}),Object(ue.jsx)(bn.a,{children:t.error_message}),Object(ue.jsx)(bn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(xn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{className:a.actionButton,onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(ue.jsx)(Sn.a,{fontSize:"small"})})}),Object(ue.jsx)(xn.a,{title:"Run",children:Object(ue.jsx)(_.a,{className:a.actionButton,onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(ue.jsx)(Vi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(_n.a,{fontSize:"small"})})})]},t.id)}var oo=co((function(e){var t=e.pollInterval,a=e.listArchivedTasksAsync,r=e.queue,c=e.pageSize,s=no(),i=Object(n.useState)(0),o=Object(ln.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(ln.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(ln.a)(h,2),f=O[0],x=O[1];if(ar(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No archived tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"last_failed",label:"Last Failed",align:"left"},{key:"last_error",label:"Last Error",align:"left"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ai,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Sn.a,{}),onClick:function(){e.batchDeleteArchivedTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(ue.jsx)(Vi.a,{}),onClick:function(){e.batchRunArchivedTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllArchivedTasksAsync(r)},disabled:e.allActionPending},{label:"Run All",onClick:function(){e.runAllArchivedTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(pn.a,{component:Oe.a,children:Object(ue.jsxs)(dn.a,{stickyHeader:!0,className:s.table,"aria-label":"archived tasks table",size:"small",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(bn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(jn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(io,{task:t,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onRunClick:function(){e.runArchivedTaskAsync(r,t.id)},onDeleteClick:function(){e.deleteArchivedTaskAsync(r,t.id)},allActionPending:e.allActionPending,onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(Zr.a,{children:Object(ue.jsx)(On.a,{children:Object(ue.jsx)(ec.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),lo=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var uo={listCompletedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,n({type:yc,queue:e}),a.next=4,nt(e,t);case 4:r=a.sent,n({type:mc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(0),console.error("listCompletedTasksAsync: ",Ta(a.t0)),n({type:Sc,queue:e,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[0,8]])})));return function(e){return a.apply(this,arguments)}}()},deleteCompletedTaskAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:Oi,queue:e,taskId:t}),a.prev=1,a.next=4,da(e,t);case 4:n({type:fi,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteCompletedTaskAsync: ",Ta(a.t0)),n({type:xi,error:_a(a.t0),queue:e,taskId:t});case 11:case"end":return a.stop()}}),a,null,[[1,7]])})));return function(e){return a.apply(this,arguments)}}()},deleteAllCompletedTasksAsync:function(e){return function(){var t=Object(me.a)(ye.a.mark((function t(a){var n;return ye.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:gi,queue:e}),t.prev=1,t.next=4,ha(e);case 4:n=t.sent,a({type:ki,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllCompletedTasksAsync: ",Ta(t.t0)),a({type:vi,error:_a(t.t0),queue:e});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},batchDeleteCompletedTasksAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:yi,queue:e,taskIds:t}),a.prev=1,a.next=4,ba(e,t);case 4:r=a.sent,n({type:mi,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteCompletedTasksAsync: ",Ta(a.t0)),n({type:Si,error:_a(a.t0),queue:e,taskIds:t});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},taskRowsPerPageChange:Z},jo=Object(o.b)((function(e){return{loading:e.tasks.completedTasks.loading,error:e.tasks.completedTasks.error,tasks:e.tasks.completedTasks.data,batchActionPending:e.tasks.completedTasks.batchActionPending,allActionPending:e.tasks.completedTasks.allActionPending,pollInterval:e.settings.pollInterval,pageSize:e.settings.taskRowsPerPage}}),uo);var bo=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}},actionCell:{width:"96px"},actionButton:{marginLeft:3,marginRight:3}}}));function po(e){var t=e.task,a=bo(),n=Object(b.f)();return Object(ue.jsxs)(On.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(Q(t.queue,t.id))},children:[Object(ue.jsx)(bn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(bn.a,{component:"th",scope:"row",children:qa(t.id)}),Object(ue.jsx)(bn.a,{children:t.type}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(bn.a,{children:Ia(t.completed_at)}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.result})}),Object(ue.jsx)(bn.a,{children:t.ttl_seconds>0?"".concat(Ca(Aa(t.ttl_seconds))," left"):"expired"}),Object(ue.jsx)(bn.a,{align:"center",className:a.actionCell,onMouseEnter:e.onActionCellEnter,onMouseLeave:e.onActionCellLeave,onClick:function(e){return e.stopPropagation()},children:e.showActions?Object(ue.jsx)(r.a.Fragment,{children:Object(ue.jsx)(xn.a,{title:"Delete",children:Object(ue.jsx)(_.a,{className:a.actionButton,onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(ue.jsx)(Sn.a,{fontSize:"small"})})})}):Object(ue.jsx)(_.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(_n.a,{fontSize:"small"})})})]},t.id)}var ho=jo((function(e){var t=e.pollInterval,a=e.listCompletedTasksAsync,r=e.queue,c=e.pageSize,s=lo(),i=Object(n.useState)(0),o=Object(ln.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(ln.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(ln.a)(h,2),f=O[0],x=O[1];if(ar(Object(n.useCallback)((function(){a(r,{page:l+1,size:c})}),[l,c,r,a]),t),e.error.length>0)return Object(ue.jsxs)(ge.a,{severity:"error",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]});if(0===e.tasks.length)return Object(ue.jsxs)(ge.a,{severity:"info",className:s.alert,children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No completed tasks at this time."]});var g=[{key:"id",label:"ID",align:"left"},{key:"type",label:"Type",align:"left"},{key:"payload",label:"Payload",align:"left"},{key:"completed_at",label:"Completed",align:"left"},{key:"result",label:"Result",align:"left"},{key:"ttl",label:"TTL",align:"left"},{key:"actions",label:"Actions",align:"center"}],k=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(Ai,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(Sn.a,{}),onClick:function(){e.batchDeleteCompletedTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending}],menuItemActions:[{label:"Delete All",onClick:function(){e.deleteAllCompletedTasksAsync(r)},disabled:e.allActionPending}]}),Object(ue.jsx)(pn.a,{component:Oe.a,children:Object(ue.jsxs)(dn.a,{stickyHeader:!0,className:s.table,"aria-label":"archived tasks table",size:"small",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(_.a,{children:Object(ue.jsx)(tc.a,{indeterminate:v>0&&v0&&v===k,onChange:function(t){if(t.target.checked){var a=e.tasks.map((function(e){return e.id}));p(a)}else p([])},inputProps:{"aria-label":"select all tasks shown in the table"}})})}),g.map((function(e){return Object(ue.jsx)(bn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(jn.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(po,{task:t,isSelected:b.includes(t.id),onSelectChange:function(e){p(e?b.concat(t.id):b.filter((function(e){return e!==t.id})))},onDeleteClick:function(){e.deleteCompletedTaskAsync(r,t.id)},allActionPending:e.allActionPending,onActionCellEnter:function(){return x(t.id)},onActionCellLeave:function(){return x("")},showActions:f===t.id},t.id)}))}),Object(ue.jsx)(Zr.a,{children:Object(ue.jsx)(On.a,{children:Object(ue.jsx)(ec.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onPageChange:function(e,t){u(t)},onRowsPerPageChange:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})}));function Oo(e){var t=e.children,a=e.value,n=e.selected,r=Object(Fr.a)(e,["children","value","selected"]);return Object(ue.jsx)("div",Object(u.a)(Object(u.a)({role:"tabpanel",hidden:a!==n,id:"scrollable-auto-tabpanel-".concat(n),"aria-labelledby":"scrollable-auto-tab-".concat(n),style:{flex:1,overflowY:"scroll"}},r),{},{children:a===n&&t}))}var fo=Object(o.b)((function(e,t){var a=e.queues.data.find((function(e){return e.name===t.queue}));return{currentStats:a?a.currentStats:{queue:t.queue,paused:!1,size:0,active:0,pending:0,scheduled:0,retry:0,archived:0,completed:0,processed:0,failed:0,timestamp:"n/a"}}})),xo=Object(p.a)((function(e){return{container:{width:"100%",height:"100%",background:e.palette.background.paper},header:{display:"flex",alignItems:"center",paddingTop:e.spacing(1)},heading:{paddingTop:e.spacing(1),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},chip:{marginLeft:e.spacing(1)},taskcount:{fontSize:"12px",color:e.palette.text.secondary,background:hr(e)?"#303030":e.palette.background.default,textAlign:"center",padding:"3px 6px",borderRadius:"10px",marginLeft:"2px"},searchbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},search:{position:"relative",width:"312px",borderRadius:"18px",backgroundColor:hr(e)?"#303030":e.palette.grey[100],"&:hover, &:focus":{backgroundColor:hr(e)?"#303030":e.palette.grey[200]}},searchIcon:{padding:e.spacing(0,2),height:"100%",position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},inputRoot:{color:"inherit",width:"100%"},inputInput:{padding:e.spacing(1,1,1,0),paddingLeft:"calc(1em + ".concat(e.spacing(4),"px)"),width:"100%",fontSize:"0.85rem"}}}));var go=fo((function(e){var t=e.currentStats,a=xo(),r=Object(b.f)(),c=[{key:"active",label:"Active",count:t.active},{key:"pending",label:"Pending",count:t.pending},{key:"scheduled",label:"Scheduled",count:t.scheduled},{key:"retry",label:"Retry",count:t.retry},{key:"archived",label:"Archived",count:t.archived},{key:"completed",label:"Completed",count:t.completed}],s=Object(n.useState)(""),i=Object(ln.a)(s,2),o=i[0],l=i[1];return Object(ue.jsxs)(Oe.a,{variant:"outlined",className:a.container,children:[Object(ue.jsxs)("div",{className:a.header,children:[Object(ue.jsx)(T.a,{color:"textPrimary",className:a.heading,children:"Tasks"}),Object(ue.jsx)("div",{children:c.map((function(t){return Object(ue.jsx)(Yr.a,{className:a.chip,label:Object(ue.jsxs)("div",{children:[t.label," ",Object(ue.jsx)("span",{className:a.taskcount,children:t.count})]}),variant:"outlined",color:e.selected===t.key?"primary":"default",onClick:function(){return r.push(M(e.queue,t.key))}},t.key)}))}),Object(ue.jsx)("div",{className:a.searchbar,children:Object(ue.jsxs)("div",{className:a.search,children:[Object(ue.jsx)("div",{className:a.searchIcon,children:Object(ue.jsx)($r.a,{})}),Object(ue.jsx)(Jr.a,{placeholder:"Search by ID",classes:{root:a.inputRoot,input:a.inputInput},value:o,onChange:function(e){l(e.target.value)},inputProps:{"aria-label":"search",onKeyDown:function(t){"Enter"===t.key&&r.push(Q(e.queue,o.trim()))}}})]})})]}),Object(ue.jsx)(Oo,{value:"active",selected:e.selected,children:Object(ue.jsx)(Pi,{queue:e.queue})}),Object(ue.jsx)(Oo,{value:"pending",selected:e.selected,children:Object(ue.jsx)(zi,{queue:e.queue,totalTaskCount:t.pending})}),Object(ue.jsx)(Oo,{value:"scheduled",selected:e.selected,children:Object(ue.jsx)(Ji,{queue:e.queue,totalTaskCount:t.scheduled})}),Object(ue.jsx)(Oo,{value:"retry",selected:e.selected,children:Object(ue.jsx)(ao,{queue:e.queue,totalTaskCount:t.retry})}),Object(ue.jsx)(Oo,{value:"archived",selected:e.selected,children:Object(ue.jsx)(oo,{queue:e.queue,totalTaskCount:t.archived})}),Object(ue.jsx)(Oo,{value:"completed",selected:e.selected,children:Object(ue.jsx)(ho,{queue:e.queue,totalTaskCount:t.completed})})]})})),ko=Object(p.a)((function(e){return{banner:{paddingTop:e.spacing(2),paddingBottom:e.spacing(2),display:"flex"},bannerItem:{flexGrow:1,borderLeft:"1px solid ".concat(e.palette.divider),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}}));var vo=Object(o.b)((function(e,t){var a=e.queues.data.find((function(e){return e.name===t.qname}));return{queue:null===a||void 0===a?void 0:a.currentStats}}))((function(e){var t=ko(),a=e.queue,n=e.qname;return Object(ue.jsxs)("div",{className:t.banner,children:[Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue name"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:n})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue state"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?a.paused?"paused":"run":"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue size"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?a.size:"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Memory usage"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?Ln()(a.memory_usage_bytes):"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Processed"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?a.processed:"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Failed"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?a.failed:"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(T.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Error rate"}),Object(ue.jsx)(T.a,{color:"textSecondary",children:a?Pa(a.failed,a.processed):"-"})]})]})})),yo=a(18),mo=a(893),So=a(342),To=a.n(So),_o=Object(Vn.a)((function(e){return{root:{backgroundColor:hr(e)?"#303030":e.palette.background.default,height:e.spacing(3),color:e.palette.text.secondary,fontWeight:e.typography.fontWeightRegular,"&:hover, &:focus":{backgroundColor:e.palette.action.hover},"&:active":{boxShadow:e.shadows[1],backgroundColor:Object(yo.c)(e.palette.action.hover,.12)}}}}))(Yr.a);function Ao(e){var t=Object(b.f)(),a=Object(n.useState)(null),r=Object(ln.a)(a,2),c=r[0],s=r[1],i=function(e){e.preventDefault(),s(e.currentTarget)},o=function(){s(null)};return Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)(mo.a,{"aria-label":"breadcrumb",children:[Object(ue.jsx)(_o,{component:j.b,to:V.HOME,label:"Queues",onClick:function(){return t.push(V.HOME)}}),Object(ue.jsx)(_o,{label:e.queueName,deleteIcon:Object(ue.jsx)(To.a,{}),onClick:i,onDelete:i}),e.taskId&&Object(ue.jsx)(_o,{label:"task:".concat(e.taskId)})]}),Object(ue.jsx)(Ti.a,{id:"queue-breadcrumb-menu",anchorEl:c,keepMounted:!0,open:Boolean(c),onClose:o,children:e.queues.sort().map((function(e){return Object(ue.jsx)($n.a,{onClick:function(){t.push(M(e)),o()},children:e},e)}))})]})}var Eo=Object(o.b)((function(e){return{queues:e.queues.data.map((function(e){return e.name}))}}),{listQueuesAsync:Wa}),Co=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(2)},breadcrumbs:{marginBottom:e.spacing(2)},banner:{marginBottom:e.spacing(2)},tasksTable:{marginBottom:e.spacing(4)}}}));var Ro=["active","pending","scheduled","retry","archived","completed"];var Io=Eo((function(e){var t=Co(),a=Object(b.h)().qname,r=new URLSearchParams(Object(b.g)().search).get("status");r&&Ro.includes(r)||(r="active");var c=e.listQueuesAsync;return Object(n.useEffect)((function(){c()}),[c]),Object(ue.jsx)(pe.a,{maxWidth:"lg",children:Object(ue.jsxs)(he.a,{container:!0,spacing:0,className:t.container,children:[Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.breadcrumbs,children:Object(ue.jsx)(Ao,{queues:e.queues,queueName:a})}),Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.banner,children:Object(ue.jsx)(vo,{qname:a})}),Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.tasksTable,children:Object(ue.jsx)(go,{queue:a,selected:r})})]})})})),wo=a(343),qo=a.n(wo);var Po=Object(o.b)((function(e){return{loading:e.tasks.taskInfo.loading,error:e.tasks.taskInfo.error,taskInfo:e.tasks.taskInfo.data,pollInterval:e.settings.pollInterval,queues:e.queues.data.map((function(e){return e.name}))}}),{getTaskInfoAsync:function(e,t){return function(){var a=Object(me.a)(ye.a.mark((function a(n){var r;return ye.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n({type:rc}),a.prev=1,a.next=4,He(e,t);case 4:r=a.sent,n({type:cc,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("getTaskInfoAsync: ",Ta(a.t0)),n({type:sc,error:_a(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},listQueuesAsync:Wa}),No=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(2)},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},paper:{padding:e.spacing(2),marginTop:e.spacing(2)},breadcrumbs:{marginBottom:e.spacing(2)},infoRow:{display:"flex",alignItems:"center",paddingTop:e.spacing(1)},infoKeyCell:{width:"140px"},infoValueCell:{width:"auto"},footer:{paddingTop:e.spacing(3),paddingBottom:e.spacing(3)}}}));var Do=Po((function(e){var t=No(),a=Object(b.h)(),r=a.qname,c=a.taskId,s=e.getTaskInfoAsync,i=e.pollInterval,o=e.listQueuesAsync,l=e.taskInfo,u=Object(b.f)();return ar(Object(n.useMemo)((function(){return function(){s(r,c)}}),[r,c,s]),i),Object(n.useEffect)((function(){o()}),[o]),Object(ue.jsx)(pe.a,{maxWidth:"lg",className:t.container,children:Object(ue.jsxs)(he.a,{container:!0,spacing:0,children:[Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.breadcrumbs,children:Object(ue.jsx)(Ao,{queues:e.queues,queueName:r,taskId:c})}),Object(ue.jsxs)(he.a,{item:!0,xs:12,md:6,children:[e.error?Object(ue.jsxs)(ge.a,{severity:"error",className:t.alert,children:[Object(ue.jsx)(ke.a,{children:"Error"}),e.error]}):Object(ue.jsxs)(Oe.a,{className:t.paper,variant:"outlined",children:[Object(ue.jsx)(T.a,{variant:"h6",children:"Task Info"}),Object(ue.jsxs)("div",{children:[Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["ID:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.id})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Type:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.type})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["State:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.state})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Queue:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:null===l||void 0===l?void 0:l.queue})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Retry:"," "]}),Object(ue.jsxs)(T.a,{className:t.infoValueCell,children:[null===l||void 0===l?void 0:l.retried,"/",null===l||void 0===l?void 0:l.max_retry]})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Last Failure:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.last_failed_at)?Object(ue.jsxs)(T.a,{children:[null===l||void 0===l?void 0:l.error_message," (",null===l||void 0===l?void 0:l.last_failed_at,")"]}):Object(ue.jsx)(T.a,{children:" - "})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Next Process Time:"," "]}),(null===l||void 0===l?void 0:l.next_process_at)?Object(ue.jsx)(T.a,{children:null===l||void 0===l?void 0:l.next_process_at}):Object(ue.jsx)(T.a,{children:" - "})]})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Timeout:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.timeout_seconds)?Object(ue.jsxs)(T.a,{children:[null===l||void 0===l?void 0:l.timeout_seconds," seconds"]}):Object(ue.jsx)(T.a,{children:" - "})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Deadline:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.deadline)?Object(ue.jsx)(T.a,{children:null===l||void 0===l?void 0:l.deadline}):Object(ue.jsx)(T.a,{children:" - "})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Payload:"," "]}),Object(ue.jsx)("div",{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.payload)&&Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0,maxWidth:400},children:l.payload})})]}),"completed"===(null===l||void 0===l?void 0:l.state)&&Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Completed:"," "]}),Object(ue.jsx)("div",{className:t.infoValueCell,children:Object(ue.jsxs)(T.a,{children:[Ia(l.completed_at)," (",l.completed_at,")"]})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Result:"," "]}),Object(ue.jsx)("div",{className:t.infoValueCell,children:Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0,maxWidth:400},children:l.result})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",className:t.infoKeyCell,children:["TTL:"," "]}),Object(ue.jsx)(T.a,{className:t.infoValueCell,children:Object(ue.jsx)(T.a,{children:l.ttl_seconds>0?"".concat(Ca(Aa(l.ttl_seconds))," left"):"expired"})})]})]})]}),Object(ue.jsx)("div",{className:t.footer,children:Object(ue.jsx)(An.a,{startIcon:Object(ue.jsx)(qo.a,{}),onClick:function(){return u.goBack()},children:"Go Back"})})]})]})})})),Lo=a(894),Bo=a(344),Ho=a.n(Bo),Uo=a(887),Ko=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column"},formControl:{margin:e.spacing(1),display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"center"},selectEmpty:{marginTop:e.spacing(2)},select:{width:"200px"}}}));var zo={pollIntervalChange:function(e){return{type:F,value:e}},selectTheme:function(e){return{type:Y,value:e}}};var Go,Vo=Object(o.b)((function(e){return{pollInterval:e.settings.pollInterval,themePreference:e.settings.themePreference}}),zo)((function(e){var t=Ko(),a=Object(n.useState)(e.pollInterval),r=Object(ln.a)(a,2),c=r[0],s=r[1];return Object(ue.jsx)(pe.a,{maxWidth:"lg",className:t.container,children:Object(ue.jsxs)(he.a,{container:!0,spacing:3,justify:"center",children:[Object(ue.jsx)(he.a,{item:!0,xs:1}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsx)(T.a,{variant:"h5",color:"textPrimary",children:"Settings"})}),Object(ue.jsx)(he.a,{item:!0,xs:5}),Object(ue.jsx)(he.a,{item:!0,xs:1}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsxs)(Oe.a,{className:t.paper,variant:"outlined",children:[Object(ue.jsx)(T.a,{color:"textPrimary",children:"Polling Interval"}),Object(ue.jsx)(T.a,{gutterBottom:!0,color:"textSecondary",variant:"subtitle1",children:"Web UI will fetch live data with the specified interval"}),Object(ue.jsxs)(T.a,{gutterBottom:!0,color:"textSecondary",variant:"subtitle1",children:["Currently: Every"," ",1===c?"second":"".concat(c," seconds")]}),Object(ue.jsx)(Lo.a,{value:c,onChange:function(e,t){s(t)},onChangeCommitted:function(t,a){e.pollIntervalChange(a)},"aria-labelledby":"continuous-slider",valueLabelDisplay:"auto",step:1,marks:!0,min:2,max:20})]})}),Object(ue.jsx)(he.a,{xs:5}),Object(ue.jsx)(he.a,{item:!0,xs:1}),Object(ue.jsx)(he.a,{item:!0,xs:6,children:Object(ue.jsx)(Oe.a,{className:t.paper,variant:"outlined",children:Object(ue.jsxs)(Ho.a,{variant:"outlined",className:t.formControl,children:[Object(ue.jsx)(T.a,{color:"textPrimary",children:"Dark Theme"}),Object(ue.jsxs)(Uo.a,{labelId:"theme-label",id:"theme-selected",value:e.themePreference,onChange:function(t){e.selectTheme(t.target.value)},label:"theme preference",className:t.select,children:[Object(ue.jsx)($n.a,{value:ur.SystemDefault,children:"System Default"}),Object(ue.jsx)($n.a,{value:ur.Always,children:"Always"}),Object(ue.jsx)($n.a,{value:ur.Never,children:"Never"})]})]})})}),Object(ue.jsx)(he.a,{item:!0,xs:5})]})})})),Mo=a(898),Qo=a(879),Wo=a(346),Fo=a.n(Wo),Yo=a(345),Jo=a.n(Yo),Xo=Object(p.a)((function(e){return{table:{minWidth:650},fixedCell:{position:"sticky",zIndex:1,left:0,background:e.palette.background.paper}}}));!function(e){e[e.HostPID=0]="HostPID",e[e.Status=1]="Status",e[e.ActiveWorkers=2]="ActiveWorkers",e[e.Queues=3]="Queues",e[e.Started=4]="Started"}(Go||(Go={}));var $o=[{label:"Host:PID",key:"host",sortBy:Go.HostPID,align:"left"},{label:"Started",key:"started",sortBy:Go.Started,align:"left"},{label:"Status",key:"status",sortBy:Go.Status,align:"left"},{label:"Queues",key:"queues",sortBy:Go.Queues,align:"left"},{label:"Active Workers",key:"workers",sortBy:Go.ActiveWorkers,align:"left"}];function Zo(e,t){var a=Object(un.a)(e);return a.sort(t),a}function el(e){var t=Xo(),a=Object(n.useState)(Go.HostPID),r=Object(ln.a)(a,2),c=r[0],s=r[1],i=Object(n.useState)(qn.Asc),o=Object(ln.a)(i,2),l=o[0],u=o[1];return 0===e.servers.length?Object(ue.jsxs)(ge.a,{severity:"info",children:[Object(ue.jsx)(ke.a,{children:"Info"}),"No servers found at this time."]}):Object(ue.jsx)(pn.a,{children:Object(ue.jsxs)(dn.a,{className:t.table,"aria-label":"server info table",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[$o.map((function(e,a){return Object(ue.jsx)(bn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:Object(ue.jsx)(fn.a,{active:e.sortBy===c,direction:l,onClick:(n=e.sortBy,function(e){if(n===c){var t=l===qn.Asc?qn.Desc:qn.Asc;u(t)}else s(n)}),children:e.label})},e.key);var n})),Object(ue.jsx)(bn.a,{})]})}),Object(ue.jsx)(jn.a,{children:Zo(e.servers,(function(e,t){var a=!1;switch(c){case Go.HostPID:if(e.host===t.host&&e.pid===t.pid)return 0;a=e.host===t.host?e.pid *":{borderBottom:"unset"}},noBorder:{border:"none"},link:{color:e.palette.text.primary}}}));function al(e){var t=tl(),a=e.server,c=Object(n.useState)(!1),s=Object(ln.a)(c,2),i=s[0],o=s[1],l=Object.keys(a.queue_priorities);return Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsxs)(On.a,{className:t.rowRoot,children:[Object(ue.jsxs)(bn.a,{children:[a.host,":",a.pid]}),Object(ue.jsx)(bn.a,{children:Ia(a.start_time)}),Object(ue.jsx)(bn.a,{children:a.status}),Object(ue.jsx)(bn.a,{children:l.map((function(e,a){return Object(ue.jsxs)("span",{children:[Object(ue.jsx)(j.b,{to:M(e),className:t.link,children:e}),a===l.length-1?"":", "]},e)}))}),Object(ue.jsxs)(bn.a,{children:[a.active_workers.length,"/",a.concurrency]}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(xn.a,{title:i?"Hide Details":"Show Details",children:Object(ue.jsx)(_.a,{"aria-label":"expand row",size:"small",onClick:function(){return o(!i)},children:i?Object(ue.jsx)(Jo.a,{}):Object(ue.jsx)(Fo.a,{})})})})]}),Object(ue.jsx)(On.a,{className:t.rowRoot,children:Object(ue.jsx)(bn.a,{style:{paddingBottom:0,paddingTop:0},colSpan:6,children:Object(ue.jsx)(Qo.a,{in:i,timeout:"auto",unmountOnExit:!0,children:Object(ue.jsxs)(he.a,{container:!0,spacing:2,children:[Object(ue.jsxs)(he.a,{item:!0,xs:9,children:[Object(ue.jsx)(T.a,{variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:"Active Workers"}),Object(ue.jsxs)(dn.a,{size:"small","aria-label":"active workers",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{children:"Task ID"}),Object(ue.jsx)(bn.a,{children:"Task Payload"}),Object(ue.jsx)(bn.a,{children:"Queue"}),Object(ue.jsx)(bn.a,{children:"Started"})]})}),Object(ue.jsx)(jn.a,{children:a.active_workers.map((function(e){return Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{component:"th",scope:"row",children:qa(e.task_id)}),Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(Tr,{language:"json",customStyle:{margin:0},children:e.task_payload})}),Object(ue.jsx)(bn.a,{children:e.queue}),Object(ue.jsx)(bn.a,{children:Ia(e.start_time)})]},e.task_id)}))})]})]}),Object(ue.jsxs)(he.a,{item:!0,xs:3,children:[Object(ue.jsx)(T.a,{variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:"Queue Priority"}),Object(ue.jsxs)(dn.a,{size:"small","aria-label":"active workers",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{children:"Queue"}),Object(ue.jsx)(bn.a,{align:"right",children:"Priority"})]})}),Object(ue.jsx)(jn.a,{children:l.map((function(e){return Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{children:Object(ue.jsx)(j.b,{to:M(e),className:t.link,children:e})}),Object(ue.jsx)(bn.a,{align:"right",children:a.queue_priorities[e]})]},e)}))})]}),Object(ue.jsxs)(Mo.a,{margin:2,children:[Object(ue.jsxs)(T.a,{variant:"subtitle2",component:"span",children:["Strict Priority:"," "]}),Object(ue.jsx)(T.a,{variant:"button",component:"span",children:a.strict_priority_enabled?"ON":"OFF"})]})]})]})})})})]})}var nl="LIST_SERVERS_BEGIN",rl="LIST_SERVERS_SUCCESS",cl="LIST_SERVERS_ERROR";var sl=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column"},heading:{paddingLeft:e.spacing(2),marginBottom:e.spacing(1)}}}));var il=Object(o.b)((function(e){return{loading:e.servers.loading,error:e.servers.error,servers:e.servers.data,pollInterval:e.settings.pollInterval}}),{listServersAsync:function(){return function(){var e=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:nl}),e.prev=1,e.next=4,fa();case 4:a=e.sent,t({type:rl,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listServersAsync: ".concat(Ta(e.t0))),t({type:cl,error:_a(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}})((function(e){var t=e.pollInterval,a=e.listServersAsync,n=sl();return ar(a,t),Object(ue.jsx)(pe.a,{maxWidth:"lg",className:n.container,children:Object(ue.jsx)(he.a,{container:!0,spacing:3,children:""===e.error?Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(Oe.a,{className:n.paper,variant:"outlined",children:[Object(ue.jsx)(T.a,{variant:"h6",className:n.heading,children:"Servers"}),Object(ue.jsx)(el,{servers:e.servers})]})}):Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ke.a,{children:"Error"}),"Could not retrieve servers live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})})})})})),ol=a(881),ll=a(882),ul="GET_REDIS_INFO_BEGIN",dl="GET_REDIS_INFO_SUCCESS",jl="GET_REDIS_INFO_ERROR";var bl=Object(p.a)((function(e){return{table:{minWidth:650}}}));function pl(e){var t=bl();return Object(ue.jsx)(pn.a,{children:Object(ue.jsxs)(dn.a,{className:t.table,"aria-label":"queue location table",children:[Object(ue.jsx)(hn.a,{children:Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{children:"Queue"}),Object(ue.jsx)(bn.a,{children:"KeySlot"}),Object(ue.jsx)(bn.a,{children:"Node Addresses"})]})}),Object(ue.jsx)(jn.a,{children:e.queueLocations.map((function(e){return Object(ue.jsxs)(On.a,{children:[Object(ue.jsx)(bn.a,{component:"th",scope:"row",children:e.queue}),Object(ue.jsx)(bn.a,{children:e.keyslot}),Object(ue.jsx)(bn.a,{children:e.nodes.join(", ")})]},e.queue)}))})]})})}var hl=a(880),Ol=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)}}}));function fl(e){var t=e.redisInfo;return Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Server"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(xl,{title:"Version",content:t.redis_version})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(xl,{title:"Uptime",content:"".concat(t.uptime_in_days," days")})}),Object(ue.jsx)(he.a,{item:!0,xs:6}),Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Memory"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(xl,{title:"Used Memory",content:t.used_memory_human})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(xl,{title:"Peak Memory Used",content:t.used_memory_peak_human})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(xl,{title:"Memory Fragmentation Ratio",content:t.mem_fragmentation_ratio})}),Object(ue.jsx)(he.a,{item:!0,xs:3}),Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Connections"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(xl,{title:"Connected Clients",content:t.connected_clients})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(xl,{title:"Connected Replicas",content:t.connected_slaves})}),Object(ue.jsx)(he.a,{item:!0,xs:6}),Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Persistence"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(xl,{title:"Last Save to Disk",content:wa(parseInt(t.rdb_last_save_time))})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(xl,{title:"Number of Changes Since Last Dump",content:t.rdb_changes_since_last_save})}),Object(ue.jsx)(he.a,{item:!0,xs:6})]})}function xl(e){return Object(ue.jsx)(ol.a,{variant:"outlined",children:Object(ue.jsxs)(ll.a,{children:[Object(ue.jsx)(T.a,{gutterBottom:!0,color:"textPrimary",variant:"h5",align:"center",children:e.content}),Object(ue.jsx)(T.a,{color:"textSecondary",variant:"subtitle2",align:"center",children:e.title})]})})}var gl=Object(o.b)((function(e){return{loading:e.redis.loading,error:e.redis.error,redisInfo:e.redis.data,redisAddress:e.redis.address,redisInfoRaw:e.redis.rawData,redisClusterEnabled:e.redis.cluster,redisClusterNodesRaw:e.redis.rawClusterNodes,queueLocations:e.redis.queueLocations,pollInterval:e.settings.pollInterval,themePreference:e.settings.themePreference}}),{getRedisInfoAsync:function(){return function(){var e=Object(me.a)(ye.a.mark((function e(t){var a;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:ul}),e.prev=1,e.next=4,ma();case 4:a=e.sent,t({type:dl,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("getRedisInfoAsync: ".concat(Ta(e.t0))),t({type:jl,error:_a(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}})((function(e){var t=Ol(),a=e.pollInterval,n=e.getRedisInfoAsync,r=e.redisInfo,c=e.redisInfoRaw,s=e.redisClusterEnabled,i=e.redisClusterNodesRaw,o=e.queueLocations;return ar(n,a),Object(ue.jsx)(pe.a,{maxWidth:"lg",className:t.container,children:Object(ue.jsx)(he.a,{container:!0,spacing:3,children:""===e.error?Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)(he.a,{item:!0,xs:12,children:[Object(ue.jsx)(T.a,{variant:"h5",color:"textPrimary",children:s?"Redis Cluster Info":"Redis Info"}),!s&&Object(ue.jsxs)(T.a,{variant:"subtitle1",color:"textSecondary",children:["Connected to: ",e.redisAddress]})]}),o&&o.length>0&&Object(ue.jsxs)(he.a,{item:!0,xs:12,children:[Object(ue.jsx)(T.a,{variant:"h6",color:"textSecondary",children:"Queue Location in Cluster"}),Object(ue.jsx)(pl,{queueLocations:o})]}),i&&Object(ue.jsx)(ue.Fragment,{children:Object(ue.jsxs)(he.a,{item:!0,xs:12,children:[Object(ue.jsxs)(T.a,{variant:"h6",color:"textSecondary",children:[Object(ue.jsx)(hl.a,{href:"https://redis.io/commands/cluster-nodes",target:"_",children:"CLUSTER NODES"})," ","Command Output"]}),Object(ue.jsx)(Tr,{language:"yaml",children:i})]})}),r&&!s&&Object(ue.jsx)(fl,{redisInfo:r}),c&&Object(ue.jsx)(ue.Fragment,{children:Object(ue.jsxs)(he.a,{item:!0,xs:6,children:[Object(ue.jsxs)(T.a,{variant:"h6",color:"textSecondary",children:[s?Object(ue.jsx)(hl.a,{href:"https://redis.io/commands/cluster-info",target:"_",children:"CLUSTER INFO"}):Object(ue.jsx)(hl.a,{href:"https://redis.io/commands/info",target:"_",children:"INFO"})," ","Command Output"]}),Object(ue.jsx)(Tr,{language:"yaml",children:c})]})})]}):Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ke.a,{children:"Error"}),"Could not retrieve redis live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})})})})})),kl=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},headingText:{fontWeight:"bold"}}}));function vl(){var e=kl();return Object(ue.jsx)(pe.a,{maxWidth:"lg",className:e.container,children:Object(ue.jsx)(he.a,{container:!0,spacing:3,children:Object(ue.jsxs)(he.a,{item:!0,xs:12,children:[Object(ue.jsx)(T.a,{variant:"h5",align:"center",className:e.headingText,children:"Oops!"}),Object(ue.jsx)(T.a,{variant:"subtitle1",color:"textSecondary",align:"center",children:"404 - Page Not Found"})]})})})}var yl={closeSnackbar:function(){return{type:Or}},toggleDrawer:function(){return{type:J}}};function ml(e){return Object(ue.jsx)(A.a,Object(u.a)(Object(u.a)({},e),{},{direction:"up"}))}var Sl=Object(o.b)((function(e){return{snackbar:e.snackbar,themePreference:e.settings.themePreference,isDrawerOpen:e.settings.isDrawerOpen}}),yl)((function(e){var t=function(e){var t=Object(pr.a)("(prefers-color-scheme: dark)");return e===ur.Always?t=!0:e===ur.Never&&(t=!1),Object(W.a)({palette:{primary:{main:"#4379FF"},secondary:{main:"#97FBD1"},background:{default:"#f5f7f9"},type:t?"dark":"light"}})}(e.themePreference),a=function(e){return Object(p.a)({root:{display:"flex"},toolbar:{paddingRight:24},toolbarIcon:Object(u.a)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"0 8px"},e.mixins.toolbar),appBar:{backgroundColor:e.palette.background.paper,zIndex:e.zIndex.drawer+1},menuButton:{marginRight:e.spacing(1),color:hr(e)?e.palette.grey[100]:e.palette.grey[700]},menuButtonHidden:{display:"none"},title:{flexGrow:1},drawerPaper:{position:"relative",whiteSpace:"nowrap",width:220,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),border:"none"},drawerPaperClose:Object(l.a)({overflowX:"hidden",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),width:e.spacing(7)},e.breakpoints.up("sm"),{width:e.spacing(9)}),snackbar:{background:e.palette.grey.A400,color:"#ffffff"},snackbarCloseIcon:{color:e.palette.grey[400]},appBarSpacer:e.mixins.toolbar,mainContainer:{display:"flex",width:"100vw"},content:{flex:1,height:"100vh",overflow:"hidden",background:e.palette.background.paper},contentWrapper:{height:"100%",display:"flex",paddingTop:"64px",overflow:"scroll"},sidebarContainer:{display:"flex",justifyContent:"space-between",height:"100%",flexDirection:"column"},listItem:{borderTopRightRadius:"24px",borderBottomRightRadius:"24px"}})}(t)();return Object(ue.jsx)(h.a,{theme:t,children:Object(ue.jsx)(j.a,{children:Object(ue.jsxs)("div",{className:a.root,children:[Object(ue.jsx)(O.a,{position:"absolute",className:a.appBar,variant:"outlined",children:Object(ue.jsxs)(x.a,{className:a.toolbar,children:[Object(ue.jsx)(_.a,{edge:"start",color:"inherit","aria-label":"open drawer",onClick:e.toggleDrawer,className:a.menuButton,children:Object(ue.jsx)(C.a,{})}),Object(ue.jsx)(T.a,{component:"h1",variant:"h6",noWrap:!0,className:a.title,color:"textPrimary",children:"Asynq Monitoring"})]})}),Object(ue.jsxs)("div",{className:a.mainContainer,children:[Object(ue.jsxs)(f.a,{variant:"permanent",classes:{paper:Object(d.default)(a.drawerPaper,!e.isDrawerOpen&&a.drawerPaperClose)},open:e.isDrawerOpen,children:[Object(ue.jsx)(m.a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:e.snackbar.isOpen,autoHideDuration:6e3,onClose:e.closeSnackbar,TransitionComponent:ml,children:Object(ue.jsx)(S.a,{message:e.snackbar.message,className:a.snackbar,action:Object(ue.jsx)(_.a,{size:"small","aria-label":"close",color:"inherit",onClick:e.closeSnackbar,children:Object(ue.jsx)(G.a,{className:a.snackbarCloseIcon,fontSize:"small"})})})}),Object(ue.jsx)("div",{className:a.appBarSpacer}),Object(ue.jsxs)("div",{className:a.sidebarContainer,children:[Object(ue.jsx)(g.a,{children:Object(ue.jsxs)("div",{children:[Object(ue.jsx)(xr,{to:V.HOME,primary:"Queues",icon:Object(ue.jsx)(I.a,{})}),Object(ue.jsx)(xr,{to:V.SERVERS,primary:"Servers",icon:Object(ue.jsx)(K.a,{})}),Object(ue.jsx)(xr,{to:V.SCHEDULERS,primary:"Schedulers",icon:Object(ue.jsx)(L.a,{})}),Object(ue.jsx)(xr,{to:V.REDIS,primary:"Redis",icon:Object(ue.jsx)(q.a,{})})]})}),Object(ue.jsxs)(g.a,{children:[Object(ue.jsx)(xr,{to:V.SETTINGS,primary:"Settings",icon:Object(ue.jsx)(N.a,{})}),Object(ue.jsxs)(k.a,{button:!0,component:"a",className:a.listItem,href:"https://github.com/hibiken/asynqmon/issues",target:"_blank",children:[Object(ue.jsx)(v.a,{children:Object(ue.jsx)(H.a,{})}),Object(ue.jsx)(y.a,{primary:"Send Feedback"})]})]})]})]}),Object(ue.jsx)("main",{className:a.content,children:Object(ue.jsx)("div",{className:a.contentWrapper,children:Object(ue.jsxs)(b.c,{children:[Object(ue.jsx)(b.a,{exact:!0,path:V.TASK_DETAILS,children:Object(ue.jsx)(Do,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.QUEUE_DETAILS,children:Object(ue.jsx)(Io,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.SCHEDULERS,children:Object(ue.jsx)(Wr,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.SERVERS,children:Object(ue.jsx)(il,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.REDIS,children:Object(ue.jsx)(gl,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.SETTINGS,children:Object(ue.jsx)(Vo,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.HOME,children:Object(ue.jsx)(dr,{})}),Object(ue.jsx)(b.a,{path:"*",children:Object(ue.jsx)(vl,{})})]})})})]})]})})})})),Tl=a(92),_l=a(357),Al={data:[],loading:!1,error:""};var El=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Al,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Na:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Da:var a=t.payload.queues;return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:"",data:a.map((function(e){return{name:e.queue,currentStats:e,requestPending:!1}}))});case La:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case Ba:case Ka:case Va:var n=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}));return Object(u.a)(Object(u.a)({},e),{},{data:n});case Ha:var r=e.data.filter((function(e){return e.name!==t.queue}));return Object(u.a)(Object(u.a)({},e),{},{data:r});case za:var c=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1,currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{paused:!0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:c});case Ma:var s=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1,currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{paused:!1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:s});case Ua:case Ga:case Qa:var i=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}));return Object(u.a)(Object(u.a)({},e),{},{data:i});case oc:case dc:case pc:case fc:case kc:var o=e.data.filter((function(e){return e.name!==t.queue})).concat({name:t.queue,currentStats:t.payload.stats,requestPending:!1});return Object(u.a)(Object(u.a)({},e),{},{data:o});case Nc:var l=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+1,scheduled:e.currentStats.scheduled-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:l});case Bc:var d=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+1,retry:e.currentStats.retry-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:d});case Kc:var j=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+1,archived:e.currentStats.archived-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:j});case Wc:var b=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+1,pending:e.currentStats.pending-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:b});case Zc:var p=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+1,scheduled:e.currentStats.scheduled-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:p});case as:var h=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+1,retry:e.currentStats.retry-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:h});case Vc:var O=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,pending:e.currentStats.pending-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:O});case Jc:var f=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,scheduled:e.currentStats.scheduled-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:f});case cs:var x=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+t.payload.archived_ids.length,pending:e.currentStats.pending-t.payload.archived_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:x});case os:var g=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,pending:e.currentStats.pending-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:g});case ps:var k=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+e.currentStats.pending,pending:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:k});case ds:var v=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,pending:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:v});case fs:var y=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+t.payload.pending_ids.length,scheduled:e.currentStats.scheduled-t.payload.pending_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:y});case ks:var m=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+t.payload.archived_ids.length,scheduled:e.currentStats.scheduled-t.payload.archived_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:m});case ms:var S=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,scheduled:e.currentStats.scheduled-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:S});case _s:var T=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+e.currentStats.scheduled,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:T});case Cs:var _=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+e.currentStats.scheduled,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:_});case ws:var A=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:A});case Ns:var E=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,retry:e.currentStats.retry-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:E});case Bs:var C=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+t.payload.pending_ids.length,retry:e.currentStats.retry-t.payload.pending_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:C});case Ks:var R=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.pending+t.payload.archived_ids.length,retry:e.currentStats.retry-t.payload.archived_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:R});case Vs:var I=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,retry:e.currentStats.retry-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:I});case Ws:var w=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+e.currentStats.retry,retry:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:w});case Js:var q=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{archived:e.currentStats.archived+e.currentStats.retry,retry:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:q});case Zs:var P=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,retry:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:P});case ai:var N=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,archived:e.currentStats.archived-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:N});case fi:var D=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-1,completed:e.currentStats.completed-1})})}));return Object(u.a)(Object(u.a)({},e),{},{data:D});case ci:var L=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+t.payload.pending_ids.length,archived:e.currentStats.archived-t.payload.pending_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:L});case oi:var B=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,archived:e.currentStats.archived-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:B});case mi:var H=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.payload.deleted_ids.length,completed:e.currentStats.completed-t.payload.deleted_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:H});case di:var U=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{pending:e.currentStats.pending+e.currentStats.archived,archived:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:U});case pi:var K=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,archived:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:K});case ki:var z=e.data.map((function(e){return e.name!==t.queue?e:Object(u.a)(Object(u.a)({},e),{},{currentStats:Object(u.a)(Object(u.a)({},e.currentStats),{},{size:e.currentStats.size-t.deleted,completed:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:z});default:return e}},Cl={activeTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},pendingTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},scheduledTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},retryTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},archivedTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},completedTasks:{loading:!1,batchActionPending:!1,allActionPending:!1,error:"",data:[]},taskInfo:{loading:!1,error:""}};var Rl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cl,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case rc:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:Object(u.a)(Object(u.a)({},e.taskInfo),{},{loading:!0})});case sc:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:{loading:!1,error:t.error}});case cc:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:{loading:!1,error:"",data:t.payload}});case ic:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!0})});case oc:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{canceling:!1,requestPending:!1})}))})});case lc:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!1,error:t.error,data:[]})});case uc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!0})});case dc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case jc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!1,error:t.error,data:[]})});case bc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!0})});case pc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case hc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!1,error:t.error,data:[]})});case Oc:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!0})});case fc:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case xc:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!1,error:t.error,data:[]})});case gc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!0})});case kc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case vc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!1,error:t.error,data:[]})});case yc:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{loading:!0})});case mc:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{loading:!1,error:"",data:t.payload.tasks.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case Sc:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{loading:!1,error:t.error,data:[]})});case Oi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{data:e.completedTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case fi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{data:e.completedTasks.data.filter((function(e){return e.id!==t.taskId}))})});case xi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{data:e.completedTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case gi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{allActionPending:!0})});case ki:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{allActionPending:!1,data:[]})});case vi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{allActionPending:!1})});case yi:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{batchActionPending:!0,data:e.completedTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case mi:var a=e.completedTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{batchActionPending:!1,data:a})});case Si:return Object(u.a)(Object(u.a)({},e),{},{completedTasks:Object(u.a)(Object(u.a)({},e.completedTasks),{},{batchActionPending:!1,data:e.completedTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});case Tc:var n=e.activeTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{data:n})});case _c:var r=e.activeTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1,canceling:!0})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{data:r})});case Ac:var c=e.activeTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{data:c})});case Ic:var s=e.activeTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{batchActionPending:!0,data:s})});case wc:var i=e.activeTasks.data.map((function(e){return t.payload.canceled_ids.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{canceling:!0,requestPending:!1}):t.payload.error_ids.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{batchActionPending:!1,data:i})});case qc:var o=e.activeTasks.data.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{batchActionPending:!1,data:o})});case Ec:var l=e.activeTasks.data.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{allActionPending:!0,data:l})});case Cc:var d=e.activeTasks.data.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1,canceling:!0})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{allActionPending:!1,data:d})});case Rc:var j=e.activeTasks.data.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}));return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{allActionPending:!1,data:j})});case Qc:case Gc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{data:e.pendingTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case Wc:case Vc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{data:e.pendingTasks.data.filter((function(e){return e.id!==t.taskId}))})});case Fc:case Mc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{data:e.pendingTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case bs:case us:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!0})});case ps:case ds:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!1,data:[]})});case hs:case js:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!1})});case rs:case is:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{batchActionPending:!0,data:e.pendingTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case cs:var b=e.pendingTasks.data.filter((function(e){return!t.payload.archived_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{batchActionPending:!1,data:b})});case os:var p=e.pendingTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{batchActionPending:!1,data:p})});case ss:case ls:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{batchActionPending:!1,data:e.pendingTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});case Pc:case $c:case Yc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{data:e.scheduledTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case Nc:case Zc:case Jc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{data:e.scheduledTasks.data.filter((function(e){return e.id!==t.taskId}))})});case Dc:case es:case Xc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{data:e.scheduledTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case Ts:case Es:case Is:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!0})});case _s:case Cs:case ws:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!1,data:[]})});case As:case Rs:case qs:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!1})});case Os:case gs:case ys:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!0,data:e.scheduledTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case fs:var h=e.scheduledTasks.data.filter((function(e){return!t.payload.pending_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!1,data:h})});case ks:var O=e.scheduledTasks.data.filter((function(e){return!t.payload.archived_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!1,data:O})});case ms:var f=e.scheduledTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!1,data:f})});case xs:case vs:case Ss:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{batchActionPending:!1,data:e.scheduledTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});case Lc:case ts:case Ps:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{data:e.retryTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case Bc:case as:case Ns:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{data:e.retryTasks.data.filter((function(e){return e.id!==t.taskId}))})});case Hc:case ns:case Ds:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{data:e.retryTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case Qs:case Ys:case $s:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!0})});case Ws:case Js:case Zs:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!1,data:[]})});case Fs:case Xs:case ei:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!1})});case Ls:case Us:case Gs:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!0,data:e.retryTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case Bs:var x=e.retryTasks.data.filter((function(e){return!t.payload.pending_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!1,data:x})});case Ks:var g=e.retryTasks.data.filter((function(e){return!t.payload.archived_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!1,data:g})});case Vs:var k=e.retryTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!1,data:k})});case Hs:case zs:case Ms:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{batchActionPending:!1,data:e.retryTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});case Uc:case ti:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{data:e.archivedTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!0})}))})});case Kc:case ai:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{data:e.archivedTasks.data.filter((function(e){return e.id!==t.taskId}))})});case zc:case ni:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{data:e.archivedTasks.data.map((function(e){return e.id!==t.taskId?e:Object(u.a)(Object(u.a)({},e),{},{requestPending:!1})}))})});case ui:case bi:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!0})});case di:case pi:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!1,data:[]})});case ji:case hi:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!1})});case ri:case ii:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{batchActionPending:!0,data:e.archivedTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!0}):e}))})});case ci:var v=e.archivedTasks.data.filter((function(e){return!t.payload.pending_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{batchActionPending:!1,data:v})});case oi:var y=e.archivedTasks.data.filter((function(e){return!t.payload.deleted_ids.includes(e.id)}));return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{batchActionPending:!1,data:y})});case si:case li:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{batchActionPending:!1,data:e.archivedTasks.data.map((function(e){return t.taskIds.includes(e.id)?Object(u.a)(Object(u.a)({},e),{},{requestPending:!1}):e}))})});default:return e}},Il={loading:!1,error:"",data:[]};var wl={isOpen:!1,message:""};var ql=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wl,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Or:return Object(u.a)(Object(u.a)({},e),{},{isOpen:!1});case wc:var a=t.payload.canceled_ids.length;return{isOpen:!0,message:"Cancelation signal sent to ".concat(a," ").concat(1===a?"task":"tasks")};case Cc:return{isOpen:!0,message:"Cancelation signal sent to all tasks in ".concat(t.queue," queue")};case Nc:return{isOpen:!0,message:"Scheduled task is now pending"};case Bc:return{isOpen:!0,message:"Retry task is now pending"};case Kc:return{isOpen:!0,message:"Archived task is now pending"};case Wc:return{isOpen:!0,message:"Pending task is now archived"};case Zc:return{isOpen:!0,message:"Scheduled task is now archived"};case as:return{isOpen:!0,message:"Retry task is now archived"};case Vc:return{isOpen:!0,message:"Pending task deleted"};case Jc:return{isOpen:!0,message:"Scheduled task deleted"};case fs:var n=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(n," scheduled ").concat(1===n?"task is":"tasks are"," now pending")};case cs:var r=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(r," pending ").concat(1===r?"task is":"tasks are"," now archived")};case os:var c=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(c," pending ").concat(1===c?"task":"tasks"," deleted")};case ks:var s=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(s," scheduled ").concat(1===s?"task is":"tasks are"," now archived")};case ms:var i=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(i," scheduled ").concat(1===i?"task":"tasks"," deleted")};case ps:return{isOpen:!0,message:"All pending tasks are now archived"};case ds:return{isOpen:!0,message:"All pending tasks deleted"};case _s:return{isOpen:!0,message:"All scheduled tasks are now pending"};case Cs:return{isOpen:!0,message:"All scheduled tasks are now archived"};case ws:return{isOpen:!0,message:"All scheduled tasks deleted"};case Ns:return{isOpen:!0,message:"Retry task deleted"};case Bs:var o=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(o," retry ").concat(1===o?"task is":"tasks are"," now pending")};case Ks:var l=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(l," retry ").concat(1===l?"task is":"tasks are"," now archived")};case Vs:var d=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(d," retry ").concat(1===d?"task":"tasks"," deleted")};case Ws:return{isOpen:!0,message:"All retry tasks are now pending"};case Js:return{isOpen:!0,message:"All retry tasks are now archived"};case Zs:return{isOpen:!0,message:"All retry tasks deleted"};case ai:return{isOpen:!0,message:"Archived task deleted"};case ci:var j=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(j," archived ").concat(1===j?"task is":"tasks are"," now pending")};case oi:var b=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(b," archived ").concat(1===b?"task":"tasks"," deleted")};case di:return{isOpen:!0,message:"All archived tasks are now pending"};case pi:return{isOpen:!0,message:"All archived tasks deleted"};case fi:return{isOpen:!0,message:"Completed task deleted"};case ki:return{isOpen:!0,message:"All completed tasks deleted"};case mi:var p=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(p," completed ").concat(1===p?"task":"tasks"," deleted")};default:return e}},Pl={loading:!1,data:{}};function Nl(e,t){var a=new Date(e),n=new Date(t);return a.getUTCDate()===n.getUTCDate()&&a.getUTCMonth()===n.getUTCMonth()&&a.getUTCFullYear()===n.getUTCFullYear()}var Dl={loading:!1,error:"",address:"",data:null,rawData:null,cluster:!1,rawClusterNodes:null,queueLocations:null};var Ll="asynqmon:state";var Bl=Object(Tl.b)({settings:br,queues:El,tasks:Rl,servers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Il,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case nl:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case rl:return{loading:!1,error:"",data:t.payload.servers};case cl:return Object(u.a)(Object(u.a)({},e),{},{error:t.error,loading:!1});default:return e}},schedulerEntries:Dr,snackbar:ql,queueStats:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pl,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ya:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Ja:return{data:t.payload.stats,loading:!1};case Xa:return Object(u.a)(Object(u.a)({},e),{},{loading:!1});case Da:var a,n=Object(u.a)({},e.data),r=Object(nr.a)(t.payload.queues);try{var c=function(){var e=a.value,t=n[e.queue];if(!t)return"continue";var r=t.map((function(t){return Nl(t.date,e.timestamp)?Object(u.a)(Object(u.a)({},t),{},{processed:e.processed,failed:e.failed}):t}));n[e.queue]=r};for(r.s();!(a=r.n()).done;)c()}catch(s){r.e(s)}finally{r.f()}return Object(u.a)(Object(u.a)({},e),{},{data:n});default:return e}},redis:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dl,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ul:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case jl:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case dl:return{loading:!1,error:"",address:t.payload.address,data:t.payload.info,rawData:t.payload.raw_info,cluster:t.payload.cluster,rawClusterNodes:t.payload.raw_cluster_nodes,queueLocations:t.payload.queue_locations};default:return e}}}),Hl=function(){try{var e=localStorage.getItem(Ll);if(null===e)return{};var t=JSON.parse(e);return{settings:Object(u.a)(Object(u.a)({},jr),t.settings||{})}}catch(a){return console.log("loadState: could not load state ",a),{}}}(),Ul=Object(_l.a)({reducer:Bl,preloadedState:Hl});Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var Kl=void 0;Ul.subscribe((function(){Kl!==(Kl=Ul.getState().settings)&&function(e){try{var t=JSON.stringify({settings:e.settings});localStorage.setItem(Ll,t)}catch(a){console.error("saveState: could not save state: ",a)}}(Ul.getState())})),s.a.render(Object(ue.jsxs)(r.a.StrictMode,{children:[Object(ue.jsx)(i.a,{}),Object(ue.jsx)(o.a,{store:Ul,children:Object(ue.jsx)(Sl,{})})]}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[802,1,2]]]); //# sourceMappingURL=main.525ff6d9.chunk.js.map