"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[6021],{96021:(e,t,s)=>{s.r(t),s.d(t,{Tooltip:()=>n.A,default:()=>a});var r=s(67758),o=s(7552),c=s(68446),n=s(88262),l=s(75429),i=s(69500);const d=e=>e.toLocaleString("en-US"),h=(0,o.forwardRef)(function(e,t){const s=(0,r.c)(17),{model:o,feature:c}=e;let n,h;if(s[0]!==c){const e=c.get("start"),t=c.get("end");n=c.get("refName"),h=e===t?d(e):`${d(e)}..${d(t)}`,s[0]=c,s[1]=n,s[2]=h}else n=s[1],h=s[2];const a=h;let x;if(s[3]!==a||s[4]!==c||s[5]!==o.sources||s[6]!==t||s[7]!==n){const e=c.get("sources");let r;s[9]!==c?(r=c.get("source"),s[9]=c,s[10]=r):r=s[10];const d=r,h=c.get("summary");let b;s[11]!==o.sources?(b=Object.fromEntries(o.sources.map(u)),s[11]=o.sources,s[12]=b):b=s[12];const g=b;let m,f;s[13]!==a||s[14]!==n?(m=[n,a].filter(j),s[13]=a,s[14]=n,s[15]=m):m=s[15],s[16]===Symbol.for("react.memo_cache_sentinel")?(f=(0,i.jsx)("br",{}),s[16]=f):f=s[16],x=(0,i.jsxs)("div",{ref:t,children:[m.join(":"),f,e?(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"color"}),(0,i.jsx)("th",{children:"source"}),(0,i.jsx)("th",{children:"score"})]})}),(0,i.jsx)("tbody",{children:Object.entries(e).map(e=>{const[t,s]=e;return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)("div",{style:{width:16,height:16,background:g[t].color}})}),(0,i.jsx)("td",{children:t}),(0,i.jsx)("td",{children:(0,l.toP)(s.score)})]},t)})})]}):(0,i.jsxs)("span",{children:[d," ",h?`min:${(0,l.toP)(c.get("minScore"))} avg:${(0,l.toP)(c.get("score"))} max:${(0,l.toP)(c.get("maxScore"))}`:(0,l.toP)(c.get("score"))]})]}),s[3]=a,s[4]=c,s[5]=o.sources,s[6]=t,s[7]=n,s[8]=x}else x=s[8];return x}),a=(0,c.observer)(e=>(0,i.jsx)(n.A,{useClientY:!0,TooltipContents:h,...e}));function u(e){return[e.name,e]}function j(e){return!!e}}}]);
//# sourceMappingURL=6021.3baf5413.chunk.js.map