import{c as g}from"../chunks/Dnm-XY8D.mjs";import"../chunks/E-vkuI0X.mjs";import{i as k}from"../chunks/BY-InYMh.mjs";import{p as P,h as j,a0 as p,r as R,c as f,d as S,j as d,i,u as c,f as h}from"../chunks/CNnnUJHC.mjs";import{p as T,i as m}from"../chunks/CDiwszz9.mjs";import{p as _}from"../chunks/Mdxnp2L8.mjs";import{C as I}from"../chunks/CFB5uY-g.mjs";import{g as B}from"../chunks/DJ7H8Huw.mjs";function w(e){try{return BigInt(e)}catch{return null}}const O=(async({params:e})=>{const a=w(e.cardId),r=a!==null?await g({cid:a}):null,n=w(e.previousId),s=n!==null?await g({cid:n}):null;return{currentInfo:r,previousInfo:s}}),K=Object.freeze(Object.defineProperty({__proto__:null,load:O},Symbol.toStringTag,{value:"Module"}));var x=d("<h3>Current</h3> <!>",1),z=d("<h3>Previous</h3> <!>",1),M=d("<center><!> <!></center>");function L(e,a){P(a,!1);let r=T(a,"data",8);const n=_.url.searchParams.get("revlog")!=="0",s=_.url.searchParams.get("curve")!=="0";globalThis.anki||(globalThis.anki={}),globalThis.anki.updateCardInfos=async t=>{const o=`/card-info/${t}`;return B(o).catch(()=>{window.location.href=o})},k();var u=M(),v=j(u);{var b=t=>{var o=x(),l=p(h(o),2);I(l,{get stats(){return i(r()),c(()=>r().currentInfo)},get showRevlog(){return n},get showCurve(){return s}}),f(t,o)};m(v,t=>{i(r()),c(()=>r().currentInfo)&&t(b)})}var C=p(v,2);{var y=t=>{var o=z(),l=p(h(o),2);I(l,{get stats(){return i(r()),c(()=>r().previousInfo)},get showRevlog(){return n},get showCurve(){return s}}),f(t,o)};m(C,t=>{i(r()),c(()=>r().previousInfo)&&t(y)})}R(u),f(e,u),S()}export{L as component,K as universal};
