import{aj as m,ak as M,al as x,am as h,an as y}from"./index-Bm2SqMk3.js";function q(o,p){const e=o.get("strand"),l=o.get("seq"),g=m(o,"MM","Mm")||"",P=p||M(o.get("CIGAR"));if(l){const f=x(g,l,e),a=h(o),t=[];let b=0;for(const{type:c,positions:r}of f){for(const{ref:n,idx:d}of y(P,r)){const s=(a==null?void 0:a[b+(e===-1?r.length-1-d:d)])||0;if(!t[n])t[n]={type:c,prob:s,allProbs:[s]};else{const i=t[n];t[n]={allProbs:[...i.allProbs,s],prob:Math.max(i.prob,s),type:i.prob>s?i.type:c}}}b+=r.length}return t}}export{q as g};
