import{m as C,R as e,u as i,o as T,ad as S}from"./rpcWorker-CVTx5FIM.js";const k=C()(()=>({td:{whiteSpace:"nowrap"}})),j=(t=0)=>+(+t).toFixed(1),s=(t,a=1)=>`${j(t/(a||1)*100)}%`,w=e.forwardRef(function(a,l){const{feature:r,model:f}=a,{classes:h}=k(),u=r.get("start")+1,E=r.get("end"),g=r.get("refName"),{refbase:p,readsCounted:m,depth:P,ref:o,...y}=r.get("snpinfo"),v=[g,u===E?i.toLocale(u):`${i.toLocale(u)}..${i.toLocale(E)}`].filter(d=>!!d).join(":");return e.createElement("div",{ref:l},e.createElement("table",null,e.createElement("caption",null,v),e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null),e.createElement("th",null,"Base"),e.createElement("th",null,"Count"),e.createElement("th",null,"% of Total"),e.createElement("th",null,"Strands"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null),e.createElement("td",null,"Total"),e.createElement("td",null,m),e.createElement("td",null," "),e.createElement("td",null," ")),e.createElement("tr",null,e.createElement("td",null),e.createElement("td",null,"REF ",p?`(${p.toUpperCase()})`:""),e.createElement("td",null,o.entryDepth),e.createElement("td",null,s(o.entryDepth,m)),e.createElement("td",null,o[-1]?`${o[-1]}(-)`:"",o[1]?`${o[1]}(+)`:"")),Object.entries(y).map(([d,$])=>Object.entries($).map(([c,n])=>e.createElement("tr",{key:`${d}_${c}`},e.createElement("td",null,e.createElement(D,{model:f,base:c})),e.createElement("td",null,c.toUpperCase()," "),e.createElement("td",{className:h.td},[n.entryDepth,n.avgProbability!==void 0?`(avg. ${s(n.avgProbability)} prob.)`:""].filter(b=>!!b).join(" ")),e.createElement("td",null,c==="depth"||c==="skip"?"---":s(n.entryDepth,m)),e.createElement("td",null,n[-1]?`${n[-1]}(-)`:"",n[1]?`${n[1]}(+)`:"")))))))});function D({base:t,model:a}){var l;const{visibleModifications:r}=a;return t.startsWith("mod_")?e.createElement("div",{style:{width:10,height:10,background:(l=r.get(t.replace("mod_","")))===null||l===void 0?void 0:l.color}}):null}const _=T(function(t){const{model:a}=t,{featureUnderMouse:l}=a;return l&&l.get("type")==="skip"?null:e.createElement(S,{TooltipContents:w,...t})});export{_ as default};
