"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[754],{80754:function(e,n,t){t.r(n),t.d(n,{YScaleBar:function(){return s.Z}});var r=t(33028),o=(t(96902),t(50209)),i=t(4782),a=t(10488),l=t(29938),s=t(64335);n.default=(0,i.observer)((function(e){var n=e.model;return(0,l.jsxs)("div",{children:[(0,l.jsx)(o.qb,(0,r.Z)({},e)),(0,l.jsx)(a.Z,{model:n})]})}))},10488:function(e,n,t){t.d(n,{Z:function(){return x}});var r=t(33028),o=t(68079),i=t(96902),a=t(27664),l=t(4782),s=t(64335),c=t(29938),u=function(e){var n=e.color,t=void 0===n?"rgb(255,255,255,0.8)":n;return(0,c.jsx)("rect",(0,r.Z)((0,r.Z)({},e),{},{fill:t}))},h=(0,l.observer)((function(e){var n=e.model,t=e.rowHeight,r=e.labelWidth,o=e.exportSVG,a=n.needsCustomLegend,l=n.needsScalebar,s=n.needsFullHeightScalebar,h=n.rowHeightTooSmallForScalebar,d=n.renderColorBoxes,g=n.sources,f=Math.min(t,12),x=t>11,m=d?15:0,v=r+m+5,j=(o?10:0)||(l&&!h?50:0);return g?(0,c.jsxs)(c.Fragment,{children:[s?(0,c.jsx)(u,{y:0,x:j,width:v,height:(g.length+.25)*t}):null,g.map((function(e,n){var r=Math.min(20,t);return(0,c.jsxs)(i.Fragment,{children:[s?null:(0,c.jsx)(u,{y:n*t+1,x:j,width:v,height:r}),e.color?(0,c.jsx)(u,{y:n*t+1,x:j,width:m,height:a?t:r,color:e.color}):null,x?(0,c.jsx)("text",{y:n*t+13,x:j+m+2,fontSize:f,children:e.name}):null]},"".concat(e.name,"-").concat(n))}))]}):null})),d=(0,l.observer)((function(e){var n=e.model,t=n.ticks,r=n.scaleType,o=(0,a.getContainingView)(n).width,i="[".concat(null===t||void 0===t?void 0:t.values[0],"-").concat(null===t||void 0===t?void 0:t.values[1],"]")+("log"===r?" (log scale)":""),l=(0,a.measureText)(i,14),s=o-l-25;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{y:0,x:s,width:l+6,height:16}),(0,c.jsx)("text",{y:13,x:s,children:i})]})})),g=t(39947),f=(0,l.observer)((function(e){var n=e.children,t=e.model;if(e.exportSVG)return(0,c.jsx)(c.Fragment,{children:n});var r=t.height;return(0,c.jsx)("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:r,width:(0,a.getContainingView)(t).width},children:n})})),x=(0,l.observer)((function(e){var n=e.model,t=e.orientation,i=e.exportSVG,l=n.stats,u=n.needsCustomLegend,x=n.needsFullHeightScalebar,m=n.rowHeightTooSmallForScalebar,v=n.rowHeight,j=n.sources,p=n.ticks,w=Math.min(v,12),b=v>11,S=(0,a.getContainingView)(n).width;if(!(l&&j))return null;var Z=Math.max.apply(Math,(0,o.Z)(j.map((function(e){return(0,a.measureText)(e.name,w)})).map((function(e){return b?e:20}))||[0]));return(0,c.jsx)(f,(0,r.Z)((0,r.Z)({},e),{},{children:x?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("g",{transform:"translate(".concat(i?0:(0,g.os)(n),",0)"),children:(0,c.jsx)(s.Z,{model:n,orientation:t})}),(0,c.jsx)("g",{transform:"translate(".concat(S-Z-100,",0)"),children:(0,c.jsx)(h,{exportSVG:i,model:n,rowHeight:12,labelWidth:Z})})]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(h,{exportSVG:i,model:n,rowHeight:n.rowHeight,labelWidth:Z}),m||u?(0,c.jsx)(d,(0,r.Z)({},e)):j.map((function(e,r){return(0,c.jsx)("g",{transform:"translate(0 ".concat(v*r,")"),children:(0,c.jsx)(s.Z,{model:n,orientation:t})},"".concat(JSON.stringify(p),"-").concat(r))}))]})}))}))},39947:function(e,n,t){t.d(n,{A1:function(){return i},os:function(){return s},vi:function(){return a}});var r=t(27664),o=t(99836);function i(e,n){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=n.map((function(n){return e.findIndex((function(e){return e.name===n}))})).sort((function(e,n){return e-n})),o=0,i=0;i<r.length;i++){var a=r[i],l=Math.max(o,a-t);l>=o&&e.splice(l,0,e.splice(a,1)[0]),o+=1}return e}function a(e,n){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=n.map((function(n){return e.findIndex((function(e){return e.name===n}))})).sort((function(e,n){return n-e})),o=e.length-1,i=0;i<r.length;i++){var a=r[i],l=Math.min(o,a+t);l<=o&&e.splice(l,0,e.splice(a,1)[0]),o-=1}return e}var l=12.8;function s(e){var n=e.prefersOffset,t=(0,r.getContainingView)(e).trackLabels,i=(0,r.getContainingTrack)(e),a=(0,o.getConf)(i,"name");return"overlapping"!==t||n?10:(0,r.measureText)(a,l)+100}}}]);
//# sourceMappingURL=754.7f71e5b4.chunk.js.map