text: import{_ as r,a as t,b as a,c,i as e,s as o,d as s,S as n,e as i,t as l,f as u,C as f,g as h,h as v,j as d,k as E,l as k,m as T,K as p,L as w,o as m,p as A,B as b,H as D,z as g,I as W,y as N,M as R,N as H,r as _,u as L,v as I,n as F,A as S,O}from"./index.f5bf138d.js";import{_ as U}from"./index.30d9a632.js";import{g as y,f as V}from"./common.28517c90.js";import{S as x}from"./Spinner.22ccfc33.js";function B(r,t,a){var c=Object.create(r);return c.worker=t[a],c.i=a,c}function j(r){var t,a=new x({});return{c:function(){_(a.$$.fragment)},l:function(r){L(a.$$.fragment,r)},m:function(r,c){I(a,r,c),t=!0},p:F,i:function(r){t||(N(a.$$.fragment,r),t=!0)},o:function(r){g(a.$$.fragment,r),t=!1},d:function(r){S(a,r)}}}function $(r){var t,a,c;return{c:function(){t=i("div"),a=i("h2"),c=l("There is no Workers matching your criteria")},l:function(r){t=h(r,"DIV",{});var e=v(t);a=h(e,"H2",{});var o=v(a);c=d(o,"There is no Workers matching your criteria"),o.forEach(E),e.forEach(E)},m:function(r,e){m(r,t,e),A(t,a),A(a,c)},p:F,i:F,o:F,d:function(r){r&&E(t)}}}function G(r){for(var t,a,c,e,o,s,n,f,p,w,b,D,g,W,N,R,H,_,L,I,S,U,y,V,x,j,$,G,P,C,J,K,Y,z,M,q,X,Z=r.workers,rr=[],tr=0;tr<Z.length;tr+=1)rr[tr]=Q(B(r,Z,tr));return{c:function(){t=i("div"),a=i("div"),c=i("div"),e=i("table"),o=i("thead"),s=i("tr"),n=i("th"),f=l("#"),p=u(),w=i("th"),b=l("State"),D=u(),g=i("th"),W=l("Halt"),N=u(),R=i("th"),H=l("Pid"),_=u(),L=i("th"),I=l("Current Job"),S=u(),U=i("th"),y=l("Last Update"),V=u(),x=i("th"),j=l("Time Start"),$=u(),G=i("th"),P=l("Timeout"),C=u(),J=i("th"),K=l("Type"),Y=u(),z=i("th"),M=l("Error"),q=u(),X=i("tbody");for(var r=0;r<rr.length;r+=1)rr[r].c();this.h()},l:function(r){t=h(r,"DIV",{});var i=v(t);a=h(i,"DIV",{class:!0});var l=v(a);c=h(l,"DIV",{class:!0});var u=v(c);e=h(u,"TABLE",{class:!0});var T=v(e);o=h(T,"THEAD",{});var m=v(o);s=h(m,"TR",{});var A=v(s);n=h(A,"TH",{scope:!0});var F=v(n);f=d(F,"#"),F.forEach(E),p=k(A),w=h(A,"TH",{scope:!0});var O=v(w);b=d(O,"State"),O.forEach(E),D=k(A),g=h(A,"TH",{scope:!0});var B=v(g);W=d(B,"Halt"),B.forEach(E),N=k(A),R=h(A,"TH",{scope:!0});var Q=v(R);H=d(Q,"Pid"),Q.forEach(E),_=k(A),L=h(A,"TH",{scope:!0});var Z=v(L);I=d(Z,"Current Job"),Z.forEach(E),S=k(A),U=h(A,"TH",{scope:!0});var tr=v(U);y=d(tr,"Last Update"),tr.forEach(E),V=k(A),x=h(A,"TH",{scope:!0});var ar=v(x);j=d(ar,"Time Start"),ar.forEach(E),$=k(A),G=h(A,"TH",{scope:!0});var cr=v(G);P=d(cr,"Timeout"),cr.forEach(E),C=k(A),J=h(A,"TH",{scope:!0});var er=v(J);K=d(er,"Type"),er.forEach(E),Y=k(A),z=h(A,"TH",{scope:!0});var or=v(z);M=d(or,"Error"),or.forEach(E),A.forEach(E),m.forEach(E),q=k(T),X=h(T,"TBODY",{});for(var sr=v(X),nr=0;nr<rr.length;nr+=1)rr[nr].l(sr);sr.forEach(E),T.forEach(E),u.forEach(E),l.forEach(E),i.forEach(E),this.h()},h:function(){T(n,"scope","col"),T(w,"scope","col"),T(g,"scope","col"),T(R,"scope","col"),T(L,"scope","col"),T(U,"scope","col"),T(x,"scope","col"),T(G,"scope","col"),T(J,"scope","col"),T(z,"scope","col"),T(e,"class","table table-striped"),T(c,"class","col-sm-12"),T(a,"class","row mt-5")},m:function(r,i){m(r,t,i),A(t,a),A(a,c),A(c,e),A(e,o),A(o,s),A(s,n),A(n,f),A(s,p),A(s,w),A(w,b),A(s,D),A(s,g),A(g,W),A(s,N),A(s,R),A(R,H),A(s,_),A(s,L),A(L,I),A(s,S),A(s,U),A(U,y),A(s,V),A(s,x),A(x,j),A(s,$),A(s,G),A(G,P),A(s,C),A(s,J),A(J,K),A(s,Y),A(s,z),A(z,M),A(e,q),A(e,X);for(var l=0;l<rr.length;l+=1)rr[l].m(X,null)},p:function(r,t){if(r.workers||r.state){var a;for(Z=t.workers,a=0;a<Z.length;a+=1){var c=B(t,Z,a);rr[a]?rr[a].p(r,c):(rr[a]=Q(c),rr[a].c(),rr[a].m(X,null))}for(;a<rr.length;a+=1)rr[a].d(1);rr.length=Z.length}},i:F,o:F,d:function(r){r&&E(t),O(rr,r)}}}function P(r){var t,a,c,e=r.worker.state+"";return{c:function(){t=i("td"),a=i("span"),c=l(e),this.h()},l:function(r){t=h(r,"TD",{});var o=v(t);a=h(o,"SPAN",{class:!0});var s=v(a);c=d(s,e),s.forEach(E),o.forEach(E),this.h()},h:function(){T(a,"class","badge badge-warning")},m:function(r,e){m(r,t,e),A(t,a),A(a,c)},p:function(r,t){r.workers&&e!==(e=t.worker.state+"")&&b(c,e)},d:function(r){r&&E(t)}}}function C(r){var t,a,c,e=r.worker.state+"";return{c:function(){t=i("td"),a=i("span"),c=l(e),this.h()},l:function(r){t=h(r,"TD",{});var o=v(t);a=h(o,"SPAN",{class:!0});var s=v(a);c=d(s,e),s.forEach(E),o.forEach(E),this.h()},h:function(){T(a,"class","badge badge-dark")},m:function(r,e){m(r,t,e),A(t,a),A(a,c)},p:function(r,t){r.workers&&e!==(e=t.worker.state+"")&&b(c,e)},d:function(r){r&&E(t)}}}function J(r){var t,a,c,e=r.worker.state+"";return{c:function(){t=i("td"),a=i("span"),c=l(e),this.h()},l:function(r){t=h(r,"TD",{});var o=v(t);a=h(o,"SPAN",{class:!0});var s=v(a);c=d(s,e),s.forEach(E),o.forEach(E),this.h()},h:function(){T(a,"class","badge badge-secondary")},m:function(r,e){m(r,t,e),A(t,a),A(a,c)},p:function(r,t){r.workers&&e!==(e=t.worker.state+"")&&b(c,e)},d:function(r){r&&E(t)}}}function K(r){var t,a,c,e=r.worker.state+"";return{c:function(){t=i("td"),a=i("span"),c=l(e),this.h()},l:function(r){t=h(r,"TD",{});var o=v(t);a=h(o,"SPAN",{class:!0});var s=v(a);c=d(s,e),s.forEach(E),o.forEach(E),this.h()},h:function(){T(a,"class","badge badge-primary")},m:function(r,e){m(r,t,e),A(t,a),A(a,c)},p:function(r,t){r.workers&&e!==(e=t.worker.state+"")&&b(c,e)},d:function(r){r&&E(t)}}}function Y(r){var t,a,c,e=r.worker.state+"";return{c:function(){t=i("td"),a=i("span"),c=l(e),this.h()},l:function(r){t=h(r,"TD",{});var o=v(t);a=h(o,"SPAN",{class:!0});var s=v(a);c=d(s,e),s.forEach(E),o.forEach(E),this.h()},h:function(){T(a,"class","badge badge-danger")},m:function(r,e){m(r,t,e),A(t,a),A(a,c)},p:function(r,t){r.workers&&e!==(e=t.worker.state+"")&&b(c,e)},d:function(r){r&&E(t)}}}function z(r){var t,a,c,e=r.worker.state+"";return{c:function(){t=i("td"),a=i("span"),c=l(e),this.h()},l:function(r){t=h(r,"TD",{});var o=v(t);a=h(o,"SPAN",{class:!0});var s=v(a);c=d(s,e),s.forEach(E),o.forEach(E),this.h()},h:function(){T(a,"class","badge badge-success")},m:function(r,e){m(r,t,e),A(t,a),A(a,c)},p:function(r,t){r.workers&&e!==(e=t.worker.state+"")&&b(c,e)},d:function(r){r&&E(t)}}}function M(r){var t,a,c=r.worker.current_job+"";return{c:function(){t=i("td"),a=l(c)},l:function(r){t=h(r,"TD",{});var e=v(t);a=d(e,c),e.forEach(E)},m:function(r,c){m(r,t,c),A(t,a)},p:function(r,t){r.workers&&c!==(c=t.worker.current_job+"")&&b(a,c)},d:function(r){r&&E(t)}}}function q(r){var t,a;return{c:function(){t=i("td"),a=l("N/A")},l:function(r){t=h(r,"TD",{});var c=v(t);a=d(c,"N/A"),c.forEach(E)},m:function(r,c){m(r,t,c),A(t,a)},p:F,d:function(r){r&&E(t)}}}function Q(r){var t,a,c,e,o,s,n,f,T,p,w,D,g,W,N,R,H,_,L,I,F,S,O,U,y,V,x,B=r.worker.id+"",j=r.worker.halt+"",$=r.worker.pid+"",G=r.worker.last_update+"",Q=r.worker.time_start+"",X=r.worker.timeout+"",Z=r.worker.type+"",rr=r.worker.error+"";function tr(r,t){return t.worker.state==t.state.RESULT?z:t.worker.state==t.state.ERROR?Y:t.worker.state==t.state.NEW?K:t.worker.state==t.state.HALTED?J:t.worker.state==t.state.WAITING?C:P}var ar=tr(0,r),cr=ar(r);function er(r,t){return 2147483647==t.worker.current_job?q:M}var or=er(0,r),sr=or(r);return{c:function(){t=i("tr"),a=i("td"),c=l(B),e=u(),cr.c(),o=u(),s=i("td"),n=l(j),f=u(),T=i("td"),p=l($),w=u(),sr.c(),D=u(),g=i("td"),W=l(G),N=u(),R=i("td"),H=l(Q),_=u(),L=i("td"),I=l(X),F=u(),S=i("td"),O=l(Z),U=u(),y=i("td"),V=l(rr),x=u()},l:function(r){t=h(r,"TR",{});var i=v(t);a=h(i,"TD",{});var l=v(a);c=d(l,B),l.forEach(E),e=k(i),cr.l(i),o=k(i),s=h(i,"TD",{});var u=v(s);n=d(u,j),u.forEach(E),f=k(i),T=h(i,"TD",{});var m=v(T);p=d(m,$),m.forEach(E),w=k(i),sr.l(i),D=k(i),g=h(i,"TD",{});var A=v(g);W=d(A,G),A.forEach(E),N=k(i),R=h(i,"TD",{});var b=v(R);H=d(b,Q),b.forEach(E),_=k(i),L=h(i,"TD",{});var P=v(L);I=d(P,X),P.forEach(E),F=k(i),S=h(i,"TD",{});var C=v(S);O=d(C,Z),C.forEach(E),U=k(i),y=h(i,"TD",{});var J=v(y);V=d(J,rr),J.forEach(E),x=k(i),i.forEach(E)},m:function(r,i){m(r,t,i),A(t,a),A(a,c),A(t,e),cr.m(t,null),A(t,o),A(t,s),A(s,n),A(t,f),A(t,T),A(T,p),A(t,w),sr.m(t,null),A(t,D),A(t,g),A(g,W),A(t,N),A(t,R),A(R,H),A(t,_),A(t,L),A(L,I),A(t,F),A(t,S),A(S,O),A(t,U),A(t,y),A(y,V),A(t,x)},p:function(r,a){r.workers&&B!==(B=a.worker.id+"")&&b(c,B),ar===(ar=tr(0,a))&&cr?cr.p(r,a):(cr.d(1),(cr=ar(a))&&(cr.c(),cr.m(t,o))),r.workers&&j!==(j=a.worker.halt+"")&&b(n,j),r.workers&&$!==($=a.worker.pid+"")&&b(p,$),or===(or=er(0,a))&&sr?sr.p(r,a):(sr.d(1),(sr=or(a))&&(sr.c(),sr.m(t,D))),r.workers&&G!==(G=a.worker.last_update+"")&&b(W,G),r.workers&&Q!==(Q=a.worker.time_start+"")&&b(H,Q),r.workers&&X!==(X=a.worker.timeout+"")&&b(I,X),r.workers&&Z!==(Z=a.worker.type+"")&&b(O,Z),r.workers&&rr!==(rr=a.worker.error+"")&&b(V,rr)},d:function(r){r&&E(t),cr.d(),sr.d()}}}function X(r){var t,a,c,e,o,s,n,H,_,L,I,F,S,O,U,y,V,x,B,P,C,J,K,Y,z,M,q,Q,X,Z,rr,tr,ar,cr,er,or,sr,nr,ir,lr,ur,fr,hr,vr,dr,Er,kr,Tr,pr,wr,mr,Ar,br,Dr,gr,Wr,Nr,Rr,Hr,_r,Lr,Ir,Fr,Sr,Or,Ur,yr,Vr,xr,Br,jr,$r,Gr,Pr,Cr,Jr,Kr,Yr=r.workers.length+"",zr=r.counters.new+"",Mr=r.counters.success+"",qr=r.counters.error+"",Qr=r.counters.halted+"",Xr=r.counters.waiting+"",Zr=[G,$,j],rt=[];function tt(r,t){return(null==jr||r.filteredWorkers||r.isAllWorkersAvailable)&&(jr=!!(t.filteredWorkers()&&t.filteredWorkers().length>0&&t.isAllWorkersAvailable)),jr?0:((null==$r||r.filteredWorkers||r.isAllWorkersAvailable)&&($r=!(0!=t.filteredWorkers().length||!t.isAllWorkersAvailable)),$r?1:t.isAllWorkersAvailable?-1:2)}return~(Gr=tt(null,r))&&(Pr=rt[Gr]=Zr[Gr](r)),{c:function(){t=i("h1"),a=l("Workers"),c=u(),e=i("div"),o=i("div"),s=i("button"),n=l("All"),H=u(),_=i("div"),L=i("button"),I=l("New"),F=u(),S=i("div"),O=i("button"),U=l("Success"),y=u(),V=i("div"),x=i("button"),B=l("Failure"),P=u(),C=i("div"),J=i("button"),K=l("Halted"),Y=u(),z=i("div"),M=i("button"),q=l("Waiting"),Q=u(),X=i("div"),Z=i("div"),rr=i("table"),tr=i("thead"),ar=i("tr"),cr=i("th"),er=l("Total"),or=u(),sr=i("th"),nr=l("New"),ir=u(),lr=i("th"),ur=l("Success"),fr=u(),hr=i("th"),vr=l("Failure"),dr=u(),Er=i("th"),kr=l("Halted"),Tr=u(),pr=i("th"),wr=l("Waiting"),mr=u(),Ar=i("tbody"),br=i("td"),Dr=l(Yr),gr=u(),Wr=i("td"),Nr=l(zr),Rr=u(),Hr=i("td"),_r=l(Mr),Lr=u(),Ir=i("td"),Fr=l(qr),Sr=u(),Or=i("td"),Ur=l(Qr),yr=u(),Vr=i("td"),xr=l(Xr),Br=u(),Pr&&Pr.c(),Cr=f(),this.h()},l:function(r){t=h(r,"H1",{});var i=v(t);a=d(i,"Workers"),i.forEach(E),c=k(r),e=h(r,"DIV",{class:!0});var l=v(e);o=h(l,"DIV",{class:!0});var u=v(o);s=h(u,"BUTTON",{class:!0});var T=v(s);n=d(T,"All"),T.forEach(E),u.forEach(E),H=k(l),_=h(l,"DIV",{class:!0});var p=v(_);L=h(p,"BUTTON",{class:!0});var w=v(L);I=d(w,"New"),w.forEach(E),p.forEach(E),F=k(l),S=h(l,"DIV",{class:!0});var m=v(S);O=h(m,"BUTTON",{class:!0});var A=v(O);U=d(A,"Success"),A.forEach(E),m.forEach(E),y=k(l),V=h(l,"DIV",{class:!0});var b=v(V);x=h(b,"BUTTON",{class:!0});var D=v(x);B=d(D,"Failure"),D.forEach(E),b.forEach(E),P=k(l),C=h(l,"DIV",{class:!0});var g=v(C);J=h(g,"BUTTON",{class:!0});var W=v(J);K=d(W,"Halted"),W.forEach(E),g.forEach(E),Y=k(l),z=h(l,"DIV",{class:!0});var N=v(z);M=h(N,"BUTTON",{class:!0});var R=v(M);q=d(R,"Waiting"),R.forEach(E),N.forEach(E),l.forEach(E),Q=k(r),X=h(r,"DIV",{class:!0});var j=v(X);Z=h(j,"DIV",{class:!0});var $=v(Z);rr=h($,"TABLE",{class:!0});var G=v(rr);tr=h(G,"THEAD",{});var jr=v(tr);ar=h(jr,"TR",{});var $r=v(ar);cr=h($r,"TH",{class:!0,scope:!0});var Gr=v(cr);er=d(Gr,"Total"),Gr.forEach(E),or=k($r),sr=h($r,"TH",{class:!0,scope:!0});var Jr=v(sr);nr=d(Jr,"New"),Jr.forEach(E),ir=k($r),lr=h($r,"TH",{class:!0,scope:!0});var Kr=v(lr);ur=d(Kr,"Success"),Kr.forEach(E),fr=k($r),hr=h($r,"TH",{class:!0,scope:!0});var Zr=v(hr);vr=d(Zr,"Failure"),Zr.forEach(E),dr=k($r),Er=h($r,"TH",{class:!0,scope:!0});var rt=v(Er);kr=d(rt,"Halted"),rt.forEach(E),Tr=k($r),pr=h($r,"TH",{class:!0,scope:!0});var tt=v(pr);wr=d(tt,"Waiting"),tt.forEach(E),$r.forEach(E),jr.forEach(E),mr=k(G),Ar=h(G,"TBODY",{class:!0});var at=v(Ar);br=h(at,"TD",{});var ct=v(br);Dr=d(ct,Yr),ct.forEach(E),gr=k(at),Wr=h(at,"TD",{});var et=v(Wr);Nr=d(et,zr),et.forEach(E),Rr=k(at),Hr=h(at,"TD",{});var ot=v(Hr);_r=d(ot,Mr),ot.forEach(E),Lr=k(at),Ir=h(at,"TD",{});var st=v(Ir);Fr=d(st,qr),st.forEach(E),Sr=k(at),Or=h(at,"TD",{});var nt=v(Or);Ur=d(nt,Qr),nt.forEach(E),yr=k(at),Vr=h(at,"TD",{});var it=v(Vr);xr=d(it,Xr),it.forEach(E),at.forEach(E),G.forEach(E),$.forEach(E),j.forEach(E),Br=k(r),Pr&&Pr.l(r),Cr=f(),this.h()},h:function(){T(s,"class","btn"),p(s,"active",r.currentFilter===r.state.ALL),T(o,"class","mr-3"),T(L,"class","btn"),p(L,"active",r.currentFilter===r.state.NEW),T(_,"class","mr-3"),T(O,"class","btn"),p(O,"active",r.currentFilter===r.state.RESULT),T(S,"class","mr-3"),T(x,"class","btn"),p(x,"active",r.currentFilter===r.state.ERROR),T(V,"class","mr-3"),T(J,"class","btn"),p(J,"active",r.currentFilter===r.state.HALTED),T(C,"class","mr-3"),T(M,"class","btn"),p(M,"active",r.currentFilter===r.state.WAITING),T(z,"class","mr-3"),T(e,"class","d-flex justify-content-start"),T(cr,"class","text-center"),T(cr,"scope","col"),T(sr,"class","text-center"),T(sr,"scope","col"),T(lr,"class","text-center"),T(lr,"scope","col"),T(hr,"class","text-center"),T(hr,"scope","col"),T(Er,"class","text-center"),T(Er,"scope","col"),T(pr,"class","text-center"),T(pr,"scope","col"),T(Ar,"class","text-center"),T(rr,"class","table table-striped"),T(Z,"class","col-sm-12"),T(X,"class","row mt-5"),Kr=[w(s,"click",r.click_handler),w(L,"click",r.click_handler_1),w(O,"click",r.click_handler_2),w(x,"click",r.click_handler_3),w(J,"click",r.click_handler_4),w(M,"click",r.click_handler_5)]},m:function(r,i){m(r,t,i),A(t,a),m(r,c,i),m(r,e,i),A(e,o),A(o,s),A(s,n),A(e,H),A(e,_),A(_,L),A(L,I),A(e,F),A(e,S),A(S,O),A(O,U),A(e,y),A(e,V),A(V,x),A(x,B),A(e,P),A(e,C),A(C,J),A(J,K),A(e,Y),A(e,z),A(z,M),A(M,q),m(r,Q,i),m(r,X,i),A(X,Z),A(Z,rr),A(rr,tr),A(tr,ar),A(ar,cr),A(cr,er),A(ar,or),A(ar,sr),A(sr,nr),A(ar,ir),A(ar,lr),A(lr,ur),A(ar,fr),A(ar,hr),A(hr,vr),A(ar,dr),A(ar,Er),A(Er,kr),A(ar,Tr),A(ar,pr),A(pr,wr),A(rr,mr),A(rr,Ar),A(Ar,br),A(br,Dr),A(Ar,gr),A(Ar,Wr),A(Wr,Nr),A(Ar,Rr),A(Ar,Hr),A(Hr,_r),A(Ar,Lr),A(Ar,Ir),A(Ir,Fr),A(Ar,Sr),A(Ar,Or),A(Or,Ur),A(Ar,yr),A(Ar,Vr),A(Vr,xr),m(r,Br,i),~Gr&&rt[Gr].m(r,i),m(r,Cr,i),Jr=!0},p:function(r,t){(r.currentFilter||r.state)&&p(s,"active",t.currentFilter===t.state.ALL),(r.currentFilter||r.state)&&p(L,"active",t.currentFilter===t.state.NEW),(r.currentFilter||r.state)&&p(O,"active",t.currentFilter===t.state.RESULT),(r.currentFilter||r.state)&&p(x,"active",t.currentFilter===t.state.ERROR),(r.currentFilter||r.state)&&p(J,"active",t.currentFilter===t.state.HALTED),(r.currentFilter||r.state)&&p(M,"active",t.currentFilter===t.state.WAITING),Jr&&!r.workers||Yr===(Yr=t.workers.length+"")||b(Dr,Yr),Jr&&!r.counters||zr===(zr=t.counters.new+"")||b(Nr,zr),Jr&&!r.counters||Mr===(Mr=t.counters.success+"")||b(_r,Mr),Jr&&!r.counters||qr===(qr=t.counters.error+"")||b(Fr,qr),Jr&&!r.counters||Qr===(Qr=t.counters.halted+"")||b(Ur,Qr),Jr&&!r.counters||Xr===(Xr=t.counters.waiting+"")||b(xr,Xr);var a=Gr;(Gr=tt(r,t))===a?~Gr&&rt[Gr].p(r,t):(Pr&&(D(),g(rt[a],1,1,function(){rt[a]=null}),W()),~Gr?((Pr=rt[Gr])||(Pr=rt[Gr]=Zr[Gr](t)).c(),N(Pr,1),Pr.m(Cr.parentNode,Cr)):Pr=null)},i:function(r){Jr||(N(Pr),Jr=!0)},o:function(r){g(Pr),Jr=!1},d:function(r){r&&E(t),r&&E(c),r&&E(e),r&&E(Q),r&&E(X),r&&E(Br),~Gr&&rt[Gr].d(r),r&&E(Cr),R(Kr)}}}function Z(r,t,a){var c={RESULT:"OK",ERROR:"ERROR",NEW:"NEW",HALTED:"HALTED",WAITING:"WAITING",ALL:"all"},e=!1,o={success:0,error:0,new:0,halted:0,waiting:0},s=c.ALL,n=[];function i(){n.forEach(function(r){r.state==c.RESULT?a("counters",o.success++,o):r.state==c.ERROR?a("counters",o.error++,o):r.state==c.NEW?a("counters",o.new++,o):r.state==c.HALTED?a("counters",o.halted++,o):r.state==c.WAITING&&a("counters",o.waiting++,o)})}function l(r){a("currentFilter",s=r)}function u(r){var t=[];return n.forEach(function(a){a.state==r&&t.push(a)}),t}H(function(){return U.async(function(r){for(;;)switch(r.prev=r.next){case 0:a("isAllWorkersAvailable",e=!1),y().then(function(r){r&&(a("isAllWorkersAvailable",e=!0),a("workers",n=r.data.workers),n.forEach(function(r){r.state=r.state.toUpperCase(),r.error&&(r.error=JSON.stringify(r.error)),r.time_start=V(r.time_start),r.last_update=V(r.last_update)}),i())}).catch(function(r){console.log(r)});case 2:case"end":return r.stop()}})});var f;return r.$$.update=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{currentFilter:1,workers:1};(r.currentFilter||r.workers)&&a("filteredWorkers",f=function(){return a("counters",o={success:0,error:0,new:0,halted:0,waiting:0}),i(),s==c.ALL?n:s==c.RESULT?u(c.RESULT):s==c.ERROR?u(c.ERROR):s==c.NEW?u(c.NEW):s==c.HALTED?u(c.HALTED):s==c.WAITING?u(c.WAITING):void 0})},{state:c,isAllWorkersAvailable:e,counters:o,currentFilter:s,workers:n,updateFilter:l,filteredWorkers:f,click_handler:function(){return l(c.ALL)},click_handler_1:function(){return l(c.NEW)},click_handler_2:function(){return l(c.RESULT)},click_handler_3:function(){return l(c.ERROR)},click_handler_4:function(){return l(c.HALTED)},click_handler_5:function(){return l(c.WAITING)}}}var rr=function(i){function l(r){var n;return t(this,l),n=a(this,c(l).call(this)),e(s(n),r,Z,X,o,{}),n}return r(l,n),l}();export{rr as W};
  