jbrowse-plugin-graphgenomeviewer 7.4.4 → 7.6.0

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.
Files changed (134) hide show
  1. package/dist/chunks/{GbzBaseSyntenyAdapter-A5MNPCKX.js → GbzBaseSyntenyAdapter-3PVPTKNW.js} +2 -2
  2. package/dist/chunks/{GbzBaseSyntenyAdapter-A5MNPCKX.js.map → GbzBaseSyntenyAdapter-3PVPTKNW.js.map} +1 -1
  3. package/dist/chunks/{GraphGenomeView-SEAPDRXS.js → GraphGenomeView-GQW4YC23.js} +2 -2
  4. package/dist/chunks/GraphTrackSettingsDialog-ARWCWJW4.js +4 -0
  5. package/dist/chunks/GraphTrackSettingsDialog-ARWCWJW4.js.map +7 -0
  6. package/dist/chunks/{HighlightColorDialog-QAYWLO5I.js → HighlightColorDialog-PD3KMF2U.js} +2 -2
  7. package/dist/chunks/LinearGraphDisplay-QNS4EAL3.js +2 -0
  8. package/dist/chunks/{LinearGraphDisplay-ZC4BQ27J.js.map → LinearGraphDisplay-QNS4EAL3.js.map} +2 -2
  9. package/dist/chunks/{MinigraphBubbleAdapter-3QM4XV47.js → MinigraphBubbleAdapter-L6JSQIOL.js} +2 -2
  10. package/dist/chunks/RgfaTabixAdapter-5HCAJ7QI.js +2 -0
  11. package/dist/chunks/RgfaTabixAdapter-5HCAJ7QI.js.map +7 -0
  12. package/dist/chunks/{WalkFormsAdapter-FT2SW4H6.js → WalkFormsAdapter-NX36GP35.js} +2 -2
  13. package/dist/chunks/WalkTabixSyntenyAdapter-JFNFX3JP.js +2 -0
  14. package/dist/chunks/{WalkTabixSyntenyAdapter-3WRVNDLB.js.map → WalkTabixSyntenyAdapter-JFNFX3JP.js.map} +2 -2
  15. package/dist/chunks/{chunk-KIYRMZWP.js → chunk-2CPD5NX2.js} +2 -2
  16. package/dist/chunks/{chunk-KIYRMZWP.js.map → chunk-2CPD5NX2.js.map} +1 -1
  17. package/dist/chunks/chunk-3AC33AXB.js +2 -0
  18. package/dist/chunks/{chunk-HF4H6LQI.js → chunk-4PHM6JNU.js} +2 -2
  19. package/dist/chunks/chunk-5LFPNQWH.js +2 -0
  20. package/dist/chunks/{chunk-6VNU7SD4.js.map → chunk-5LFPNQWH.js.map} +4 -4
  21. package/dist/chunks/{chunk-6WUWQX2P.js → chunk-CNEUOM7X.js} +2 -2
  22. package/dist/chunks/{chunk-6WUWQX2P.js.map → chunk-CNEUOM7X.js.map} +1 -1
  23. package/dist/chunks/{chunk-P3FBI5ML.js → chunk-DOC7QIE2.js} +1 -1
  24. package/dist/chunks/{chunk-P3FBI5ML.js.map → chunk-DOC7QIE2.js.map} +1 -1
  25. package/dist/chunks/{chunk-G53BI7VK.js → chunk-G4OPM6G7.js} +2 -2
  26. package/dist/chunks/{chunk-G53BI7VK.js.map → chunk-G4OPM6G7.js.map} +1 -1
  27. package/dist/chunks/chunk-GRLNDNX4.js +2 -0
  28. package/dist/chunks/{chunk-S333HOG5.js.map → chunk-GRLNDNX4.js.map} +4 -4
  29. package/dist/chunks/{chunk-7RJMG6I2.js → chunk-JYYF3U2H.js} +1 -1
  30. package/dist/chunks/{chunk-7RJMG6I2.js.map → chunk-JYYF3U2H.js.map} +1 -1
  31. package/dist/chunks/chunk-KDXVLEHS.js +3 -0
  32. package/dist/chunks/chunk-KDXVLEHS.js.map +7 -0
  33. package/dist/chunks/chunk-LGV6BTOY.js +2 -0
  34. package/dist/chunks/{chunk-HCDKP3IP.js.map → chunk-LGV6BTOY.js.map} +4 -4
  35. package/dist/chunks/{chunk-2KVE7YAS.js → chunk-LJ7O3736.js} +1 -1
  36. package/dist/chunks/{chunk-2KVE7YAS.js.map → chunk-LJ7O3736.js.map} +1 -1
  37. package/dist/chunks/{chunk-OJWBLPPH.js → chunk-OQHN2GWX.js} +2 -2
  38. package/dist/chunks/chunk-PTDOYJFH.js +4 -0
  39. package/dist/chunks/chunk-PTDOYJFH.js.map +7 -0
  40. package/dist/chunks/chunk-SGP63UMC.js +2 -0
  41. package/dist/chunks/chunk-SGP63UMC.js.map +7 -0
  42. package/dist/chunks/{chunk-XXBE4IFZ.js → chunk-SI5VLKVN.js} +2 -2
  43. package/dist/chunks/{chunk-XXBE4IFZ.js.map → chunk-SI5VLKVN.js.map} +1 -1
  44. package/dist/chunks/{chunk-6SWXMRAV.js → chunk-TWPUVVYH.js} +1 -1
  45. package/dist/chunks/{chunk-6SWXMRAV.js.map → chunk-TWPUVVYH.js.map} +1 -1
  46. package/dist/chunks/{chunk-FTXDTU27.js → chunk-XF6GU4GK.js} +3 -3
  47. package/dist/chunks/{chunk-FTXDTU27.js.map → chunk-XF6GU4GK.js.map} +2 -2
  48. package/dist/chunks/{chunk-MUONTMYZ.js → chunk-XSDGE4RF.js} +2 -2
  49. package/dist/chunks/{chunk-LE7FZM6Y.js → chunk-ZFJGNGIB.js} +2 -2
  50. package/dist/chunks/{chunk-LE7FZM6Y.js.map → chunk-ZFJGNGIB.js.map} +1 -1
  51. package/dist/chunks/chunk-ZI7RFIA2.js +4 -0
  52. package/dist/chunks/chunk-ZI7RFIA2.js.map +7 -0
  53. package/dist/chunks/{renderSvg-ZIUOPWJQ.js → renderSvg-NIWFCY3U.js} +2 -2
  54. package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +4 -3
  55. package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +4 -4
  56. package/package.json +2 -2
  57. package/src/GraphComputeLayout.test.ts +24 -0
  58. package/src/GraphComputeLayout.ts +4 -2
  59. package/src/GraphGenomeView/components/GraphSettingsDialog.tsx +16 -0
  60. package/src/GraphGenomeView/components/WalkRowsOverlay.tsx +83 -0
  61. package/src/GraphGenomeView/components/usePaneGestures.test.tsx +82 -5
  62. package/src/GraphGenomeView/components/usePaneGestures.ts +10 -4
  63. package/src/GraphGenomeView/graphLayers.ts +14 -1
  64. package/src/GraphGenomeView/legendSections.ts +32 -0
  65. package/src/GraphGenomeView/model.test.ts +307 -7
  66. package/src/GraphGenomeView/model.ts +3 -10
  67. package/src/GraphGenomeView/nodeColor.test.ts +27 -1
  68. package/src/GraphGenomeView/nodeColor.ts +38 -29
  69. package/src/GraphGenomeView/nodeSize.test.ts +21 -5
  70. package/src/GraphGenomeView/nodeSize.ts +24 -8
  71. package/src/GraphGenomeView/pane/fitViews.ts +5 -1
  72. package/src/GraphGenomeView/pane/graphViews.ts +102 -20
  73. package/src/GraphGenomeView/pane/launchActions.ts +55 -11
  74. package/src/GraphGenomeView/pane/launchViews.ts +46 -0
  75. package/src/GraphGenomeView/pane/loadActions.ts +85 -25
  76. package/src/GraphGenomeView/pane/morph.test.ts +25 -1
  77. package/src/GraphGenomeView/pane/morph.ts +3 -1
  78. package/src/GraphGenomeView/pane/paneBase.ts +5 -0
  79. package/src/GraphGenomeView/pane/renderingActions.ts +61 -2
  80. package/src/GraphGenomeView/pane/settingActions.ts +65 -5
  81. package/src/GraphGenomeView/pane/walkRowViews.ts +17 -6
  82. package/src/GraphGenomeView/retiredNodeColor.test.ts +46 -0
  83. package/src/GraphGenomeView/retiredNodeColor.ts +76 -0
  84. package/src/GraphGenomeView/tubeMapPanels.ts +2 -1
  85. package/src/GraphGenomeView/viewModel.ts +16 -9
  86. package/src/GraphGenomeView/walkRowBlocks.ts +50 -0
  87. package/src/LinearGraphDisplay/LinearGraphDisplay.test.ts +97 -10
  88. package/src/LinearGraphDisplay/components/GraphStatusChrome.test.tsx +18 -0
  89. package/src/LinearGraphDisplay/components/GraphStatusChrome.tsx +4 -2
  90. package/src/LinearGraphDisplay/components/SubgraphHaplotypesField.test.tsx +41 -1
  91. package/src/LinearGraphDisplay/components/SubgraphHaplotypesField.tsx +33 -19
  92. package/src/LinearGraphDisplay/configSchema.ts +18 -10
  93. package/src/LinearGraphDisplay/model.ts +4 -2
  94. package/src/RgfaTabixAdapter/RgfaTabixAdapter.ts +2 -9
  95. package/src/WalkTabixSyntenyAdapter/WalkTabixSyntenyAdapter.ts +3 -6
  96. package/src/hoverSync/graphViewHighlights.test.ts +53 -0
  97. package/src/hoverSync/graphViewHighlights.ts +25 -0
  98. package/src/hoverSync/lgvHover.test.ts +100 -1
  99. package/src/hoverSync/lgvHover.ts +77 -6
  100. package/src/launchFromGraph/contributors.test.ts +52 -0
  101. package/src/launchFromGraph/contributors.ts +105 -1
  102. package/src/launchFromGraph/launchFromGraph.ts +2 -2
  103. package/src/panSNTabix.test.ts +28 -0
  104. package/src/panSNTabix.ts +26 -8
  105. package/src/version.ts +1 -1
  106. package/dist/chunks/GraphTrackSettingsDialog-EVIIGC5G.js +0 -6
  107. package/dist/chunks/GraphTrackSettingsDialog-EVIIGC5G.js.map +0 -7
  108. package/dist/chunks/LinearGraphDisplay-ZC4BQ27J.js +0 -2
  109. package/dist/chunks/RgfaTabixAdapter-XSOIEWBK.js +0 -2
  110. package/dist/chunks/RgfaTabixAdapter-XSOIEWBK.js.map +0 -7
  111. package/dist/chunks/WalkTabixSyntenyAdapter-3WRVNDLB.js +0 -2
  112. package/dist/chunks/chunk-6VNU7SD4.js +0 -2
  113. package/dist/chunks/chunk-GRTN25B6.js +0 -3
  114. package/dist/chunks/chunk-GRTN25B6.js.map +0 -7
  115. package/dist/chunks/chunk-HCDKP3IP.js +0 -2
  116. package/dist/chunks/chunk-LE43I4PT.js +0 -4
  117. package/dist/chunks/chunk-LE43I4PT.js.map +0 -7
  118. package/dist/chunks/chunk-QV7SSOMJ.js +0 -2
  119. package/dist/chunks/chunk-S333HOG5.js +0 -2
  120. package/dist/chunks/chunk-VZQ6VOUP.js +0 -2
  121. package/dist/chunks/chunk-VZQ6VOUP.js.map +0 -7
  122. package/dist/chunks/chunk-WLRRI35A.js +0 -3
  123. package/dist/chunks/chunk-WLRRI35A.js.map +0 -7
  124. package/src/launchFromGraph/launchTracks.test.ts +0 -95
  125. package/src/launchFromGraph/launchTracks.ts +0 -49
  126. /package/dist/chunks/{GraphGenomeView-SEAPDRXS.js.map → GraphGenomeView-GQW4YC23.js.map} +0 -0
  127. /package/dist/chunks/{HighlightColorDialog-QAYWLO5I.js.map → HighlightColorDialog-PD3KMF2U.js.map} +0 -0
  128. /package/dist/chunks/{MinigraphBubbleAdapter-3QM4XV47.js.map → MinigraphBubbleAdapter-L6JSQIOL.js.map} +0 -0
  129. /package/dist/chunks/{WalkFormsAdapter-FT2SW4H6.js.map → WalkFormsAdapter-NX36GP35.js.map} +0 -0
  130. /package/dist/chunks/{chunk-QV7SSOMJ.js.map → chunk-3AC33AXB.js.map} +0 -0
  131. /package/dist/chunks/{chunk-HF4H6LQI.js.map → chunk-4PHM6JNU.js.map} +0 -0
  132. /package/dist/chunks/{chunk-OJWBLPPH.js.map → chunk-OQHN2GWX.js.map} +0 -0
  133. /package/dist/chunks/{chunk-MUONTMYZ.js.map → chunk-XSDGE4RF.js.map} +0 -0
  134. /package/dist/chunks/{renderSvg-ZIUOPWJQ.js.map → renderSvg-NIWFCY3U.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{a as O,b as pt}from"./chunk-5LFPNQWH.js";import{a as Qe,b as et,c as ee,d as tt,e as nt,f as te,h as ot,i as rt,j as at,k as it,m as ne,n as st,o as ut,p as dt,r as ft,t as ht,u as mt}from"./chunk-PTDOYJFH.js";import{N as qe,O as Ue,R as pe,T as Je,U as lt,V as ct,a as S,c as Ge,f as U,g as Te,h as He,q as Ae,r as We,t as Ye,u as Ze,v as $e,w as je}from"./chunk-ZI7RFIA2.js";import{n as N}from"./chunk-JYYF3U2H.js";import{Ca as Fe,Fb as _,J as se,Ja as Ve,Jb as le,Lb as ce,N as J,Nb as Q,R as Oe,T as De,a as X,b as ve,ca as Xe,dc as Ke,q as ze,r as _e,va as Be}from"./chunk-KDXVLEHS.js";import{n as Ne}from"./chunk-SGP63UMC.js";import{e as T}from"./chunk-NDRLCGPC.js";import{j}from"./chunk-TENPGIPX.js";import{d as H,e as Ee,f as Ie,g as k,h as C}from"./chunk-YU7T5WOQ.js";import{D as Le,G as q,H as B,b as be,c as we,e as ie,k as xe,o as Se,p as Pe,s as Me,v as K,w as ke,y as Re,z as Ce}from"./chunk-UGCNPRKC.js";import{a as I,b as n,c as f,d as h}from"./chunk-JMBDTNUR.js";var W=JBrowseExports["@jbrowse/render-core/useRenderingBackend"],ln=t=>W!=null&&t in Object(W)?W[t]:Object.assign(function(){throw new Error("This JBrowse does not provide '"+t+"' from '@jbrowse/render-core/useRenderingBackend' to plugins: GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse")},{jbrowseHostMissing:t});var gt=ln("useRenderingBackend"),co=W&&W.__esModule?W.default:W;var ue=et(1);function de({model:t}){let[e,o]=C(null);return H(()=>{if(!e)return;let i=new _(e),a=X(()=>{Xe(Ke()),i.resize(t.paneWidth,t.canvasHeight),t.paintHover(i,t.drawnBatch)});return()=>{a(),i.dispose()}},[e,t]),n("canvas",{ref:o,"data-testid":"graph-hover-layer",style:ue})}var yt={background:"rgba(255,255,255,0.82)",padding:"3px 6px",fontSize:11,lineHeight:"15px",whiteSpace:"nowrap"},oe={display:"flex",alignItems:"center",gap:5},vt={color:"#666"};function re({row:t,at:e,hint:o,after:i}){return t.swatch?f("div",{title:[t.title,o].filter(Boolean).join(" \xB7 ")||void 0,children:[f("div",{style:oe,children:[n(ne,{swatch:t.swatch}),f("span",{children:[t.strong?n("strong",{children:t.strong}):null,t.label]}),i]}),e?n("div",{"data-testid":"graph-walk-at",children:e}):t.under?n("div",{children:t.under}):null]}):n("div",{style:vt,children:t.label})}var cn={pointerEvents:"auto",cursor:"pointer",border:"none",background:"none",padding:"0 2px",font:"inherit",textDecoration:"underline"},bt=h(function({model:e}){return n(I,{children:it(e).map(({testid:o,rows:i})=>n("div",{style:yt,"data-testid":o,children:i.map(a=>n(re,{row:a,at:a.walk?e.hoveredOn(a.walk):void 0,after:a.closesBubble?n("button",{type:"button",style:cn,"data-testid":"graph-close-bubble",onClick:()=>{e.closeBubbles()},children:"close"}):null},a.key))},o))})});var pn={position:"absolute",left:0,top:0,zIndex:4,display:"grid",gap:ze,lineHeight:"normal"},un={height:_e,padding:"2px 6px",boxSizing:"border-box",fontFamily:"inherit",fontSize:11,color:"inherit",cursor:"pointer",border:"none",background:"none",textAlign:"left",display:"block"},dn={position:"relative"},fn={gridColumn:"1 / -1",height:Ue,padding:"2px 6px",boxSizing:"border-box",display:"flex",gap:14,fontSize:11,lineHeight:"15px"},hn=h(function({model:e,lift:o,width:i,height:a,cell:p,handlers:c,canvasStyle:l}){let[s,d]=C(null),[g,x]=C(null),w=o.walks[0];H(()=>{if(!s||!g)return;let G=new _(s),A=new _(g),z=ve(()=>e.buildDrawing(o,!1)),Y,Z=[X(()=>{let R=e.facetGrid;R&&G.resize(R.width,R.height);let L=z.get();L&&(L!==Y&&(G.uploadGeometry(L.batch),Y=L),e.applySelection(G),e.paint(G))}),X(()=>{let R=e.facetGrid;R&&A.resize(R.width,R.height);let L=z.get();L&&e.paintHover(A,L.batch)})];return()=>{for(let R of Z)R();G.dispose(),A.dispose()}},[s,g,e,o]);let D=e.walkLabel(w.name);return f("div",{style:p,children:[n("button",{type:"button",style:un,"data-testid":"graph-facet-title",onClick:()=>{e.liftWalks([w.name]),e.setFacet("")},children:n(re,{row:rt(e,w),hint:`click to lift ${D} alone`,at:e.hoveredOn(w)})}),f("div",{style:dn,children:[n("canvas",{ref:d,"data-testid":"graph-facet-canvas",style:{...l,width:i,height:a,display:"block"},...c}),n("canvas",{ref:x,style:ue})]})]})}),mn=h(function({model:e,handlers:o,canvasStyle:i}){let a=e.facetPanels,p=e.facetGrid,c=e.facetPlacement;if(!a||!p||!c)return null;let{columns:l,width:s,height:d}=p;return f("div",{"data-testid":"graph-facet-panels",style:{...pn,width:e.paneWidth,minHeight:e.canvasHeight,gridTemplateColumns:`repeat(${l}, ${s}px)`,background:J},children:[a.map((g,x)=>n(hn,{model:e,lift:g,width:s,height:d,cell:{gridRow:Math.floor(c.cells[x]/l)+1,gridColumn:c.cells[x]%l+1},handlers:o,canvasStyle:i},g.walks[0].name)),n("div",{style:{...fn,gridRow:Math.floor(c.cells.reduce((g,x)=>Math.max(g,x),-1/0)/l)+2},"data-testid":"graph-facet-key",children:at(e).map(g=>n(re,{row:g},g.key))})]})}),wt=mn;var xt=S(n("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 St=S([n("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"),n("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"},"1")],"ZoomIn");var Pt=S(n("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 gn=h(function({model:e}){let o=e.colorSchemeLock;return n(O,{label:"Color",size:"small",sx:{minWidth:100},disabled:o!==void 0,title:o?.why,shown:o?.value,value:e.chosenColorScheme,options:Ae.map(({value:i})=>({value:i,label:e.colorSchemeLabel(i)})),testId:"graph-color-select",onChange:i=>{e.setColorScheme(i)}})}),Mt=gn;var kt=N()({stats:{marginLeft:"auto"},perf:{color:"#888",fontVariantNumeric:"tabular-nums"}});function fe(t){return t===void 0?"\u2013":`${Math.round(t)}ms`}var yn=h(function({model:e}){let{classes:o}=kt(),{lastFetchMs:i,lastLayoutMs:a,lastGeometryMs:p}=e,c=i!==void 0||a!==void 0||p!==void 0;return e.showPerf&&c?f(B,{variant:"caption",className:o.perf,"data-testid":"graph-perf-stats",children:["fetch ",fe(i)," \xB7 layout ",fe(a)," \xB7 geom"," ",fe(p)]}):null}),vn=h(function({model:e}){let{classes:o}=kt();return f("div",{className:o.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:[f(B,{variant:"body2",component:"span",children:[e.nodeCount," nodes, ",e.edgeCount," edges",e.pathCount>0?`, ${e.pathCount} paths`:""]})," ",n(yn,{model:e})]})}),Rt=vn;var bn=h(function({model:e}){let{graph:o}=e;return n(O,{label:"Layout",size:"small",sx:{minWidth:140},testId:"graph-layout-select",value:e.chosenLayoutMode,options:Ge.map(({value:i,label:a,description:p,available:c})=>({value:i,label:a,description:p,disabled:o?!c(o):!1})),onChange:i=>{e.switchLayout(i)}})}),Ct=bn;var wn=h(function({model:e}){return e.chosenLayoutMode!=="walkrows"||e.repeatChoices.length===0?null:n(O,{label:"Repeat",size:"small",sx:{minWidth:130,maxWidth:260},testId:"graph-repeat-select",value:e.selectedRepeat?.key??"",options:e.repeatOptions,onChange:o=>{e.setRepeatKey(o)}})}),Lt=wn;var Et=S(n("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var It=S(n("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 xn=h(function({model:e}){let o=e.highlightMenuItems({picks:!1});return n(be,{size:"small",tooltip:"Graph options",menuItems:[...o.length>0?[{label:"Haplotypes",icon:lt,subMenu:o}]:[],...e.layoutOptionMenuItems({repeat:!1}),{label:"Show...",icon:We,subMenu:[...e.showMenuItems(),...e.modeDrawsNodes&&e.walkChoices.length>1?[{type:"checkbox",label:"Show walk rows under the graph",checked:e.walkStrip,onClick:()=>{e.setWalkStrip(!e.walkStrip)}}]:[],{type:"checkbox",label:"Show timings",checked:e.showPerf,onClick:()=>{e.setShowPerf(!e.showPerf)}}]},{type:"divider"},{label:"Graph settings...",icon:ct,helpText:"Subgraph node limit; node width and path colors; the force-directed layout engine",onClick:()=>{j(e).queueDialog(i=>[pt,{model:e,onClose:i}])}},{type:"divider"},{label:"Close graph",icon:Et,onClick:()=>{e.clearGraph()}}],children:n(It,{})})}),Gt=xn;var Sn=N()({formControl:{minWidth:130,maxWidth:260}}),Pn=h(function({model:e}){let{classes:o}=Sn(),i=Ee(),{walkChoices:a}=e;if(a.length===0||!e.liftsWalks)return null;let p=new Set(a.map(s=>s.name)),c=new Map(a.map(s=>[s.name,s.label])),l=e.walkLayers.map(s=>s.walk).filter(s=>p.has(s));return a.length>De?n(Se,{size:"small",variant:"outlined",color:"inherit","data-testid":"graph-walk-choose",onClick:()=>{j(e).queueDialog(s=>[Oe,{model:e,onClose:s}])},children:l.length>0?`${l.length} of ${a.length} haplotypes`:"Highlight haplotypes..."}):f(Me,{size:"small",className:o.formControl,children:[n(ke,{id:i,children:"Highlight"}),n(Le,{labelId:i,multiple:!0,value:l,label:"Highlight","data-testid":"graph-walk-select",renderValue:s=>s.map(d=>c.get(d)).join(", "),onChange:s=>{let{value:d}=s.target;e.liftAmongChoices(typeof d=="string"?d.split(","):d)},children:a.map(({name:s,label:d})=>f(Ce,{value:s,dense:!0,children:[n(Pe,{size:"small",checked:l.includes(s)}),n(Re,{primary:d})]},s))})]})}),Tt=Pn;var Mn=N()({toolbar:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:4,padding:"2px 4px",borderBottom:"1px solid #ddd"}}),kn=h(function({model:e}){return n(B,{variant:"body2",children:e.zoomPercent})}),Rn=h(function({model:e}){let{classes:o}=Mn(),i=a=>{e.zoom(a,e.viewBox.width/2,e.viewBox.height/2)};return f("div",{className:o.toolbar,children:[n(Ct,{model:e}),n(Mt,{model:e}),n(Tt,{model:e}),n(Lt,{model:e}),n(q,{title:"Zoom in",children:n(K,{size:"small",onClick:()=>{i(1.5)},children:n(St,{})})}),n(q,{title:"Zoom out",children:n(K,{size:"small",onClick:()=>{i(1/1.5)},children:n(Pt,{})})}),n(q,{title:"Zoom to fit",children:n(K,{size:"small",onClick:()=>{e.refitView()},children:n(xt,{})})}),n(kn,{model:e}),n(Rt,{model:e}),n(Gt,{model:e})]})}),Ht=Rn;var Cn={position:"absolute",bottom:qe,lineHeight:"normal",background:"rgba(0,0,0,0.75)",color:"white",padding:"4px 8px",borderRadius:4,fontSize:12,pointerEvents:"none",zIndex:6};function he({label:t,readout:e}){return f(I,{children:[n("strong",{children:t})," \u2014 ",e]})}function Ln(t,e){if(e)return{testId:"graph-chip-tooltip",body:he(e)};let o=t.hoveredNode?t.hoverNodeById?.get(t.hoveredNode):void 0;if(o){let c=t.hoverDrawing?.members.get(o.id),l=He(o);return{body:f(I,{children:[n("strong",{children:o.name}),c?` and ${c.length-1} more`:""," \u2014"," ",o.length.toLocaleString()," bp, depth ",o.depth.toFixed(1),l?f(I,{children:[n("br",{}),l.sample," ",U(l)," (rank ",o.stable?.rank,")"]}):null]})}}let i=t.hoveredEdge===null?void 0:t.graph?.edges[t.hoveredEdge];if(i){let c=Te(i,t.deletions.find(l=>l.edgeIndex===t.hoveredEdge),l=>t.nodeById?.get(l)?.name??l);return{body:c.deletion?f(I,{children:[n("strong",{children:"Deletion"})," ",c.deletion.bp,n("br",{}),c.deletion.where]}):f(I,{children:["Edge: ",c.ends]})}}let a=t.hoveredWalkRowText;if(a)return{testId:"graph-walk-row-tooltip",body:he(a)};let p=t.hoveredTubeText;return p?{testId:"graph-tube-tooltip",body:he(p)}:void 0}var En=h(function({model:e,chip:o}){let i=Ln(e,o);return i?n("div",{style:{...Cn,right:e.tooltipRightPx},"data-testid":i.testId,children:i.body}):null}),At=En;var zt=S(n("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList");var _t=S(n("path",{d:"M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z"}),"FilterListOff");var Wt=S(n("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 In={x:0,y:0};function Gn(t,e){let{own:o,reference:i,highlight:a}=t.nodeLaunchTargets(e);return[{label:"Node details",icon:Wt,onClick:()=>{t.showNodeDetails(e)}},...Je({own:o,reference:i,highlight:a,onShowLinear:p=>{t.showInLinearView(p)},onHighlight:t.canHighlightInLinearView?p=>{t.highlightInLinearView(p)}:void 0})]}function Tn(t){return t>=1e3?`${Math.round(t/1e3)} k`:`${t}`}function Hn(t,e,o){let i=o??t.walkRowBars,a=t.walkRowLaunchTarget(e,i),p=a?.assembly,c=e>0?i?.rows[e-1]:void 0,l=c?.sample,s=!o&&t.walkRowBars,d=t.walkRowSamples;return[a&&p?{label:`Linear genome view \u2014 ${p} ${U(a.location)}`,icon:pe,onClick:()=>{t.showInLinearView({location:a.location,assembly:p})}}:{label:"Linear genome view",icon:pe,disabled:!0,disabledHelpText:a?`No assembly in this session is ${a.location.haplotype??a.label}`:"This walk states no contig coordinates",onClick:()=>{}},...c?.abridgedSteps?[{label:`Load the ${Tn(c.abridgedSteps)} abridged steps`,onClick:()=>{t.expandWalk(c.name)}}]:[],...c&&t.liftsWalks&&t.modeDrawsNodes?[{type:"checkbox",label:`Highlight ${c.label}`,checked:t.walkLayers.some(g=>g.walk===c.name),onClick:()=>{t.toggleWalk(c.name)}}]:[],...s&&l&&!(d?.length===1&&d[0]===l)?[{label:`Show only ${l}`,icon:zt,onClick:()=>{t.setWalkRowSamples([l])}}]:[],...s&&d?[{label:"Show every sample",icon:_t,onClick:()=>{t.setWalkRowSamples(void 0)}}]:[]]}function F({model:t,at:e,onClose:o}){return n(we,{anchor:e,offset:In,onClose:o,menuItems:()=>e===void 0?[]:"nodeId"in e?Gn(t,e.nodeId):Hn(t,e.row,e.bars)})}var An={display:"flex",flexWrap:"wrap",gap:"2px 14px",padding:"2px 8px 6px",fontSize:11,color:"#333"},zn={position:"absolute",pointerEvents:"none",background:"rgba(255,255,255,0.92)",border:"1px solid #ccc",borderRadius:3,padding:"1px 6px",fontSize:11,whiteSpace:"nowrap",zIndex:4},_n=h(function({bars:e,frame:o,ramp:i,rowGenes:a}){let p=nt(),c=Ie(()=>Ve(e,o,{ramp:i,rowGenes:a,idPrefix:p}),[e,o,i,a,p]);return n(te,{el:c})}),Wn=h(function({model:e}){let o=e.walkStripRows,i=e.walkStripFrame,a=e.stripHover,p=o?[o.reference,...o.rows]:[],c=a?p.findIndex(g=>g.name===a.row):-1,l=p[c];if(!o||!i||i.labelled||!a||!l)return null;let s=(o.origin+a.offset)*i.scaleX+i.translateX,d=s>i.width/2?{right:i.width-s+12}:{left:s+12};return f("div",{"data-testid":"graph-walk-strip-tip",style:{...zn,...d,top:c*i.rowPx+i.translateY-18},children:[l.label," \xB7"," ",Be(l,c===0?void 0:o.reference)]})}),Nn=h(function({model:e,bars:o,frame:i}){return n(te,{el:Ze(o,i,e.walkStripMarks)})}),On=h(function({model:e}){let o=e.walkStripRows,i=e.walkStripFrame,[a,p]=C();if(!o||!i)return null;let c=s=>{let d=s.currentTarget.getBoundingClientRect();return Ye(o,i,s.clientX-d.left,s.clientY-d.top)},l=Fe(o,{ramp:e.referenceRampDomain,rampCss:Ne,genes:je(i,e.walkRowGenes,e.walkRowGeneGaps)});return f("div",{"data-testid":"graph-walk-strip",style:{position:"relative",borderTop:"1px solid #ddd"},onMouseEnter:()=>{e.setPointerInPane(!0)},onMouseLeave:()=>{T(e)&&(e.setPointerInPane(!1),e.setStripHover(null))},children:[f("svg",{width:i.width,height:i.height,style:{display:"block"},onMouseMove:s=>{let d=c(s);s.currentTarget.style.cursor=d&&d.index>0?"pointer":"",e.setStripHover(d?{row:d.row.name,offset:d.offset}:null)},onClick:s=>{let d=c(s);d&&d.index>0&&e.toggleWalk(d.row.name)},onContextMenu:s=>{let d=c(s);d&&(s.preventDefault(),p({clientX:s.clientX,clientY:s.clientY,row:d.index}))},children:[n(_n,{bars:o,frame:i,ramp:e.referenceRampDomain,rowGenes:e.walkRowGenes}),n(Nn,{model:e,bars:o,frame:i}),n(te,{el:$e(o,i,new Set(e.walkLayers.map(s=>s.walk)))})]}),n(Wn,{model:e}),f("div",{style:An,"data-testid":"graph-walk-strip-key",children:[l.map(s=>f("div",{style:oe,children:[n(ne,{swatch:ot(s.swatch)}),n("span",{children:s.label})]},s.label)),n("span",{style:{color:"#777"},children:"Ticks mark where each walk passes the node under the pointer; click a haplotype's bar to lift its walk"})]}),n(F,{model:e,at:a&&{...a,bars:o},onClose:()=>{p(void 0)}})]})}),Nt=On;var Dn=h(function({model:e}){let o=e.walkStripLocator;return o?f(ee,{model:e,zIndex:4,overflow:"visible",testId:"graph-walk-strip-locator",children:[n("circle",{cx:o.x,cy:o.y,r:11,fill:"none",stroke:"white",strokeWidth:4}),n("circle",{cx:o.x,cy:o.y,r:11,fill:"none",stroke:"#111",strokeWidth:1.75})]}):null}),Ot=Dn;var Xn=1.1,Bn=100,Fn=40,Vn=800,Yn=10,Dt=2;function me(t){let e=t.deltaY*(t.deltaMode===1?Fn:t.deltaMode===2?Vn:1),o=(t.ctrlKey?Yn:1)*e/Bn;return Xn**-Math.max(-Dt,Math.min(Dt,o))}var Zn=40,$n=100,jn=24,Xt=Math.log(16);function Kn(t,e){let o=t*Math.exp(-Math.max(0,e)/jn);return Math.abs(o)<.001?t:t-o}function qn(t,e){let o=Math.abs(t.deltaX)>Math.abs(t.deltaY);return t.ctrlKey||t.metaKey||!o&&(!e||e.scrollZoom)?"zoom":o?"pan":"page"}function Vt(t,e,o){H(()=>{if(!t)return;let i=-1/0,a={backlog:0,x:0,y:0,frame:0,last:0},p=l=>{let s=Kn(a.backlog,Math.min(100,l-a.last));a.backlog-=s,a.last=l,a.frame=a.backlog?requestAnimationFrame(p):0,T(o)&&o.zoom(Math.exp(s),a.x,a.y)},c=l=>{if(o.hostPlacesX||o.followsHostView)return;let g=((l.target instanceof Element?l.target.closest("canvas"):null)??(o.facetPanels?null:e))?.getBoundingClientRect();if(g&&l.clientY-g.top<o.referenceStripZonePx)return;let x=qn(l,o.host);if(x!=="page"){if(o.host&&l.stopPropagation(),l.preventDefault(),x==="pan"){if(l.timeStamp-i>$n){let w=l.deltaMode===1?Zn:1;o.setTransform(o.scale,o.translateX-l.deltaX*w,o.translateY)}return}i=l.timeStamp,g&&(a.x=l.clientX-g.left,a.y=l.clientY-g.top,a.backlog=Math.max(-Xt,Math.min(Xt,a.backlog+Math.log(me(l)))),a.frame||(a.last=performance.now()-1e3/60,a.frame=requestAnimationFrame(p)))}};return t.addEventListener("wheel",c,{passive:!1}),()=>{cancelAnimationFrame(a.frame),t.removeEventListener("wheel",c)}},[t,e,o])}var Bt=3,ge="data-gesture-owner",V=t=>({x:t.clientX,y:t.clientY});function Ft(t){let[e,o]=[...t.values()];return{spread:Math.hypot(e.x-o.x,e.y-o.y),mid:{x:(e.x+o.x)/2,y:(e.y+o.y)/2}}}function Yt(t){let e=k({x:0,y:0}),o=k({x:0,y:0}),i=k(!1),a=k(void 0),p=r=>a.current!==void 0&&r.pointerId!==a.current,c=k(new Map),l=k(null),s=k(null),d=k(!1),g=k(null),x=k(!1),w=k({frame:0,pan:null,hover:null,pinch:!1});H(()=>()=>{cancelAnimationFrame(w.current.frame)},[]);let[D,G]=C(),[A,z]=C(!1),[Y,Z]=C(void 0);function R(r){let u=r.currentTarget.getBoundingClientRect();return{x:r.clientX-u.left,y:r.clientY-u.top}}function L(r,u){if(t.layoutResult?.tubeMap)return t.tubeMapNodeAt(r,u);let m=t.referenceStripNodeAt(r,u);if(m)return m;let{nodePositions:y}=t;if(!y)return null;let{x:v,y:b}=se(r,u,t,t.axisScale);return le(y,v,b,t.axisScale,t.positionsVersion,t.nodeInk)}function jt(r,u){let{nodePositions:m,graph:y}=t;if(!m||!y)return null;let{x:v,y:b}=se(r,u,t,t.axisScale);return ce(m,y,v,b,t.axisScale,t.effectiveDrawPaths&&!t.facetPanels,t.positionsVersion,t.deletionEdgeIndexes,t.hiddenEdgeIndexes,t.deletionRoutes,t.layoutResult?.stranded)}function Kt(r){r.button===0&&r.preventDefault()}function qt(r){if(r.button!==0)return;let u=c.current;if(p(r)){t.isPanning&&!x.current&&r.pointerType==="touch"&&u.size===1&&(r.currentTarget.setPointerCapture(r.pointerId),u.set(r.pointerId,V(r)),s.current=Ft(u),i.current=!0);return}i.current=!1,o.current={x:r.clientX,y:r.clientY},r.currentTarget.removeAttribute(ge);let m=t.followsHostView;if(t.hostPlacesX||m&&r.shiftKey)return;r.currentTarget.setPointerCapture(r.pointerId),a.current=r.pointerId,l.current=r.currentTarget,u.clear(),u.set(r.pointerId,V(r));let{x:y,y:v}=R(r),b=v<t.referenceStripZonePx,P=t.layoutResult?.tubeMap||b?null:L(y,v);m&&P&&r.currentTarget.setAttribute(ge,""),x.current=m,d.current=b&&!m,P?t.setDraggingNode(P):t.setPanning(!0),e.current={x:r.clientX,y:r.clientY}}function ye(){let r=s.current,u=l.current;if(!r||!u)return;let m=Ft(c.current),y=u.getBoundingClientRect();r.spread>0&&m.spread>0&&t.zoom(m.spread/r.spread,r.mid.x-y.left,r.mid.y-y.top),t.setTransform(t.scale,t.translateX+m.mid.x-r.mid.x,t.translateY+m.mid.y-r.mid.y),s.current=m}function Ut(){let r=w.current,{pan:u,hover:m,pinch:y}=r;if(r.frame=0,r.pan=null,r.hover=null,r.pinch=!1,y&&ye(),u&&d.current?t.host?.horizontalScroll(-u.dx):u&&x.current?t.setTransform(t.scale,t.translateX,t.translateY+u.dy):u&&t.setTransform(t.scale,t.translateX+u.dx,t.translateY+u.dy),!m)return;let{x:v,y:b}=m,P=t.facetPanels?void 0:ut(t.overlayLabels,v,b);Z(M=>M?.label===P?.label&&M?.readout===P?.readout?M:P);let E=t.walkRowBars;if(E){let M=t.walkRowAt(v,b);t.setHoveredWalkRow(M===void 0?null:[E.reference,...E.rows][M].name)}if(t.nodePositions&&t.graph){let M=L(v,b);t.setHoveredPanel(t.tubeMapPanelAt(b)),t.setHoveredNode(M,{x:v,y:b}),z(M!==null&&!t.hostPlacesX&&!t.layoutResult?.tubeMap&&b>=t.referenceStripZonePx),t.setHoveredTube(M===null&&t.layoutResult?.tubeMap?t.tubeAt(v,b):null),t.setHoveredEdge(M||t.layoutResult?.tubeMap||!t.hoverLightsEverything?null:jt(v,b))}}function $(){w.current.frame||(w.current.frame=requestAnimationFrame(Ut))}function Jt(){let r=w.current;cancelAnimationFrame(r.frame),r.frame=0,r.pan=null,r.hover=null,r.pinch=!1}function Qt(r){let u=c.current;if(s.current&&u.has(r.pointerId)){u.set(r.pointerId,V(r)),w.current.pinch=!0,$();return}if(p(r)||g.current)return;let m=r.clientX-e.current.x,y=r.clientY-e.current.y;e.current={x:r.clientX,y:r.clientY},Math.hypot(r.clientX-o.current.x,r.clientY-o.current.y)>Bt&&(i.current=!0);let v=w.current;if(t.draggingNode)t.moveNode(t.draggingNode,m/t.scaleX,y/t.scaleY);else if(t.isPanning)v.pan={dx:(v.pan?.dx??0)+m,dy:(v.pan?.dy??0)+y},$();else{let b=r.currentTarget.getBoundingClientRect();v.hover={x:r.clientX-b.left,y:r.clientY-b.top},$()}}function ae(r){let u=c.current;if(s.current&&u.has(r.pointerId)){w.current.pinch&&(w.current.pinch=!1,ye()),u.delete(r.pointerId),s.current=null;let[[m,y]]=[...u];a.current=m,e.current=y;return}p(r)||(a.current=void 0,u.clear(),T(t)&&t.stopDragging())}function en(r){p(r)||(a.current=void 0,c.current.clear(),s.current=null,Jt(),Z(void 0),z(!1),T(t)&&(t.stopDragging(),t.clearHover()))}function tn(r){let{x:u,y:m}=R(r),y=L(u,m),{clientX:v,clientY:b}=r;if(y){r.preventDefault(),G({clientX:v,clientY:b,nodeId:y});return}let P=t.walkRowAt(u,m);P!==void 0&&(r.preventDefault(),G({clientX:v,clientY:b,row:P}))}function nn(r){if(!i.current){let{x:u,y:m}=R(r),y=L(u,m);t.setSelectedNode(y),y&&t.showNodeDetails(y)}}H(()=>()=>{g.current?.end()},[]);function on(r){if(r.button!==0||t.hostPlacesX||t.followsHostView||!(r.target instanceof Element)||!r.target.closest(`[${Qe}]`))return;g.current?.end(),d.current=!1,x.current=!1;let u=r.pointerId,m=V(r),y=m,v={moved:!1,end:()=>{window.removeEventListener("pointermove",b,!0),window.removeEventListener("pointerup",P,!0),window.removeEventListener("pointercancel",P,!0),v.moved&&T(t)&&t.stopDragging()}};function b(E){if(E.pointerId!==u)return;if(!v.moved){if(Math.hypot(E.clientX-m.x,E.clientY-m.y)<=Bt)return;v.moved=!0,t.setPanning(!0)}let M=w.current;M.pan={dx:(M.pan?.dx??0)+E.clientX-y.x,dy:(M.pan?.dy??0)+E.clientY-y.y},y=V(E),$()}function P(E){E.pointerId===u&&(v.end(),setTimeout(()=>{g.current===v&&(g.current=null)},0))}g.current=v,window.addEventListener("pointermove",b,!0),window.addEventListener("pointerup",P,!0),window.addEventListener("pointercancel",P,!0)}function rn(r){g.current?.moved&&(g.current=null,r.stopPropagation())}let an={cursor:t.isPanning||t.draggingNode?"grabbing":A?"move":"grab",touchAction:t.hostPlacesX?"auto":"none",overscrollBehavior:"contain"},sn=t.host!==void 0&&!t.hostPlacesX&&!t.followsHostView?{[ge]:"",onMouseDown:r=>{r.stopPropagation()}}:{};return{canvasStyle:an,surfaceProps:sn,handlers:{onMouseDown:Kt,onPointerDown:qt,onPointerMove:Qt,onPointerUp:ae,onPointerCancel:ae,onLostPointerCapture:ae,onPointerLeave:en,onClick:nn,onContextMenu:tn},contextMenu:D,hoveredChip:Y,labelHandlers:{onPointerDown:on,onClickCapture:rn},closeContextMenu:()=>{G(void 0)}}}function Zt(t){return Promise.resolve(new _(t))}var Un={position:"relative"},Jn={position:"relative",lineHeight:0,isolation:"isolate"},Qn={position:"absolute",left:0,right:0,bottom:0,zIndex:0},eo={position:"absolute",inset:0,zIndex:10,lineHeight:"normal",pointerEvents:"none"},to={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},no=h(function({model:e}){return n(I,{children:e.visibleRowLabels.map(({label:o,y:i,top:a})=>n("div",{"data-testid":"graph-row-label",style:{...to,top:a},children:o},i))})}),oo={position:"absolute",top:Q,right:Q,display:"flex",flexDirection:"column",borderRadius:3,overflow:"hidden",zIndex:4},$t={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},ro={...$t,color:"#18181c",fontWeight:600},ao=h(function({model:e}){let o=k(null),i=e.legendAtRest;return H(()=>{let a=o.current;if(!a||!i)return;let p=()=>{T(e)&&e.legendAtRest&&e.setLegendSize({width:a.offsetWidth,height:a.offsetHeight})};p();let c=new ResizeObserver(p);return c.observe(a),()=>{c.disconnect()}},[e,i]),n("div",{ref:o,style:{...oo,top:Q+e.referenceStripZonePx},children:n(bt,{model:e})})}),io=h(function({model:e}){let o=e.overlayLabels.sizes,i=o.flatMap(({key:a,leader:p})=>p?[{key:a,...p}]:[]);return f(I,{children:[i.length>0?n(ee,{model:e,zIndex:2,overflow:"visible",children:i.map(({key:a,arcX:p,arcY:c,labelX:l,labelY:s})=>n("line",{"data-testid":"graph-label-leader",x1:p,y1:c,x2:l,y2:s,stroke:"#18181c",strokeWidth:1},a))}):null,o.map(({key:a,text:p,x:c,y:l,kind:s})=>n("div",{"data-testid":"graph-size-label",style:{...s==="deletion"?ro:$t,left:c,top:l},children:p},a))]})}),so=h(function({model:e,ownChrome:o=!0}){let{canvasRef:i,canvas:a,error:p,retry:c}=gt(Zt,e),{handlers:l,canvasStyle:s,surfaceProps:d,labelHandlers:g,contextMenu:x,closeContextMenu:w,hoveredChip:D}=Yt(e),[G,A]=C(null);Vt(G,a,e);let z=e.facetPanels!==void 0;return f("div",{style:Un,...d,children:[o?n(Ht,{model:e}):null,f("div",{ref:A,style:Jn,...g,onMouseEnter:()=>{e.setPointerInPane(!0)},onMouseLeave:()=>{T(e)&&e.setPointerInPane(!1)},children:[e.referenceStripShown?n("div",{style:{...Qn,top:e.referenceStripZonePx,background:J}}):null,n("canvas",{ref:i,"data-testid":"graph-genome-canvas",style:{...s,width:e.paneWidth,height:e.canvasHeight,display:"block",position:"relative",zIndex:1},...l}),z?n(wt,{model:e,handlers:l,canvasStyle:s}):f(I,{children:[n(ht,{model:e}),n(de,{model:e}),n(ft,{model:e}),n(no,{model:e}),n(io,{model:e}),n(tt,{model:e}),n(st,{model:e}),n(dt,{model:e}),n(mt,{model:e}),n(Ot,{model:e}),n(ao,{model:e})]}),o?n("div",{style:eo,children:n(xe,{isVisible:e.isLoading,immediate:!e.layoutResult,statusMessage:e.statusMessage,onCancel:e.canCancelLoad?()=>{e.cancelLoad()}:void 0})}):null,n(At,{model:e,chip:D})]}),e.walkStripShown?n(Nt,{model:e}):null,n(F,{model:e,at:x,onClose:w}),p?n(ie,{error:p,onReset:c}):null,o&&e.error?n(ie,{error:e.error,onReset:e.canRetryLoad?()=>{e.retryLoad()}:void 0}):null]})}),Di=so;export{Di as a};
2
+ //# sourceMappingURL=chunk-LGV6BTOY.js.map