jbrowse-plugin-graphgenomeviewer 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{GraphGenomeView-UV5XDD7W.js → GraphGenomeView-QOBHGMLE.js} +2 -2
- package/dist/chunks/{LinearGraphDisplay-P2POSPXV.js → LinearGraphDisplay-TPXW6POY.js} +2 -2
- package/dist/chunks/{chunk-32XXMGET.js → chunk-HW55QCJG.js} +2 -2
- package/dist/chunks/{chunk-32XXMGET.js.map → chunk-HW55QCJG.js.map} +1 -1
- package/dist/chunks/{chunk-OJOZ5YAL.js → chunk-SIP5IHWK.js} +2 -2
- package/dist/chunks/{chunk-OJOZ5YAL.js.map → chunk-SIP5IHWK.js.map} +2 -2
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +3 -3
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/GraphGenomeView/components/WalkRowsOverlay.tsx +2 -2
- package/src/GraphGenomeView/model.test.ts +1 -1
- package/src/version.ts +1 -1
- /package/dist/chunks/{GraphGenomeView-UV5XDD7W.js.map → GraphGenomeView-QOBHGMLE.js.map} +0 -0
- /package/dist/chunks/{LinearGraphDisplay-P2POSPXV.js.map → LinearGraphDisplay-TPXW6POY.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{a as x}from"./chunk-HW55QCJG.js";import"./chunk-SIP5IHWK.js";import"./chunk-UQEPPJEO.js";import"./chunk-SCMIJAAX.js";import"./chunk-FCWXYIFC.js";import"./chunk-4C4CMI6K.js";import{X as L}from"./chunk-ECKLYJWP.js";import"./chunk-7BKUWQE5.js";import"./chunk-KULNKXPT.js";import{a as s,b as g,c as v,d as G,e as B}from"./chunk-XEJ47DLD.js";import{b as a}from"./chunk-FY3BTKY4.js";var S=a(g(),1);var m=a(G(),1),n=a(v(),1),C=a(g(),1),P=a(L(),1),o=a(s(),1),I=(0,P.makeStyles)()({paper:{padding:16,margin:8,maxWidth:560,marginInline:"auto",display:"flex",flexDirection:"column",gap:12},row:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8}}),b=(0,C.observer)(function({model:e}){let{classes:r}=I();return e.isLoading?(0,o.jsxs)(n.Paper,{className:r.paper,"data-testid":"graph-genome-loading",children:[(0,o.jsxs)("div",{className:r.row,children:[(0,o.jsx)(m.LoadingEllipses,{variant:"h6",message:e.statusMessage}),(0,o.jsx)(n.Button,{size:"small","data-testid":"graph-genome-cancel",onClick:()=>{e.cancelLoad()},children:"Cancel"})]}),(0,o.jsx)(n.LinearProgress,{variant:"indeterminate"})]}):e.error?(0,o.jsx)(n.Paper,{className:r.paper,children:(0,o.jsx)(m.ErrorBanner,{error:e.error,onReset:()=>{e.retryLoad()}})}):(0,o.jsx)(n.Paper,{className:r.paper,"data-testid":"graph-genome-load-canceled",children:(0,o.jsxs)("div",{className:r.row,children:[(0,o.jsx)(n.Typography,{variant:"h6",children:"Loading canceled"}),(0,o.jsx)(n.Button,{variant:"contained",size:"small","data-testid":"graph-genome-retry",onClick:()=>{e.retryLoad()},children:"Retry"})]})})}),h=b;var M=a(B(),1),N=a(G(),1),i=a(v(),1),w=a(g(),1),E=a(L(),1),t=a(s(),1),k=`H VN:Z:1.0
|
|
2
2
|
S 1 ACGT
|
|
3
3
|
S 2 GGCC
|
|
4
4
|
S 3 TTAA
|
|
@@ -7,4 +7,4 @@ L 1 + 2 + 0M
|
|
|
7
7
|
L 1 + 3 + 0M
|
|
8
8
|
L 2 + 4 + 0M
|
|
9
9
|
L 3 + 4 + 0M`,z=(0,E.makeStyles)()({column:{display:"flex",flexDirection:"column",gap:8},rowEnd:{display:"flex",gap:8,alignItems:"flex-end"},rowCenter:{display:"flex",gap:8,alignItems:"center"},flex1:{flex:1},paper:{padding:16,margin:8,maxWidth:560,marginInline:"auto"},header:{marginBottom:12},footer:{marginTop:12,display:"flex",justifyContent:"flex-end"}}),R=(0,w.observer)(function({model:e}){let{classes:r}=z(),[d,T]=(0,M.useState)("");function y(){d.trim()&&e.loadGFAFromLocation({uri:d,locationType:"UriLocation"})}function A(p){let c=p.target.files?.[0];c&&c.text().then(f=>e.loadGFA(f,c.name)).catch(f=>{e.setError(f)})}return(0,t.jsxs)(i.Paper,{className:r.paper,children:[(0,t.jsx)("div",{className:r.header,children:(0,t.jsx)(i.Typography,{variant:"h6",children:"Load a GFA graph"})}),(0,t.jsxs)("div",{className:r.column,children:[(0,t.jsxs)("div",{className:r.rowCenter,children:[(0,t.jsxs)(i.Button,{variant:"outlined",component:"label",size:"small",children:["Choose file",(0,t.jsx)("input",{type:"file",accept:".gfa,.gfa1,.gfa2",hidden:!0,onChange:p=>{A(p)}})]}),(0,t.jsx)(i.Typography,{variant:"caption",color:"text.secondary",children:"Whole-file GFA; best for small/medium graphs."})]}),(0,t.jsxs)("div",{className:r.rowEnd,children:[(0,t.jsx)(i.TextField,{size:"small",label:"URL",placeholder:"https://example.com/graph.gfa",value:d,onChange:p=>{T(p.target.value)},onKeyDown:p=>{p.key==="Enter"&&y()},className:r.flex1}),(0,t.jsx)(i.Button,{variant:"contained",onClick:()=>{y()},disabled:!d.trim(),children:"Open"})]})]}),(0,t.jsx)("div",{className:r.footer,children:(0,t.jsx)(i.Button,{size:"small",onClick:()=>{e.loadGFA(k,"Example graph")},children:"Load 4-node example"})}),e.error?(0,t.jsx)(N.ErrorBanner,{error:e.error}):null]})}),F=R;var l=a(s(),1),U=(0,S.observer)(function({model:e}){return e.hasGraph?(0,l.jsx)(x,{model:e}):e.canRetryLoad&&(e.error||e.loadCanceled)?(0,l.jsx)(h,{model:e}):(0,l.jsxs)(l.Fragment,{children:[e.isLoading?(0,l.jsx)(h,{model:e}):null,(0,l.jsx)("div",{hidden:e.isLoading,children:(0,l.jsx)(F,{model:e})})]})}),O=U;export{O as default};
|
|
10
|
-
//# sourceMappingURL=GraphGenomeView-
|
|
10
|
+
//# sourceMappingURL=GraphGenomeView-QOBHGMLE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=LinearGraphDisplay-
|
|
1
|
+
import{a as i}from"./chunk-HW55QCJG.js";import"./chunk-SIP5IHWK.js";import"./chunk-UQEPPJEO.js";import"./chunk-SCMIJAAX.js";import"./chunk-FCWXYIFC.js";import"./chunk-4C4CMI6K.js";import"./chunk-ECKLYJWP.js";import"./chunk-7BKUWQE5.js";import"./chunk-KULNKXPT.js";import{a as e,b as d}from"./chunk-XEJ47DLD.js";import{a as h,b as t}from"./chunk-FY3BTKY4.js";var p=h((l,o)=>{o.exports=JBrowseExports["@jbrowse/display-kit/DisplayChrome"]});var s=t(p(),1),n=t(d(),1);var r=t(e(),1),y=(0,n.observer)(function({model:a}){return(0,r.jsx)(s.DisplayStatusChrome,{model:a,phase:a.displayPhase,drawn:a.painted&&a.geometryPainted,testid:"linear-graph-display","data-layout":a.chosenLayoutMode,"data-cut-tier":a.cutTier,"data-recuts":a.recuts,"data-node-count":a.hasGraph?a.nodeCount:void 0,"data-loading":a.isLoading?"":void 0,style:{width:a.paneWidth,height:a.height,overflow:"hidden"},children:(0,r.jsx)(i,{model:a,ownChrome:!1})})}),c=y;export{c as default};
|
|
2
|
+
//# sourceMappingURL=LinearGraphDisplay-TPXW6POY.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{A as be,B as rt,Da as xt,E as at,F as de,Fa as kt,G as st,Ka as Te,L as ye,La as He,M as it,N as lt,Na as Mt,O as ct,Oa as Ct,R as dt,S as pt,U as ut,V as ft,W as ve,a as T,b as Ge,ba as we,da as mt,h as qe,i as Je,ka as ht,m as Qe,na as gt,oa as bt,s as re,sa as yt,t as tt,ua as vt,va as wt,xa as St,z as ot}from"./chunk-OJOZ5YAL.js";import{b as et}from"./chunk-UQEPPJEO.js";import{a as Ie}from"./chunk-FCWXYIFC.js";import{a as Lt}from"./chunk-4C4CMI6K.js";import{P as nt,X as ae,h as je,j as Ue,k as Ne,l as he,x as ge}from"./chunk-ECKLYJWP.js";import{a as v,b as I,c as ee,d as Ze,e as X}from"./chunk-XEJ47DLD.js";import{a as ao,b as i}from"./chunk-FY3BTKY4.js";var Pt=ao((Xr,Rt)=>{Rt.exports=JBrowseExports["@jbrowse/render-core/useRenderingBackend"]});var Ee=i(X(),1);var Q=i(Ze(),1),Ve=i(Ie(),1),no=i(Pt(),1);var Et=i(v(),1),It=(0,T.createSvgIcon)((0,Et.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info");var _=i(I(),1);var _e=i(I(),1);var N={background:"rgba(255,255,255,0.82)",padding:"4px 6px",borderRadius:3,fontSize:11,lineHeight:"15px",whiteSpace:"nowrap"},L={display:"flex",alignItems:"center",gap:5};var B=i(v(),1),so={position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"hidden",zIndex:2},io=(0,_e.observer)(function({model:e}){let{bubbleHalos:n,walkLift:o,hoveredBubble:a}=e;if(n.length===0)return null;let{scaleX:r,scaleY:s,translateX:c,translateY:u,paneWidth:p,canvasHeight:h}=e,d=e.contigThickness*ot,b=m=>o!==void 0&&!m.nodeIds.some(w=>o.nodeIds.has(w));return(0,B.jsx)("svg",{style:so,width:p,height:h,"data-testid":"graph-bubble-halos",children:(0,B.jsx)("g",{transform:`translate(${c} ${u}) scale(${r} ${s})`,children:n.filter(m=>!m.whole).map(m=>(0,B.jsx)("path",{d:m.path,fill:"none",stroke:re[m.kind],strokeOpacity:a&&et(m.bubble,a)?.45:b(m)?.06:.22,strokeWidth:d,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"},`${m.bubble.start}-${m.bubble.end}`))})})}),Gt=io;function lo({color:t}){return(0,B.jsx)("svg",{width:18,height:10,style:{flex:"none"},children:(0,B.jsx)("line",{x1:5,y1:5,x2:13,y2:5,stroke:t,strokeOpacity:.35,strokeWidth:8,strokeLinecap:"round"})})}var Nt=(0,_e.observer)(function({model:e}){let n=new Map;for(let o of e.bubbleHalos)if(!o.whole){let a=re[o.kind],r=n.get(a)??new Set;r.add(tt[o.kind]),n.set(a,r)}return n.size>0?(0,B.jsx)("div",{style:N,"data-testid":"graph-halo-legend",children:[...n].map(([o,a])=>(0,B.jsxs)("div",{style:L,children:[(0,B.jsx)(lo,{color:o}),(0,B.jsxs)("span",{children:["bubble: ",[...a].join(", ")]})]},o))}):null});var Me=i(X(),1);var Ce=i(Ge(),1),Be=i(I(),1);var D=i(v(),1),te={width:18,height:8,borderRadius:2,flex:"none"},co={marginBottom:2},po={...te,width:48};function pe({walk:t,label:e,reference:n,hint:o,at:a}){let r=mt(t,n);return(0,D.jsxs)("div",{style:co,title:[r.hover,o].filter(Boolean).join(" \xB7 ")||void 0,children:[(0,D.jsxs)("div",{style:L,children:[(0,D.jsx)("div",{style:{...r.shades?po:te,background:we(t.encoding)}}),(0,D.jsxs)("span",{children:[(0,D.jsx)("strong",{children:e}),r.delta,r.outside,r.reversed]})]}),a?(0,D.jsx)("div",{"data-testid":"graph-walk-at",children:a}):r.scale?(0,D.jsx)("div",{children:r.scale}):null]})}var W=i(X(),1);var uo=50;function Tt(t,e){return e>0?Math.max(1,t/e):uo}function fo(t){let e=new Set,n=1/0,o=-1/0;for(let a of t)e.add(a.minY),n=Math.min(n,a.minY),o=Math.max(o,a.minY);return e.size>1?(o-n)/(e.size-1):void 0}function mo(t,e,n){let o=Tt(e,t.length);return{x:o,y:n>0?Tt(n,t.length):fo(t)??o}}function Ht(t,e,n,o){return t===void 0?mo(e,n,o):typeof t=="number"?{x:t,y:t}:t}function ho(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));let a=o.get(n);return a||(a=[],o.set(n,a)),a}function _t(t,e,n,o,a,r,s){let c=Math.floor(n/e.x),u=Math.floor(a/e.x),p=Math.floor(o/e.y),h=Math.floor(r/e.y);for(let d=c;d<=u;d++)for(let b=p;b<=h;b++)ho(t,d,b).push(s)}function Bt(t,e,n,o,a,r){let s=Math.floor((n-a)/e.x),c=Math.floor((n+a)/e.x),u=Math.floor((o-r)/e.y),p=Math.floor((o+r)/e.y),h=[],d=new Set;for(let b=s;b<=c;b++){let m=t.get(b);if(m)for(let w=u;w<=p;w++){let y=m.get(w);if(y)for(let f of y)d.has(f)||(d.add(f),h.push(f))}}return h}var Se=class{constructor(e,n){this.cells=new Map;let o=[],a=0,r=0;for(let[s,c]of Object.entries(e))for(let u=0;u<c.length-1;u++){let p=c[u],h=c[u+1],d=Math.min(p.x,h.x),b=Math.min(p.y,h.y),m=Math.max(p.x,h.x),w=Math.max(p.y,h.y);a+=m-d,r+=w-b,o.push({entry:{nodeId:s,segmentIdx:u},minX:d,minY:b,maxX:m,maxY:w})}this.cellSize=Ht(n,o,a,r);for(let s of o)_t(this.cells,this.cellSize,s.minX,s.minY,s.maxX,s.maxY,s.entry)}query(e,n,o,a=o){return Bt(this.cells,this.cellSize,e,n,o,a)}},xe=class{constructor(e,n,o,a,r,s,c=0){this.cells=new Map;this.edgeCurves=at(e,n,a,s,c);let u=[],p=0,h=0;for(let d=0;d<n.edges.length;d++){let b=n.edges[d],m=e[b.from],w=e[b.to],y=this.edgeCurves.get(d);if(m?.length&&w?.length&&y){let{minX:f,minY:R,maxX:G,maxY:$}=je(y),g=b.pathIds?.length??0;if(o&&g>0){let S=0,M=0;for(let x of he(m,w,g,a))S=Math.max(S,Math.abs(x.x)),M=Math.max(M,Math.abs(x.y));f-=S,R-=M,G+=S,$+=M}p+=G-f,h+=$-R,u.push({ei:d,minX:f,minY:R,maxX:G,maxY:$})}}this.cellSize=Ht(r,u,p,h);for(let d of u)_t(this.cells,this.cellSize,d.minX,d.minY,d.maxX,d.maxY,d.ei)}getCurves(e){return this.edgeCurves.get(e)}query(e,n,o,a=o){return Bt(this.cells,this.cellSize,e,n,o,a)}};function At(t,e,n,o,a,r){let s=a-n,c=r-o,u=s*s+c*c;if(u===0)return Math.hypot(t-n,e-o);let p=Math.max(0,Math.min(1,((t-n)*s+(e-o)*c)/u));return Math.hypot(t-(n+p*s),e-(o+p*c))}function go(t,e,n,o,a,r,s,c,u,p){let h=1/0,d=20,b=n,m=o;for(let w=1;w<=d;w++){let y=w/d,f=1-y,R=f*f*f*n+3*f*f*y*a+3*f*y*y*s+y*y*y*u,G=f*f*f*o+3*f*f*y*r+3*f*y*y*c+y*y*y*p;h=Math.min(h,At(t,e,b,m,R,G)),b=R,m=G}return h}function bo(t,e,n){return go(t,e,n.x0,n.y0,n.cx0,n.cy0,n.cx1,n.cy1,n.x1,n.y1)}function zt(t,e,n,o=1){let a=1/0;for(let r of n){let s=bo(t,e,o===1?r:{x0:r.x0,y0:r.y0*o,cx0:r.cx0,cy0:r.cy0*o,cx1:r.cx1,cy1:r.cy1*o,x1:r.x1,y1:r.y1*o});s<a&&(a=s)}return a}var Wt=new WeakMap;function yo(t,e){let n=Wt.get(t);if(n?.version===e)return n.index;let o=new Se(t);return Wt.set(t,{version:e,index:o}),o}var Ot=new WeakMap;function vo(t,e,n,o,a,r){let s=Ot.get(t);if(s?.graph===e&&s.drawPaths===n&&s.scaleX===o.scaleX&&s.scaleY===o.scaleY&&s.version===a&&s.deletions===r)return s.index;let c=new xe(t,e,n,o,void 0,r,a);return Ot.set(t,{graph:e,drawPaths:n,scaleX:o.scaleX,scaleY:o.scaleY,version:a,index:c,deletions:r}),c}var wo=5;function Xt(t,e,n,o,a=0,r){let s=Ne(o),c=yo(t,a),u=m=>Math.max(wo,m)/o.scaleX,p=u(r?.maxHalfWidthPx??0),h=c.query(e,n,p,p/s),d=null,b=1/0;for(let{nodeId:m,segmentIdx:w}of h){let y=t[m],f=At(e,n*s,y[w].x,y[w].y*s,y[w+1].x,y[w+1].y*s);f<b&&f<u(r?.halfWidthPx(m)??0)&&(b=f,d=m)}return d}function Dt(t,e,n,o,a,r,s=0,c,u){let p=Ne(a),h=10/a.scaleX,d=vo(t,e,r,a,s,c),b=d.query(n,o,h,h/p),m=null,w=h;for(let y of b){let f=e.edges[y],R=t[f.from],G=t[f.to];if(!R?.length||!G?.length||u?.has(y))continue;let $=f.pathIds?.length??0,g=d.getCurves(y);if(!g)continue;let S;if(!r||$===0)S=zt(n,o*p,g,p);else{let M=1/0;for(let x of he(R,G,$,a)){let z=x.x===0&&x.y===0?g:Ue(g,x.x,x.y),ce=zt(n,o*p,z,p);ce<M&&(M=ce)}S=M}S<w&&(w=S,m=y)}return m}function Yt(t){let e=t.deltaY*(t.deltaMode===1?40:t.deltaMode===2?800:1),n=(t.ctrlKey?10:1)*e/100;return 1.1**-Math.max(-2,Math.min(2,n))}var $t=i(Ie(),1);function ke(t,e){(0,W.useEffect)(()=>{if(!t)return;let n=t;function o(a){if(e.hostPlacesX)return;e.host&&a.stopPropagation(),a.preventDefault();let r=n.getBoundingClientRect();e.zoom(Yt(a),a.clientX-r.left,a.clientY-r.top)}return n.addEventListener("wheel",o,{passive:!1}),()=>{n.removeEventListener("wheel",o)}},[t,e])}function Ft(t){let e=(0,W.useRef)({x:0,y:0}),n=(0,W.useRef)(!1),o=(0,W.useRef)({frame:0,pan:null,hover:null});(0,W.useEffect)(()=>()=>{cancelAnimationFrame(o.current.frame)},[]);let[a,r]=(0,W.useState)(void 0),[s,c]=(0,W.useState)(void 0);function u(g,S){return{x:(g-t.translateX)/t.scaleX,y:(S-t.translateY)/t.scaleY}}function p(g){let S=g.currentTarget.getBoundingClientRect();return u(g.clientX-S.left,g.clientY-S.top)}function h(g,S){let{nodePositions:M}=t,x=g*t.scaleX+t.translateX,z=S*t.scaleY+t.translateY;if(t.layoutResult?.tubeMap)return t.tubeMapNodeAt(x,z);let ce=t.referenceStripNodeAt(x,z);return ce||(M?Xt(M,g,S,t.axisScale,t.positionsVersion,t.nodeInk):null)}function d(g){if(g.button===0){if(n.current=!1,t.hostPlacesX)return;t.host&&g.stopPropagation();let{x:S,y:M}=p(g),x=t.layoutResult?.tubeMap||g.nativeEvent.offsetY<t.referenceStripZonePx?null:h(S,M);x?t.setDraggingNode(x):t.setPanning(!0),e.current={x:g.clientX,y:g.clientY}}}function b(){let g=o.current;if(g.frame=0,g.pan&&(t.setTransform(t.scale,t.translateX+g.pan.dx,t.translateY+g.pan.dy),g.pan=null),g.hover&&t.nodePositions&&t.graph){let{x:S,y:M}=u(g.hover.x,g.hover.y);g.hover=null;let x=h(S,M);t.setHoveredNode(x),t.setHoveredEdge(x||t.layoutResult?.tubeMap?null:Dt(t.nodePositions,t.graph,S,M,t.axisScale,t.effectiveDrawPaths&&!t.facetPanels,t.positionsVersion,t.deletionEdgeIndexes,t.hiddenEdgeIndexes))}}function m(){o.current.frame||(o.current.frame=requestAnimationFrame(b))}function w(){let g=o.current;cancelAnimationFrame(g.frame),g.frame=0,g.pan=null,g.hover=null}function y(g){let S=g.clientX-e.current.x,M=g.clientY-e.current.y;e.current={x:g.clientX,y:g.clientY},(Math.abs(S)>1||Math.abs(M)>1)&&(n.current=!0);let x=o.current;if(t.draggingNode)t.moveNode(t.draggingNode,S/t.scaleX,M/t.scaleY);else if(t.isPanning)x.pan={dx:(x.pan?.dx??0)+S,dy:(x.pan?.dy??0)+M},m();else{let z=g.currentTarget.getBoundingClientRect();x.hover={x:g.clientX-z.left,y:g.clientY-z.top},m()}}function f(){t.stopDragging()}function R(){w(),(0,$t.isAlive)(t)&&(t.stopDragging(),t.setHoveredNode(null),t.setHoveredEdge(null))}function G(g){let{x:S,y:M}=p(g),x=h(S,M);if(x){g.preventDefault(),r({nodeId:x,top:g.clientY,left:g.clientX});return}let z=t.walkRowAt(S*t.scaleX+t.translateX,M*t.scaleY+t.translateY);z!==void 0&&(g.preventDefault(),c({row:z,top:g.clientY,left:g.clientX}))}function $(g){if(!n.current){let{x:S,y:M}=p(g),x=h(S,M);t.setSelectedNode(x),x&&t.showNodeDetails(x)}}return{handlers:{onMouseDown:d,onMouseMove:y,onMouseUp:f,onMouseLeave:R,onClick:$,onContextMenu:G},contextNode:a,contextRow:s,closeContextMenu:()=>{r(void 0),c(void 0)}}}var F=i(v(),1),ko={position:"absolute",left:0,top:0,zIndex:4,display:"grid",gap:8,lineHeight:"normal"},Mo={height:34,padding:"2px 6px",boxSizing:"border-box",fontFamily:"inherit",fontSize:11,color:"inherit",cursor:"pointer",border:"none",background:"none",textAlign:"left",display:"block"},Co=(0,Be.observer)(function({model:e,lift:n,width:o,height:a,cell:r,handlers:s}){let[c,u]=(0,Me.useState)(null),p=n.walks[0];ke(c,e),(0,Me.useEffect)(()=>{if(!c)return;let d=new ve(c);d.resize(o,a);let b=(0,Ce.computed)(()=>e.buildDrawing(n,!1)),m,w=(0,Ce.autorun)(()=>{let y=b.get();y&&(y!==m&&(d.uploadGeometry(y.batch),m=y),e.applyHighlights(d),e.paint(d))});return()=>{w(),d.dispose()}},[c,e,n,o,a]);let h=e.walkLabel(p.name);return(0,F.jsxs)("div",{style:r,children:[(0,F.jsx)("button",{type:"button",style:Mo,"data-testid":"graph-facet-title",onClick:()=>{e.liftWalks([p.name]),e.setFacet("")},children:(0,F.jsx)(pe,{walk:p,label:h,reference:e.walkReference,hint:`click to lift ${h} alone`,at:e.hoveredOn(p)})}),(0,F.jsx)("canvas",{ref:u,"data-testid":"graph-facet-canvas",style:{width:o,height:a,display:"block",cursor:e.isPanning||e.draggingNode?"grabbing":"grab"},...s})]})}),Lo=(0,Be.observer)(function({model:e,handlers:n}){let o=e.facetPanels,a=e.facetGrid,r=e.facetPlacement;if(!o||!a||!r)return null;let{columns:s,width:c,height:u}=a;return(0,F.jsx)("div",{"data-testid":"graph-facet-panels",style:{...ko,width:e.paneWidth,minHeight:e.canvasHeight,gridTemplateColumns:`repeat(${s}, ${c}px)`,background:e.darkMode?"#1f1f1f":"white"},children:o.map((p,h)=>(0,F.jsx)(Co,{model:e,lift:p,width:c,height:u,cell:{gridRow:Math.floor(r.cells[h]/s)+1,gridColumn:r.cells[h]%s+1},handlers:n},p.walks[0].name))})}),Kt=Lo;var Vt=i(X(),1),Zt=i(I(),1),K=i(v(),1),Ro={position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"hidden",zIndex:2},ue="#daa520",Po=4,Eo=1,Io=2,Go=(0,Zt.observer)(function({model:e}){let n=`exon-outline-${(0,Vt.useId)().replaceAll(/[^\w-]/g,"")}`,{genePins:o,walkLift:a,nodeInk:r}=e;if(o.length===0)return null;let{scaleX:s,scaleY:c,translateX:u,translateY:p,paneWidth:h,canvasHeight:d}=e,b=f=>{let R=r.halfWidthPx(f)*2;return a?.nodeIds.has(f)?Math.max(R,a.walks.length*Po):R},m=o.flatMap(f=>f.exonsByNode.map(({nodeId:R,d:G})=>({key:`${f.gene.name}-${f.gene.start}-${R}`,d:G,inner:b(R)+2*Eo}))),w=`translate(${u} ${p}) scale(${s} ${c})`,y={fill:"none",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"};return(0,K.jsxs)("svg",{style:Ro,width:h,height:d,"data-testid":"graph-gene-pins",children:[(0,K.jsx)("mask",{id:n,maskUnits:"userSpaceOnUse",x:0,y:0,width:h,height:d,children:(0,K.jsxs)("g",{transform:w,children:[m.map(f=>(0,K.jsx)("path",{d:f.d,stroke:"#fff",strokeWidth:f.inner+2*Io,...y},f.key)),m.map(f=>(0,K.jsx)("path",{d:f.d,stroke:"#000",strokeWidth:f.inner,...y},f.key))]})}),(0,K.jsx)("rect",{width:h,height:d,fill:ue,mask:`url(#${n})`})]})}),jt=Go;var Ut=i(v(),1),qt=(0,T.createSvgIcon)((0,Ut.jsx)("path",{d:"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2m2 10H3v4c0 1.1.9 2 2 2h4v-2H5zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2"}),"CropFree");var ze=i(v(),1),Jt=(0,T.createSvgIcon)([(0,ze.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"},"0"),(0,ze.jsx)("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"},"1")],"ZoomIn");var Qt=i(v(),1),en=(0,T.createSvgIcon)((0,Qt.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z"}),"ZoomOut");var A=i(ee(),1),Xe=i(I(),1),Cn=i(ae(),1);var V=i(ee(),1),tn=i(I(),1),nn=i(ae(),1),se=i(v(),1),No=(0,nn.makeStyles)()({formControl:{minWidth:100}}),To=(0,tn.observer)(function({model:e}){let{classes:n}=No(),o=e.colorSchemeLock;return(0,se.jsxs)(V.FormControl,{size:"small",className:n.formControl,disabled:o!==void 0,title:o?.why,children:[(0,se.jsx)(V.InputLabel,{children:"Color"}),(0,se.jsx)(V.Select,{value:e.chosenColorScheme,label:"Color",renderValue:o?()=>o.value:void 0,onChange:a=>{e.setColorScheme(a.target.value)},children:nt.map(({value:a,label:r})=>(0,se.jsx)(V.MenuItem,{value:a,children:r},a))})]})}),on=To;var Oe=i(ee(),1),Ae=i(I(),1),rn=i(ae(),1),ie=i(v(),1),an=(0,rn.makeStyles)()({stats:{marginLeft:"auto"},perf:{color:"#888",fontVariantNumeric:"tabular-nums"}});function We(t){return t===void 0?"\u2013":`${Math.round(t)}ms`}var Ho=(0,Ae.observer)(function({model:e}){let{classes:n}=an(),{lastFetchMs:o,lastLayoutMs:a,lastGeometryMs:r}=e,s=o!==void 0||a!==void 0||r!==void 0;return e.showPerf&&s?(0,ie.jsxs)(Oe.Typography,{variant:"caption",className:n.perf,"data-testid":"graph-perf-stats",children:["fetch ",We(o)," \xB7 layout ",We(a)," \xB7 geom"," ",We(r)]}):null}),_o=(0,Ae.observer)(function({model:e}){let{classes:n}=an();return(0,ie.jsxs)("div",{className:n.stats,"data-testid":"graph-stats","data-node-count":e.nodeCount,"data-edge-count":e.edgeCount,"data-path-count":e.pathCount,"data-fetch-ms":e.lastFetchMs??"","data-layout-ms":e.lastLayoutMs??"","data-geometry-ms":e.lastGeometryMs??"","data-geometry-strokes":e.lastGeometryStrokeCount??"",children:[(0,ie.jsxs)(Oe.Typography,{variant:"body2",component:"span",children:[e.nodeCount," nodes, ",e.edgeCount," edges",e.pathCount>0?`, ${e.pathCount} paths`:""]})," ",(0,ie.jsx)(Ho,{model:e})]})}),sn=_o;var O=i(ee(),1),ln=i(I(),1),cn=i(ae(),1),Z=i(v(),1),Bo=(0,cn.makeStyles)()({formControl:{minWidth:150}}),zo=(0,ln.observer)(function({model:e}){let{classes:n}=Bo(),{graph:o}=e;return(0,Z.jsxs)(O.FormControl,{size:"small",className:n.formControl,children:[(0,Z.jsx)(O.InputLabel,{children:"Layout"}),(0,Z.jsx)(O.Select,{value:e.chosenLayoutMode,label:"Layout","data-testid":"graph-layout-select",onChange:a=>{e.switchLayout(a.target.value)},children:Qe.map(({value:a,label:r,description:s,available:c})=>(0,Z.jsx)(O.MenuItem,{value:a,disabled:o?!c(o):!1,children:(0,Z.jsx)(O.Tooltip,{title:s,placement:"right",children:(0,Z.jsx)("span",{children:r})})},a))})]})}),dn=zo;var Y=i(ee(),1),pn=i(I(),1),un=i(ae(),1),j=i(v(),1),Wo=(0,un.makeStyles)()({formControl:{minWidth:130,maxWidth:240}}),Oo=(0,pn.observer)(function({model:e}){let{classes:n}=Wo(),{repeatChoices:o}=e;if(e.chosenLayoutMode!=="walkrows"||o.length===0)return null;let a=new Set(o.map(r=>r.key));return(0,j.jsxs)(Y.FormControl,{size:"small",className:n.formControl,children:[(0,j.jsx)(Y.InputLabel,{children:"Repeat"}),(0,j.jsxs)(Y.Select,{value:a.has(e.repeatKey)?e.repeatKey:"",label:"Repeat","data-testid":"graph-repeat-select",onChange:r=>{e.setRepeatKey(r.target.value)},children:[(0,j.jsx)(Y.MenuItem,{value:"",children:(0,j.jsx)("em",{children:"Whole window"})}),o.map(({key:r,name:s,unit:c})=>(0,j.jsxs)(Y.MenuItem,{value:r,children:[s," \xB7 ",c.toLocaleString()," bp unit"]},r))]})]})}),fn=Oo;var yn=i(X(),1),vn=i(Ze(),1);var mn=i(v(),1),hn=(0,T.createSvgIcon)((0,mn.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");var gn=i(v(),1),bn=(0,T.createSvgIcon)((0,gn.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var wn=i(I(),1);var U=i(v(),1),Ao=(0,wn.observer)(function({model:e}){let[n,o]=(0,yn.useState)(!1);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(vn.CascadingMenuButton,{size:"small",menuItems:[{type:"checkbox",label:"Linear layout",checked:e.linearLayout,onClick:()=>{e.setLinearLayout(!e.linearLayout),e.recomputeLayout()}},{type:"checkbox",label:"Show deletion edges",checked:e.showDeletionEdges,onClick:()=>{e.setShowDeletionEdges(!e.showDeletionEdges)}},{type:"checkbox",label:"Show timings",checked:e.showPerf,onClick:()=>{e.setShowPerf(!e.showPerf)}},{type:"divider"},{label:"Settings",icon:Ct,onClick:()=>{o(!0)}},{type:"divider"},{label:"Return to import form",icon:hn,onClick:()=>{e.clearGraph()}}],children:(0,U.jsx)(bn,{})}),(0,U.jsx)(Lt,{model:e,open:n,onClose:()=>{o(!1)}})]})}),Sn=Ao;var H=i(ee(),1),xn=i(I(),1),kn=i(ae(),1),q=i(v(),1),Xo=(0,kn.makeStyles)()({formControl:{minWidth:130,maxWidth:260}}),Do=(0,xn.observer)(function({model:e}){let{classes:n}=Xo(),{walkChoices:o}=e;if(o.length===0||!e.liftsWalks)return null;let a=new Set(o.map(c=>c.name)),r=new Map(o.map(c=>[c.name,c.label])),s=e.walkLayers.map(c=>c.walk).filter(c=>a.has(c));return(0,q.jsxs)(H.FormControl,{size:"small",className:n.formControl,children:[(0,q.jsx)(H.InputLabel,{children:"Walks"}),(0,q.jsx)(H.Select,{multiple:!0,value:s,label:"Walks","data-testid":"graph-walk-select",renderValue:c=>c.map(u=>r.get(u)).join(", "),onChange:c=>{let{value:u}=c.target;e.liftWalks(typeof u=="string"?u.split(","):u)},children:o.map(({name:c,label:u})=>(0,q.jsxs)(H.MenuItem,{value:c,dense:!0,children:[(0,q.jsx)(H.Checkbox,{size:"small",checked:s.includes(c)}),(0,q.jsx)(H.ListItemText,{primary:u})]},c))})]})}),Mn=Do;var P=i(v(),1),Yo=(0,Cn.makeStyles)()({toolbar:{display:"flex",alignItems:"center",gap:4,padding:"2px 4px",borderBottom:"1px solid #ddd"}}),$o=(0,Xe.observer)(function({model:e}){return(0,P.jsx)(A.Typography,{variant:"body2",children:e.zoomPercent})}),Fo=(0,Xe.observer)(function({model:e}){let{classes:n}=Yo();return(0,P.jsxs)("div",{className:n.toolbar,children:[(0,P.jsx)(dn,{model:e}),(0,P.jsx)(on,{model:e}),(0,P.jsx)(Mn,{model:e}),(0,P.jsx)(fn,{model:e}),(0,P.jsx)(A.Tooltip,{title:"Zoom in",children:(0,P.jsx)(A.IconButton,{size:"small",onClick:()=>{e.zoom(1.5,e.viewBox.width/2,e.viewBox.height/2)},children:(0,P.jsx)(Jt,{})})}),(0,P.jsx)(A.Tooltip,{title:"Zoom out",children:(0,P.jsx)(A.IconButton,{size:"small",onClick:()=>{e.zoom(1/1.5,e.viewBox.width/2,e.viewBox.height/2)},children:(0,P.jsx)(en,{})})}),(0,P.jsx)(A.Tooltip,{title:"Zoom to fit",children:(0,P.jsx)(A.IconButton,{size:"small",onClick:()=>{e.zoomToFit()},children:(0,P.jsx)(qt,{})})}),(0,P.jsx)($o,{model:e}),(0,P.jsx)(sn,{model:e}),(0,P.jsx)(Sn,{model:e})]})}),Ln=Fo;var En=i(Ie(),1),In=i(I(),1);var ne=i(v(),1);function fe({x:t,y:e,w:n,text:o,note:a,color:r,edge:s=r,italic:c,small:u,dimmed:p,title:h,testId:d,onClick:b,onHover:m}){return(0,ne.jsxs)("g",{style:{pointerEvents:b||m?"auto":"none",cursor:b?"pointer":void 0,opacity:p?.35:1},"data-testid":d,onClick:b,onMouseEnter:()=>{m?.(!0)},onMouseLeave:()=>{m?.(!1)},children:[h?(0,ne.jsx)("title",{children:h}):null,(0,ne.jsx)("rect",{x:t-n/2,y:e-11-4+2,width:n,height:17,rx:3,fill:"rgba(255,255,255,0.85)",stroke:s,strokeWidth:u?.6:1}),(0,ne.jsxs)("text",{x:t,y:e,fontSize:u?10:11,fontFamily:"sans-serif",fontStyle:c?"italic":void 0,fontWeight:c?600:void 0,fill:r,textAnchor:"middle",children:[o,a?(0,ne.jsx)("tspan",{fontStyle:"normal",fontWeight:"normal",children:a}):null]})]})}var J=i(v(),1),Ko={position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"hidden",zIndex:3},Pn="#1c1c22",Vo=(0,In.observer)(function({model:e}){let{bubbles:n,genes:o,routes:a}=e.overlayLabels;if(n.length+o.length+a.length===0)return null;let{walkLift:r,scaleY:s,translateY:c,contigThickness:u}=e,p=d=>r!==void 0&&!d.nodeIds.some(b=>r.nodeIds.has(b)),h=d=>r!==void 0&&!d.route.walks.some(b=>r.names.has(b));return(0,J.jsxs)("svg",{style:Ko,width:e.paneWidth,height:e.canvasHeight,"data-testid":"graph-label-layer",children:[o.map(({item:d,x:b,y:m,w,text:y})=>{let{gene:f}=d,R=rt(d);return(0,J.jsxs)("g",{children:[(0,J.jsx)("line",{x1:b,x2:b,y1:m-11-2,y2:d.at.y*s+c+u/2,stroke:Pn,strokeWidth:.8,strokeOpacity:.6}),(0,J.jsx)(fe,{x:b,y:m,w,text:f.name,note:y.slice(f.name.length)||void 0,color:Pn,edge:ue,italic:!0,title:`${f.name} ${f.refName}:${f.start.toLocaleString()}-${f.end.toLocaleString()}${R?`, ${R} in the cut`:""}`,testId:"graph-gene-pin-label"})]},`${f.name}-${f.start}`)}),a.map(({item:{halo:d,route:b},x:m,y:w,w:y,text:f})=>(0,J.jsx)(fe,{x:m,y:w,w:y,text:f,color:re[d.kind],small:!0,dimmed:h(b),title:`${b.route.walks.length} walk(s): ${b.route.walks.join(", ")}`,testId:"graph-route-label"},`${d.bubble.start}-${d.bubble.end}-${b.route.steps.join(",")}`)),n.map(({item:d,x:b,y:m,w,text:y})=>(0,J.jsx)(fe,{x:b,y:m,w,text:y,color:re[d.kind],dimmed:p(d),title:`${d.label}
|
|
1
|
+
import{A as be,B as rt,Da as xt,E as at,F as de,Fa as kt,G as st,Ka as Te,L as ye,La as He,M as it,N as lt,Na as Mt,O as ct,Oa as Ct,R as dt,S as pt,U as ut,V as ft,W as ve,a as T,b as Ge,ba as we,da as mt,h as qe,i as Je,ka as ht,m as Qe,na as gt,oa as bt,s as re,sa as yt,t as tt,ua as vt,va as wt,xa as St,z as ot}from"./chunk-SIP5IHWK.js";import{b as et}from"./chunk-UQEPPJEO.js";import{a as Ie}from"./chunk-FCWXYIFC.js";import{a as Lt}from"./chunk-4C4CMI6K.js";import{P as nt,X as ae,h as je,j as Ue,k as Ne,l as he,x as ge}from"./chunk-ECKLYJWP.js";import{a as v,b as I,c as ee,d as Ze,e as X}from"./chunk-XEJ47DLD.js";import{a as ao,b as i}from"./chunk-FY3BTKY4.js";var Pt=ao((Xr,Rt)=>{Rt.exports=JBrowseExports["@jbrowse/render-core/useRenderingBackend"]});var Ee=i(X(),1);var Q=i(Ze(),1),Ve=i(Ie(),1),no=i(Pt(),1);var Et=i(v(),1),It=(0,T.createSvgIcon)((0,Et.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info");var _=i(I(),1);var _e=i(I(),1);var N={background:"rgba(255,255,255,0.82)",padding:"4px 6px",borderRadius:3,fontSize:11,lineHeight:"15px",whiteSpace:"nowrap"},L={display:"flex",alignItems:"center",gap:5};var B=i(v(),1),so={position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"hidden",zIndex:2},io=(0,_e.observer)(function({model:e}){let{bubbleHalos:n,walkLift:o,hoveredBubble:a}=e;if(n.length===0)return null;let{scaleX:r,scaleY:s,translateX:c,translateY:u,paneWidth:p,canvasHeight:h}=e,d=e.contigThickness*ot,b=m=>o!==void 0&&!m.nodeIds.some(w=>o.nodeIds.has(w));return(0,B.jsx)("svg",{style:so,width:p,height:h,"data-testid":"graph-bubble-halos",children:(0,B.jsx)("g",{transform:`translate(${c} ${u}) scale(${r} ${s})`,children:n.filter(m=>!m.whole).map(m=>(0,B.jsx)("path",{d:m.path,fill:"none",stroke:re[m.kind],strokeOpacity:a&&et(m.bubble,a)?.45:b(m)?.06:.22,strokeWidth:d,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"},`${m.bubble.start}-${m.bubble.end}`))})})}),Gt=io;function lo({color:t}){return(0,B.jsx)("svg",{width:18,height:10,style:{flex:"none"},children:(0,B.jsx)("line",{x1:5,y1:5,x2:13,y2:5,stroke:t,strokeOpacity:.35,strokeWidth:8,strokeLinecap:"round"})})}var Nt=(0,_e.observer)(function({model:e}){let n=new Map;for(let o of e.bubbleHalos)if(!o.whole){let a=re[o.kind],r=n.get(a)??new Set;r.add(tt[o.kind]),n.set(a,r)}return n.size>0?(0,B.jsx)("div",{style:N,"data-testid":"graph-halo-legend",children:[...n].map(([o,a])=>(0,B.jsxs)("div",{style:L,children:[(0,B.jsx)(lo,{color:o}),(0,B.jsxs)("span",{children:["bubble: ",[...a].join(", ")]})]},o))}):null});var Me=i(X(),1);var Ce=i(Ge(),1),Be=i(I(),1);var D=i(v(),1),te={width:18,height:8,borderRadius:2,flex:"none"},co={marginBottom:2},po={...te,width:48};function pe({walk:t,label:e,reference:n,hint:o,at:a}){let r=mt(t,n);return(0,D.jsxs)("div",{style:co,title:[r.hover,o].filter(Boolean).join(" \xB7 ")||void 0,children:[(0,D.jsxs)("div",{style:L,children:[(0,D.jsx)("div",{style:{...r.shades?po:te,background:we(t.encoding)}}),(0,D.jsxs)("span",{children:[(0,D.jsx)("strong",{children:e}),r.delta,r.outside,r.reversed]})]}),a?(0,D.jsx)("div",{"data-testid":"graph-walk-at",children:a}):r.scale?(0,D.jsx)("div",{children:r.scale}):null]})}var W=i(X(),1);var uo=50;function Tt(t,e){return e>0?Math.max(1,t/e):uo}function fo(t){let e=new Set,n=1/0,o=-1/0;for(let a of t)e.add(a.minY),n=Math.min(n,a.minY),o=Math.max(o,a.minY);return e.size>1?(o-n)/(e.size-1):void 0}function mo(t,e,n){let o=Tt(e,t.length);return{x:o,y:n>0?Tt(n,t.length):fo(t)??o}}function Ht(t,e,n,o){return t===void 0?mo(e,n,o):typeof t=="number"?{x:t,y:t}:t}function ho(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));let a=o.get(n);return a||(a=[],o.set(n,a)),a}function _t(t,e,n,o,a,r,s){let c=Math.floor(n/e.x),u=Math.floor(a/e.x),p=Math.floor(o/e.y),h=Math.floor(r/e.y);for(let d=c;d<=u;d++)for(let b=p;b<=h;b++)ho(t,d,b).push(s)}function Bt(t,e,n,o,a,r){let s=Math.floor((n-a)/e.x),c=Math.floor((n+a)/e.x),u=Math.floor((o-r)/e.y),p=Math.floor((o+r)/e.y),h=[],d=new Set;for(let b=s;b<=c;b++){let m=t.get(b);if(m)for(let w=u;w<=p;w++){let y=m.get(w);if(y)for(let f of y)d.has(f)||(d.add(f),h.push(f))}}return h}var Se=class{constructor(e,n){this.cells=new Map;let o=[],a=0,r=0;for(let[s,c]of Object.entries(e))for(let u=0;u<c.length-1;u++){let p=c[u],h=c[u+1],d=Math.min(p.x,h.x),b=Math.min(p.y,h.y),m=Math.max(p.x,h.x),w=Math.max(p.y,h.y);a+=m-d,r+=w-b,o.push({entry:{nodeId:s,segmentIdx:u},minX:d,minY:b,maxX:m,maxY:w})}this.cellSize=Ht(n,o,a,r);for(let s of o)_t(this.cells,this.cellSize,s.minX,s.minY,s.maxX,s.maxY,s.entry)}query(e,n,o,a=o){return Bt(this.cells,this.cellSize,e,n,o,a)}},xe=class{constructor(e,n,o,a,r,s,c=0){this.cells=new Map;this.edgeCurves=at(e,n,a,s,c);let u=[],p=0,h=0;for(let d=0;d<n.edges.length;d++){let b=n.edges[d],m=e[b.from],w=e[b.to],y=this.edgeCurves.get(d);if(m?.length&&w?.length&&y){let{minX:f,minY:R,maxX:G,maxY:$}=je(y),g=b.pathIds?.length??0;if(o&&g>0){let S=0,M=0;for(let x of he(m,w,g,a))S=Math.max(S,Math.abs(x.x)),M=Math.max(M,Math.abs(x.y));f-=S,R-=M,G+=S,$+=M}p+=G-f,h+=$-R,u.push({ei:d,minX:f,minY:R,maxX:G,maxY:$})}}this.cellSize=Ht(r,u,p,h);for(let d of u)_t(this.cells,this.cellSize,d.minX,d.minY,d.maxX,d.maxY,d.ei)}getCurves(e){return this.edgeCurves.get(e)}query(e,n,o,a=o){return Bt(this.cells,this.cellSize,e,n,o,a)}};function At(t,e,n,o,a,r){let s=a-n,c=r-o,u=s*s+c*c;if(u===0)return Math.hypot(t-n,e-o);let p=Math.max(0,Math.min(1,((t-n)*s+(e-o)*c)/u));return Math.hypot(t-(n+p*s),e-(o+p*c))}function go(t,e,n,o,a,r,s,c,u,p){let h=1/0,d=20,b=n,m=o;for(let w=1;w<=d;w++){let y=w/d,f=1-y,R=f*f*f*n+3*f*f*y*a+3*f*y*y*s+y*y*y*u,G=f*f*f*o+3*f*f*y*r+3*f*y*y*c+y*y*y*p;h=Math.min(h,At(t,e,b,m,R,G)),b=R,m=G}return h}function bo(t,e,n){return go(t,e,n.x0,n.y0,n.cx0,n.cy0,n.cx1,n.cy1,n.x1,n.y1)}function zt(t,e,n,o=1){let a=1/0;for(let r of n){let s=bo(t,e,o===1?r:{x0:r.x0,y0:r.y0*o,cx0:r.cx0,cy0:r.cy0*o,cx1:r.cx1,cy1:r.cy1*o,x1:r.x1,y1:r.y1*o});s<a&&(a=s)}return a}var Wt=new WeakMap;function yo(t,e){let n=Wt.get(t);if(n?.version===e)return n.index;let o=new Se(t);return Wt.set(t,{version:e,index:o}),o}var Ot=new WeakMap;function vo(t,e,n,o,a,r){let s=Ot.get(t);if(s?.graph===e&&s.drawPaths===n&&s.scaleX===o.scaleX&&s.scaleY===o.scaleY&&s.version===a&&s.deletions===r)return s.index;let c=new xe(t,e,n,o,void 0,r,a);return Ot.set(t,{graph:e,drawPaths:n,scaleX:o.scaleX,scaleY:o.scaleY,version:a,index:c,deletions:r}),c}var wo=5;function Xt(t,e,n,o,a=0,r){let s=Ne(o),c=yo(t,a),u=m=>Math.max(wo,m)/o.scaleX,p=u(r?.maxHalfWidthPx??0),h=c.query(e,n,p,p/s),d=null,b=1/0;for(let{nodeId:m,segmentIdx:w}of h){let y=t[m],f=At(e,n*s,y[w].x,y[w].y*s,y[w+1].x,y[w+1].y*s);f<b&&f<u(r?.halfWidthPx(m)??0)&&(b=f,d=m)}return d}function Dt(t,e,n,o,a,r,s=0,c,u){let p=Ne(a),h=10/a.scaleX,d=vo(t,e,r,a,s,c),b=d.query(n,o,h,h/p),m=null,w=h;for(let y of b){let f=e.edges[y],R=t[f.from],G=t[f.to];if(!R?.length||!G?.length||u?.has(y))continue;let $=f.pathIds?.length??0,g=d.getCurves(y);if(!g)continue;let S;if(!r||$===0)S=zt(n,o*p,g,p);else{let M=1/0;for(let x of he(R,G,$,a)){let z=x.x===0&&x.y===0?g:Ue(g,x.x,x.y),ce=zt(n,o*p,z,p);ce<M&&(M=ce)}S=M}S<w&&(w=S,m=y)}return m}function Yt(t){let e=t.deltaY*(t.deltaMode===1?40:t.deltaMode===2?800:1),n=(t.ctrlKey?10:1)*e/100;return 1.1**-Math.max(-2,Math.min(2,n))}var $t=i(Ie(),1);function ke(t,e){(0,W.useEffect)(()=>{if(!t)return;let n=t;function o(a){if(e.hostPlacesX)return;e.host&&a.stopPropagation(),a.preventDefault();let r=n.getBoundingClientRect();e.zoom(Yt(a),a.clientX-r.left,a.clientY-r.top)}return n.addEventListener("wheel",o,{passive:!1}),()=>{n.removeEventListener("wheel",o)}},[t,e])}function Ft(t){let e=(0,W.useRef)({x:0,y:0}),n=(0,W.useRef)(!1),o=(0,W.useRef)({frame:0,pan:null,hover:null});(0,W.useEffect)(()=>()=>{cancelAnimationFrame(o.current.frame)},[]);let[a,r]=(0,W.useState)(void 0),[s,c]=(0,W.useState)(void 0);function u(g,S){return{x:(g-t.translateX)/t.scaleX,y:(S-t.translateY)/t.scaleY}}function p(g){let S=g.currentTarget.getBoundingClientRect();return u(g.clientX-S.left,g.clientY-S.top)}function h(g,S){let{nodePositions:M}=t,x=g*t.scaleX+t.translateX,z=S*t.scaleY+t.translateY;if(t.layoutResult?.tubeMap)return t.tubeMapNodeAt(x,z);let ce=t.referenceStripNodeAt(x,z);return ce||(M?Xt(M,g,S,t.axisScale,t.positionsVersion,t.nodeInk):null)}function d(g){if(g.button===0){if(n.current=!1,t.hostPlacesX)return;t.host&&g.stopPropagation();let{x:S,y:M}=p(g),x=t.layoutResult?.tubeMap||g.nativeEvent.offsetY<t.referenceStripZonePx?null:h(S,M);x?t.setDraggingNode(x):t.setPanning(!0),e.current={x:g.clientX,y:g.clientY}}}function b(){let g=o.current;if(g.frame=0,g.pan&&(t.setTransform(t.scale,t.translateX+g.pan.dx,t.translateY+g.pan.dy),g.pan=null),g.hover&&t.nodePositions&&t.graph){let{x:S,y:M}=u(g.hover.x,g.hover.y);g.hover=null;let x=h(S,M);t.setHoveredNode(x),t.setHoveredEdge(x||t.layoutResult?.tubeMap?null:Dt(t.nodePositions,t.graph,S,M,t.axisScale,t.effectiveDrawPaths&&!t.facetPanels,t.positionsVersion,t.deletionEdgeIndexes,t.hiddenEdgeIndexes))}}function m(){o.current.frame||(o.current.frame=requestAnimationFrame(b))}function w(){let g=o.current;cancelAnimationFrame(g.frame),g.frame=0,g.pan=null,g.hover=null}function y(g){let S=g.clientX-e.current.x,M=g.clientY-e.current.y;e.current={x:g.clientX,y:g.clientY},(Math.abs(S)>1||Math.abs(M)>1)&&(n.current=!0);let x=o.current;if(t.draggingNode)t.moveNode(t.draggingNode,S/t.scaleX,M/t.scaleY);else if(t.isPanning)x.pan={dx:(x.pan?.dx??0)+S,dy:(x.pan?.dy??0)+M},m();else{let z=g.currentTarget.getBoundingClientRect();x.hover={x:g.clientX-z.left,y:g.clientY-z.top},m()}}function f(){t.stopDragging()}function R(){w(),(0,$t.isAlive)(t)&&(t.stopDragging(),t.setHoveredNode(null),t.setHoveredEdge(null))}function G(g){let{x:S,y:M}=p(g),x=h(S,M);if(x){g.preventDefault(),r({nodeId:x,top:g.clientY,left:g.clientX});return}let z=t.walkRowAt(S*t.scaleX+t.translateX,M*t.scaleY+t.translateY);z!==void 0&&(g.preventDefault(),c({row:z,top:g.clientY,left:g.clientX}))}function $(g){if(!n.current){let{x:S,y:M}=p(g),x=h(S,M);t.setSelectedNode(x),x&&t.showNodeDetails(x)}}return{handlers:{onMouseDown:d,onMouseMove:y,onMouseUp:f,onMouseLeave:R,onClick:$,onContextMenu:G},contextNode:a,contextRow:s,closeContextMenu:()=>{r(void 0),c(void 0)}}}var F=i(v(),1),ko={position:"absolute",left:0,top:0,zIndex:4,display:"grid",gap:8,lineHeight:"normal"},Mo={height:34,padding:"2px 6px",boxSizing:"border-box",fontFamily:"inherit",fontSize:11,color:"inherit",cursor:"pointer",border:"none",background:"none",textAlign:"left",display:"block"},Co=(0,Be.observer)(function({model:e,lift:n,width:o,height:a,cell:r,handlers:s}){let[c,u]=(0,Me.useState)(null),p=n.walks[0];ke(c,e),(0,Me.useEffect)(()=>{if(!c)return;let d=new ve(c);d.resize(o,a);let b=(0,Ce.computed)(()=>e.buildDrawing(n,!1)),m,w=(0,Ce.autorun)(()=>{let y=b.get();y&&(y!==m&&(d.uploadGeometry(y.batch),m=y),e.applyHighlights(d),e.paint(d))});return()=>{w(),d.dispose()}},[c,e,n,o,a]);let h=e.walkLabel(p.name);return(0,F.jsxs)("div",{style:r,children:[(0,F.jsx)("button",{type:"button",style:Mo,"data-testid":"graph-facet-title",onClick:()=>{e.liftWalks([p.name]),e.setFacet("")},children:(0,F.jsx)(pe,{walk:p,label:h,reference:e.walkReference,hint:`click to lift ${h} alone`,at:e.hoveredOn(p)})}),(0,F.jsx)("canvas",{ref:u,"data-testid":"graph-facet-canvas",style:{width:o,height:a,display:"block",cursor:e.isPanning||e.draggingNode?"grabbing":"grab"},...s})]})}),Lo=(0,Be.observer)(function({model:e,handlers:n}){let o=e.facetPanels,a=e.facetGrid,r=e.facetPlacement;if(!o||!a||!r)return null;let{columns:s,width:c,height:u}=a;return(0,F.jsx)("div",{"data-testid":"graph-facet-panels",style:{...ko,width:e.paneWidth,minHeight:e.canvasHeight,gridTemplateColumns:`repeat(${s}, ${c}px)`,background:e.darkMode?"#1f1f1f":"white"},children:o.map((p,h)=>(0,F.jsx)(Co,{model:e,lift:p,width:c,height:u,cell:{gridRow:Math.floor(r.cells[h]/s)+1,gridColumn:r.cells[h]%s+1},handlers:n},p.walks[0].name))})}),Kt=Lo;var Vt=i(X(),1),Zt=i(I(),1),K=i(v(),1),Ro={position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"hidden",zIndex:2},ue="#daa520",Po=4,Eo=1,Io=2,Go=(0,Zt.observer)(function({model:e}){let n=`exon-outline-${(0,Vt.useId)().replaceAll(/[^\w-]/g,"")}`,{genePins:o,walkLift:a,nodeInk:r}=e;if(o.length===0)return null;let{scaleX:s,scaleY:c,translateX:u,translateY:p,paneWidth:h,canvasHeight:d}=e,b=f=>{let R=r.halfWidthPx(f)*2;return a?.nodeIds.has(f)?Math.max(R,a.walks.length*Po):R},m=o.flatMap(f=>f.exonsByNode.map(({nodeId:R,d:G})=>({key:`${f.gene.name}-${f.gene.start}-${R}`,d:G,inner:b(R)+2*Eo}))),w=`translate(${u} ${p}) scale(${s} ${c})`,y={fill:"none",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"};return(0,K.jsxs)("svg",{style:Ro,width:h,height:d,"data-testid":"graph-gene-pins",children:[(0,K.jsx)("mask",{id:n,maskUnits:"userSpaceOnUse",x:0,y:0,width:h,height:d,children:(0,K.jsxs)("g",{transform:w,children:[m.map(f=>(0,K.jsx)("path",{d:f.d,stroke:"#fff",strokeWidth:f.inner+2*Io,...y},f.key)),m.map(f=>(0,K.jsx)("path",{d:f.d,stroke:"#000",strokeWidth:f.inner,...y},f.key))]})}),(0,K.jsx)("rect",{width:h,height:d,fill:ue,mask:`url(#${n})`})]})}),jt=Go;var Ut=i(v(),1),qt=(0,T.createSvgIcon)((0,Ut.jsx)("path",{d:"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2m2 10H3v4c0 1.1.9 2 2 2h4v-2H5zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2"}),"CropFree");var ze=i(v(),1),Jt=(0,T.createSvgIcon)([(0,ze.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"},"0"),(0,ze.jsx)("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"},"1")],"ZoomIn");var Qt=i(v(),1),en=(0,T.createSvgIcon)((0,Qt.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z"}),"ZoomOut");var A=i(ee(),1),Xe=i(I(),1),Cn=i(ae(),1);var V=i(ee(),1),tn=i(I(),1),nn=i(ae(),1),se=i(v(),1),No=(0,nn.makeStyles)()({formControl:{minWidth:100}}),To=(0,tn.observer)(function({model:e}){let{classes:n}=No(),o=e.colorSchemeLock;return(0,se.jsxs)(V.FormControl,{size:"small",className:n.formControl,disabled:o!==void 0,title:o?.why,children:[(0,se.jsx)(V.InputLabel,{children:"Color"}),(0,se.jsx)(V.Select,{value:e.chosenColorScheme,label:"Color",renderValue:o?()=>o.value:void 0,onChange:a=>{e.setColorScheme(a.target.value)},children:nt.map(({value:a,label:r})=>(0,se.jsx)(V.MenuItem,{value:a,children:r},a))})]})}),on=To;var Oe=i(ee(),1),Ae=i(I(),1),rn=i(ae(),1),ie=i(v(),1),an=(0,rn.makeStyles)()({stats:{marginLeft:"auto"},perf:{color:"#888",fontVariantNumeric:"tabular-nums"}});function We(t){return t===void 0?"\u2013":`${Math.round(t)}ms`}var Ho=(0,Ae.observer)(function({model:e}){let{classes:n}=an(),{lastFetchMs:o,lastLayoutMs:a,lastGeometryMs:r}=e,s=o!==void 0||a!==void 0||r!==void 0;return e.showPerf&&s?(0,ie.jsxs)(Oe.Typography,{variant:"caption",className:n.perf,"data-testid":"graph-perf-stats",children:["fetch ",We(o)," \xB7 layout ",We(a)," \xB7 geom"," ",We(r)]}):null}),_o=(0,Ae.observer)(function({model:e}){let{classes:n}=an();return(0,ie.jsxs)("div",{className:n.stats,"data-testid":"graph-stats","data-node-count":e.nodeCount,"data-edge-count":e.edgeCount,"data-path-count":e.pathCount,"data-fetch-ms":e.lastFetchMs??"","data-layout-ms":e.lastLayoutMs??"","data-geometry-ms":e.lastGeometryMs??"","data-geometry-strokes":e.lastGeometryStrokeCount??"",children:[(0,ie.jsxs)(Oe.Typography,{variant:"body2",component:"span",children:[e.nodeCount," nodes, ",e.edgeCount," edges",e.pathCount>0?`, ${e.pathCount} paths`:""]})," ",(0,ie.jsx)(Ho,{model:e})]})}),sn=_o;var O=i(ee(),1),ln=i(I(),1),cn=i(ae(),1),Z=i(v(),1),Bo=(0,cn.makeStyles)()({formControl:{minWidth:150}}),zo=(0,ln.observer)(function({model:e}){let{classes:n}=Bo(),{graph:o}=e;return(0,Z.jsxs)(O.FormControl,{size:"small",className:n.formControl,children:[(0,Z.jsx)(O.InputLabel,{children:"Layout"}),(0,Z.jsx)(O.Select,{value:e.chosenLayoutMode,label:"Layout","data-testid":"graph-layout-select",onChange:a=>{e.switchLayout(a.target.value)},children:Qe.map(({value:a,label:r,description:s,available:c})=>(0,Z.jsx)(O.MenuItem,{value:a,disabled:o?!c(o):!1,children:(0,Z.jsx)(O.Tooltip,{title:s,placement:"right",children:(0,Z.jsx)("span",{children:r})})},a))})]})}),dn=zo;var Y=i(ee(),1),pn=i(I(),1),un=i(ae(),1),j=i(v(),1),Wo=(0,un.makeStyles)()({formControl:{minWidth:130,maxWidth:240}}),Oo=(0,pn.observer)(function({model:e}){let{classes:n}=Wo(),{repeatChoices:o}=e;if(e.chosenLayoutMode!=="walkrows"||o.length===0)return null;let a=new Set(o.map(r=>r.key));return(0,j.jsxs)(Y.FormControl,{size:"small",className:n.formControl,children:[(0,j.jsx)(Y.InputLabel,{children:"Repeat"}),(0,j.jsxs)(Y.Select,{value:a.has(e.repeatKey)?e.repeatKey:"",label:"Repeat","data-testid":"graph-repeat-select",onChange:r=>{e.setRepeatKey(r.target.value)},children:[(0,j.jsx)(Y.MenuItem,{value:"",children:(0,j.jsx)("em",{children:"Whole window"})}),o.map(({key:r,name:s,unit:c})=>(0,j.jsxs)(Y.MenuItem,{value:r,children:[s," \xB7 ",c.toLocaleString()," bp unit"]},r))]})]})}),fn=Oo;var yn=i(X(),1),vn=i(Ze(),1);var mn=i(v(),1),hn=(0,T.createSvgIcon)((0,mn.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");var gn=i(v(),1),bn=(0,T.createSvgIcon)((0,gn.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var wn=i(I(),1);var U=i(v(),1),Ao=(0,wn.observer)(function({model:e}){let[n,o]=(0,yn.useState)(!1);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(vn.CascadingMenuButton,{size:"small",menuItems:[{type:"checkbox",label:"Linear layout",checked:e.linearLayout,onClick:()=>{e.setLinearLayout(!e.linearLayout),e.recomputeLayout()}},{type:"checkbox",label:"Show deletion edges",checked:e.showDeletionEdges,onClick:()=>{e.setShowDeletionEdges(!e.showDeletionEdges)}},{type:"checkbox",label:"Show timings",checked:e.showPerf,onClick:()=>{e.setShowPerf(!e.showPerf)}},{type:"divider"},{label:"Settings",icon:Ct,onClick:()=>{o(!0)}},{type:"divider"},{label:"Return to import form",icon:hn,onClick:()=>{e.clearGraph()}}],children:(0,U.jsx)(bn,{})}),(0,U.jsx)(Lt,{model:e,open:n,onClose:()=>{o(!1)}})]})}),Sn=Ao;var H=i(ee(),1),xn=i(I(),1),kn=i(ae(),1),q=i(v(),1),Xo=(0,kn.makeStyles)()({formControl:{minWidth:130,maxWidth:260}}),Do=(0,xn.observer)(function({model:e}){let{classes:n}=Xo(),{walkChoices:o}=e;if(o.length===0||!e.liftsWalks)return null;let a=new Set(o.map(c=>c.name)),r=new Map(o.map(c=>[c.name,c.label])),s=e.walkLayers.map(c=>c.walk).filter(c=>a.has(c));return(0,q.jsxs)(H.FormControl,{size:"small",className:n.formControl,children:[(0,q.jsx)(H.InputLabel,{children:"Walks"}),(0,q.jsx)(H.Select,{multiple:!0,value:s,label:"Walks","data-testid":"graph-walk-select",renderValue:c=>c.map(u=>r.get(u)).join(", "),onChange:c=>{let{value:u}=c.target;e.liftWalks(typeof u=="string"?u.split(","):u)},children:o.map(({name:c,label:u})=>(0,q.jsxs)(H.MenuItem,{value:c,dense:!0,children:[(0,q.jsx)(H.Checkbox,{size:"small",checked:s.includes(c)}),(0,q.jsx)(H.ListItemText,{primary:u})]},c))})]})}),Mn=Do;var P=i(v(),1),Yo=(0,Cn.makeStyles)()({toolbar:{display:"flex",alignItems:"center",gap:4,padding:"2px 4px",borderBottom:"1px solid #ddd"}}),$o=(0,Xe.observer)(function({model:e}){return(0,P.jsx)(A.Typography,{variant:"body2",children:e.zoomPercent})}),Fo=(0,Xe.observer)(function({model:e}){let{classes:n}=Yo();return(0,P.jsxs)("div",{className:n.toolbar,children:[(0,P.jsx)(dn,{model:e}),(0,P.jsx)(on,{model:e}),(0,P.jsx)(Mn,{model:e}),(0,P.jsx)(fn,{model:e}),(0,P.jsx)(A.Tooltip,{title:"Zoom in",children:(0,P.jsx)(A.IconButton,{size:"small",onClick:()=>{e.zoom(1.5,e.viewBox.width/2,e.viewBox.height/2)},children:(0,P.jsx)(Jt,{})})}),(0,P.jsx)(A.Tooltip,{title:"Zoom out",children:(0,P.jsx)(A.IconButton,{size:"small",onClick:()=>{e.zoom(1/1.5,e.viewBox.width/2,e.viewBox.height/2)},children:(0,P.jsx)(en,{})})}),(0,P.jsx)(A.Tooltip,{title:"Zoom to fit",children:(0,P.jsx)(A.IconButton,{size:"small",onClick:()=>{e.zoomToFit()},children:(0,P.jsx)(qt,{})})}),(0,P.jsx)($o,{model:e}),(0,P.jsx)(sn,{model:e}),(0,P.jsx)(Sn,{model:e})]})}),Ln=Fo;var En=i(Ie(),1),In=i(I(),1);var ne=i(v(),1);function fe({x:t,y:e,w:n,text:o,note:a,color:r,edge:s=r,italic:c,small:u,dimmed:p,title:h,testId:d,onClick:b,onHover:m}){return(0,ne.jsxs)("g",{style:{pointerEvents:b||m?"auto":"none",cursor:b?"pointer":void 0,opacity:p?.35:1},"data-testid":d,onClick:b,onMouseEnter:()=>{m?.(!0)},onMouseLeave:()=>{m?.(!1)},children:[h?(0,ne.jsx)("title",{children:h}):null,(0,ne.jsx)("rect",{x:t-n/2,y:e-11-4+2,width:n,height:17,rx:3,fill:"rgba(255,255,255,0.85)",stroke:s,strokeWidth:u?.6:1}),(0,ne.jsxs)("text",{x:t,y:e,fontSize:u?10:11,fontFamily:"sans-serif",fontStyle:c?"italic":void 0,fontWeight:c?600:void 0,fill:r,textAnchor:"middle",children:[o,a?(0,ne.jsx)("tspan",{fontStyle:"normal",fontWeight:"normal",children:a}):null]})]})}var J=i(v(),1),Ko={position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"hidden",zIndex:3},Pn="#1c1c22",Vo=(0,In.observer)(function({model:e}){let{bubbles:n,genes:o,routes:a}=e.overlayLabels;if(n.length+o.length+a.length===0)return null;let{walkLift:r,scaleY:s,translateY:c,contigThickness:u}=e,p=d=>r!==void 0&&!d.nodeIds.some(b=>r.nodeIds.has(b)),h=d=>r!==void 0&&!d.route.walks.some(b=>r.names.has(b));return(0,J.jsxs)("svg",{style:Ko,width:e.paneWidth,height:e.canvasHeight,"data-testid":"graph-label-layer",children:[o.map(({item:d,x:b,y:m,w,text:y})=>{let{gene:f}=d,R=rt(d);return(0,J.jsxs)("g",{children:[(0,J.jsx)("line",{x1:b,x2:b,y1:m-11-2,y2:d.at.y*s+c+u/2,stroke:Pn,strokeWidth:.8,strokeOpacity:.6}),(0,J.jsx)(fe,{x:b,y:m,w,text:f.name,note:y.slice(f.name.length)||void 0,color:Pn,edge:ue,italic:!0,title:`${f.name} ${f.refName}:${f.start.toLocaleString()}-${f.end.toLocaleString()}${R?`, ${R} in the cut`:""}`,testId:"graph-gene-pin-label"})]},`${f.name}-${f.start}`)}),a.map(({item:{halo:d,route:b},x:m,y:w,w:y,text:f})=>(0,J.jsx)(fe,{x:m,y:w,w:y,text:f,color:re[d.kind],small:!0,dimmed:h(b),title:`${b.route.walks.length} walk(s): ${b.route.walks.join(", ")}`,testId:"graph-route-label"},`${d.bubble.start}-${d.bubble.end}-${b.route.steps.join(",")}`)),n.map(({item:d,x:b,y:m,w,text:y})=>(0,J.jsx)(fe,{x:b,y:m,w,text:y,color:re[d.kind],dimmed:p(d),title:`${d.label}
|
|
2
2
|
${d.bubble.segmentCount} segments \xB7 click to open`,testId:"graph-bubble-halo-label",onClick:()=>{e.popBubble(d.bubble)},onHover:f=>{(0,En.isAlive)(e)&&e.setHoveredBubble(f?d.bubble:null)}},`${d.bubble.start}-${d.bubble.end}`))]})}),Gn=Vo;var Le=i(X(),1);var Tn=i(ft(),1),Hn=i(Ge(),1),De=i(I(),1);var E=i(v(),1),Zo={position:"absolute",left:0,top:0,pointerEvents:"none",zIndex:5},jo=(0,De.observer)(function({model:e}){let n=(0,Le.useRef)(null),{referenceStripShown:o,paneWidth:a,canvasHeight:r}=e;return(0,Le.useEffect)(()=>(0,Hn.autorun)(()=>{let s=n.current,c=e.referenceStripFrame,u=s?.getContext("2d");if(s&&u&&c&&e.referenceStripShown){let p=(0,Tn.getDpr)(),h=e.paneWidth,d=e.canvasHeight;s.width=Math.round(h*p),s.height=Math.round(d*p),u.setTransform(p,0,0,p,0,0),u.clearRect(0,0,h,d),ht(u,e.referenceStripBlocks,c,{width:h,lit:e.referenceStripLit,darkMode:e.darkMode,dpr:p})}}),[e]),(0,E.jsx)("canvas",{ref:n,"data-testid":o?"graph-reference-strip":void 0,style:{...Zo,width:a,height:r,display:o?"block":"none"}})}),_n=jo,Bn=18,Uo="linear-gradient(to right, hsl(0, 70%, 50%) 0 33%, hsl(120, 70%, 50%) 33% 61%, hsl(240, 70%, 50%) 61%)",qo=6;function Jo(t){let e=t.filter((a,r)=>a!==t[r-1]),n=Math.min(qo,e.length),o=Array.from({length:n},(a,r)=>e[n>1?Math.round(r*(e.length-1)/(n-1)):0]);return o.length>1?`linear-gradient(to right, ${o.join(", ")})`:o[0]??de}function Nn({rows:t}){return(0,E.jsx)("div",{style:{width:Bn,flex:"none"},children:t.map(({key:e,background:n})=>(0,E.jsx)("div",{style:{height:t.length>1?3:4,background:n}},e))})}function Qo(t){return t.walkLift?.walks.map(e=>({key:e.name,background:we(e.encoding)}))??[{key:"scheme",background:t.effectiveColorScheme==="reference-position"?Uo:Jo(t.referenceStripBlocks.map(e=>e.colors[0]))}]}function er(){return(0,E.jsx)("svg",{width:Bn,height:10,style:{flex:"none"},children:(0,E.jsx)("path",{d:"M0,5 L8,0 L8,10 Z M18,5 L10,0 L10,10 Z",fill:"#18181c"})})}var zn=(0,De.observer)(function({model:e}){let n=(e.walkLift?.walks.length??0)>1;return e.referenceStripShown?(0,E.jsxs)("div",{style:N,"data-testid":"graph-reference-strip-legend",children:[(0,E.jsxs)("div",{style:L,children:[(0,E.jsx)(Nn,{rows:Qo(e)}),(0,E.jsxs)("span",{children:["top strip: reference segments at their bp",n?", a row per walk":""]})]}),e.referenceStripFaded?(0,E.jsxs)("div",{style:L,children:[(0,E.jsx)(Nn,{rows:[{key:"pale",background:de}]}),(0,E.jsxs)("span",{children:["reference not on"," ",n?"that row's walk":e.liftedWalksLabel]})]}):null,e.referenceStripOverhangs?(0,E.jsxs)("div",{style:L,children:[(0,E.jsx)(er,{}),(0,E.jsx)("span",{children:"the graph draws reference past this edge"})]}):null]}):null});var Pe=i(X(),1);var An=i(ft(),1),Xn=i(Ge(),1),Ye=i(I(),1);var k=i(v(),1),tr={position:"absolute",left:0,top:0,pointerEvents:"none",zIndex:1},nr=(0,Ye.observer)(function({model:e}){let n=(0,Pe.useRef)(null),{tubeMapPicture:o,paneWidth:a,canvasHeight:r}=e;return(0,Pe.useEffect)(()=>(0,Xn.autorun)(()=>{let s=n.current,c=e.tubeMapPicture,u=e.tubeMapFrame,p=s?.getContext("2d");if(s&&p&&c&&u){let h=(0,An.getDpr)(),d=e.paneWidth,b=e.canvasHeight;s.width=Math.round(d*h),s.height=Math.round(b*h),p.setTransform(h,0,0,h,0,0),p.clearRect(0,0,d,b);let m={...u,width:d,highlightNode:e.hoveredNode??e.selectedNode,darkMode:e.darkMode,tubeColors:e.tubeMapTubeColors,nodeColors:e.tubeMapNodeColors};St(p,c,m),wt(p,e.tubeMapDeviations,m),yt(p,e.tubeMapConnectors,e.connectorZoneBottom,m);let{bounds:w}=c;xt(p,e.tubeMapGenes,m,u.y(w.minY)-2);let y=e.tubeMapRulerBoxes;y&&bt(p,y,m,u.y(w.maxY)+4,e.layoutResult?.referenceAxis)}}),[e]),(0,k.jsx)("canvas",{ref:n,"data-testid":o?"graph-tube-map":void 0,style:{...tr,width:a,height:r,display:o?"block":"none"}})}),Dn=nr,Re=18;function or(){let t=[[.5,5.5],[8.5,Re-.5]];return(0,k.jsx)("svg",{width:Re,height:7,style:{flex:"none"},children:(0,k.jsx)("path",{d:t.map(([e,n])=>`M${e},6 V1.5 H${n} V6`).join(" "),fill:"none",stroke:gt(),strokeWidth:1})})}var $e={width:Re,height:7,flex:"none"},rr={...$e,display:"flex",justifyContent:"center",backgroundColor:"#b8b8c0"};function ar(){return(0,k.jsx)("div",{style:rr,children:(0,k.jsx)("div",{style:{width:2,backgroundColor:vt()}})})}function Wn({colors:t}){let e=100/t.length,n=t.map((o,a)=>`${o} ${a*e}% ${(a+1)*e}%`);return(0,k.jsx)("div",{style:{...$e,background:`linear-gradient(to right, ${n.join(", ")})`}})}var On={width:Re,flex:"none",textAlign:"center",fontFamily:"monospace",fontSize:12};function sr(){return(0,k.jsx)("div",{style:{...$e,backgroundColor:"grey"}})}function oe({swatch:t,children:e}){return(0,k.jsxs)("div",{style:L,children:[t,(0,k.jsx)("span",{children:e})]})}var Yn=(0,Ye.observer)(function({model:e}){let{logWidths:n,foldBp:o,forwardReads:a,reverseReads:r,mismatches:s}=e.tubeMapKeys,c=[a&&(0,k.jsx)(oe,{swatch:(0,k.jsx)(Wn,{colors:qe}),children:"read on the forward strand"},"fwd"),r&&(0,k.jsx)(oe,{swatch:(0,k.jsx)(Wn,{colors:Je}),children:"read on the reverse strand"},"rev"),s.has("substitution")&&(0,k.jsx)(oe,{swatch:(0,k.jsx)("span",{style:On,children:"A"}),children:"a read's base unlike the node's"},"sub"),s.has("insertion")&&(0,k.jsx)(oe,{swatch:(0,k.jsx)("span",{style:On,children:"*"}),children:"bases a read inserts"},"ins"),s.has("deletion")&&(0,k.jsx)(oe,{swatch:(0,k.jsx)(sr,{}),children:"bases a read skips"},"del"),o!==void 0&&(0,k.jsxs)(oe,{swatch:(0,k.jsx)(ar,{}),children:["a haplotype's variant under ",ge(o)]},"fold"),n&&(0,k.jsx)(oe,{swatch:(0,k.jsx)(or,{}),children:"width grows with log of length"},"log")].filter(Boolean);return c.length>0?(0,k.jsx)("div",{style:N,"data-testid":"graph-tube-map-legend",children:c}):null});var $n=i(ee(),1),Fn=i(I(),1),Vn=i(v(),1),ir={position:"absolute",left:8,zIndex:5,background:"rgba(255,255,255,0.9)",textTransform:"none"},lr=(0,Fn.observer)(function({model:e}){let{poppedFrom:n}=e;return n?(0,Vn.jsxs)($n.Button,{size:"small",variant:"outlined",style:{...ir,...e.facetPanels?{bottom:8}:{top:8}},"data-testid":"graph-unpop-bubble",onClick:()=>{e.unpopBubble()},children:["\u25C0 Back to ",n.label]}):null}),Kn=lr;var qn=i(X(),1);var Ke=i(I(),1);var Zn=i(X(),1);function cr(t){return t==="class"?"className":/^(data|aria)-/.test(t)?t:t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}function jn(t,e){if(typeof t=="string")return t;let n={key:e};for(let[o,a]of Object.entries(t.attrs))a!==void 0&&(n[cr(o)]=a);return(0,Zn.createElement)(t.tag,n,...t.children.map(jn))}function Fe({el:t}){return jn(t,0)}var C=i(v(),1),pr={position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"visible",zIndex:3},ur="#111",fr="#9e9e9e",me={width:18,height:lt-4,borderRadius:2},mr={...me,display:"flex",justifyContent:"center"};function Un({color:t}){return(0,C.jsx)("div",{style:mr,children:(0,C.jsx)("div",{style:{width:2,backgroundColor:t}})})}function hr({swatch:t}){return t.kind==="gene"?(0,C.jsx)("div",{style:{...me,boxSizing:"border-box",border:`1.5px solid ${it}`,borderRadius:0}}):(0,C.jsx)("div",{style:{...me,height:t.kind==="gap"?ct:me.height,background:t.fill}})}var Jn=(0,Ke.observer)(function({model:e}){let n=e.walkRowBars;if(!n)return null;let o=[n.reference,...n.rows].flatMap(r=>r.call??[]),a=dt(n,{ramp:e.referenceRampDomain,rampCss:ye,genes:e.walkRowGenes?.size?e.walkRowGeneGaps:void 0});return(0,C.jsxs)("div",{style:N,"data-testid":"graph-walk-rows-legend",children:[a.map(r=>r.note?(0,C.jsx)("div",{style:{color:"#666",fontStyle:"italic"},children:r.label},r.label):(0,C.jsxs)("div",{style:L,children:[(0,C.jsx)(hr,{swatch:r.swatch}),(0,C.jsx)("span",{children:r.label})]},r.label)),o.some(r=>r.spanningReads!==0)?(0,C.jsxs)("div",{style:L,children:[(0,C.jsx)(Un,{color:ur}),(0,C.jsx)("span",{children:"allele length called for this walk"})]}):null,o.some(r=>r.spanningReads===0)?(0,C.jsxs)("div",{style:L,children:[(0,C.jsx)(Un,{color:fr}),(0,C.jsx)("span",{children:"called with no read spanning it"})]}):null,o.some(r=>r.agrees===!1)?(0,C.jsxs)("div",{style:L,children:[(0,C.jsx)("div",{style:me}),(0,C.jsxs)("span",{style:{color:pt},children:["walk and call over ",Math.round(.1*100),"% apart"]})]}):null]})}),gr=(0,Ke.observer)(function({model:e}){let n=(0,qn.useId)().replace(/[^\w-]/g,""),o=e.walkRowBars;if(!o)return null;let{paneWidth:a,canvasHeight:r}=e;return(0,C.jsx)("svg",{style:pr,width:a,height:r,"data-testid":"graph-walk-rows",children:(0,C.jsx)(Fe,{el:ut(o,{scaleX:e.scaleX,scaleY:e.scaleY,translateX:e.translateX,translateY:e.translateY,width:a,height:r},{ramp:e.referenceRampDomain,rowGenes:e.walkRowGenes,idPrefix:n})})})}),Qn=gr;function eo(t){return Promise.resolve(new ve(t))}var l=i(v(),1),to={position:"absolute",bottom:8,right:8,background:"rgba(0,0,0,0.75)",color:"white",padding:"4px 8px",borderRadius:4,fontSize:12,pointerEvents:"none",zIndex:6},br={position:"relative"},yr={position:"relative",lineHeight:0,isolation:"isolate"},vr={position:"absolute",left:0,right:0,bottom:0,zIndex:0},wr={position:"absolute",inset:0,zIndex:10,lineHeight:"normal",pointerEvents:"none"},Sr={position:"absolute",left:6,transform:"translateY(-50%)",background:"rgba(255,255,255,0.82)",padding:"0 4px",borderRadius:3,fontSize:11,lineHeight:"16px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:4},xr=(0,_.observer)(function({model:e}){let n=e.drawnRowLabels;return(0,l.jsx)(l.Fragment,{children:n.map(({label:o,y:a})=>{let r=a*e.scaleY+e.translateY;return r>=0&&r<=e.canvasHeight?(0,l.jsx)("div",{"data-testid":"graph-row-label",style:{...Sr,top:r},children:o},a):null})})}),kr={position:"absolute",top:be,right:be,display:"flex",flexDirection:"column",alignItems:"flex-end",gap:4,pointerEvents:"none",zIndex:4},Mr={width:18,height:3,borderRadius:2},Cr=(0,_.observer)(function({model:e}){let{pathLegend:n}=e;return n.length>0?(0,l.jsx)("div",{style:N,"data-testid":"graph-path-legend",children:n.map(({name:o,label:a,color:r})=>(0,l.jsxs)("div",{style:L,children:[(0,l.jsx)("div",{style:{...Mr,backgroundColor:r}}),(0,l.jsx)("span",{children:a})]},o))}):null}),Lr=(0,_.observer)(function({model:e}){let n=e.walkLift;return n?(0,l.jsxs)("div",{style:N,"data-testid":"graph-walk-readout",children:[n.walks.map(o=>(0,l.jsx)(pe,{walk:o,label:e.walkLabel(o.name),reference:e.walkReference,at:e.hoveredOn(o)},o.name)),e.liftPaintsOffReference?(0,l.jsx)(oo,{}):null,(0,l.jsxs)("div",{style:L,children:[(0,l.jsx)("div",{style:{...te,background:de}}),(0,l.jsxs)("span",{children:["not on ",e.liftedWalksLabel]})]})]}):null}),Rr={minWidth:90,height:8,borderRadius:2,background:ye},Pr={display:"flex",justifyContent:"space-between",gap:8},Er=(0,_.observer)(function({model:e}){let n=e.walkLift?void 0:e.referenceRampDomain,{offReference:o,unplaced:a}=e.referenceRampOffKeys,r=Math.round(n?.start??0),s=Math.round(n?.end??0);return n?(0,l.jsxs)("div",{style:N,"data-testid":"graph-ramp-legend",children:[(0,l.jsx)("div",{style:Rr}),(0,l.jsxs)("div",{style:Pr,children:[(0,l.jsx)("span",{children:r.toLocaleString()}),(0,l.jsxs)("span",{children:["(",ge(s-r),")"]}),(0,l.jsx)("span",{children:s.toLocaleString()})]}),o?(0,l.jsx)(oo,{}):null,a?(0,l.jsxs)("div",{style:L,children:[(0,l.jsx)("div",{style:{...te,background:Ir}}),(0,l.jsx)("span",{children:"no reference position"})]}):null]}):null}),Ir="rgb(160, 160, 160)";function oo(){return(0,l.jsxs)("div",{style:L,children:[(0,l.jsx)("div",{style:{...te,background:st}}),(0,l.jsx)("span",{children:"off the reference"})]})}var Gr={...te,border:`2px solid ${ue}`,borderRadius:5,boxSizing:"border-box"},Nr=(0,_.observer)(function({model:e}){return e.genePins.some(n=>n.exonsByNode.length>0)?(0,l.jsx)("div",{style:N,"data-testid":"graph-gene-legend",children:(0,l.jsxs)("div",{style:L,children:[(0,l.jsx)("div",{style:Gr}),(0,l.jsx)("span",{children:"exon"})]})}):null}),ro={position:"absolute",transform:"translate(-50%, -50%)",background:"rgba(255,255,255,0.78)",padding:"0 3px",borderRadius:3,fontSize:10,lineHeight:"13px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:3},Tr={...ro,color:"#18181c",fontWeight:600},Hr={position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"visible",zIndex:2},_r=(0,_.observer)(function({model:e}){let n=(0,Ee.useRef)(null);return(0,Ee.useEffect)(()=>{let o=n.current;if(!o)return;let a=new ResizeObserver(()=>{(0,Ve.isAlive)(e)&&e.hoveredNode===null&&e.setLegendSize({width:o.offsetWidth,height:o.offsetHeight})});return a.observe(o),()=>{a.disconnect()}},[e]),(0,l.jsxs)("div",{ref:n,style:{...kr,top:be+e.referenceStripZonePx},children:[(0,l.jsx)(Er,{model:e}),(0,l.jsx)(zn,{model:e}),(0,l.jsx)(Nt,{model:e}),(0,l.jsx)(Nr,{model:e}),(0,l.jsx)(Cr,{model:e}),(0,l.jsx)(Yn,{model:e}),(0,l.jsx)(Jn,{model:e}),(0,l.jsx)(Lr,{model:e})]})}),Br=(0,_.observer)(function({model:e}){let n=e.overlayLabels.sizes,o=n.flatMap(({key:a,leader:r})=>r?[{key:a,...r}]:[]);return(0,l.jsxs)(l.Fragment,{children:[o.length>0?(0,l.jsx)("svg",{style:Hr,width:e.paneWidth,height:e.canvasHeight,children:o.map(({key:a,arcX:r,arcY:s,labelX:c,labelY:u})=>(0,l.jsx)("line",{"data-testid":"graph-label-leader",x1:r,y1:s,x2:c,y2:u,stroke:"#18181c",strokeWidth:1},a))}):null,n.map(({key:a,text:r,x:s,y:c,kind:u})=>(0,l.jsx)("div",{"data-testid":"graph-size-label",style:{...u==="deletion"?Tr:ro,left:s,top:c},children:r},a))]})}),zr=(0,_.observer)(function({model:e}){let n=e.hoveredNode?e.nodeById?.get(e.hoveredNode):null,o=e.hoveredEdge!==null&&e.graph?e.graph.edges[e.hoveredEdge]:null,a=n?kt(n):void 0,r=e.hoveredEdge===null?void 0:e.deletions.find(s=>s.edgeIndex===e.hoveredEdge);return(0,l.jsxs)(l.Fragment,{children:[n?(0,l.jsxs)("div",{style:to,children:[(0,l.jsx)("strong",{children:n.name})," \u2014"," ",n.length.toLocaleString()," bp, depth"," ",n.depth.toFixed(1),a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),a.sample," ",Te(a)," (rank"," ",n.stable?.rank,")"]}):null]}):null,o?(0,l.jsx)("div",{style:to,children:r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("strong",{children:"Deletion"})," ",r.bp.toLocaleString()," bp",(0,l.jsx)("br",{}),r.refName,":",r.start.toLocaleString(),"-",r.end.toLocaleString()]}):(0,l.jsxs)(l.Fragment,{children:["Edge: ",o.from," \u2192 ",o.to]})}):null]})}),Wr=(0,_.observer)(function({model:e,nodeId:n,top:o,left:a,onClose:r}){let{own:s,reference:c,highlight:u}=e.nodeLaunchTargets(n);return(0,l.jsx)(Q.Menu,{open:!0,anchorReference:"anchorPosition",anchorPosition:{top:o,left:a},onClose:()=>{r()},onMenuItemClick:p=>{p()},menuItems:[{label:"Node details",icon:It,onClick:()=>{e.showNodeDetails(n)}},...Mt({own:s,reference:c,highlight:u,onShowLinear:p=>{e.showInLinearView(p)},onHighlight:e.canHighlightInLinearView?p=>{e.highlightInLinearView(p)}:void 0})]})}),Or=(0,_.observer)(function({model:e,row:n,top:o,left:a,onClose:r}){let s=e.walkRowLaunchTarget(n),c=s?.assembly;return(0,l.jsx)(Q.Menu,{open:!0,anchorReference:"anchorPosition",anchorPosition:{top:o,left:a},onClose:()=>{r()},onMenuItemClick:u=>{u()},menuItems:[s&&c?{label:`Linear genome view \u2014 ${c} ${Te(s.location)}`,icon:He,onClick:()=>{e.showInLinearView({location:s.location,assembly:c})}}:{label:"Linear genome view",icon:He,disabled:!0,disabledHelpText:s?`No assembly in this session is ${s.location.haplotype??s.label}`:"This walk states no contig coordinates",onClick:()=>{}}]})}),Ar=(0,_.observer)(function({model:e,ownChrome:n=!0}){let{canvasRef:o,canvas:a,error:r,retry:s}=(0,no.useRenderingBackend)(eo,e),{handlers:c,contextNode:u,contextRow:p,closeContextMenu:h}=Ft(e);ke(a,e);let d=e.facetPanels!==void 0;return(0,l.jsxs)("div",{style:br,children:[n?(0,l.jsx)(Ln,{model:e}):null,(0,l.jsxs)("div",{style:yr,onMouseEnter:()=>{e.setPointerInPane(!0)},onMouseLeave:()=>{(0,Ve.isAlive)(e)&&e.setPointerInPane(!1)},children:[e.referenceStripShown?(0,l.jsx)("div",{style:{...vr,top:e.referenceStripZonePx,background:e.paperCss}}):null,(0,l.jsx)("canvas",{ref:o,"data-testid":"graph-genome-canvas",style:{width:e.paneWidth,height:e.canvasHeight,cursor:e.isPanning||e.draggingNode?"grabbing":"grab",display:"block",position:"relative",zIndex:1},...c}),d?(0,l.jsx)(Kt,{model:e,handlers:c}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{model:e}),(0,l.jsx)(_n,{model:e}),(0,l.jsx)(xr,{model:e}),(0,l.jsx)(Br,{model:e}),(0,l.jsx)(Gt,{model:e}),(0,l.jsx)(jt,{model:e}),(0,l.jsx)(Gn,{model:e}),(0,l.jsx)(Qn,{model:e}),(0,l.jsx)(_r,{model:e})]}),(0,l.jsx)(Kn,{model:e}),n?(0,l.jsx)("div",{style:wr,children:(0,l.jsx)(Q.LoadingOverlay,{isVisible:e.isLoading,immediate:!e.layoutResult,statusMessage:e.statusMessage,onCancel:e.canCancelLoad?()=>{e.cancelLoad()}:void 0})}):null]}),(0,l.jsx)(zr,{model:e}),u?(0,l.jsx)(Wr,{model:e,nodeId:u.nodeId,top:u.top,left:u.left,onClose:h}):null,p?(0,l.jsx)(Or,{model:e,row:p.row,top:p.top,left:p.left,onClose:h}):null,r?(0,l.jsx)(Q.ErrorBanner,{error:r,onReset:s}):null,n&&e.error?(0,l.jsx)(Q.ErrorBanner,{error:e.error,onReset:e.canRetryLoad?()=>{e.retryLoad()}:void 0}):null]})}),Vs=Ar;export{Vs as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-HW55QCJG.js.map
|