import{S as C,i as D,s as F,k as T,b as d,q as w,j as m,F as I,e as v,a as u,t as p,g as k,m as j,f as q,h as S,R as h}from"./index.65fb5956.js";function E(i){let e,t;return{c(){e=v("div"),t=v("span"),t.textContent="ERROR",u(t,"class","text-red-400 font-mono font-semibold text-lg svelte-91poyq"),u(e,"style",i[0]),u(e,"class","svelte-91poyq"),p(e,"cover_container",i[1])},m(n,l){d(n,e,l),k(e,t)},p(n,l){l&1&&u(e,"style",n[0]),l&2&&p(e,"cover_container",n[1])},d(n){n&&m(e)}}}function M(i){let e,t,n,l;function r(s,f){return s[2]?O:N}let o=r(i),a=o(i);function b(s,f){return s[5]===null?A:z}let y=b(i),c=y(i);return{c(){e=v("div"),t=v("div"),a.c(),n=j(),l=v("div"),c.c(),u(t,"class","text-xs font-mono text-gray-400 svelte-91poyq"),u(l,"class","border-gray-200 rounded border w-40 h-2 relative svelte-91poyq"),u(e,"style",i[0]),u(e,"class","svelte-91poyq"),p(e,"cover_container",i[1])},m(s,f){d(s,e,f),k(e,t),a.m(t,null),k(e,n),k(e,l),c.m(l,null)},p(s,f){o===(o=r(s))&&a?a.p(s,f):(a.d(1),a=o(s),a&&(a.c(),a.m(t,null))),y===(y=b(s))&&c?c.p(s,f):(c.d(1),c=y(s),c&&(c.c(),c.m(l,null))),f&1&&u(e,"style",s[0]),f&2&&p(e,"cover_container",s[1])},d(s){s&&m(e),a.d(),c.d()}}}function N(i){let e=i[4].toFixed(1)+"",t,n;return{c(){t=q(e),n=q("s")},m(l,r){d(l,t,r),d(l,n,r)},p(l,r){r&16&&e!==(e=l[4].toFixed(1)+"")&&S(t,e)},d(l){l&&m(t),l&&m(n)}}}function O(i){let e,t;return{c(){e=q(i[2]),t=q(" in line")},m(n,l){d(n,e,l),d(n,t,l)},p(n,l){l&4&&S(e,n[2])},d(n){n&&m(e),n&&m(t)}}}function z(i){let e;return{c(){e=v("div"),u(e,"class","blink bg-amber-500 shadow-inner h-full svelte-91poyq"),h(e,"width",i[5]*100+"%")},m(t,n){d(t,e,n)},p(t,n){n&32&&h(e,"width",t[5]*100+"%")},d(t){t&&m(e)}}}function A(i){let e;return{c(){e=v("div"),u(e,"class","bounce absolute bg-amber-500 shadow-inner h-full w-1/4 svelte-91poyq")},m(t,n){d(t,e,n)},p:w,d(t){t&&m(e)}}}function B(i){let e;function t(r,o){if(r[3]==="pending")return M;if(r[3]==="error")return E}let n=t(i),l=n&&n(i);return{c(){l&&l.c(),e=T()},m(r,o){l&&l.m(r,o),d(r,e,o)},p(r,[o]){n===(n=t(r))&&l?l.p(r,o):(l&&l.d(1),l=n&&n(r),l&&(l.c(),l.m(e.parentNode,e)))},i:w,o:w,d(r){l&&l.d(r),r&&m(e)}}}function G(i,e,t){let n,{style:l=""}=e,{cover_container:r=!1}=e,{eta:o=null}=e,{duration:a=8.2}=e,{queue_pos:b=0}=e,{tracked_status:y}=e,c=null,s=0,f=0;const R=()=>{s=Date.now(),t(4,f=0),c=setInterval(()=>{t(4,f=(Date.now()-s)/1e3)},100)},g=()=>{clearInterval(c)};return I(()=>{c&&g()}),i.$$set=_=>{"style"in _&&t(0,l=_.style),"cover_container"in _&&t(1,r=_.cover_container),"eta"in _&&t(6,o=_.eta),"duration"in _&&t(7,a=_.duration),"queue_pos"in _&&t(2,b=_.queue_pos),"tracked_status"in _&&t(3,y=_.tracked_status)},i.$$.update=()=>{i.$$.dirty&192&&t(5,n=o===null?null:Math.min(a/o,1)),i.$$.dirty&8&&(y==="pending"?R():g())},[l,r,b,y,f,n,o,a]}class H extends C{constructor(e){super(),D(this,e,G,B,F,{style:0,cover_container:1,eta:6,duration:7,queue_pos:2,tracked_status:3})}}var K=H;const L=["static"];export{K as Component,L as modes};
