diff x/static/js/4753.834007ba.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/x/static/js/4753.834007ba.chunk.js.map	Sat Oct 05 23:58:05 2024 +0000
@@ -0,0 +1,1 @@
+{"version":3,"file":"static/js/4753.834007ba.chunk.js","mappings":"uOAce,SAASA,GAAmB,MACzCC,EAAK,QACLC,EAAO,SACPC,IAMA,MAAMC,GAAOC,EAAAA,EAAAA,mBAAkBJ,IACzB,QAAEK,EAAO,QAAEC,EAAO,QAAEC,GAAYL,EACtC,OACEM,EAAAA,cAACC,EAAAA,KAAI,CACHC,gBAAiBA,CAACC,EAAOC,KACvBA,EAASD,GACTV,GAAS,EAEXC,SAAU,CACRW,SAAU,EACVC,sBAAuBA,KAGd,CACLC,IAFQT,EAGRU,KAJQX,EAKRY,OAJQX,EAKRY,MANQb,EAORc,MAAO,EACPC,OAAQ,EACRC,EATQhB,EAURiB,EATQhB,EAURiB,MAAAA,GAAU,KAIhBtB,QAASA,EACTuB,KAAMC,QAAQvB,GACdwB,UAAW,CACT,CACEC,MAAO,oBACPC,QAASA,KACP,MAAM,EAAEC,GAAMtB,EACRuB,EAAQD,EAAEE,IAAI,SACdC,EAAMH,EAAEE,IAAI,OACZE,EAAUJ,EAAEE,IAAI,WAChBG,EAAOL,EAAEE,IAAI,QACnB5B,EAAKgC,MAAM,GAAIC,eAAe,GAAGH,KAAWH,KAASE,KAAOK,OACzDC,IACCC,QAAQC,MAAMF,IACdG,EAAAA,EAAAA,YAAWzC,GAAO0C,YAAY,GAAGJ,IAAKA,EAAE,IAG5CnC,EAAKgC,MAAM,GAAIC,eACb,GAAGF,EAAKD,WAAWC,EAAKJ,SAASI,EAAKF,OACtCK,OAAOC,IACPC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":["../../../plugins/linear-comparative-view/src/LinearSyntenyDisplay/components/SyntenyContextMenu.tsx","../../../plugins/linear-comparative-view/src/LinearSyntenyDisplay/components/LinearSyntenyRendering.tsx","../../../plugins/linear-comparative-view/src/LinearSyntenyDisplay/components/Component.tsx","../../../plugins/linear-comparative-view/src/LinearSyntenyDisplay/components/util.ts","../../../plugins/linear-comparative-view/src/LinearSyntenyDisplay/drawSynteny.ts"],"sourcesContent":["import React from 'react'\nimport { getContainingView, getSession, Feature } from '@jbrowse/core/util'\nimport { Menu } from '@jbrowse/core/ui'\n\n// locals\nimport { LinearSyntenyDisplayModel } from '../model'\nimport { LinearSyntenyViewModel } from '../../LinearSyntenyView/model'\n\ninterface ClickCoord {\n  clientX: number\n  clientY: number\n  feature: { f: Feature }\n}\n\nexport default function SyntenyContextMenu({\n  model,\n  onClose,\n  anchorEl,\n}: {\n  onClose: () => void\n  model: LinearSyntenyDisplayModel\n  anchorEl: ClickCoord\n}) {\n  const view = getContainingView(model) as LinearSyntenyViewModel\n  const { clientX, clientY, feature } = anchorEl\n  return (\n    <Menu\n      onMenuItemClick={(event, callback) => {\n        callback(event)\n        onClose()\n      }}\n      anchorEl={{\n        nodeType: 1,\n        getBoundingClientRect: () => {\n          const x = clientX\n          const y = clientY\n          return {\n            top: y,\n            left: x,\n            bottom: y,\n            right: x,\n            width: 0,\n            height: 0,\n            x,\n            y,\n            toJSON() {},\n          }\n        },\n      }}\n      onClose={onClose}\n      open={Boolean(anchorEl)}\n      menuItems={[\n        {\n          label: 'Center on feature',\n          onClick: () => {\n            const { f } = feature\n            const start = f.get('start')\n            const end = f.get('end')\n            const refName = f.get('refName')\n            const mate = f.get('mate')\n            view.views[0]!.navToLocString(`${refName}:${start}-${end}`).catch(\n              (e: unknown) => {\n                console.error(e)\n                getSession(model).notifyError(`${e}`, e)\n              },\n            )\n            view.views[1]!.navToLocString(\n              `${mate.refName}:${mate.start}-${mate.end}`,\n            ).catch((e: unknown) => {\n              console.error(e)\n              getSession(model).notifyError(`${e}`, e)\n            })\n          },\n        },\n      ]}\n    />\n  )\n}\n","import React, { useState, useCallback, useRef, lazy } from 'react'\nimport { observer } from 'mobx-react'\nimport { getContainingView } from '@jbrowse/core/util'\nimport { transaction } from 'mobx'\nimport { makeStyles } from 'tss-react/mui'\n\n// locals\nimport { LinearSyntenyDisplayModel } from '../model'\nimport { getId, MAX_COLOR_RANGE } from '../drawSynteny'\nimport { LinearSyntenyViewModel } from '../../LinearSyntenyView/model'\nimport SyntenyContextMenu from './SyntenyContextMenu'\nimport { ClickCoord, getTooltip, onSynClick, onSynContextClick } from './util'\n\nconst SyntenyTooltip = lazy(() => import('./SyntenyTooltip'))\n\ntype Timer = ReturnType<typeof setTimeout>\n\nconst useStyles = makeStyles()({\n  pix: {\n    imageRendering: 'pixelated',\n    pointerEvents: 'none',\n    visibility: 'hidden',\n    position: 'absolute',\n  },\n  rel: {\n    position: 'relative',\n  },\n  abs: {\n    position: 'absolute',\n  },\n  none: {\n    pointEvents: 'none',\n  },\n})\n\nconst LinearSyntenyRendering = observer(function ({\n  model,\n}: {\n  model: LinearSyntenyDisplayModel\n}) {\n  const { classes, cx } = useStyles()\n  const xOffset = useRef<number>(0)\n  const currScrollFrame = useRef<number>()\n  const view = getContainingView(model) as LinearSyntenyViewModel\n  const height = view.middleComparativeHeight\n  const width = view.width\n  const delta = useRef(0)\n  const timeout = useRef<Timer>()\n  const [anchorEl, setAnchorEl] = useState<ClickCoord>()\n  const [tooltip, setTooltip] = useState('')\n  const [currX, setCurrX] = useState<number>()\n  const [mouseCurrDownX, setMouseCurrDownX] = useState<number>()\n  const [mouseInitialDownX, setMouseInitialDownX] = useState<number>()\n  const [currY, setCurrY] = useState<number>()\n  const { mouseoverId } = model\n\n  // these useCallbacks avoid new refs from being created on any mouseover,\n  // etc.\n  // biome-ignore lint/correctness/useExhaustiveDependencies:\n  const k1 = useCallback(\n    (ref: HTMLCanvasElement | null) => {\n      model.setMouseoverCanvasRef(ref)\n    },\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    [model, height, width],\n  )\n  // biome-ignore lint/correctness/useExhaustiveDependencies:\n  const k2 = useCallback(\n    (ref: HTMLCanvasElement | null) => {\n      model.setMainCanvasRef(ref)\n      function onWheel(event: WheelEvent) {\n        event.preventDefault()\n        if (event.ctrlKey) {\n          delta.current += event.deltaY / 500\n          for (const v of view.views) {\n            v.setScaleFactor(\n              delta.current < 0 ? 1 - delta.current : 1 / (1 + delta.current),\n            )\n          }\n          if (timeout.current) {\n            clearTimeout(timeout.current)\n          }\n          timeout.current = setTimeout(() => {\n            for (const v of view.views) {\n              v.setScaleFactor(1)\n              v.zoomTo(\n                delta.current > 0\n                  ? v.bpPerPx * (1 + delta.current)\n                  : v.bpPerPx / (1 - delta.current),\n                event.clientX - (ref?.getBoundingClientRect().left || 0),\n              )\n            }\n            delta.current = 0\n          }, 300)\n        } else {\n          if (Math.abs(event.deltaY) < Math.abs(event.deltaX)) {\n            xOffset.current += event.deltaX / 2\n          }\n          if (currScrollFrame.current === undefined) {\n            currScrollFrame.current = requestAnimationFrame(() => {\n              transaction(() => {\n                for (const v of view.views) {\n                  v.horizontalScroll(xOffset.current)\n                }\n                xOffset.current = 0\n                currScrollFrame.current = undefined\n              })\n            })\n          }\n        }\n      }\n      ref?.addEventListener('wheel', onWheel)\n\n      // this is a react 19-ism to have a cleanup in the ref callback\n      // https://react.dev/blog/2024/04/25/react-19#cleanup-functions-for-refs\n      // note: it warns in earlier versions of react\n      return () => {\n        ref?.removeEventListener('wheel', onWheel)\n      }\n    },\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    [model, height, width],\n  )\n  // biome-ignore lint/correctness/useExhaustiveDependencies:\n  const k3 = useCallback(\n    (ref: HTMLCanvasElement | null) => {\n      model.setClickMapCanvasRef(ref)\n    },\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    [model, height, width],\n  )\n  // biome-ignore lint/correctness/useExhaustiveDependencies:\n  const k4 = useCallback(\n    (ref: HTMLCanvasElement | null) => {\n      model.setCigarClickMapCanvasRef(ref)\n    },\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    [model, height, width],\n  )\n\n  return (\n    <div className={classes.rel}>\n      <canvas\n        ref={k1}\n        width={width}\n        height={height}\n        className={cx(classes.abs, classes.none)}\n      />\n      <canvas\n        ref={k2}\n        onMouseMove={event => {\n          if (mouseCurrDownX !== undefined) {\n            xOffset.current += mouseCurrDownX - event.clientX\n            setMouseCurrDownX(event.clientX)\n            if (currScrollFrame.current === undefined) {\n              currScrollFrame.current = requestAnimationFrame(() => {\n                transaction(() => {\n                  for (const v of view.views) {\n                    v.horizontalScroll(xOffset.current)\n                  }\n                  xOffset.current = 0\n                  currScrollFrame.current = undefined\n                })\n              })\n            }\n          } else {\n            const ref1 = model.clickMapCanvas\n            const ref2 = model.cigarClickMapCanvas\n            if (!ref1 || !ref2) {\n              return\n            }\n            const rect = ref1.getBoundingClientRect()\n            const ctx1 = ref1.getContext('2d')\n            const ctx2 = ref2.getContext('2d')\n            if (!ctx1 || !ctx2) {\n              return\n            }\n            const { clientX, clientY } = event\n            const x = clientX - rect.left\n            const y = clientY - rect.top\n            setCurrX(clientX)\n            setCurrY(clientY)\n            const [r1, g1, b1] = ctx1.getImageData(x, y, 1, 1).data\n            const [r2, g2, b2] = ctx2.getImageData(x, y, 1, 1).data\n            const unitMultiplier = Math.floor(MAX_COLOR_RANGE / model.numFeats)\n            const id = getId(r1!, g1!, b1!, unitMultiplier)\n            model.setMouseoverId(model.featPositions[id]?.f.id())\n            if (id === -1) {\n              setTooltip('')\n            } else if (model.featPositions[id]) {\n              const { f, cigar } = model.featPositions[id]\n              const unitMultiplier2 = Math.floor(MAX_COLOR_RANGE / cigar.length)\n              const cigarIdx = getId(r2!, g2!, b2!, unitMultiplier2)\n              setTooltip(getTooltip(f, cigar[cigarIdx], cigar[cigarIdx + 1]))\n            }\n          }\n        }}\n        onMouseLeave={() => {\n          model.setMouseoverId(undefined)\n          setMouseInitialDownX(undefined)\n          setMouseCurrDownX(undefined)\n        }}\n        onMouseDown={evt => {\n          setMouseCurrDownX(evt.clientX)\n          setMouseInitialDownX(evt.clientX)\n        }}\n        onMouseUp={evt => {\n          setMouseCurrDownX(undefined)\n          if (\n            mouseInitialDownX !== undefined &&\n            Math.abs(evt.clientX - mouseInitialDownX) < 5\n          ) {\n            onSynClick(evt, model)\n          }\n        }}\n        onContextMenu={evt => {\n          onSynContextClick(evt, model, setAnchorEl)\n        }}\n        data-testid=\"synteny_canvas\"\n        className={classes.abs}\n        width={width}\n        height={height}\n      />\n      <canvas ref={k3} className={classes.pix} width={width} height={height} />\n      <canvas ref={k4} className={classes.pix} width={width} height={height} />\n      {mouseoverId && tooltip && currX && currY ? (\n        <SyntenyTooltip title={tooltip} />\n      ) : null}\n      {anchorEl ? (\n        <SyntenyContextMenu\n          model={model}\n          anchorEl={anchorEl}\n          onClose={() => {\n            setAnchorEl(undefined)\n          }}\n        />\n      ) : null}\n    </div>\n  )\n})\n\nexport default LinearSyntenyRendering\n","import React, { useEffect, useState } from 'react'\nimport { makeStyles } from 'tss-react/mui'\nimport { observer } from 'mobx-react'\nimport { LoadingEllipses } from '@jbrowse/core/ui'\n\n// locals\nimport LinearSyntenyRendering from './LinearSyntenyRendering'\nimport { LinearSyntenyDisplayModel } from '../model'\n\nconst useStyles = makeStyles()(theme => {\n  const bg = theme.palette.action.disabledBackground\n  return {\n    loading: {\n      paddingLeft: '0.6em',\n      backgroundColor: theme.palette.background.default,\n      backgroundImage: `repeating-linear-gradient(45deg, transparent, transparent 5px, ${bg} 5px, ${bg} 10px)`,\n      textAlign: 'center',\n    },\n    blockMessage: {\n      background: '#f1f1f1',\n      padding: 10,\n    },\n    blockError: {\n      background: '#f1f1f1',\n      padding: 10,\n      color: 'red',\n    },\n  }\n})\n\nfunction LoadingMessage() {\n  // only show the loading message after 300ms to prevent excessive flickering\n  const [shown, setShown] = useState(false)\n  const { classes } = useStyles()\n  useEffect(() => {\n    const timeout = setTimeout(() => {\n      setShown(true)\n    }, 300)\n    return () => {\n      clearTimeout(timeout)\n    }\n  })\n\n  return shown ? (\n    <div className={classes.loading}>\n      <LoadingEllipses />\n    </div>\n  ) : null\n}\n\nfunction BlockMessage({ messageText }: { messageText: string }) {\n  const { classes } = useStyles()\n  return <div className={classes.blockMessage}>{messageText}</div>\n}\n\nfunction BlockError({ error }: { error: unknown }) {\n  const { classes } = useStyles()\n  return <div className={classes.blockError}>{`${error}`}</div>\n}\n\nconst ServerSideRenderedBlockContent = observer(function ({\n  model,\n}: {\n  model: LinearSyntenyDisplayModel\n}) {\n  if (model.error) {\n    return <BlockError error={model.error} />\n  }\n  if (model.message) {\n    return <BlockMessage messageText={model.message} />\n  }\n  if (!model.features) {\n    return <LoadingMessage />\n  }\n\n  return <LinearSyntenyRendering model={model} />\n})\n\nexport default ServerSideRenderedBlockContent\n","import React from 'react'\nimport {\n  assembleLocString,\n  doesIntersect2,\n  getSession,\n  isSessionModelWithWidgets,\n  Feature,\n  getContainingTrack,\n  getContainingView,\n} from '@jbrowse/core/util'\n\n// locals\nimport { getId, MAX_COLOR_RANGE } from '../drawSynteny'\nimport { LinearSyntenyDisplayModel } from '../model'\n\ninterface Pos {\n  offsetPx: number\n}\n\nexport interface ClickCoord {\n  clientX: number\n  clientY: number\n  feature: { f: Feature }\n}\n\ninterface FeatPos {\n  p11: Pos\n  p12: Pos\n  p21: Pos\n  p22: Pos\n  f: Feature\n  cigar: string[]\n}\n\nexport function drawMatchSimple({\n  feature,\n  ctx,\n  offsets,\n  cb,\n  height,\n  drawCurves,\n  oobLimit,\n  viewWidth,\n  hideTiny,\n}: {\n  feature: FeatPos\n  ctx: CanvasRenderingContext2D\n  offsets: number[]\n  oobLimit: number\n  viewWidth: number\n  cb: (ctx: CanvasRenderingContext2D) => void\n  height: number\n  drawCurves?: boolean\n  hideTiny?: boolean\n}) {\n  const { p11, p12, p21, p22 } = feature\n\n  const x11 = p11.offsetPx - offsets[0]!\n  const x12 = p12.offsetPx - offsets[0]!\n  const x21 = p21.offsetPx - offsets[1]!\n  const x22 = p22.offsetPx - offsets[1]!\n\n  const l1 = Math.abs(x12 - x11)\n  const l2 = Math.abs(x22 - x21)\n  const y1 = 0\n  const y2 = height\n  const mid = (y2 - y1) / 2\n  const minX = Math.min(x21, x22)\n  const maxX = Math.max(x21, x22)\n\n  if (!doesIntersect2(minX, maxX, -oobLimit, viewWidth + oobLimit)) {\n    return\n  }\n\n  // drawing a line if the results are thin: drawing a line results in much\n  // less pixellation than filling in a thin polygon\n  if (l1 <= 1 && l2 <= 1) {\n    // hideTiny can be used to avoid drawing mouseover for thin lines in this\n    // case\n    if (!hideTiny) {\n      ctx.beginPath()\n      ctx.moveTo(x11, y1)\n      if (drawCurves) {\n        ctx.bezierCurveTo(x11, mid, x21, mid, x21, y2)\n      } else {\n        ctx.lineTo(x21, y2)\n      }\n      ctx.stroke()\n    }\n  } else {\n    draw(ctx, x11, x12, y1, x22, x21, y2, mid, drawCurves)\n    cb(ctx)\n  }\n}\n\nexport function draw(\n  ctx: CanvasRenderingContext2D,\n  x1: number,\n  x2: number,\n  y1: number,\n  x3: number,\n  x4: number,\n  y2: number,\n  mid: number,\n  drawCurves?: boolean,\n) {\n  if (drawCurves) {\n    drawBezierBox(ctx, x1, x2, y1, x3, x4, y2, mid)\n  } else {\n    drawBox(ctx, x1, x2, y1, x3, x4, y2)\n  }\n}\n\nexport function drawBox(\n  ctx: CanvasRenderingContext2D,\n  x1: number,\n  x2: number,\n  y1: number,\n  x3: number,\n  x4: number,\n  y2: number,\n) {\n  ctx.beginPath()\n  ctx.moveTo(x1, y1)\n  ctx.lineTo(x2, y1)\n  ctx.lineTo(x3, y2)\n  ctx.lineTo(x4, y2)\n  ctx.closePath()\n  ctx.fill()\n}\n\nexport function drawBezierBox(\n  ctx: CanvasRenderingContext2D,\n  x1: number,\n  x2: number,\n  y1: number,\n  x3: number,\n  x4: number,\n  y2: number,\n  mid: number,\n) {\n  const len1 = Math.abs(x1 - x2)\n  const len2 = Math.abs(x1 - x2)\n\n  // heuristic to not draw hourglass inversions with bezier curves when they\n  // are thin and far apart because it results in areas that are not drawn well\n  // demo https://codesandbox.io/s/fast-glitter-q3b1or?file=/src/index.js\n  if (len1 < 5 && len2 < 5 && x2 < x1 && Math.abs(x1 - x3) > 100) {\n    const tmp = x1\n    x1 = x2\n    x2 = tmp\n  }\n  ctx.beginPath()\n  ctx.moveTo(x1, y1)\n  ctx.lineTo(x2, y1)\n  ctx.bezierCurveTo(x2, mid, x3, mid, x3, y2)\n  ctx.lineTo(x4, y2)\n  ctx.bezierCurveTo(x4, mid, x1, mid, x1, y1)\n  ctx.closePath()\n  ctx.fill()\n}\n\nexport function onSynClick(\n  event: React.MouseEvent,\n  model: LinearSyntenyDisplayModel,\n) {\n  const view = getContainingView(model)\n  const track = getContainingTrack(model)\n  const ref1 = model.clickMapCanvas\n  const ref2 = model.cigarClickMapCanvas\n  if (!ref1 || !ref2) {\n    return\n  }\n  const rect = ref1.getBoundingClientRect()\n  const ctx1 = ref1.getContext('2d')\n  const ctx2 = ref2.getContext('2d')\n  if (!ctx1 || !ctx2) {\n    return\n  }\n  const x = event.clientX - rect.left\n  const y = event.clientY - rect.top\n  const [r1, g1, b1] = ctx1.getImageData(x, y, 1, 1).data\n  const unitMultiplier = Math.floor(MAX_COLOR_RANGE / model.numFeats)\n  const id = getId(r1!, g1!, b1!, unitMultiplier)\n  const feat = model.featPositions[id]\n  if (feat) {\n    const { f } = feat\n    model.setClickId(f.id())\n    const session = getSession(model)\n    if (isSessionModelWithWidgets(session)) {\n      session.showWidget(\n        session.addWidget('BaseFeatureWidget', 'baseFeature', {\n          view,\n          track,\n          featureData: f.toJSON(),\n        }),\n      )\n    }\n  }\n  return feat\n}\n\nexport function onSynContextClick(\n  event: React.MouseEvent,\n  model: LinearSyntenyDisplayModel,\n  setAnchorEl: (arg: ClickCoord) => void,\n) {\n  event.preventDefault()\n  const ref1 = model.clickMapCanvas\n  const ref2 = model.cigarClickMapCanvas\n  if (!ref1 || !ref2) {\n    return\n  }\n  const rect = ref1.getBoundingClientRect()\n  const ctx1 = ref1.getContext('2d')\n  const ctx2 = ref2.getContext('2d')\n  if (!ctx1 || !ctx2) {\n    return\n  }\n  const { clientX, clientY } = event\n  const x = clientX - rect.left\n  const y = clientY - rect.top\n  const [r1, g1, b1] = ctx1.getImageData(x, y, 1, 1).data\n  const unitMultiplier = Math.floor(MAX_COLOR_RANGE / model.numFeats)\n  const id = getId(r1!, g1!, b1!, unitMultiplier)\n  const f = model.featPositions[id]\n  if (f) {\n    model.setClickId(f.f.id())\n    setAnchorEl({ clientX, clientY, feature: f })\n  }\n}\n\nexport function getTooltip(f: Feature, cigarOp?: string, cigarOpLen?: string) {\n  // @ts-expect-error\n  const f1 = f.toJSON() as {\n    refName: string\n    start: number\n    end: number\n    strand?: number\n    assemblyName: string\n    identity?: number\n    name?: string\n    mate: {\n      start: number\n      end: number\n      refName: string\n      name: string\n    }\n  }\n  const f2 = f1.mate\n  const l1 = f1.end - f1.start\n  const l2 = f2.end - f2.start\n  const identity = f1.identity\n  const n1 = f1.name\n  const n2 = f2.name\n  return [\n    `Loc1: ${assembleLocString(f1)}`,\n    `Loc2: ${assembleLocString(f2)}`,\n    `Inverted: ${f1.strand === -1}`,\n    `Query len: ${l1.toLocaleString('en-US')}`,\n    `Target len: ${l2.toLocaleString('en-US')}`,\n    identity ? `Identity: ${identity.toPrecision(2)}` : '',\n    cigarOp ? `CIGAR operator: ${cigarOp}${cigarOpLen}` : '',\n    n1 ? `Name 1: ${n1}` : '',\n    n2 ? `Name 1: ${n2}` : '',\n  ]\n    .filter(f => !!f)\n    .join('<br/>')\n}\n","import { doesIntersect2, getContainingView } from '@jbrowse/core/util'\n// locals\nimport { LinearSyntenyViewModel } from '../LinearSyntenyView/model'\nimport { LinearSyntenyDisplayModel } from './model'\nimport { draw, drawMatchSimple } from './components/util'\n\nexport const MAX_COLOR_RANGE = 255 * 255 * 255 // max color range\n\nfunction makeColor(idx: number) {\n  const r = Math.floor(idx / (255 * 255)) % 255\n  const g = Math.floor(idx / 255) % 255\n  const b = idx % 255\n  return `rgb(${r},${g},${b})`\n}\n\nconst colorMap = {\n  I: '#ff03',\n  N: '#0a03',\n  D: '#00f3',\n  X: 'brown',\n  M: '#f003',\n  '=': '#f003',\n}\n\nconst lineLimit = 3\n\nconst oobLimit = 1600\n\nexport function getId(r: number, g: number, b: number, unitMultiplier: number) {\n  return Math.floor((r * 255 * 255 + g * 255 + b - 1) / unitMultiplier)\n}\n\nexport function drawRef(\n  model: LinearSyntenyDisplayModel,\n  ctx1: CanvasRenderingContext2D,\n  ctx3?: CanvasRenderingContext2D,\n) {\n  const view = getContainingView(model) as LinearSyntenyViewModel\n  const drawCurves = view.drawCurves\n  const drawCIGAR = view.drawCIGAR\n  const height = view.middleComparativeHeight\n  const width = view.width\n  const bpPerPxs = view.views.map(v => v.bpPerPx)\n\n  if (ctx3) {\n    ctx3.imageSmoothingEnabled = false\n  }\n\n  ctx1.beginPath()\n  const featPos = model.featPositions\n  const offsets = view.views.map(v => v.offsetPx)\n\n  const unitMultiplier = Math.floor(MAX_COLOR_RANGE / featPos.length)\n\n  // this loop is optimized to draw many thin lines with a single ctx.stroke\n  // call, a separate loop below draws larger boxes\n  ctx1.fillStyle = colorMap.M\n  ctx1.strokeStyle = colorMap.M\n  for (const { p11, p12, p21, p22 } of featPos) {\n    const x11 = p11.offsetPx - offsets[0]!\n    const x12 = p12.offsetPx - offsets[0]!\n    const x21 = p21.offsetPx - offsets[1]!\n    const x22 = p22.offsetPx - offsets[1]!\n    const l1 = Math.abs(x12 - x11)\n    const l2 = Math.abs(x22 - x21)\n    const y1 = 0\n    const y2 = height\n    const mid = (y2 - y1) / 2\n\n    // drawing a line if the results are thin results in much less pixellation\n    // than filling in a thin polygon\n    if (\n      l1 <= lineLimit &&\n      l2 <= lineLimit &&\n      x21 < width + oobLimit &&\n      x21 > -oobLimit\n    ) {\n      ctx1.moveTo(x11, y1)\n      if (drawCurves) {\n        ctx1.bezierCurveTo(x11, mid, x21, mid, x21, y2)\n      } else {\n        ctx1.lineTo(x21, y2)\n      }\n    }\n  }\n  ctx1.stroke()\n\n  // this loop only draws small lines as a polyline, the polyline calls\n  // ctx.stroke once is much more efficient than calling stroke() many times\n  ctx1.fillStyle = colorMap.M\n  ctx1.strokeStyle = colorMap.M\n  for (const { p11, p12, p21, p22, f, cigar } of featPos) {\n    const x11 = p11.offsetPx - offsets[0]!\n    const x12 = p12.offsetPx - offsets[0]!\n    const x21 = p21.offsetPx - offsets[1]!\n    const x22 = p22.offsetPx - offsets[1]!\n    const l1 = Math.abs(x12 - x11)\n    const l2 = Math.abs(x22 - x21)\n    const minX = Math.min(x21, x22)\n    const maxX = Math.max(x21, x22)\n    const y1 = 0\n    const y2 = height\n    const mid = (y2 - y1) / 2\n\n    if (\n      !(l1 <= lineLimit && l2 <= lineLimit) &&\n      doesIntersect2(minX, maxX, -oobLimit, view.width + oobLimit)\n    ) {\n      const s1 = f.get('strand')\n      const k1 = s1 === -1 ? x12 : x11\n      const k2 = s1 === -1 ? x11 : x12\n\n      // rev1/rev2 flip the direction of the CIGAR drawing in horizontally flipped\n      // modes. somewhat heuristically determined, but tested for\n      const rev1 = k1 < k2 ? 1 : -1\n      const rev2 = (x21 < x22 ? 1 : -1) * s1\n\n      // cx1/cx2 are the current x positions on top and bottom rows\n      let cx1 = k1\n      let cx2 = s1 === -1 ? x22 : x21\n      if (cigar.length && drawCIGAR) {\n        // continuingFlag skips drawing commands on very small CIGAR features\n        let continuingFlag = false\n\n        // px1/px2 are the previous x positions on the top and bottom rows\n        let px1 = 0\n        let px2 = 0\n        const unitMultiplier2 = Math.floor(MAX_COLOR_RANGE / cigar.length)\n        for (let j = 0; j < cigar.length; j += 2) {\n          const idx = j * unitMultiplier2 + 1\n\n          const len = +cigar[j]!\n          const op = cigar[j + 1] as keyof typeof colorMap\n\n          if (!continuingFlag) {\n            px1 = cx1\n            px2 = cx2\n          }\n\n          const d1 = len / bpPerPxs[0]!\n          const d2 = len / bpPerPxs[1]!\n\n          if (op === 'M' || op === '=' || op === 'X') {\n            cx1 += d1 * rev1\n            cx2 += d2 * rev2\n          } else if (op === 'D' || op === 'N') {\n            cx1 += d1 * rev1\n          }\n          // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n          else if (op === 'I') {\n            cx2 += d2 * rev2\n          }\n\n          // check that we are even drawing in view here, e.g. that all\n          // points are not all less than 0 or greater than width\n          if (\n            !(\n              Math.max(px1, px2, cx1, cx2) < 0 ||\n              Math.min(px1, px2, cx1, cx2) > width\n            )\n          ) {\n            // if it is a small feature and not the last element of the\n            // CIGAR (which could skip rendering it entire if we did turn\n            // it on), then turn on continuing flag\n            const isNotLast = j < cigar.length - 2\n            if (\n              Math.abs(cx1 - px1) <= 1 &&\n              Math.abs(cx2 - px2) <= 1 &&\n              isNotLast\n            ) {\n              continuingFlag = true\n            } else {\n              // allow rendering the dominant color when using continuing flag\n              // if the last element of continuing was a large feature, else\n              // just use match\n              ctx1.fillStyle =\n                colorMap[(continuingFlag && d1 > 1) || d2 > 1 ? op : 'M']\n              continuingFlag = false\n\n              draw(ctx1, px1, cx1, y1, cx2, px2, y2, mid, drawCurves)\n              if (ctx3) {\n                ctx3.fillStyle = makeColor(idx)\n                draw(ctx3, px1, cx1, y1, cx2, px2, y2, mid, drawCurves)\n              }\n            }\n          }\n        }\n      } else {\n        draw(ctx1, x11, x12, y1, x22, x21, y2, mid, drawCurves)\n      }\n    }\n  }\n\n  // draw click map\n  const ctx2 = model.clickMapCanvas?.getContext('2d')\n  if (!ctx2) {\n    return\n  }\n  ctx2.imageSmoothingEnabled = false\n  ctx2.clearRect(0, 0, width, height)\n  for (let i = 0; i < featPos.length; i++) {\n    const feature = featPos[i]!\n    const idx = i * unitMultiplier + 1\n    ctx2.fillStyle = makeColor(idx)\n\n    // too many click map false positives with colored stroked lines\n    drawMatchSimple({\n      cb: ctx => {\n        ctx.fill()\n      },\n      feature,\n      ctx: ctx2,\n      drawCurves,\n      offsets,\n      oobLimit,\n      viewWidth: view.width,\n      hideTiny: true,\n      height,\n    })\n  }\n  return undefined\n}\n\nexport function drawMouseoverSynteny(model: LinearSyntenyDisplayModel) {\n  const { clickId, mouseoverId } = model\n  const highResolutionScaling = 1\n  const view = getContainingView(model) as LinearSyntenyViewModel\n  const drawCurves = view.drawCurves\n  const height = view.middleComparativeHeight\n  const width = view.width\n  const ctx = model.mouseoverCanvas?.getContext('2d')\n  const offsets = view.views.map(v => v.offsetPx)\n\n  if (!ctx) {\n    return\n  }\n  ctx.resetTransform()\n  ctx.scale(highResolutionScaling, highResolutionScaling)\n  ctx.clearRect(0, 0, width, height)\n  const feature1 = model.featMap[mouseoverId || '']\n  if (feature1) {\n    ctx.fillStyle = 'rgb(0,0,0,0.1)'\n    drawMatchSimple({\n      cb: ctx => {\n        ctx.fill()\n      },\n      feature: feature1,\n      ctx,\n      oobLimit,\n      viewWidth: view.width,\n      drawCurves,\n      offsets,\n      height,\n    })\n  }\n  const feature2 = model.featMap[clickId || '']\n  if (feature2) {\n    ctx.strokeStyle = 'rgb(0, 0, 0, 0.9)'\n\n    drawMatchSimple({\n      cb: ctx => {\n        ctx.stroke()\n      },\n      feature: feature2,\n      ctx,\n      oobLimit,\n      viewWidth: view.width,\n      drawCurves,\n      offsets,\n      height,\n    })\n  }\n}\n"],"names":["SyntenyContextMenu","model","onClose","anchorEl","view","getContainingView","clientX","clientY","feature","React","Menu","onMenuItemClick","event","callback","nodeType","getBoundingClientRect","top","left","bottom","right","width","height","x","y","toJSON","open","Boolean","menuItems","label","onClick","f","start","get","end","refName","mate","views","navToLocString","catch","e","console","error","getSession","notifyError","SyntenyTooltip","lazy","useStyles","makeStyles","pix","imageRendering","pointerEvents","visibility","position","rel","abs","none","pointEvents","observer","classes","cx","xOffset","useRef","currScrollFrame","middleComparativeHeight","delta","timeout","setAnchorEl","useState","tooltip","setTooltip","currX","setCurrX","mouseCurrDownX","setMouseCurrDownX","mouseInitialDownX","setMouseInitialDownX","currY","setCurrY","mouseoverId","k1","useCallback","ref","setMouseoverCanvasRef","k2","onWheel","preventDefault","ctrlKey","current","deltaY","v","setScaleFactor","clearTimeout","setTimeout","zoomTo","bpPerPx","Math","deltaX","undefined","requestAnimationFrame","transaction","horizontalScroll","setMainCanvasRef","addEventListener","removeEventListener","k3","setClickMapCanvasRef","k4","setCigarClickMapCanvasRef","className","onMouseMove","ref1","clickMapCanvas","ref2","cigarClickMapCanvas","rect","ctx1","getContext","ctx2","r1","g1","b1","getImageData","data","r2","g2","b2","unitMultiplier","floor","MAX_COLOR_RANGE","numFeats","id","getId","setMouseoverId","featPositions","cigar","unitMultiplier2","length","cigarIdx","getTooltip","onMouseLeave","onMouseDown","evt","onMouseUp","onSynClick","onContextMenu","onSynContextClick","title","theme","bg","palette","action","disabledBackground","loading","paddingLeft","backgroundColor","background","default","backgroundImage","textAlign","blockMessage","padding","blockError","color","LoadingMessage","shown","setShown","useEffect","LoadingEllipses","BlockMessage","messageText","BlockError","message","features","LinearSyntenyRendering","drawMatchSimple","ctx","offsets","cb","drawCurves","oobLimit","viewWidth","hideTiny","p11","p12","p21","p22","x11","offsetPx","x12","x21","x22","l1","l2","y2","mid","minX","min","maxX","max","doesIntersect2","beginPath","moveTo","bezierCurveTo","lineTo","stroke","draw","x1","x2","y1","x3","x4","len1","len2","tmp","closePath","fill","drawBezierBox","drawBox","track","getContainingTrack","feat","setClickId","session","isSessionModelWithWidgets","showWidget","addWidget","featureData","cigarOp","cigarOpLen","f1","f2","identity","n1","name","n2","assembleLocString","strand","toLocaleString","toPrecision","filter","join","makeColor","idx","colorMap","I","N","D","X","M","lineLimit","r","g","b","drawRef","ctx3","drawCIGAR","bpPerPxs","map","imageSmoothingEnabled","featPos","fillStyle","strokeStyle","s1","rev1","rev2","cx1","cx2","continuingFlag","px1","px2","j","len","op","d1","d2","isNotLast","clearRect","i","drawMouseoverSynteny","clickId","mouseoverCanvas","resetTransform","scale","feature1","featMap","feature2"],"sourceRoot":""}
\ No newline at end of file