import{k as z}from"../chunks/DTHo7gyJ.mjs";import"../chunks/E-vkuI0X.mjs";import{i as A}from"../chunks/DueIe5zz.mjs";import{p as E,l as ie,a as ce,f as k,r as s,c as n,d as H,s as ue,i as o,h as p,al as m,u as i,b as M,j as f,m as de,g as le}from"../chunks/Dpn8_Hnn.mjs";import{p as P}from"../chunks/CUWjGq9Z.mjs";import{o as me}from"../chunks/Bg0ZbUei.mjs";import{s as _}from"../chunks/B4YZClIG.mjs";import{i as v}from"../chunks/CBivfA5Q.mjs";import{J as ve,K as fe,L as pe,M as ge,N as _e,O as he,P as ye,Q as be,R as xe,S as j,T as R}from"../chunks/CyJ0Hgdp.mjs";import{b as O}from"../chunks/_XOV-ATs.mjs";import{C as Ce}from"../chunks/CpUFM5Ht.mjs";import{C as we}from"../chunks/CCAgu_H0.mjs";import{n as Se,u as Le,a as ke}from"../chunks/BIcF9WEn.mjs";const Me=(async()=>({info:await z({})})),Ge=Object.freeze(Object.defineProperty({__proto__:null,load:Me},Symbol.toStringTag,{value:"Module"}));function Re(c){const a=c.secsUntilNextLearn;if(a>=86400)return"";const e=Se(a),h=Math.round(ke(e,a)),y=Le(e),g=ve({amount:h,unit:y}),b=fe({remaining:c.learnRemaining});return`${g} ${b}`}var B=f("<p> </p>"),F=f("<p></p>"),Pe=f("<!> <!>",1),Te=f('<div class="description svelte-bnvdv9"></div>'),Ne=f('<div class="congrats svelte-bnvdv9"><h1> </h1> <p> </p> <!> <!> <!> <!></div>'),I=f('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function De(c,a){E(a,!1);let e=P(a,"info",12),h=P(a,"refreshPeriodically",8,!0);const y=pe();let g=de();const b=ge(),J=_e(),K=O("unbury",he()),Q=ye({unburyThem:K}),q=O("customStudy",be()),G=xe({customStudy:q});me(()=>{h()&&setInterval(async()=>{try{e(await z({},{alertOnError:!1}))}catch{console.log("congrats fetch failed")}},6e4)}),ie(()=>o(e()),()=>{ue(g,Re(e()))}),ce(),A();var T=I(),x=k(T);j(x,()=>({"--gutter-block":"1rem","--gutter-inline":"2px"})),we(x.lastChild,{breakpoint:"sm",children:(V,Ue)=>{var N=I(),C=k(N);j(C,()=>({"--col-justify":"center"})),Ce(C.lastChild,{children:(W,$e)=>{var w=Ne(),S=p(w),X=p(S,!0);s(S);var L=m(S,2),Y=p(L,!0);s(L);var D=m(L,2);{var Z=t=>{var r=B(),l=p(r,!0);s(r),M(()=>_(l,b)),n(t,r)};v(D,t=>{o(e()),i(()=>e().reviewRemaining)&&t(Z)})}var U=m(D,2);{var ee=t=>{var r=B(),l=p(r,!0);s(r),M(()=>_(l,J)),n(t,r)};v(U,t=>{o(e()),i(()=>e().newRemaining)&&t(ee)})}var $=m(U,2);{var te=t=>{var r=Pe(),l=k(r);{var se=u=>{var d=F();R(d,()=>Q,!0),s(d),n(u,d)};v(l,u=>{o(e()),i(()=>e().haveSchedBuried||e().haveUserBuried)&&u(se)})}var ne=m(l,2);{var oe=u=>{var d=F();R(d,()=>G,!0),s(d),n(u,d)};v(ne,u=>{o(e()),i(()=>!e().isFilteredDeck)&&u(oe)})}n(t,r)};v($,t=>{o(e()),i(()=>e().bridgeCommandsSupported)&&t(te)})}var re=m($,2);{var ae=t=>{var r=Te();R(r,()=>(o(e()),i(()=>e().deckDescription)),!0),s(r),n(t,r)};v(re,t=>{o(e()),i(()=>e().deckDescription)&&t(ae)})}s(w),M(()=>{_(X,y),_(Y,le(g))}),n(W,w)},$$slots:{default:!0}}),s(C),n(V,N)},$$slots:{default:!0}}),s(x),n(c,T),H()}function Ve(c,a){E(a,!1);let e=P(a,"data",8);A(),De(c,{get info(){return o(e()),i(()=>e().info)}}),H()}export{Ve as component,Ge as universal};
