mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-19 11:15:53 +08:00
2 lines
168 KiB
JavaScript
2 lines
168 KiB
JavaScript
(this.webpackJsonpui=this.webpackJsonpui||[]).push([[0],{801:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),c=a(27),s=a.n(c),i=a(884),o=a(28),l=a(110),u=a(2),d=a(6),j=a(42),b=a(41),p=a(841),h=a(876),O=a(881),f=a(882),x=a(874),g=a(809),v=a(810),k=a(871),y=a(872),m=a(883),S=a(812),_=a(115),A=a(844),T=a(811),E=a(351),C=a.n(E),R=a(353),I=a.n(R),w=a(356),q=a.n(w),P=a(357),N=a.n(P),D=a(355),L=a.n(D),B=a(358),H=a.n(B),U=a(354),K=a.n(U),z=a(352),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 Q(e,t){var a=V.QUEUE_DETAILS.replace(":qname",e);return t?"".concat(a,"?status=").concat(t):a}function M(e,t){return V.TASK_DETAILS.replace(":qname",e).replace(":taskId",t)}var W=a(359),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(843),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.onChangePage;return Object(ue.jsxs)("div",{className:t.root,children:[Object(ue.jsx)(A.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.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.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.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(867),he=a(868),Oe=a(163),fe=a(252),xe=a.n(fe),ge=a(887),ve=a(869),ke=a(4),ye=a.n(ke),me=a(10),Se=a(21),_e=a.n(Se),Ae=a(141),Te=a.n(Ae),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,_e()({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,_e()({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,_e()({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,_e()({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,_e()({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,_e()({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(Te.a.stringify(a))),e.next=4,_e()({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,_e()({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 Qe(e){return Me.apply(this,arguments)}function Me(){return(Me=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,_e()({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,_e()({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(Te.a.stringify(a))),e.next=4,_e()({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(Te.a.stringify(a))),e.next=4,_e()({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(Te.a.stringify(a))),e.next=4,_e()({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(Te.a.stringify(a))),e.next=4,_e()({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){return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e()({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 ct(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,_e()({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 it(e){return ot.apply(this,arguments)}function ot(){return(ot=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,_e()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks:archive_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lt(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,_e()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/pending_tasks/").concat(a)});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){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e()({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 bt(e){return pt.apply(this,arguments)}function pt(){return(pt=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,_e()({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 ht(e,t){return Ot.apply(this,arguments)}function Ot(){return(Ot=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,_e()({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 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,_e()({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 gt(e,t){return vt.apply(this,arguments)}function vt(){return(vt=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,_e()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks/").concat(a)});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kt(e,t){return yt.apply(this,arguments)}function yt(){return(yt=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,_e()({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 mt(e){return St.apply(this,arguments)}function St(){return(St=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,_e()({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 _t(e,t){return At.apply(this,arguments)}function At(){return(At=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,_e()({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 Tt(e){return Et.apply(this,arguments)}function Et(){return(Et=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,_e()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ct(e,t){return Rt.apply(this,arguments)}function Rt(){return(Rt=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,_e()({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 It(e){return wt.apply(this,arguments)}function wt(){return(wt=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,_e()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/scheduled_tasks:archive_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qt(e,t){return Pt.apply(this,arguments)}function Pt(){return(Pt=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,_e()({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 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,_e()({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 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,_e()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks/").concat(a)});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){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e()({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 Kt(e){return zt.apply(this,arguments)}function zt(){return(zt=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,_e()({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 Gt(e,t){return Vt.apply(this,arguments)}function Vt(){return(Vt=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,_e()({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 Qt(e){return Mt.apply(this,arguments)}function Mt(){return(Mt=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,_e()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(e,t){return Ft.apply(this,arguments)}function Ft(){return(Ft=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,_e()({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 Yt(e){return Jt.apply(this,arguments)}function Jt(){return(Jt=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,_e()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/retry_tasks:archive_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xt(e,t){return $t.apply(this,arguments)}function $t(){return($t=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,_e()({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 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,_e()({method:"delete",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks/").concat(a)});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){var n;return ye.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e()({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 na(e){return ra.apply(this,arguments)}function ra(){return(ra=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,_e()({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 ca(e,t){return sa.apply(this,arguments)}function sa(){return(sa=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,_e()({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 ia(e){return oa.apply(this,arguments)}function oa(){return(oa=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,_e()({method:"post",url:"".concat(Ee,"/queues/").concat(t,"/archived_tasks:run_all")});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function la(){return ua.apply(this,arguments)}function ua(){return(ua=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,_e()({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 da(){return ja.apply(this,arguments)}function ja(){return(ja=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,_e()({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 ba(e){return pa.apply(this,arguments)}function pa(){return(pa=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,_e()({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 ha(){return Oa.apply(this,arguments)}function Oa(){return(Oa=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,_e()({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 fa(e){var t=e.response;return t?"".concat(t.status," (").concat(t.statusText,"): ").concat(t.data):"error: no error response data available"}function xa(e){var t=e.response;return t?t.data:"Unknown error occurred. See the logs for details."}function ga(e,t){var a=e-t,n=Math.floor(a/1e3),r=Math.floor(n/3600),c=Math.floor((n-3600*r)/60);return{hour:r,minute:c,second:n-3600*r-60*c,totalSeconds:n}}function va(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 ka(e){try{var t=ga(Date.parse(e),Date.now());return t.totalSeconds<1?"now":"in "+va(t)}catch(a){return"-"}}function ya(e){try{return ma(Date.parse(e)/1e3)}catch(t){return console.error("Could not parse timestamp: ",e,t),"-"}}function ma(e){return 0===e?"":va(ga(Date.now(),1e3*e))+" ago"}function Sa(e){var t=e.indexOf("-");return-1===t?e:e.substr(0,t)}function _a(e,t){if(0===t)return"0.00%";var a=(e/t*100).toFixed(2);return"".concat(a," %")}var Aa="LIST_QUEUES_BEGIN",Ta="LIST_QUEUES_SUCCESS",Ea="LIST_QUEUES_ERROR",Ca="DELETE_QUEUE_BEGIN",Ra="DELETE_QUEUE_SUCCESS",Ia="DELETE_QUEUE_ERROR",wa="PAUSE_QUEUE_BEGIN",qa="PAUSE_QUEUE_SUCCESS",Pa="PAUSE_QUEUE_ERROR",Na="RESUME_QUEUE_BEGIN",Da="RESUME_QUEUE_SUCCESS",La="RESUME_QUEUE_ERROR";function Ba(){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:Aa}),e.prev=1,e.next=4,Ce();case 4:a=e.sent,t({type:Ta,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listQueuesAsync: ".concat(fa(e.t0))),t({type:Ea,error:xa(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}function Ha(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:Ca,queue:e}),t.prev=1,t.next=4,Ie(e);case 4:a({type:Ra,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0),a({type:Ia,queue:e,error:xa(t.t0)});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()}var Ua="LIST_QUEUE_STATS_BEGIN",Ka="LIST_QUEUE_STATS_SUCCESS",za="LIST_QUEUE_STATS_ERROR";var Ga=a(845),Va=a(846),Qa=a(850),Ma=a(202),Wa=a(203),Fa=a(161),Ya=a(158),Ja=a(363);var Xa=function(e){var t=Object(b.f)();return Object(ue.jsx)(Ga.a,{children:Object(ue.jsxs)(Va.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(Q(a.activeLabel))},style:{cursor:"pointer"},children:[Object(ue.jsx)(Qa.a,{strokeDasharray:"3 3"}),Object(ue.jsx)(Ma.a,{dataKey:"queue"}),Object(ue.jsx)(Wa.a,{}),Object(ue.jsx)(Fa.a,{}),Object(ue.jsx)(Ya.a,{}),Object(ue.jsx)(Ja.a,{dataKey:"active",stackId:"a",fill:"#1967d2"}),Object(ue.jsx)(Ja.a,{dataKey:"pending",stackId:"a",fill:"#669df6"}),Object(ue.jsx)(Ja.a,{dataKey:"scheduled",stackId:"a",fill:"#fdd663"}),Object(ue.jsx)(Ja.a,{dataKey:"retry",stackId:"a",fill:"#f666a9"}),Object(ue.jsx)(Ja.a,{dataKey:"archived",stackId:"a",fill:"#ac4776"})]})})};var $a=function(e){var t=Object(te.a)();return Object(ue.jsx)(Ga.a,{children:Object(ue.jsxs)(Va.a,{data:e.data,maxBarSize:120,children:[Object(ue.jsx)(Qa.a,{strokeDasharray:"3 3"}),Object(ue.jsx)(Ma.a,{dataKey:"queue"}),Object(ue.jsx)(Wa.a,{}),Object(ue.jsx)(Fa.a,{}),Object(ue.jsx)(Ya.a,{}),Object(ue.jsx)(Ja.a,{dataKey:"succeeded",stackId:"a",fill:t.palette.success.light}),Object(ue.jsx)(Ja.a,{dataKey:"failed",stackId:"a",fill:t.palette.error.light})]})})},Za=a(18),en=a(97),tn=a(857),an=a(861),nn=a(860),rn=a(856),cn=a(858),sn=a(859),on=a(893),ln=a(862),un=a(336),dn=a.n(un),jn=a(335),bn=a.n(jn),pn=a(61),hn=a.n(pn),On=a(60),fn=a.n(On),xn=a(806),gn=a(851),vn=a(855),kn=a(853),yn=a(854),mn=a(852);var Sn,_n=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:Ha})((function(e){return Object(ue.jsx)(gn.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)(mn.a,{id:"alert-dialog-title",children:"Queue is not empty"}),Object(ue.jsx)(kn.a,{children:Object(ue.jsxs)(yn.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)(vn.a,{children:Object(ue.jsx)(xn.a,{onClick:e.onClose,color:"primary",children:"OK"})})]}):Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)(mn.a,{id:"alert-dialog-title",children:['Are you sure you want to delete "',e.queue.queue,'"?']}),Object(ue.jsx)(kn.a,{children:Object(ue.jsx)(yn.a,{id:"alert-dialog-description",children:"You can't undo this action."})}),Object(ue.jsxs)(vn.a,{children:[Object(ue.jsx)(xn.a,{onClick:e.onClose,disabled:e.requestPending,color:"primary",children:"Cancel"}),Object(ue.jsx)(xn.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"}(Sn||(Sn={}));var An,Tn=a(206),En=a.n(Tn),Cn=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"}(An||(An={}));var Rn=[{label:"Queue",key:"queue",sortBy:An.Queue,align:"left"},{label:"State",key:"state",sortBy:An.State,align:"left"},{label:"Size",key:"size",sortBy:An.Size,align:"right"},{label:"Memory usage",key:"memory_usage",sortBy:An.MemoryUsage,align:"right"},{label:"Processed",key:"processed",sortBy:An.Processed,align:"right"},{label:"Failed",key:"failed",sortBy:An.Failed,align:"right"},{label:"Error rate",key:"error_rate",sortBy:An.ErrorRate,align:"right"},{label:"Actions",key:"actions",sortBy:An.None,align:"center"}];function In(e,t){var a=Object(en.a)(e);return a.sort(t),a}function wn(e){var t=Cn(),a=Object(n.useState)(An.Queue),c=Object(Za.a)(a,2),s=c[0],i=c[1],o=Object(n.useState)(Sn.Asc),l=Object(Za.a)(o,2),u=l[0],j=l[1],b=Object(n.useState)(null),p=Object(Za.a)(b,2),h=p[0],O=p[1];return Object(ue.jsxs)(r.a.Fragment,{children:[Object(ue.jsx)(rn.a,{children:Object(ue.jsxs)(tn.a,{className:t.table,"aria-label":"queues overview table",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsx)(sn.a,{children:Rn.map((function(e,a){return Object(ue.jsx)(nn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:e.sortBy!==An.None?Object(ue.jsx)(on.a,{active:s===e.sortBy,direction:u,onClick:(n=e.sortBy,function(e){if(n===s){var t=u===Sn.Asc?Sn.Desc:Sn.Asc;j(t)}else i(n)}),children:e.label}):Object(ue.jsx)("div",{children:e.label})},e.key);var n}))})}),Object(ue.jsx)(an.a,{children:In(e.queues,(function(e,t){var a;switch(s){case An.Queue:if(e.queue===t.queue)return 0;a=e.queue<t.queue;break;case An.State:if(e.paused===t.paused)return 0;a=!e.paused;break;case An.Size:if(e.size===t.size)return 0;a=e.size<t.size;break;case An.MemoryUsage:if(e.memory_usage_bytes===t.memory_usage_bytes)return 0;a=e.memory_usage_bytes<t.memory_usage_bytes;break;case An.Processed:if(e.processed===t.processed)return 0;a=e.processed<t.processed;break;case An.Failed:if(e.failed===t.failed)return 0;a=e.failed<t.failed;break;case An.ErrorRate:var n=e.failed/e.processed,r=t.failed/t.processed;if(n===r)return 0;a=n<r;break;default:throw"Unexpected order by value: ".concat(s)}return u===Sn.Asc?a?-1:1:a?1:-1})).map((function(t){return Object(ue.jsx)(Pn,{queue:t,onPauseClick:function(){return e.onPauseClick(t.queue)},onResumeClick:function(){return e.onResumeClick(t.queue)},onDeleteClick:function(){return O(t)}},t.queue)}))})]})}),Object(ue.jsx)(_n,{onClose:function(){O(null)},queue:h})]})}var qn=Object(p.a)((function(e){return{row:{"&:last-child td":{borderBottomWidth:0},"&:last-child th":{borderBottomWidth:0}},linkText:{textDecoration:"none",color:e.palette.text.primary,"&:hover":{textDecoration:"underline"}},textGreen:{color:e.palette.success.dark},textRed:{color:e.palette.error.dark},boldCell:{fontWeight:600},fixedCell:{position:"sticky",zIndex:1,left:0,background:e.palette.background.paper},actionIconsContainer:{display:"flex",justifyContent:"center",minWidth:"100px"}}}));function Pn(e){var t=qn(),a=e.queue,c=Object(n.useState)(!1),s=Object(Za.a)(c,2),i=s[0],o=s[1];return Object(ue.jsxs)(sn.a,{className:t.row,children:[Object(ue.jsx)(nn.a,{component:"th",scope:"row",className:Object(d.default)(t.boldCell,t.fixedCell),children:Object(ue.jsx)(j.b,{to:Q(a.queue),className:t.linkText,children:a.queue})}),Object(ue.jsx)(nn.a,{children:a.paused?Object(ue.jsx)("span",{className:t.textRed,children:"paused"}):Object(ue.jsx)("span",{className:t.textGreen,children:"run"})}),Object(ue.jsx)(nn.a,{align:"right",children:a.size}),Object(ue.jsx)(nn.a,{align:"right",children:En()(a.memory_usage_bytes)}),Object(ue.jsx)(nn.a,{align:"right",children:a.processed}),Object(ue.jsx)(nn.a,{align:"right",children:a.failed}),Object(ue.jsx)(nn.a,{align:"right",children:_a(a.failed,a.processed)}),Object(ue.jsx)(nn.a,{align:"center",onMouseEnter:function(){return o(!0)},onMouseLeave:function(){return o(!1)},children:Object(ue.jsx)("div",{className:t.actionIconsContainer,children:i?Object(ue.jsxs)(r.a.Fragment,{children:[a.paused?Object(ue.jsx)(ln.a,{title:"Resume",children:Object(ue.jsx)(A.a,{color:"secondary",onClick:e.onResumeClick,disabled:a.requestPending,size:"small",children:Object(ue.jsx)(bn.a,{fontSize:"small"})})}):Object(ue.jsx)(ln.a,{title:"Pause",children:Object(ue.jsx)(A.a,{color:"primary",onClick:e.onPauseClick,disabled:a.requestPending,size:"small",children:Object(ue.jsx)(dn.a,{fontSize:"small"})})}),Object(ue.jsx)(ln.a,{title:"Delete",children:Object(ue.jsx)(A.a,{onClick:e.onDeleteClick,size:"small",children:Object(ue.jsx)(hn.a,{fontSize:"small"})})})]}):Object(ue.jsx)(A.a,{size:"small",children:Object(ue.jsx)(fn.a,{fontSize:"small"})})})})]},a.queue)}var Nn=a(9),Dn=Object(Nn.a)((function(e){return{tooltip:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",maxWidth:400,fontSize:e.typography.pxToRem(12),border:"1px solid #dadde9"}}}))(ln.a),Ln=a(863),Bn=a(337),Hn=a.n(Bn),Un=a(808),Kn=a(369),zn=a(807),Gn=a(865),Vn=a(864),Qn=Object(p.a)((function(e){return{popper:{zIndex:2},buttonContained:{backgroundColor:sr(e)?"#303030":e.palette.background.default,color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover}}}}));function Mn(e){var t=Qn(),a=r.a.useState(!1),n=Object(Za.a)(a,2),c=n[0],s=n[1],i=r.a.useRef(null),o=r.a.useState(e.initialSelectedKey),l=Object(Za.a)(o,2),d=l[0],j=l[1],b=function(e){i.current&&i.current.contains(e.target)||s(!1)},p=e.options.find((function(e){return e.key===d}));return Object(ue.jsxs)(ue.Fragment,{children:[Object(ue.jsxs)(Ln.a,{variant:"contained",ref:i,"aria-label":"split button",size:"small",disableElevation:!0,children:[Object(ue.jsx)(xn.a,{classes:{contained:t.buttonContained},children:p?p.label:"Select Option"}),Object(ue.jsx)(xn.a,{size:"small","aria-controls":c?"split-button-menu":void 0,"aria-expanded":c?"true":void 0,"aria-label":"select option","aria-haspopup":"menu",onClick:function(){s((function(e){return!e}))},classes:{contained:t.buttonContained},children:Object(ue.jsx)(Hn.a,{})})]}),Object(ue.jsx)(zn.a,{open:c,anchorEl:i.current,role:void 0,transition:!0,disablePortal:!0,className:t.popper,children:function(t){var a=t.TransitionProps,n=t.placement;return Object(ue.jsx)(Kn.a,Object(u.a)(Object(u.a)({},a),{},{style:{transformOrigin:"bottom"===n?"center top":"center bottom"},children:Object(ue.jsx)(Oe.a,{children:Object(ue.jsx)(Un.a,{onClickAway:b,children:Object(ue.jsx)(Vn.a,{id:"split-button-menu",children:e.options.map((function(t){return Object(ue.jsx)(Gn.a,{selected:t.key===d,onClick:function(a){return n=t.key,j(n),s(!1),void e.onSelect(n);var n},children:t.label},t.key)}))})})})}))}})]})}function Wn(e,t){Object(n.useEffect)((function(){e();var a=setInterval(e,1e3*t);return function(){return clearInterval(a)}}),[t,e])}var Fn=a(43),Yn=a(866),Jn=a(338);function Xn(e){var t=function(e,t){var a={};for(var n in e){var r,c=Object(Fn.a)(e[n]);try{for(c.s();!(r=c.n()).done;){var s=r.value;a.hasOwnProperty(s.date)||(a[s.date]={succeeded:0,failed:0,date:s.date}),a[s.date].succeeded+=s.processed-s.failed,a[s.date].failed+=s.failed}}catch(i){c.e(i)}finally{c.f()}}return Object.values(a).sort($n).slice(-t)}(e.data,e.numDays),a=Object(te.a)();return Object(ue.jsx)(Ga.a,{children:Object(ue.jsxs)(Yn.a,{data:t,children:[Object(ue.jsx)(Qa.a,{strokeDasharray:"3 3"}),Object(ue.jsx)(Ma.a,{dataKey:"date",minTickGap:10}),Object(ue.jsx)(Wa.a,{}),Object(ue.jsx)(Fa.a,{}),Object(ue.jsx)(Ya.a,{}),Object(ue.jsx)(Jn.a,{type:"monotone",dataKey:"succeeded",stroke:a.palette.success.main}),Object(ue.jsx)(Jn.a,{type:"monotone",dataKey:"failed",stroke:a.palette.error.main})]})})}function $n(e,t){return Date.parse(e.date)-Date.parse(t.date)}var Zn=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"},chartHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:e.spacing(2)},chartHeaderTitle:{display:"flex",alignItems:"center"},chartContainer:{width:"100%",height:"300px"},infoIcon:{marginLeft:e.spacing(1),color:e.palette.grey[500],cursor:"pointer"},tooltipSection:{marginBottom:"4px"},tableContainer:{marginBottom:e.spacing(2)}}}));var er={listQueuesAsync:Ba,pauseQueueAsync: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:wa,queue:e}),t.prev=1,t.next=4,qe(e);case 4:a({type:qa,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("pauseQueueAsynq: ",fa(t.t0)),a({type:Pa,queue:e,error:xa(t.t0)});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},resumeQueueAsync: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:Na,queue:e}),t.prev=1,t.next=4,Ne(e);case 4:a({type:Da,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("resumeQueueAsync: ",fa(t.t0)),a({type:La,queue:e,error:xa(t.t0)});case 11:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()},deleteQueueAsync:Ha,listQueueStatsAsync: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:Ua}),e.prev=1,e.next=4,Le();case 4:a=e.sent,t({type:Ka,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listQueueStatsAsync: ",fa(e.t0)),t({type:za,error:xa(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()},dailyStatsKeyChange:function(e){return{type:$,value:e}}};var tr,ar=Object(o.b)((function(e){return{loading:e.queues.loading,queues:e.queues.data.map((function(e){return Object(u.a)(Object(u.a)({},e.currentStats),{},{requestPending:e.requestPending})})),error:e.queues.error,pollInterval:e.settings.pollInterval,queueStats:e.queueStats.data,dailyStatsKey:e.settings.dailyStatsChartType}}),er)((function(e){var t=e.pollInterval,a=e.listQueuesAsync,r=e.queues,c=e.listQueueStatsAsync,s=e.dailyStatsKey,i=Zn();Wn(a,t);var o=r.map((function(e){return e.queue})).sort().join(",");Object(n.useEffect)((function(){c()}),[c,o]);var l=r.map((function(e){return{queue:e.queue,succeeded:e.processed-e.failed,failed:e.failed}}));return Object(ue.jsx)(pe.a,{maxWidth:"lg",className:i.container,children:Object(ue.jsxs)(he.a,{container:!0,spacing:3,children:[e.error.length>0&&Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ve.a,{children:"Error"}),"Could not retreive 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)(_.a,{variant:"h6",children:"Queue Size"}),Object(ue.jsx)(Dn,{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)(Xa,{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)(_.a,{variant:"h6",children:"Tasks Processed"}),Object(ue.jsx)(Dn,{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)(Mn,{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)($a,{data:l}),"last-7d"===s&&Object(ue.jsx)(Xn,{data:e.queueStats,numDays:7}),"last-30d"===s&&Object(ue.jsx)(Xn,{data:e.queueStats,numDays:30}),"last-90d"===s&&Object(ue.jsx)(Xn,{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)(wn,{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"}(tr||(tr={}));var nr={pollInterval:8,themePreference:tr.SystemDefault,isDrawerOpen:!0,taskRowsPerPage:20,dailyStatsChartType:"last-7d"};var rr=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 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}},cr=a(870);function sr(e){return"dark"===e.palette.type}var ir="CLOSE_SNACKBAR";var or=Object(p.a)((function(e){return{listItem:{borderTopRightRadius:"24px",borderBottomRightRadius:"24px"},selected:{backgroundColor:sr(e)?"".concat(e.palette.secondary.main,"30"):"".concat(e.palette.primary.main,"30")},selectedText:{fontWeight:600,color:sr(e)?e.palette.secondary.main:e.palette.primary.main},selectedIcon:{color:sr(e)?e.palette.secondary.main:e.palette.primary.main}}}));var lr=function(e){var t=or(),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)(ln.a,{title:n,placement:"right",children:Object(ue.jsxs)(v.a,{button:!0,component:i,className:Object(d.default)(t.listItem,s&&t.selected),children:[a&&Object(ue.jsx)(k.a,{className:Object(d.default)(s&&t.selectedIcon),children:a}),Object(ue.jsx)(y.a,{primary:n,classes:{primary:s?t.selectedText:void 0}})]})})})},ur=a(371),dr=a(344),jr=a.n(dr),br=a(888),pr=a(339),hr=a(340);function Or(e){var t=sr(Object(te.a)())?pr.a:hr.a;return Object(ue.jsx)(br.a,{language:e.language,style:t,customStyle:e.customStyle,children:e.children})}var fr=a(343),xr=a.n(fr),gr="LIST_SCHEDULER_ENTRIES_BEGIN",vr="LIST_SCHEDULER_ENTRIES_SUCCESS",kr="LIST_SCHEDULER_ENTRIES_ERROR",yr="LIST_SCHEDULER_ENQUEUE_EVENTS_BEGIN",mr="LIST_SCHEDULER_ENQUEUE_EVENTS_SUCCESS",Sr="LIST_SCHEDULER_ENQUEUE_EVENTS_ERROR";function _r(e,t){return e.enqueueEventsByEntryId[t]||{data:[],loading:!1}}var Ar={loading:!1,data:[],error:"",enqueueEventsByEntryId:{}};var Tr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ar,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case gr:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case vr:return Object(u.a)(Object(u.a)({},e),{},{error:"",loading:!1,data:t.payload.entries});case kr:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case yr:var a=_r(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 mr:var n=function(e,t){return Date.parse(t.enqueued_at)-Date.parse(e.enqueued_at)},r=_r(e,t.entryId),c=xr()([].concat(Object(en.a)(r.data),Object(en.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 Sr:var s=_r(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}},Er=Object(p.a)((function(e){return{table:{height:"80vh"},stickyHeaderCell:{background:e.palette.background.paper}}}));var Cr,Rr=Object(o.b)((function(e,t){return{events:_r(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:yr,entryId:e}),t.prev=1,t.next=4,ba(e);case 4:n=t.sent,a({type:mr,payload:n,entryId:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("listSchedulerEnqueueEventsAsync: ",fa(t.t0)),a({type:Sr,error:xa(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=Er(),a=e.listSchedulerEnqueueEventsAsync,r=e.entryId,c=e.events;return Object(n.useEffect)((function(){a(r)}),[r,a]),Object(ue.jsx)(rn.a,{className:t.table,children:Object(ue.jsxs)(tn.a,{stickyHeader:!0,"aria-label":"scheduler enqueue events table",size:"small",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{classes:{stickyHeader:t.stickyHeaderCell},children:"Enqueued"}),Object(ue.jsx)(nn.a,{classes:{stickyHeader:t.stickyHeaderCell},children:"Task ID"})]})}),Object(ue.jsx)(an.a,{children:c.data.map((function(e){return Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{component:"th",scope:"row",children:ya(e.enqueued_at)}),Object(ue.jsx)(nn.a,{children:e.task_id})]},e.task_id)}))})]})})})),Ir=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"}(Cr||(Cr={}));var wr=[{label:"Entry ID",key:"entry_id",sortBy:Cr.EntryId,align:"left"},{label:"Spec",key:"spec",sortBy:Cr.Spec,align:"left"},{label:"Type",key:"type",sortBy:Cr.Type,align:"left"},{label:"Payload",key:"task_payload",sortBy:Cr.Payload,align:"left"},{label:"Options",key:"options",sortBy:Cr.Options,align:"left"},{label:"Next Enqueue",key:"next_enqueue",sortBy:Cr.NextEnqueue,align:"left"},{label:"Prev Enqueue",key:"prev_enqueue",sortBy:Cr.PrevEnqueue,align:"left"},{label:"",key:"show_history",sortBy:Cr.None,align:"left"}];function qr(e,t){var a=Object(en.a)(e);return a.sort(t),a}function Pr(e){var t=Ir(),a=Object(n.useState)(Cr.EntryId),r=Object(Za.a)(a,2),c=r[0],s=r[1],i=Object(n.useState)(Sn.Asc),o=Object(Za.a)(i,2),l=o[0],u=o[1],j=Object(n.useState)(""),b=Object(Za.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)(ve.a,{children:"Info"}),"No entries found at this time."]}):Object(ue.jsx)(ue.Fragment,{children:Object(ue.jsxs)(rn.a,{children:[Object(ue.jsxs)(tn.a,{className:t.table,"aria-label":"scheduler entries table",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsx)(sn.a,{children:wr.map((function(e,a){return Object(ue.jsx)(nn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:Object(ue.jsx)(on.a,{active:e.sortBy===c,direction:l,onClick:(n=e.sortBy,function(e){if(n===c){var t=l===Sn.Asc?Sn.Desc:Sn.Asc;u(t)}else s(n)}),children:e.label})},e.key);var n}))})}),Object(ue.jsx)(an.a,{children:qr(e.entries,(function(e,t){var a;switch(c){case Cr.EntryId:if(e.id===t.id)return 0;a=e.id<t.id;break;case Cr.Spec:if(e.spec===t.spec)return 0;a=e.spec<t.spec;break;case Cr.Type:if(e.task_type===t.task_type)return 0;a=e.task_type<t.task_type;break;case Cr.Payload:if(e.task_payload===t.task_payload)return 0;a=e.task_payload<t.task_payload;break;case Cr.Options:if(e.options===t.options)return 0;a=e.options<t.options;break;case Cr.NextEnqueue:if(e.next_enqueue_at===t.next_enqueue_at)return 0;a=e.next_enqueue_at<t.next_enqueue_at;break;case Cr.PrevEnqueue:var n=e.prev_enqueue_at||"",r=t.prev_enqueue_at||"";if(n===r)return 0;a=n<r;break;default:throw"Unexpected order by value: ".concat(c)}return l===Sn.Asc?a?-1:1:a?1:-1})).map((function(t,a){return Object(ue.jsx)(Dr,{entry:t,isLastRow:a===e.entries.length-1,onShowHistoryClick:function(){return h(t.id)}},t.id)}))})]}),Object(ue.jsx)(ur.a,{open:""!==p,onClose:function(){return h("")},className:t.modal,children:Object(ue.jsxs)("div",{className:t.modalContent,children:[Object(ue.jsx)(_.a,{variant:"h6",gutterBottom:!0,color:"textPrimary",children:"Recent History"}),Object(ue.jsx)(Rr,{entryId:p})]})})]})})}var Nr=Object(p.a)((function(e){return{rowRoot:{"& > *":{borderBottom:"unset"}},noBorder:{border:"none"}}}));function Dr(e){var t=e.entry,a=e.isLastRow,n=Nr();return Object(ue.jsxs)(sn.a,{className:n.rowRoot,children:[Object(ue.jsx)(nn.a,{component:"th",scope:"row",className:Object(d.default)(a&&n.noBorder),children:t.id}),Object(ue.jsx)(nn.a,{className:Object(d.default)(a&&n.noBorder),children:t.spec}),Object(ue.jsx)(nn.a,{className:Object(d.default)(a&&n.noBorder),children:t.task_type}),Object(ue.jsx)(nn.a,{className:Object(d.default)(a&&n.noBorder),children:Object(ue.jsx)(Or,{language:"json",children:t.task_payload})}),Object(ue.jsx)(nn.a,{className:Object(d.default)(a&&n.noBorder),children:Object(ue.jsx)(Or,{language:"go",children:t.options.length>0?t.options.join(", "):"No options"})}),Object(ue.jsx)(nn.a,{className:Object(d.default)(a&&n.noBorder),children:ka(t.next_enqueue_at)}),Object(ue.jsx)(nn.a,{className:Object(d.default)(a&&n.noBorder),children:t.prev_enqueue_at?ya(t.prev_enqueue_at):"N/A"}),Object(ue.jsx)(nn.a,{children:Object(ue.jsx)(ln.a,{title:"See History",children:Object(ue.jsx)(A.a,{"aria-label":"expand row",size:"small",onClick:e.onShowHistoryClick,children:Object(ue.jsx)(jr.a,{})})})})]})}var Lr=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 Br=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:gr}),e.prev=1,e.next=4,da();case 4:a=e.sent,t({type:vr,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listSchedulerEnqueueEventsAsync: ".concat(fa(e.t0))),t({type:kr,error:xa(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=Lr();return Wn(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)(_.a,{variant:"h6",className:n.heading,children:"Scheduler Entries"}),Object(ue.jsx)(Pr,{entries:e.entries})]})}):Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ve.a,{children:"Error"}),"Could not retreive scheduler entries live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})})})})})),Hr=a(362),Ur=a(895),Kr=a(894),zr=a(345),Gr=a.n(zr),Vr=a(873),Qr=a(890),Mr=a(889),Wr=a(253),Fr=a.n(Wr),Yr="GET_TASK_INFO_BEGIN",Jr="GET_TASK_INFO_SUCCESS",Xr="GET_TASK_INFO_ERROR",$r="LIST_ACTIVE_TASKS_BEGIN",Zr="LIST_ACTIVE_TASKS_SUCCESS",ec="LIST_ACTIVE_TASKS_ERROR",tc="LIST_PENDING_TASKS_BEGIN",ac="LIST_PENDING_TASKS_SUCCESS",nc="LIST_PENDING_TASKS_ERROR",rc="LIST_SCHEDULED_TASKS_BEGIN",cc="LIST_SCHEDULED_TASKS_SUCCESS",sc="LIST_SCHEDULED_TASKS_ERROR",ic="LIST_RETRY_TASKS_BEGIN",oc="LIST_RETRY_TASKS_SUCCESS",lc="LIST_RETRY_TASKS_ERROR",uc="LIST_ARCHIVED_TASKS_BEGIN",dc="LIST_ARCHIVED_TASKS_SUCCESS",jc="LIST_ARCHIVED_TASKS_ERROR",bc="CANCEL_ACTIVE_TASK_BEGIN",pc="CANCEL_ACTIVE_TASK_SUCCESS",hc="CANCEL_ACTIVE_TASK_ERROR",Oc="CANCEL_ALL_ACTIVE_TASKS_BEGIN",fc="CANCEL_ALL_ACTIVE_TASKS_SUCCESS",xc="CANCEL_ALL_ACTIVE_TASKS_ERROR",gc="BATCH_CANCEL_ACTIVE_TASKS_BEGIN",vc="BATCH_CANCEL_ACTIVE_TASKS_SUCCESS",kc="BATCH_CANCEL_ACTIVE_TASKS_ERROR",yc="RUN_SCHEDULED_TASK_BEGIN",mc="RUN_SCHEDULED_TASK_SUCCESS",Sc="RUN_SCHEDULED_TASK_ERROR",_c="RUN_RETRY_TASK_BEGIN",Ac="RUN_RETRY_TASK_SUCCESS",Tc="RUN_RETRY_TASK_ERROR",Ec="RUN_ARCHIVED_TASK_BEGIN",Cc="RUN_ARCHIVED_TASK_SUCCESS",Rc="RUN_ARCHIVED_TASK_ERROR",Ic="DELETE_PENDING_TASK_BEGIN",wc="DELETE_PENDING_TASK_SUCCESS",qc="DELETE_PENDING_TASK_ERROR",Pc="ARCHIVE_PENDING_TASK_BEGIN",Nc="ARCHIVE_PENDING_TASK_SUCCESS",Dc="ARCHIVE_PENDING_TASK_ERROR",Lc="DELETE_SCHEDULED_TASK_BEGIN",Bc="DELETE_SCHEDULED_TASK_SUCCESS",Hc="DELETE_SCHEDULED_TASK_ERROR",Uc="ARCHIVE_SCHEDULED_TASK_BEGIN",Kc="ARCHIVE_SCHEDULED_TASK_SUCCESS",zc="ARCHIVE_SCHEDULED_TASK_ERROR",Gc="ARCHIVE_RETRY_TASK_BEGIN",Vc="ARCHIVE_RETRY_TASK_SUCCESS",Qc="ARCHIVE_RETRY_TASK_ERROR",Mc="BATCH_ARCHIVE_PENDING_TASKS_BEGIN",Wc="BATCH_ARCHIVE_PENDING_TASKS_SUCCESS",Fc="BATCH_RUN_PENDING_TASKS_ERROR",Yc="BATCH_DELETE_PENDING_TASKS_BEGIN",Jc="BATCH_DELETE_PENDING_TASKS_SUCCESS",Xc="BATCH_DELETE_PENDING_TASKS_ERROR",$c="DELETE_ALL_PENDING_TASKS_BEGIN",Zc="DELETE_ALL_PENDING_TASKS_SUCCESS",es="DELETE_ALL_PENDING_TASKS_ERROR",ts="ARCHIVE_ALL_PENDING_TASKS_BEGIN",as="ARCHIVE_ALL_PENDING_TASKS_SUCCESS",ns="ARCHIVE_ALL_PENDING_TASKS_ERROR",rs="BATCH_RUN_SCHEDULED_TASKS_BEGIN",cs="BATCH_RUN_SCHEDULED_TASKS_SUCCESS",ss="BATCH_RUN_SCHEDULED_TASKS_ERROR",is="BATCH_ARCHIVE_SCHEDULED_TASKS_BEGIN",os="BATCH_ARCHIVE_SCHEDULED_TASKS_SUCCESS",ls="BATCH_RUN_SCHEDULED_TASKS_ERROR",us="BATCH_DELETE_SCHEDULED_TASKS_BEGIN",ds="BATCH_DELETE_SCHEDULED_TASKS_SUCCESS",js="BATCH_DELETE_SCHEDULED_TASKS_ERROR",bs="RUN_ALL_SCHEDULED_TASKS_BEGIN",ps="RUN_ALL_SCHEDULED_TASKS_SUCCESS",hs="RUN_ALL_SCHEDULED_TASKS_ERROR",Os="ARCHIVE_ALL_SCHEDULED_TASKS_BEGIN",fs="ARCHIVE_ALL_SCHEDULED_TASKS_SUCCESS",xs="ARCHIVE_ALL_SCHEDULED_TASKS_ERROR",gs="DELETE_ALL_SCHEDULED_TASKS_BEGIN",vs="DELETE_ALL_SCHEDULED_TASKS_SUCCESS",ks="DELETE_ALL_SCHEDULED_TASKS_ERROR",ys="DELETE_RETRY_TASK_BEGIN",ms="DELETE_RETRY_TASK_SUCCESS",Ss="DELETE_RETRY_TASK_ERROR",_s="BATCH_RUN_RETRY_TASKS_BEGIN",As="BATCH_RUN_RETRY_TASKS_SUCCESS",Ts="BATCH_RUN_RETRY_TASKS_ERROR",Es="BATCH_ARCHIVE_RETRY_TASKS_BEGIN",Cs="BATCH_ARCHIVE_RETRY_TASKS_SUCCESS",Rs="BATCH_ARCHIVE_RETRY_TASKS_ERROR",Is="BATCH_DELETE_RETRY_TASKS_BEGIN",ws="BATCH_DELETE_RETRY_TASKS_SUCCESS",qs="BATCH_DELETE_RETRY_TASKS_ERROR",Ps="RUN_ALL_RETRY_TASKS_BEGIN",Ns="RUN_ALL_RETRY_TASKS_SUCCESS",Ds="RUN_ALL_RETRY_TASKS_ERROR",Ls="ARCHIVE_ALL_RETRY_TASKS_BEGIN",Bs="ARCHIVE_ALL_RETRY_TASKS_SUCCESS",Hs="ARCHIVE_ALL_RETRY_TASKS_ERROR",Us="DELETE_ALL_RETRY_TASKS_BEGIN",Ks="DELETE_ALL_RETRY_TASKS_SUCCESS",zs="DELETE_ALL_RETRY_TASKS_ERROR",Gs="DELETE_ARCHIVED_TASK_BEGIN",Vs="DELETE_ARCHIVED_TASK_SUCCESS",Qs="DELETE_ARCHIVED_TASK_ERROR",Ms="BATCH_RUN_ARCHIVED_TASKS_BEGIN",Ws="BATCH_RUN_ARCHIVED_TASKS_SUCCESS",Fs="BATCH_RUN_ARCHIVED_TASKS_ERROR",Ys="BATCH_DELETE_ARCHIVED_TASKS_BEGIN",Js="BATCH_DELETE_ARCHIVED_TASKS_SUCCESS",Xs="BATCH_DELETE_ARCHIVED_TASKS_ERROR",$s="RUN_ALL_ARCHIVED_TASKS_BEGIN",Zs="RUN_ALL_ARCHIVED_TASKS_SUCCESS",ei="RUN_ALL_ARCHIVED_TASKS_ERROR",ti="DELETE_ALL_ARCHIVED_TASKS_BEGIN",ai="DELETE_ALL_ARCHIVED_TASKS_SUCCESS",ni="DELETE_ALL_ARCHIVED_TASKS_ERROR";var ri=a(364),ci=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 si(e){var t=ci(),a=Object(n.useState)(null),r=Object(Za.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)(ln.a,{title:"More Actions",children:Object(ue.jsx)(A.a,{"aria-label":"actions",className:t.moreIcon,onClick:function(e){s(e.currentTarget)},children:Object(ue.jsx)(fn.a,{})})}),Object(ue.jsx)(ri.a,{id:"action-menu",keepMounted:!0,anchorEl:c,open:Boolean(c),onClose:i,children:e.menuItemActions.map((function(e){return Object(ue.jsx)(Gn.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)(ln.a,{title:e.tooltip,children:Object(ue.jsx)(A.a,{onClick:e.onClick,disabled:e.disabled,children:e.icon})},e.tooltip)}))})]})}var ii=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var oi={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:$r,queue:e}),a.prev=1,a.next=4,Ke(e,t);case 4:r=a.sent,n({type:Zr,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listActiveTasksAsync: ",fa(a.t0)),n({type:ec,queue:e,error:xa(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:bc,queue:e,taskId:t}),a.prev=1,a.next=4,Ge(e,t);case 4:n({type:pc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("cancelActiveTaskAsync: ",fa(a.t0)),n({type:hc,error:xa(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:gc,queue:e,taskIds:t}),a.prev=1,a.next=4,We(e,t);case 4:r=a.sent,n({type:vc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchCancelActiveTasksAsync: ",fa(a.t0)),n({type:kc,error:xa(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:Oc,queue:e}),t.prev=1,t.next=4,Qe(e);case 4:a({type:fc,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("cancelAllActiveTasksAsync: ",fa(t.t0)),a({type:xc,error:xa(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},li=[{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"}],ui=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}}),oi);var di=Object(p.a)((function(e){return{root:{cursor:"pointer","&:hover":{boxShadow:e.shadows[2]},"&:hover .MuiTableCell-root":{borderBottomColor:e.palette.background.paper}}}}));function ji(e){var t=e.task,a=di(),n=Object(b.f)();return Object(ue.jsxs)(sn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(M(t.queue,t.id))},children:[Object(ue.jsx)(nn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(nn.a,{component:"th",scope:"row",children:Sa(t.id)}),Object(ue.jsx)(nn.a,{children:t.type}),Object(ue.jsx)(nn.a,{children:Object(ue.jsx)(Or,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(nn.a,{children:t.canceling?"Canceling":"Running"}),Object(ue.jsx)(nn.a,{children:"-"===t.start_time?"just now":ya(t.start_time)}),Object(ue.jsx)(nn.a,{children:"-"===t.deadline?"-":ka(t.deadline)}),Object(ue.jsx)(nn.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)(ln.a,{title:"Cancel",children:Object(ue.jsx)(A.a,{onClick:e.onCancelClick,disabled:t.requestPending||t.canceling,size:"small",children:Object(ue.jsx)(Fr.a,{fontSize:"small"})})})}):Object(ue.jsx)(A.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(fn.a,{fontSize:"small"})})})]},t.id)}var bi=ui((function(e){var t=e.pollInterval,a=e.listActiveTasksAsync,r=e.queue,c=e.pageSize,s=ii(),i=Object(n.useState)(0),o=Object(Za.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(Za.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(Za.a)(h,2),f=O[0],x=O[1];if(Wn(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)(ve.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)(ve.a,{children:"Info"}),"No active tasks at this time."]});var g=e.tasks.length,v=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(si,{showIconButtons:v>0,iconButtonActions:[{tooltip:"Cancel",icon:Object(ue.jsx)(Fr.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)(rn.a,{component:Oe.a,children:Object(ue.jsxs)(tn.a,{stickyHeader:!0,className:s.table,"aria-label":"active tasks table",size:"small",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{indeterminate:v>0&&v<g,checked:g>0&&v===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"}})})}),li.map((function(e){return Object(ue.jsx)(nn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(an.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(ji,{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)(Vr.a,{children:Object(ue.jsx)(sn.a,{children:Object(ue.jsx)(Qr.a,{rowsPerPageOptions:be,colSpan:li.length+1,count:e.tasks.length,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onChangePage:function(e,t){u(t)},onChangeRowsPerPage:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),pi=a(98),hi=a.n(pi),Oi=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var fi={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:tc,queue:e}),a.prev=1,a.next=4,Ye(e,t);case 4:r=a.sent,n({type:ac,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listPendingTasksAsync: ",fa(a.t0)),n({type:nc,queue:e,error:xa(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:Ic,queue:e,taskId:t}),a.prev=1,a.next=4,lt(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("deletePendingTaskAsync: ",fa(a.t0)),n({type:qc,error:xa(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:Yc,queue:e,taskIds:t}),a.prev=1,a.next=4,dt(e,t);case 4:r=a.sent,n({type:Jc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeletePendingTasksAsync: ",fa(a.t0)),n({type:Xc,error:xa(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:$c,queue:e}),t.prev=1,t.next=4,bt(e);case 4:n=t.sent,a({type:Zc,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllPendingTasksAsync: ",fa(t.t0)),a({type:es,error:xa(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:Pc,queue:e,taskId:t}),a.prev=1,a.next=4,nt(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("archivePendingTaskAsync: ",fa(a.t0)),n({type:Dc,error:xa(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:Mc,queue:e,taskIds:t}),a.prev=1,a.next=4,ct(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("batchArchivePendingTasksAsync: ",fa(a.t0)),n({type:Fc,error:xa(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:ts,queue:e}),t.prev=1,t.next=4,it(e);case 4:a({type:as,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllPendingTasksAsync: ",fa(t.t0)),a({type:ns,error:xa(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},xi=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}}),fi);var gi=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 vi(e){var t=e.task,a=gi(),n=Object(b.f)();return Object(ue.jsxs)(sn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(M(t.queue,t.id))},children:[Object(ue.jsx)(nn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(nn.a,{component:"th",scope:"row",children:Sa(t.id)}),Object(ue.jsx)(nn.a,{children:t.type}),Object(ue.jsx)(nn.a,{children:Object(ue.jsx)(Or,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(nn.a,{align:"right",children:t.retried}),Object(ue.jsx)(nn.a,{align:"right",children:t.max_retry}),Object(ue.jsx)(nn.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)(ln.a,{title:"Delete",children:Object(ue.jsx)(A.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(hn.a,{fontSize:"small"})})}),Object(ue.jsx)(ln.a,{title:"Archive",children:Object(ue.jsx)(A.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(hi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(A.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(fn.a,{fontSize:"small"})})})]},t.id)}var ki=xi((function(e){var t=e.pollInterval,a=e.listPendingTasksAsync,r=e.queue,c=e.pageSize,s=Oi(),i=Object(n.useState)(0),o=Object(Za.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(Za.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(Za.a)(h,2),f=O[0],x=O[1];if(Wn(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)(ve.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)(ve.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"}],v=e.tasks.length,k=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(si,{showIconButtons:k>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(hn.a,{}),onClick:function(){e.batchDeletePendingTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(ue.jsx)(hi.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)(rn.a,{component:Oe.a,children:Object(ue.jsxs)(tn.a,{stickyHeader:!0,className:s.table,"aria-label":"pending tasks table",size:"small",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{indeterminate:k>0&&k<v,checked:v>0&&k===v,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)(nn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(an.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(vi,{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)(Vr.a,{children:Object(ue.jsx)(sn.a,{children:Object(ue.jsx)(Qr.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onChangePage:function(e,t){u(t)},onChangeRowsPerPage:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),yi=a(99),mi=a.n(yi),Si=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={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:rc,queue:e}),a.prev=1,a.next=4,Xe(e,t);case 4:r=a.sent,n({type:cc,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("listScheduledTasksAsync: ",fa(a.t0)),n({type:sc,queue:e,error:xa(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:us,queue:e,taskIds:t}),a.prev=1,a.next=4,kt(e,t);case 4:r=a.sent,n({type:ds,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteScheduledTasksAsync: ",fa(a.t0)),n({type:js,error:xa(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:rs,queue:e,taskIds:t}),a.prev=1,a.next=4,_t(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("batchRunScheduledTasksAsync: ",fa(a.t0)),n({type:ss,error:xa(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:is,queue:e,taskIds:t}),a.prev=1,a.next=4,Ct(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("batchArchiveScheduledTasksAsync: ",fa(a.t0)),n({type:ls,error:xa(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:gs,queue:e}),t.prev=1,t.next=4,mt(e);case 4:n=t.sent,a({type:vs,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllScheduledTasksAsync: ",fa(t.t0)),a({type:ks,error:xa(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:bs,queue:e}),t.prev=1,t.next=4,Tt(e);case 4:a({type:ps,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllScheduledTasksAsync: ",fa(t.t0)),a({type:hs,error:xa(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:Os,queue:e}),t.prev=1,t.next=4,It(e);case 4:a({type:fs,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllScheduledTasksAsync: ",fa(t.t0)),a({type:xs,error:xa(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:Lc,queue:e,taskId:t}),a.prev=1,a.next=4,gt(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("deleteScheduledTaskAsync: ",fa(a.t0)),n({type:Hc,error:xa(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:yc,queue:e,taskId:t}),a.prev=1,a.next=4,ht(e,t);case 4:n({type:mc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runScheduledTaskAsync: ",fa(a.t0)),n({type:Sc,error:xa(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:Uc,queue:e,taskId:t}),a.prev=1,a.next=4,ft(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("archiveScheduledTaskAsync: ",fa(a.t0)),n({type:zc,error:xa(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},Ai=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}}),_i);var Ti=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 Ei(e){var t=e.task,a=Ti(),n=Object(b.f)();return Object(ue.jsxs)(sn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(M(t.queue,t.id))},children:[Object(ue.jsx)(nn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(nn.a,{component:"th",scope:"row",children:Sa(t.id)}),Object(ue.jsx)(nn.a,{children:t.type}),Object(ue.jsx)(nn.a,{children:Object(ue.jsx)(Or,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(nn.a,{children:ka(t.next_process_at)}),Object(ue.jsx)(nn.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)(ln.a,{title:"Delete",children:Object(ue.jsx)(A.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(hn.a,{fontSize:"small"})})}),Object(ue.jsx)(ln.a,{title:"Archive",children:Object(ue.jsx)(A.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(hi.a,{fontSize:"small"})})}),Object(ue.jsx)(ln.a,{title:"Run",children:Object(ue.jsx)(A.a,{onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(mi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(A.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(fn.a,{fontSize:"small"})})})]},t.id)}var Ci=Ai((function(e){var t=e.pollInterval,a=e.listScheduledTasksAsync,r=e.queue,c=e.pageSize,s=Si(),i=Object(n.useState)(0),o=Object(Za.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(Za.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(Za.a)(h,2),f=O[0],x=O[1];if(Wn(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)(ve.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)(ve.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"}],v=e.tasks.length,k=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(si,{showIconButtons:k>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(hn.a,{}),onClick:function(){e.batchDeleteScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(ue.jsx)(hi.a,{}),onClick:function(){e.batchArchiveScheduledTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(ue.jsx)(mi.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)(rn.a,{component:Oe.a,children:Object(ue.jsxs)(tn.a,{stickyHeader:!0,className:s.table,"aria-label":"scheduled tasks table",size:"small",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{indeterminate:k>0&&k<v,checked:v>0&&k===v,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)(nn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.label)}))]})}),Object(ue.jsx)(an.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(Ei,{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)(Vr.a,{children:Object(ue.jsx)(sn.a,{children:Object(ue.jsx)(Qr.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onChangePage:function(e,t){u(t)},onChangeRowsPerPage:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),Ri=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Ii={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:Is,queue:e,taskIds:t}),a.prev=1,a.next=4,Ht(e,t);case 4:r=a.sent,n({type:ws,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteRetryTasksAsync: ",fa(a.t0)),n({type:qs,error:xa(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:_s,queue:e,taskIds:t}),a.prev=1,a.next=4,Gt(e,t);case 4:r=a.sent,n({type:As,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunRetryTasksAsync: ",fa(a.t0)),n({type:Ts,error:xa(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:Es,queue:e,taskIds:t}),a.prev=1,a.next=4,Wt(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("batchArchiveRetryTasksAsync: ",fa(a.t0)),n({type:Rs,error:xa(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:Us,queue:e}),t.prev=1,t.next=4,Kt(e);case 4:n=t.sent,a({type:Ks,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllRetryTasksAsync: ",fa(t.t0)),a({type:zs,error:xa(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:Ps,queue:e}),t.prev=1,t.next=4,Qt(e);case 4:a({type:Ns,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllRetryTasksAsync: ",fa(t.t0)),a({type:Ds,error:xa(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:Ls,queue:e}),t.prev=1,t.next=4,Yt(e);case 4:a({type:Bs,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("archiveAllRetryTasksAsync: ",fa(t.t0)),a({type:Hs,error:xa(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:ic,queue:e}),a.prev=1,a.next=4,Ze(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("listRetryTasksAsync: ",fa(a.t0)),n({type:lc,queue:e,error:xa(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:ys,queue:e,taskId:t}),a.prev=1,a.next=4,Lt(e,t);case 4:n({type:ms,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteRetryTaskAsync: ",fa(a.t0)),n({type:Ss,error:xa(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:_c,queue:e,taskId:t}),a.prev=1,a.next=4,qt(e,t);case 4:n({type:Ac,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runRetryTaskAsync: ",fa(a.t0)),n({type:Tc,error:xa(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:Gc,queue:e,taskId:t}),a.prev=1,a.next=4,Nt(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("archiveRetryTaskAsync: ",fa(a.t0)),n({type:Qc,error:xa(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.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}}),Ii);var qi=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 Pi(e){var t=e.task,a=qi(),n=Object(b.f)();return Object(ue.jsxs)(sn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(M(t.queue,t.id))},children:[Object(ue.jsx)(nn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(nn.a,{component:"th",scope:"row",children:Sa(t.id)}),Object(ue.jsx)(nn.a,{children:t.type}),Object(ue.jsx)(nn.a,{children:Object(ue.jsx)(Or,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(nn.a,{children:ka(t.next_process_at)}),Object(ue.jsx)(nn.a,{children:t.error_message}),Object(ue.jsx)(nn.a,{align:"right",children:t.retried}),Object(ue.jsx)(nn.a,{align:"right",children:t.max_retry}),Object(ue.jsx)(nn.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)(ln.a,{title:"Delete",children:Object(ue.jsx)(A.a,{onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(hn.a,{fontSize:"small"})})}),Object(ue.jsx)(ln.a,{title:"Archive",children:Object(ue.jsx)(A.a,{onClick:e.onArchiveClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(hi.a,{fontSize:"small"})})}),Object(ue.jsx)(ln.a,{title:"Run",children:Object(ue.jsx)(A.a,{onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",className:a.actionButton,children:Object(ue.jsx)(mi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(A.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(fn.a,{fontSize:"small"})})})]},t.id)}var Ni=wi((function(e){var t=e.pollInterval,a=e.listRetryTasksAsync,r=e.queue,c=e.pageSize,s=Ri(),i=Object(n.useState)(0),o=Object(Za.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(Za.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(Za.a)(h,2),f=O[0],x=O[1];if(Wn(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)(ve.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)(ve.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"}],v=e.tasks.length,k=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(si,{showIconButtons:k>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(hn.a,{}),onClick:function(){e.batchDeleteRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Archive",icon:Object(ue.jsx)(hi.a,{}),onClick:function(){e.batchArchiveRetryTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(ue.jsx)(mi.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)(rn.a,{component:Oe.a,children:Object(ue.jsxs)(tn.a,{stickyHeader:!0,className:s.table,"aria-label":"retry tasks table",size:"small",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{indeterminate:k>0&&k<v,checked:v>0&&k===v,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)(nn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.label)}))]})}),Object(ue.jsx)(an.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(Pi,{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)(Vr.a,{children:Object(ue.jsx)(sn.a,{children:Object(ue.jsx)(Qr.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onChangePage:function(e,t){u(t)},onChangeRowsPerPage:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})})),Di=Object(p.a)((function(e){return{table:{minWidth:650},stickyHeaderCell:{background:e.palette.background.paper},alert:{borderTopLeftRadius:0,borderTopRightRadius:0},pagination:{border:"none"}}}));var Li={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:uc,queue:e}),a.prev=1,a.next=4,tt(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("listArchivedTasksAsync: ",fa(a.t0)),n({type:jc,queue:e,error:xa(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:Ec,queue:e,taskId:t}),a.prev=1,a.next=4,Xt(e,t);case 4:n({type:Cc,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("runArchivedTaskAsync: ",fa(a.t0)),n({type:Rc,error:xa(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:$s,queue:e}),t.prev=1,t.next=4,ia(e);case 4:a({type:Zs,queue:e}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),console.error("runAllArchivedTasksAsync: ",fa(t.t0)),a({type:ei,error:xa(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:Gs,queue:e,taskId:t}),a.prev=1,a.next=4,Zt(e,t);case 4:n({type:Vs,queue:e,taskId:t}),a.next=11;break;case 7:a.prev=7,a.t0=a.catch(1),console.error("deleteArchivedTaskAsync: ",fa(a.t0)),n({type:Qs,error:xa(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:ti,queue:e}),t.prev=1,t.next=4,na(e);case 4:n=t.sent,a({type:ai,deleted:n.deleted,queue:e}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("deleteAllArchivedTasksAsync: ",fa(t.t0)),a({type:ni,error:xa(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:Ms,queue:e,taskIds:t}),a.prev=1,a.next=4,ca(e,t);case 4:r=a.sent,n({type:Ws,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchRunArchivedTasksAsync: ",fa(a.t0)),n({type:Fs,error:xa(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:Ys,queue:e,taskIds:t}),a.prev=1,a.next=4,ta(e,t);case 4:r=a.sent,n({type:Js,queue:e,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("batchDeleteArchivedTasksAsync: ",fa(a.t0)),n({type:Xs,error:xa(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},Bi=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}}),Li);var Hi=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 Ui(e){var t=e.task,a=Hi(),n=Object(b.f)();return Object(ue.jsxs)(sn.a,{className:a.root,selected:e.isSelected,onClick:function(){return n.push(M(t.queue,t.id))},children:[Object(ue.jsx)(nn.a,{padding:"checkbox",onClick:function(e){return e.stopPropagation()},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{onChange:function(t){return e.onSelectChange(t.target.checked)},checked:e.isSelected})})}),Object(ue.jsx)(nn.a,{component:"th",scope:"row",children:Sa(t.id)}),Object(ue.jsx)(nn.a,{children:t.type}),Object(ue.jsx)(nn.a,{children:Object(ue.jsx)(Or,{language:"json",customStyle:{margin:0,maxWidth:400},children:t.payload})}),Object(ue.jsx)(nn.a,{children:ya(t.last_failed_at)}),Object(ue.jsx)(nn.a,{children:t.error_message}),Object(ue.jsx)(nn.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)(ln.a,{title:"Delete",children:Object(ue.jsx)(A.a,{className:a.actionButton,onClick:e.onDeleteClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(ue.jsx)(hn.a,{fontSize:"small"})})}),Object(ue.jsx)(ln.a,{title:"Run",children:Object(ue.jsx)(A.a,{className:a.actionButton,onClick:e.onRunClick,disabled:t.requestPending||e.allActionPending,size:"small",children:Object(ue.jsx)(mi.a,{fontSize:"small"})})})]}):Object(ue.jsx)(A.a,{size:"small",onClick:e.onActionCellEnter,children:Object(ue.jsx)(fn.a,{fontSize:"small"})})})]},t.id)}var Ki=Bi((function(e){var t=e.pollInterval,a=e.listArchivedTasksAsync,r=e.queue,c=e.pageSize,s=Di(),i=Object(n.useState)(0),o=Object(Za.a)(i,2),l=o[0],u=o[1],d=Object(n.useState)([]),j=Object(Za.a)(d,2),b=j[0],p=j[1],h=Object(n.useState)(""),O=Object(Za.a)(h,2),f=O[0],x=O[1];if(Wn(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)(ve.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)(ve.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"}],v=e.tasks.length,k=b.length;return Object(ue.jsxs)("div",{children:[Object(ue.jsx)(si,{showIconButtons:k>0,iconButtonActions:[{tooltip:"Delete",icon:Object(ue.jsx)(hn.a,{}),onClick:function(){e.batchDeleteArchivedTasksAsync(r,b).then((function(){return p([])}))},disabled:e.batchActionPending},{tooltip:"Run",icon:Object(ue.jsx)(mi.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)(rn.a,{component:Oe.a,children:Object(ue.jsxs)(tn.a,{stickyHeader:!0,className:s.table,"aria-label":"archived tasks table",size:"small",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{padding:"checkbox",classes:{stickyHeader:s.stickyHeaderCell},children:Object(ue.jsx)(A.a,{children:Object(ue.jsx)(Mr.a,{indeterminate:k>0&&k<v,checked:v>0&&k===v,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)(nn.a,{align:e.align,classes:{stickyHeader:s.stickyHeaderCell},children:e.label},e.key)}))]})}),Object(ue.jsx)(an.a,{children:e.tasks.map((function(t){return Object(ue.jsx)(Ui,{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)(Vr.a,{children:Object(ue.jsx)(sn.a,{children:Object(ue.jsx)(Qr.a,{rowsPerPageOptions:be,colSpan:g.length+1,count:e.totalTaskCount,rowsPerPage:c,page:l,SelectProps:{inputProps:{"aria-label":"rows per page"},native:!0},onChangePage:function(e,t){u(t)},onChangeRowsPerPage:function(t){e.taskRowsPerPageChange(parseInt(t.target.value,10)),u(0)},ActionsComponent:je,className:s.pagination})})})]})})]})}));function zi(e){var t=e.children,a=e.value,n=e.selected,r=Object(Hr.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 Gi=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,processed:0,failed:0,timestamp:"n/a"}}})),Vi=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:sr(e)?"#303030":e.palette.background.default,textAlign:"center",padding:"3px 6px",borderRadius:"10px",marginLeft:"2px"},searchbar:{marginLeft:e.spacing(4)},search:{position:"relative",width:"312px",borderRadius:"18px",backgroundColor:sr(e)?"#303030":e.palette.grey[100],"&:hover, &:focus":{backgroundColor:sr(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 Qi=Gi((function(e){var t=e.currentStats,a=Vi(),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}],s=Object(n.useState)(""),i=Object(Za.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)(_.a,{color:"textPrimary",className:a.heading,children:"Tasks"}),Object(ue.jsx)("div",{children:c.map((function(t){return Object(ue.jsx)(Ur.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(Q(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)(Gr.a,{})}),Object(ue.jsx)(Kr.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(M(e.queue,o.trim()))}}})]})})]}),Object(ue.jsx)(zi,{value:"active",selected:e.selected,children:Object(ue.jsx)(bi,{queue:e.queue})}),Object(ue.jsx)(zi,{value:"pending",selected:e.selected,children:Object(ue.jsx)(ki,{queue:e.queue,totalTaskCount:t.pending})}),Object(ue.jsx)(zi,{value:"scheduled",selected:e.selected,children:Object(ue.jsx)(Ci,{queue:e.queue,totalTaskCount:t.scheduled})}),Object(ue.jsx)(zi,{value:"retry",selected:e.selected,children:Object(ue.jsx)(Ni,{queue:e.queue,totalTaskCount:t.retry})}),Object(ue.jsx)(zi,{value:"archived",selected:e.selected,children:Object(ue.jsx)(Ki,{queue:e.queue,totalTaskCount:t.archived})})]})})),Mi=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 Wi=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=Mi(),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)(_.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue name"}),Object(ue.jsx)(_.a,{color:"textSecondary",children:n})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(_.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue state"}),Object(ue.jsx)(_.a,{color:"textSecondary",children:a?a.paused?"paused":"run":"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(_.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Queue size"}),Object(ue.jsx)(_.a,{color:"textSecondary",children:a?a.size:"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(_.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Memory usage"}),Object(ue.jsx)(_.a,{color:"textSecondary",children:a?En()(a.memory_usage_bytes):"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(_.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Processed"}),Object(ue.jsx)(_.a,{color:"textSecondary",children:a?a.processed:"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(_.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Failed"}),Object(ue.jsx)(_.a,{color:"textSecondary",children:a?a.failed:"-"})]}),Object(ue.jsxs)("div",{className:t.bannerItem,children:[Object(ue.jsx)(_.a,{variant:"subtitle2",color:"textPrimary",gutterBottom:!0,children:"Error rate"}),Object(ue.jsx)(_.a,{color:"textSecondary",children:a?_a(a.failed,a.processed):"-"})]})]})})),Fi=a(17),Yi=a(891),Ji=a(346),Xi=a.n(Ji),$i=Object(Nn.a)((function(e){return{root:{backgroundColor:sr(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(Fi.b)(e.palette.action.hover,.12)}}}}))(Ur.a);function Zi(e){var t=Object(b.f)(),a=Object(n.useState)(null),r=Object(Za.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)(Yi.a,{"aria-label":"breadcrumb",children:[Object(ue.jsx)($i,{component:j.b,to:V.HOME,label:"Queues",onClick:function(){return t.push(V.HOME)}}),Object(ue.jsx)($i,{label:e.queueName,deleteIcon:Object(ue.jsx)(Xi.a,{}),onClick:i,onDelete:i}),e.taskId&&Object(ue.jsx)($i,{label:"task:".concat(e.taskId)})]}),Object(ue.jsx)(ri.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)(Gn.a,{onClick:function(){t.push(Q(e)),o()},children:e},e)}))})]})}var eo=Object(o.b)((function(e){return{queues:e.queues.data.map((function(e){return e.name}))}}),{listQueuesAsync:Ba}),to=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 ao=["active","pending","scheduled","retry","archived"];var no=eo((function(e){var t=to(),a=Object(b.h)().qname,r=new URLSearchParams(Object(b.g)().search).get("status");r&&ao.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)(Zi,{queues:e.queues,queueName:a})}),Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.banner,children:Object(ue.jsx)(Wi,{qname:a})}),Object(ue.jsx)(he.a,{item:!0,xs:12,className:t.tasksTable,children:Object(ue.jsx)(Qi,{queue:a,selected:r})})]})})})),ro=a(347),co=a.n(ro);var so=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:Yr}),a.prev=1,a.next=4,He(e,t);case 4:r=a.sent,n({type:Jr,payload:r}),a.next=12;break;case 8:a.prev=8,a.t0=a.catch(1),console.error("getTaskInfoAsync: ",fa(a.t0)),n({type:Xr,error:xa(a.t0)});case 12:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(e){return a.apply(this,arguments)}}()},listQueuesAsync:Ba}),io=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 oo=so((function(e){var t=io(),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 Wn(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)(Zi,{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)(ve.a,{children:"Error"}),e.error]}):Object(ue.jsxs)(Oe.a,{className:t.paper,variant:"outlined",children:[Object(ue.jsx)(_.a,{variant:"h6",children:"Task Info"}),Object(ue.jsxs)("div",{children:[Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(_.a,{variant:"subtitle2",className:t.infoKeyCell,children:["ID:"," "]}),Object(ue.jsx)(_.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)(_.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Type:"," "]}),Object(ue.jsx)(_.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)(_.a,{variant:"subtitle2",className:t.infoKeyCell,children:["State:"," "]}),Object(ue.jsx)(_.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)(_.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Queue:"," "]}),Object(ue.jsx)(_.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)(_.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Retry:"," "]}),Object(ue.jsxs)(_.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)(_.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Last Failure:"," "]}),Object(ue.jsx)(_.a,{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.last_failed_at)?Object(ue.jsxs)(_.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)(_.a,{children:"n/a"})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(_.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Next Process Time:"," "]}),(null===l||void 0===l?void 0:l.next_process_at)?Object(ue.jsx)(_.a,{children:null===l||void 0===l?void 0:l.next_process_at}):Object(ue.jsx)(_.a,{children:"n/a"})]})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(_.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Timeout:"," "]}),Object(ue.jsx)(_.a,{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.timeout_seconds)?Object(ue.jsxs)(_.a,{children:[null===l||void 0===l?void 0:l.timeout_seconds," seconds"]}):Object(ue.jsx)(_.a,{children:"n/a"})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(_.a,{variant:"subtitle2",className:t.infoKeyCell,children:["Deadline:"," "]}),Object(ue.jsx)(_.a,{className:t.infoValueCell,children:(null===l||void 0===l?void 0:l.deadline)?Object(ue.jsx)(_.a,{children:null===l||void 0===l?void 0:l.deadline}):Object(ue.jsx)(_.a,{children:"n/a"})})]}),Object(ue.jsxs)("div",{className:t.infoRow,children:[Object(ue.jsxs)(_.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)(Or,{language:"json",customStyle:{margin:0,maxWidth:400},children:l.payload})})]})]}),Object(ue.jsx)("div",{className:t.footer,children:Object(ue.jsx)(xn.a,{startIcon:Object(ue.jsx)(co.a,{}),onClick:function(){return u.goBack()},children:"Go Back"})})]})]})})})),lo=a(892),uo=a(348),jo=a.n(uo),bo=a(885),po=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 ho={pollIntervalChange:function(e){return{type:F,value:e}},selectTheme:function(e){return{type:Y,value:e}}};var Oo,fo=Object(o.b)((function(e){return{pollInterval:e.settings.pollInterval,themePreference:e.settings.themePreference}}),ho)((function(e){var t=po(),a=Object(n.useState)(e.pollInterval),r=Object(Za.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)(_.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)(_.a,{color:"textPrimary",children:"Polling Interval"}),Object(ue.jsx)(_.a,{gutterBottom:!0,color:"textSecondary",variant:"subtitle1",children:"Web UI will fetch live data with the specified interval"}),Object(ue.jsxs)(_.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)(jo.a,{variant:"outlined",className:t.formControl,children:[Object(ue.jsx)(_.a,{color:"textPrimary",children:"Dark Theme"}),Object(ue.jsxs)(bo.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)(Gn.a,{value:tr.SystemDefault,children:"System Default"}),Object(ue.jsx)(Gn.a,{value:tr.Always,children:"Always"}),Object(ue.jsx)(Gn.a,{value:tr.Never,children:"Never"})]})]})})}),Object(ue.jsx)(he.a,{item:!0,xs:5})]})})})),xo=a(896),go=a(877),vo=a(350),ko=a.n(vo),yo=a(349),mo=a.n(yo),So=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"}(Oo||(Oo={}));var _o=[{label:"Host:PID",key:"host",sortBy:Oo.HostPID,align:"left"},{label:"Started",key:"started",sortBy:Oo.Started,align:"left"},{label:"Status",key:"status",sortBy:Oo.Status,align:"left"},{label:"Queues",key:"queues",sortBy:Oo.Queues,align:"left"},{label:"Active Workers",key:"workers",sortBy:Oo.ActiveWorkers,align:"left"}];function Ao(e,t){var a=Object(en.a)(e);return a.sort(t),a}function To(e){var t=So(),a=Object(n.useState)(Oo.HostPID),r=Object(Za.a)(a,2),c=r[0],s=r[1],i=Object(n.useState)(Sn.Asc),o=Object(Za.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)(ve.a,{children:"Info"}),"No servers found at this time."]}):Object(ue.jsx)(rn.a,{children:Object(ue.jsxs)(tn.a,{className:t.table,"aria-label":"server info table",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[_o.map((function(e,a){return Object(ue.jsx)(nn.a,{align:e.align,className:Object(d.default)(0===a&&t.fixedCell),children:Object(ue.jsx)(on.a,{active:e.sortBy===c,direction:l,onClick:(n=e.sortBy,function(e){if(n===c){var t=l===Sn.Asc?Sn.Desc:Sn.Asc;u(t)}else s(n)}),children:e.label})},e.key);var n})),Object(ue.jsx)(nn.a,{})]})}),Object(ue.jsx)(an.a,{children:Ao(e.servers,(function(e,t){var a=!1;switch(c){case Oo.HostPID:if(e.host===t.host&&e.pid===t.pid)return 0;a=e.host===t.host?e.pid<t.pid:e.host<t.host;break;case Oo.Started:var n=Date.parse(e.start_time),r=Date.parse(t.start_time);if(n===r)return 0;a=n<r;break;case Oo.Status:if(e.status===t.status)return 0;a=e.status<t.status;break;case Oo.Queues:var s=Object.keys(e.queue_priorities).join(","),i=Object.keys(t.queue_priorities).join(",");if(s===i)return 0;a=s<i;break;case Oo.ActiveWorkers:if(e.active_workers.length===t.active_workers.length)return 0;a=e.active_workers.length<t.active_workers.length;break;default:throw"Unexpected order by value: ".concat(c)}return l===Sn.Asc?a?-1:1:a?1:-1})).map((function(e){return Object(ue.jsx)(Co,{server:e},e.id)}))})]})})}var Eo=Object(p.a)((function(e){return{rowRoot:{"& > *":{borderBottom:"unset"}},noBorder:{border:"none"},link:{color:e.palette.text.primary}}}));function Co(e){var t=Eo(),a=e.server,c=Object(n.useState)(!1),s=Object(Za.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)(sn.a,{className:t.rowRoot,children:[Object(ue.jsxs)(nn.a,{children:[a.host,":",a.pid]}),Object(ue.jsx)(nn.a,{children:ya(a.start_time)}),Object(ue.jsx)(nn.a,{children:a.status}),Object(ue.jsx)(nn.a,{children:l.map((function(e,a){return Object(ue.jsxs)("span",{children:[Object(ue.jsx)(j.b,{to:Q(e),className:t.link,children:e}),a===l.length-1?"":", "]},e)}))}),Object(ue.jsxs)(nn.a,{children:[a.active_workers.length,"/",a.concurrency]}),Object(ue.jsx)(nn.a,{children:Object(ue.jsx)(ln.a,{title:i?"Hide Details":"Show Details",children:Object(ue.jsx)(A.a,{"aria-label":"expand row",size:"small",onClick:function(){return o(!i)},children:i?Object(ue.jsx)(mo.a,{}):Object(ue.jsx)(ko.a,{})})})})]}),Object(ue.jsx)(sn.a,{className:t.rowRoot,children:Object(ue.jsx)(nn.a,{style:{paddingBottom:0,paddingTop:0},colSpan:6,children:Object(ue.jsx)(go.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)(_.a,{variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:"Active Workers"}),Object(ue.jsxs)(tn.a,{size:"small","aria-label":"active workers",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{children:"Task ID"}),Object(ue.jsx)(nn.a,{children:"Task Payload"}),Object(ue.jsx)(nn.a,{children:"Queue"}),Object(ue.jsx)(nn.a,{children:"Started"})]})}),Object(ue.jsx)(an.a,{children:a.active_workers.map((function(e){return Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{component:"th",scope:"row",children:Sa(e.task_id)}),Object(ue.jsx)(nn.a,{children:Object(ue.jsx)(Or,{language:"json",customStyle:{margin:0},children:e.task_payload})}),Object(ue.jsx)(nn.a,{children:e.queue}),Object(ue.jsx)(nn.a,{children:ya(e.start_time)})]},e.task_id)}))})]})]}),Object(ue.jsxs)(he.a,{item:!0,xs:3,children:[Object(ue.jsx)(_.a,{variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:"Queue Priority"}),Object(ue.jsxs)(tn.a,{size:"small","aria-label":"active workers",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{children:"Queue"}),Object(ue.jsx)(nn.a,{align:"right",children:"Priority"})]})}),Object(ue.jsx)(an.a,{children:l.map((function(e){return Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{children:Object(ue.jsx)(j.b,{to:Q(e),className:t.link,children:e})}),Object(ue.jsx)(nn.a,{align:"right",children:a.queue_priorities[e]})]},e)}))})]}),Object(ue.jsxs)(xo.a,{margin:2,children:[Object(ue.jsxs)(_.a,{variant:"subtitle2",component:"span",children:["Strict Priority:"," "]}),Object(ue.jsx)(_.a,{variant:"button",component:"span",children:a.strict_priority_enabled?"ON":"OFF"})]})]})]})})})})]})}var Ro="LIST_SERVERS_BEGIN",Io="LIST_SERVERS_SUCCESS",wo="LIST_SERVERS_ERROR";var qo=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 Po=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:Ro}),e.prev=1,e.next=4,la();case 4:a=e.sent,t({type:Io,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("listServersAsync: ".concat(fa(e.t0))),t({type:wo,error:xa(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=qo();return Wn(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)(_.a,{variant:"h6",className:n.heading,children:"Servers"}),Object(ue.jsx)(To,{servers:e.servers})]})}):Object(ue.jsx)(he.a,{item:!0,xs:12,children:Object(ue.jsxs)(ge.a,{severity:"error",children:[Object(ue.jsx)(ve.a,{children:"Error"}),"Could not retreive servers live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})})})})})),No=a(879),Do=a(880),Lo="GET_REDIS_INFO_BEGIN",Bo="GET_REDIS_INFO_SUCCESS",Ho="GET_REDIS_INFO_ERROR";var Uo=Object(p.a)((function(e){return{table:{minWidth:650}}}));function Ko(e){var t=Uo();return Object(ue.jsx)(rn.a,{children:Object(ue.jsxs)(tn.a,{className:t.table,"aria-label":"queue location table",children:[Object(ue.jsx)(cn.a,{children:Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{children:"Queue"}),Object(ue.jsx)(nn.a,{children:"KeySlot"}),Object(ue.jsx)(nn.a,{children:"Node Addresses"})]})}),Object(ue.jsx)(an.a,{children:e.queueLocations.map((function(e){return Object(ue.jsxs)(sn.a,{children:[Object(ue.jsx)(nn.a,{component:"th",scope:"row",children:e.queue}),Object(ue.jsx)(nn.a,{children:e.keyslot}),Object(ue.jsx)(nn.a,{children:e.nodes.join(", ")})]},e.queue)}))})]})})}var zo=a(878),Go=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)}}}));function Vo(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)(_.a,{variant:"h6",color:"textSecondary",children:"Server"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(Qo,{title:"Version",content:t.redis_version})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(Qo,{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)(_.a,{variant:"h6",color:"textSecondary",children:"Memory"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(Qo,{title:"Used Memory",content:t.used_memory_human})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(Qo,{title:"Peak Memory Used",content:t.used_memory_peak_human})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(Qo,{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)(_.a,{variant:"h6",color:"textSecondary",children:"Connections"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(Qo,{title:"Connected Clients",content:t.connected_clients})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(Qo,{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)(_.a,{variant:"h6",color:"textSecondary",children:"Persistence"})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(Qo,{title:"Last Save to Disk",content:ma(parseInt(t.rdb_last_save_time))})}),Object(ue.jsx)(he.a,{item:!0,xs:3,children:Object(ue.jsx)(Qo,{title:"Number of Changes Since Last Dump",content:t.rdb_changes_since_last_save})}),Object(ue.jsx)(he.a,{item:!0,xs:6})]})}function Qo(e){return Object(ue.jsx)(No.a,{variant:"outlined",children:Object(ue.jsxs)(Do.a,{children:[Object(ue.jsx)(_.a,{gutterBottom:!0,color:"textPrimary",variant:"h5",align:"center",children:e.content}),Object(ue.jsx)(_.a,{color:"textSecondary",variant:"subtitle2",align:"center",children:e.title})]})})}var Mo=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:Lo}),e.prev=1,e.next=4,ha();case 4:a=e.sent,t({type:Bo,payload:a}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("getRedisInfoAsync: ".concat(fa(e.t0))),t({type:Ho,error:xa(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=Go(),a=e.pollInterval,n=e.getRedisInfoAsync,r=e.redisInfo,c=e.redisInfoRaw,s=e.redisClusterEnabled,i=e.redisClusterNodesRaw,o=e.queueLocations;return Wn(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)(_.a,{variant:"h5",color:"textPrimary",children:s?"Redis Cluster Info":"Redis Info"}),!s&&Object(ue.jsxs)(_.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)(_.a,{variant:"h6",color:"textSecondary",children:"Queue Location in Cluster"}),Object(ue.jsx)(Ko,{queueLocations:o})]}),i&&Object(ue.jsx)(ue.Fragment,{children:Object(ue.jsxs)(he.a,{item:!0,xs:12,children:[Object(ue.jsxs)(_.a,{variant:"h6",color:"textSecondary",children:[Object(ue.jsx)(zo.a,{href:"https://redis.io/commands/cluster-nodes",target:"_",children:"CLUSTER NODES"})," ","Command Output"]}),Object(ue.jsx)(Or,{language:"yaml",children:i})]})}),r&&!s&&Object(ue.jsx)(Vo,{redisInfo:r}),c&&Object(ue.jsx)(ue.Fragment,{children:Object(ue.jsxs)(he.a,{item:!0,xs:6,children:[Object(ue.jsxs)(_.a,{variant:"h6",color:"textSecondary",children:[s?Object(ue.jsx)(zo.a,{href:"https://redis.io/commands/cluster-info",target:"_",children:"CLUSTER INFO"}):Object(ue.jsx)(zo.a,{href:"https://redis.io/commands/info",target:"_",children:"INFO"})," ","Command Output"]}),Object(ue.jsx)(Or,{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)(ve.a,{children:"Error"}),"Could not retreive redis live data \u2014"," ",Object(ue.jsx)("strong",{children:"See the logs for details"})]})})})})})),Wo=Object(p.a)((function(e){return{container:{paddingTop:e.spacing(4),paddingBottom:e.spacing(4)},headingText:{fontWeight:"bold"}}}));function Fo(){var e=Wo();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)(_.a,{variant:"h5",align:"center",className:e.headingText,children:"Oops!"}),Object(ue.jsx)(_.a,{variant:"subtitle1",color:"textSecondary",align:"center",children:"404 - Page Not Found"})]})})})}var Yo={closeSnackbar:function(){return{type:ir}},toggleDrawer:function(){return{type:J}}};function Jo(e){return Object(ue.jsx)(T.a,Object(u.a)(Object(u.a)({},e),{},{direction:"up"}))}var Xo=Object(o.b)((function(e){return{snackbar:e.snackbar,themePreference:e.settings.themePreference,isDrawerOpen:e.settings.isDrawerOpen}}),Yo)((function(e){var t=function(e){var t=Object(cr.a)("(prefers-color-scheme: dark)");return e===tr.Always?t=!0:e===tr.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:sr(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.a,{edge:"start",color:"inherit","aria-label":"open drawer",onClick:e.toggleDrawer,className:a.menuButton,children:Object(ue.jsx)(C.a,{})}),Object(ue.jsx)(_.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:Jo,children:Object(ue.jsx)(S.a,{message:e.snackbar.message,className:a.snackbar,action:Object(ue.jsx)(A.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)(lr,{to:V.HOME,primary:"Queues",icon:Object(ue.jsx)(I.a,{})}),Object(ue.jsx)(lr,{to:V.SERVERS,primary:"Servers",icon:Object(ue.jsx)(K.a,{})}),Object(ue.jsx)(lr,{to:V.SCHEDULERS,primary:"Schedulers",icon:Object(ue.jsx)(L.a,{})}),Object(ue.jsx)(lr,{to:V.REDIS,primary:"Redis",icon:Object(ue.jsx)(q.a,{})})]})}),Object(ue.jsxs)(g.a,{children:[Object(ue.jsx)(lr,{to:V.SETTINGS,primary:"Settings",icon:Object(ue.jsx)(N.a,{})}),Object(ue.jsxs)(v.a,{button:!0,component:"a",className:a.listItem,href:"https://github.com/hibiken/asynqmon/issues",target:"_blank",children:[Object(ue.jsx)(k.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)(oo,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.QUEUE_DETAILS,children:Object(ue.jsx)(no,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.SCHEDULERS,children:Object(ue.jsx)(Br,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.SERVERS,children:Object(ue.jsx)(Po,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.REDIS,children:Object(ue.jsx)(Mo,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.SETTINGS,children:Object(ue.jsx)(fo,{})}),Object(ue.jsx)(b.a,{exact:!0,path:V.HOME,children:Object(ue.jsx)(ar,{})}),Object(ue.jsx)(b.a,{path:"*",children:Object(ue.jsx)(Fo,{})})]})})})]})]})})})})),$o=a(75),Zo=a(361),el={data:[],loading:!1,error:""};var tl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:el,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Aa:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Ta: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 Ea:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case Ca:case wa:case Na: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 Ra:var r=e.data.filter((function(e){return e.name!==t.queue}));return Object(u.a)(Object(u.a)({},e),{},{data:r});case qa: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 Da: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 Ia:case Pa:case La: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 Zr:case ac:case cc:case oc:case dc: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 mc: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 Ac: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 Cc: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 Nc: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 Kc: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 Vc: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 wc: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 Bc: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 Wc: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 Jc: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 as: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),{},{archived:e.currentStats.archived+e.currentStats.pending,pending:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:v});case Zc: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,pending:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:k});case cs: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 os: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 ds: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 ps: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),{},{pending:e.currentStats.pending+e.currentStats.scheduled,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:_});case fs: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),{},{archived:e.currentStats.archived+e.currentStats.scheduled,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:A});case vs: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),{},{size:e.currentStats.size-t.deleted,scheduled:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:T});case ms: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 As: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 Cs: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 ws: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 Ns: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 Bs: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 Ks: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 Vs: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 Ws: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+t.payload.pending_ids.length,archived:e.currentStats.archived-t.payload.pending_ids.length})})}));return Object(u.a)(Object(u.a)({},e),{},{data:D});case Js: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),{},{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:L});case Zs: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),{},{pending:e.currentStats.pending+e.currentStats.archived,archived:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:B});case ai: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.deleted,archived:0})})}));return Object(u.a)(Object(u.a)({},e),{},{data:H});default:return e}},al={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:[]},taskInfo:{loading:!1,error:""}};var nl=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 Yr:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:Object(u.a)(Object(u.a)({},e.taskInfo),{},{loading:!0})});case Xr:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:{loading:!1,error:t.error}});case Jr:return Object(u.a)(Object(u.a)({},e),{},{taskInfo:{loading:!1,error:"",data:t.payload}});case $r:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!0})});case Zr: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 ec:return Object(u.a)(Object(u.a)({},e),{},{activeTasks:Object(u.a)(Object(u.a)({},e.activeTasks),{},{loading:!1,error:t.error,data:[]})});case tc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!0})});case ac: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 nc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{loading:!1,error:t.error,data:[]})});case rc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!0})});case cc: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 sc:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{loading:!1,error:t.error,data:[]})});case ic:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!0})});case oc: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 lc:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{loading:!1,error:t.error,data:[]})});case uc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!0})});case dc: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 jc:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{loading:!1,error:t.error,data:[]})});case bc:var a=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:a})});case pc:var n=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:n})});case hc:var r=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:r})});case gc:var c=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:c})});case vc:var s=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:s})});case kc:var i=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:i})});case Oc:var o=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:o})});case fc:var l=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:l})});case xc:var d=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:d})});case Pc:case Ic: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 Nc:case wc: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 Dc:case qc: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 ts:case $c:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!0})});case as:case Zc:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!1,data:[]})});case ns:case es:return Object(u.a)(Object(u.a)({},e),{},{pendingTasks:Object(u.a)(Object(u.a)({},e.pendingTasks),{},{allActionPending:!1})});case Mc:case Yc: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 Wc:var j=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:j})});case Jc:var b=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:b})});case Fc:case Xc: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 yc:case Uc:case Lc: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 mc:case Kc:case Bc: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 Sc:case zc:case Hc: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 bs:case Os:case gs:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!0})});case ps:case fs:case vs:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!1,data:[]})});case hs:case xs:case ks:return Object(u.a)(Object(u.a)({},e),{},{scheduledTasks:Object(u.a)(Object(u.a)({},e.scheduledTasks),{},{allActionPending:!1})});case rs:case is:case us: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 cs:var p=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:p})});case os:var h=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:h})});case ds:var O=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:O})});case ss:case ls:case js: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 _c:case Gc:case ys: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 Ac:case Vc:case ms: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 Tc:case Qc:case Ss: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 Ps:case Ls:case Us:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!0})});case Ns:case Bs:case Ks:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!1,data:[]})});case Ds:case Hs:case zs:return Object(u.a)(Object(u.a)({},e),{},{retryTasks:Object(u.a)(Object(u.a)({},e.retryTasks),{},{allActionPending:!1})});case _s:case Es:case Is: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 As:var f=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:f})});case Cs:var x=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:x})});case ws:var g=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:g})});case Ts:case Rs:case qs: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 Ec:case Gs: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 Cc:case Vs: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 Rc:case Qs: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 $s:case ti:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!0})});case Zs:case ai:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!1,data:[]})});case ei:case ni:return Object(u.a)(Object(u.a)({},e),{},{archivedTasks:Object(u.a)(Object(u.a)({},e.archivedTasks),{},{allActionPending:!1})});case Ms:case Ys: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 Ws: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 Js:var k=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:k})});case Fs:case Xs: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}},rl={loading:!1,error:"",data:[]};var cl={isOpen:!1,message:""};var sl=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 ir:return Object(u.a)(Object(u.a)({},e),{},{isOpen:!1});case vc:var a=t.payload.canceled_ids.length;return{isOpen:!0,message:"Cancelation signal sent to ".concat(a," ").concat(1===a?"task":"tasks")};case fc:return{isOpen:!0,message:"Cancelation signal sent to all tasks in ".concat(t.queue," queue")};case mc:return{isOpen:!0,message:"Scheduled task is now pending"};case Ac:return{isOpen:!0,message:"Retry task is now pending"};case Cc:return{isOpen:!0,message:"Archived task is now pending"};case Nc:return{isOpen:!0,message:"Pending task is now archived"};case Kc:return{isOpen:!0,message:"Scheduled task is now archived"};case Vc:return{isOpen:!0,message:"Retry task is now archived"};case wc:return{isOpen:!0,message:"Pending task deleted"};case Bc:return{isOpen:!0,message:"Scheduled task deleted"};case cs:var n=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(n," scheduled ").concat(1===n?"task is":"tasks are"," now pending")};case Wc:var r=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(r," pending ").concat(1===r?"task is":"tasks are"," now archived")};case Jc:var c=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(c," pending ").concat(1===c?"task":"tasks"," deleted")};case os:var s=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(s," scheduled ").concat(1===s?"task is":"tasks are"," now archived")};case ds:var i=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(i," scheduled ").concat(1===i?"task":"tasks"," deleted")};case as:return{isOpen:!0,message:"All pending tasks are now archived"};case Zc:return{isOpen:!0,message:"All pending tasks deleted"};case ps:return{isOpen:!0,message:"All scheduled tasks are now pending"};case fs:return{isOpen:!0,message:"All scheduled tasks are now archived"};case vs:return{isOpen:!0,message:"All scheduled tasks deleted"};case ms:return{isOpen:!0,message:"Retry task deleted"};case As:var o=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(o," retry ").concat(1===o?"task is":"tasks are"," now pending")};case Cs:var l=t.payload.archived_ids.length;return{isOpen:!0,message:"".concat(l," retry ").concat(1===l?"task is":"tasks are"," now archived")};case ws:var d=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(d," retry ").concat(1===d?"task":"tasks"," deleted")};case Ns:return{isOpen:!0,message:"All retry tasks are now pending"};case Bs:return{isOpen:!0,message:"All retry tasks are now archived"};case Ks:return{isOpen:!0,message:"All retry tasks deleted"};case Vs:return{isOpen:!0,message:"Archived task deleted"};case Ws:var j=t.payload.pending_ids.length;return{isOpen:!0,message:"".concat(j," archived ").concat(1===j?"task is":"tasks are"," now pending")};case Js:var b=t.payload.deleted_ids.length;return{isOpen:!0,message:"".concat(b," archived ").concat(1===b?"task":"tasks"," deleted")};case Zs:return{isOpen:!0,message:"All archived tasks are now pending"};case ai:return{isOpen:!0,message:"All archived tasks deleted"};default:return e}},il={loading:!1,data:{}};function ol(e,t){return new Date(e).toDateString()===new Date(t).toDateString()}var ll={loading:!1,error:"",address:"",data:null,rawData:null,cluster:!1,rawClusterNodes:null,queueLocations:null};var ul="asynqmon:state";var dl=Object($o.c)({settings:rr,queues:tl,tasks:nl,servers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rl,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ro:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Io:return{loading:!1,error:"",data:t.payload.servers};case wo:return Object(u.a)(Object(u.a)({},e),{},{error:t.error,loading:!1});default:return e}},schedulerEntries:Tr,snackbar:sl,queueStats: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 Ua:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Ka:return{data:t.payload.stats,loading:!1};case za:return Object(u.a)(Object(u.a)({},e),{},{loading:!1});case Ta:var a,n=Object(u.a)({},e.data),r=Object(Fn.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 ol(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]:ll,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Lo:return Object(u.a)(Object(u.a)({},e),{},{loading:!0});case Ho:return Object(u.a)(Object(u.a)({},e),{},{loading:!1,error:t.error});case Bo: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}}}),jl=function(){try{var e=localStorage.getItem(ul);if(null===e)return{};var t=JSON.parse(e);return{settings:Object(u.a)(Object(u.a)({},nr),t.settings||{})}}catch(a){return console.log("loadState: could not load state ",a),{}}}(),bl=Object(Zo.a)({reducer:dl,preloadedState:jl});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 pl=void 0;bl.subscribe((function(){pl!==(pl=bl.getState().settings)&&function(e){try{var t=JSON.stringify({settings:e.settings});localStorage.setItem(ul,t)}catch(a){console.error("saveState: could not save state: ",a)}}(bl.getState())})),s.a.render(Object(ue.jsxs)(r.a.StrictMode,{children:[Object(ue.jsx)(i.a,{}),Object(ue.jsx)(o.a,{store:bl,children:Object(ue.jsx)(Xo,{})})]}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[801,1,2]]]);
|
|
//# sourceMappingURL=main.090c4a40.chunk.js.map
|