comparison x/static/js/3416.f7c72cbe.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
comparison
equal deleted inserted replaced
124:137e08517410 125:49f3d3878413
1 {"version":3,"file":"static/js/3416.f7c72cbe.chunk.js","mappings":"sSAsBA,MAAM,YAAEA,EAAW,QAAEC,EAAO,UAAEC,EAAS,sBAAEC,EAAqB,OAAEC,GAC9DC,EAAAA,GAoBIC,GAAYC,EAAAA,EAAAA,KAAAA,CAAa,CAC7BC,KAAM,CACJC,MAAO,OAII,SAASC,GAAgB,MACtCC,EACAC,QAASC,EAAU,YACnBC,IAOA,MAAM,QAAEC,GAAYT,KAIbU,EAAgBC,IAAiBC,EAAAA,EAAAA,UAAS,MAC1CC,EAAOC,IAAYF,EAAAA,EAAAA,aACnBG,EAAgBC,IAAqBJ,EAAAA,EAAAA,YACtCK,GAAcP,EAmPpB,OA/OAQ,EAAAA,EAAAA,YAAU,KAEP,WACCJ,OAASK,GACT,IACE,GAA8B,KAA1BZ,EAAWa,IAAI,SAAiB,CAClC,MACMC,GADavB,EAAOS,EAAY,OAAS,IACzBe,MAAM,KAAK,IAC1BC,EAAOC,GAAWH,EAAWC,MAAM,MACpC,WAAEG,IAAeC,EAAAA,EAAAA,YAAWrB,GAC5BsB,GAAgBC,EAAAA,EAAAA,SAAQvB,EAAO,WAC/BwB,GAAYC,EAAAA,EAAAA,iBAAgBzB,GAc5B0B,SAZeN,EAAWO,KAAKH,EAAW,kBAAmB,CACjEF,gBACAE,YACAI,QAAS,CACP,CACEC,QAASX,EACTY,OAAQX,EAAW,EACnBY,KAAMZ,OAKSa,MACnBC,KACEA,EAAElB,IAAI,UAAYb,EAAWa,IAAI,SACd,KAAjBkB,EAAElB,IAAI,UACW,IAAjBkB,EAAElB,IAAI,YAEZ,IAAIW,EAGF,MA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YT,gBAAkBY,EAAcE,QAAQ,GACpDH,EAAU,iBAAmBlE,KAAKsE,MAAM9H,GACxCwH,EAAYR,iBAAmB,KAAK,IAAMhH,GAAS,IAAM2H,GAAeE,QAAQ,OAChFJ,EAAUM,UAAY,gBACxB,CACA,OAAoB,SAAK1C,EAAsB,CAC7CxF,WAAW,OAAKzC,EAAQP,KAAMgD,GAC9BC,MAAO,CACLhD,MAAOqK,EACPrC,OAAQqC,KACLM,KACA3H,GAEL4F,WAAYA,EACZwB,IAAKA,EACLc,KAAM,iBACHN,KACAL,EACHY,UAAuB,SAAKzB,EAAqB,CAC/C3G,UAAWzC,EAAQqJ,IACnBf,WAAYA,EACZwC,QAAS,cACTD,UAAuB,SAAKvB,EAAwB,CAClD7G,UAAWzC,EAAQuJ,OACnB7G,MAAO0H,EACP9B,WAAYA,EACZyC,GArMK,GAsMLC,GAtMK,GAuMLC,GAvMK,GAuMMjB,GAAa,EACxBkB,KAAM,OACNC,YAAanB,OAIrB,G,qECzNO,SAASoB,EAAgClD,GAC9C,OAAO,QAAqB,sBAAuBA,EACrD,CACA,MACA,GADgC,OAAuB,sBAAuB,CAAC,OAAQ,cAAe,gBAAiB,eAAgB,iBAAkB,MAAO,SAAU,oBAAqB,sBAAuB,uB","sources":["../../../plugins/linear-comparative-view/src/LinearReadVsRef/LinearReadVsRef.tsx","../../../node_modules/@mui/material/CircularProgress/CircularProgress.js","../../../node_modules/@mui/material/CircularProgress/circularProgressClasses.js"],"sourcesContent":["import React, { useEffect, useState } from 'react'\nimport {\n Button,\n CircularProgress,\n DialogActions,\n DialogContent,\n TextField,\n Typography,\n} from '@mui/material'\nimport { Dialog } from '@jbrowse/core/ui'\nimport { makeStyles } from 'tss-react/mui'\nimport { getConf } from '@jbrowse/core/configuration'\nimport { getRpcSessionId } from '@jbrowse/core/util/tracks'\nimport {\n getSession,\n getContainingView,\n gatherOverlaps,\n Feature,\n} from '@jbrowse/core/util'\n\n// locals\nimport { MismatchParser } from '@jbrowse/plugin-alignments'\nconst { featurizeSA, getClip, getLength, getLengthSansClipping, getTag } =\n MismatchParser\n\ninterface ReducedFeature {\n refName: string\n start: number\n clipPos: number\n end: number\n strand: number\n seqLength: number\n syntenyId?: number\n uniqueId: string\n mate: {\n refName: string\n start: number\n end: number\n syntenyId?: number\n uniqueId?: string\n }\n}\n\nconst useStyles = makeStyles()({\n root: {\n width: 300,\n },\n})\n\nexport default function ReadVsRefDialog({\n track,\n feature: preFeature,\n handleClose,\n}: {\n feature: Feature\n handleClose: () => void\n\n track: any\n}) {\n const { classes } = useStyles()\n\n // window size stored as string, because it corresponds to a textfield which\n // is parsed as number on submit\n const [windowSizeText, setWindowSize] = useState('0')\n const [error, setError] = useState<unknown>()\n const [primaryFeature, setPrimaryFeature] = useState<Feature>()\n const windowSize = +windowSizeText\n\n // we need to fetch the primary alignment if the selected feature is 2048.\n // this should be the first in the list of the SA tag\n useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ;(async () => {\n setError(undefined)\n try {\n if (preFeature.get('flags') & 2048) {\n const SA: string = getTag(preFeature, 'SA') || ''\n const primaryAln = SA.split(';')[0]!\n const [saRef, saStart] = primaryAln.split(',')\n const { rpcManager } = getSession(track)\n const adapterConfig = getConf(track, 'adapter')\n const sessionId = getRpcSessionId(track)\n\n const feats = (await rpcManager.call(sessionId, 'CoreGetFeatures', {\n adapterConfig,\n sessionId,\n regions: [\n {\n refName: saRef,\n start: +saStart! - 1,\n end: +saStart!,\n },\n ],\n })) as Feature[]\n\n const result = feats.find(\n f =>\n f.get('name') === preFeature.get('name') &&\n !(f.get('flags') & 2048) &&\n !(f.get('flags') & 256),\n )\n if (result) {\n setPrimaryFeature(result)\n } else {\n throw new Error('primary feature not found')\n }\n } else {\n setPrimaryFeature(preFeature)\n }\n } catch (e) {\n console.error(e)\n setError(e)\n }\n })()\n }, [preFeature, track])\n\n function onSubmit() {\n try {\n if (!primaryFeature) {\n return\n }\n const feature = primaryFeature\n const session = getSession(track)\n const view = getContainingView(track)\n const cigar = feature.get('CIGAR') as string\n const flags = feature.get('flags') as number\n const origStrand = feature.get('strand') as number\n const SA = (getTag(feature, 'SA') as string) || ''\n const readName = feature.get('name') as string\n const clipPos = getClip(cigar, 1)\n\n const readAssembly = `${readName}_assembly_${Date.now()}`\n const [trackAssembly] = getConf(track, 'assemblyNames')\n const assemblyNames = [trackAssembly, readAssembly]\n const trackId = `track-${Date.now()}`\n const trackName = `${readName}_vs_${trackAssembly}`\n\n // get the canonical refname for the read because if the\n // read.get('refName') is chr1 and the actual fasta refName is 1 then no\n // tracks can be opened on the top panel of the linear read vs ref\n const { assemblyManager } = session\n const assembly = assemblyManager.get(trackAssembly)\n if (!assembly) {\n throw new Error('assembly not found')\n }\n\n const suppAlns = featurizeSA(SA, feature.id(), origStrand, readName, true)\n\n const feat = feature.toJSON()\n feat.clipPos = clipPos\n feat.strand = 1\n\n feat.mate = {\n refName: readName,\n start: clipPos,\n end: clipPos + getLengthSansClipping(cigar),\n }\n\n // if secondary alignment or supplementary, calculate length from SA[0]'s\n // CIGAR which is the primary alignments. otherwise it is the primary\n // alignment just use seq.length if primary alignment\n const totalLength =\n flags & 2048 ? getLength(suppAlns[0]!.CIGAR) : getLength(cigar)\n\n const features = [feat, ...suppAlns] as ReducedFeature[]\n\n features.forEach((f, idx) => {\n f.refName = assembly.getCanonicalRefName(f.refName) || f.refName\n f.syntenyId = idx\n f.mate.syntenyId = idx\n f.mate.uniqueId = `${f.uniqueId}_mate`\n })\n features.sort((a, b) => a.clipPos - b.clipPos)\n\n const featSeq = feature.get('seq') as string | undefined\n\n // the config feature store includes synthetic mate features\n // mapped to the read assembly\n const configFeatureStore = [...features, ...features.map(f => f.mate)]\n const expand = 2 * windowSize\n const refLen = features.reduce((a, f) => a + f.end - f.start + expand, 0)\n\n const seqTrackId = `${readName}_${Date.now()}`\n const sequenceTrackConf = getConf(assembly, 'sequence')\n const lgvRegions = gatherOverlaps(\n features.map(f => ({\n ...f,\n start: Math.max(0, f.start - windowSize),\n end: f.end + windowSize,\n assemblyName: trackAssembly,\n })),\n )\n\n session.addTemporaryAssembly?.({\n name: readAssembly,\n sequence: {\n type: 'ReferenceSequenceTrack',\n name: 'Read sequence',\n trackId: seqTrackId,\n assemblyNames: [readAssembly],\n adapter: {\n type: 'FromConfigSequenceAdapter',\n noAssemblyManager: true,\n features: [\n {\n start: 0,\n end: totalLength,\n seq: featSeq || '', // can be empty if user clicks secondary read\n refName: readName,\n uniqueId: `${Math.random()}`,\n },\n ],\n },\n },\n })\n\n session.addView('LinearSyntenyView', {\n type: 'LinearSyntenyView',\n views: [\n {\n type: 'LinearGenomeView',\n hideHeader: true,\n offsetPx: 0,\n bpPerPx: refLen / view.width,\n displayedRegions: lgvRegions,\n tracks: [\n {\n id: `${Math.random()}`,\n type: 'ReferenceSequenceTrack',\n assemblyNames: [trackAssembly],\n configuration: sequenceTrackConf.trackId,\n displays: [\n {\n id: `${Math.random()}`,\n type: 'LinearReferenceSequenceDisplay',\n showReverse: true,\n showTranslation: false,\n height: 35,\n configuration: `${seqTrackId}-LinearReferenceSequenceDisplay`,\n },\n ],\n },\n ],\n },\n {\n type: 'LinearGenomeView',\n hideHeader: true,\n offsetPx: 0,\n bpPerPx: totalLength / view.width,\n displayedRegions: [\n {\n assemblyName: readAssembly,\n start: 0,\n end: totalLength,\n refName: readName,\n },\n ],\n tracks: [\n {\n id: `${Math.random()}`,\n type: 'ReferenceSequenceTrack',\n configuration: seqTrackId,\n displays: [\n {\n id: `${Math.random()}`,\n type: 'LinearReferenceSequenceDisplay',\n showReverse: true,\n showTranslation: false,\n height: 35,\n configuration: `${seqTrackId}-LinearReferenceSequenceDisplay`,\n },\n ],\n },\n ],\n },\n ],\n viewTrackConfigs: [\n {\n type: 'SyntenyTrack',\n assemblyNames,\n adapter: {\n type: 'FromConfigAdapter',\n features: configFeatureStore,\n },\n trackId,\n name: trackName,\n },\n ],\n tracks: [\n {\n configuration: trackId,\n type: 'SyntenyTrack',\n displays: [\n {\n type: 'LinearSyntenyDisplay',\n configuration: `${trackId}-LinearSyntenyDisplay`,\n },\n ],\n },\n ],\n displayName: `${readName} vs ${trackAssembly}`,\n })\n handleClose()\n } catch (e) {\n console.error(e)\n setError(e)\n }\n }\n\n return (\n <Dialog open onClose={handleClose} title=\"Set window size\">\n <DialogContent>\n {error ? (\n <Typography color=\"error\">{`${error}`}</Typography>\n ) : !primaryFeature ? (\n <div>\n <Typography>\n To accurately perform comparison we are fetching the primary\n alignment. Loading primary feature...\n </Typography>\n <CircularProgress />\n </div>\n ) : (\n <div className={classes.root}>\n {primaryFeature.get('flags') & 256 ? (\n <Typography style={{ color: 'orange' }}>\n Note: You selected a secondary alignment (which generally does\n not have SA tags or SEQ fields) so do a full reconstruction of\n the alignment\n </Typography>\n ) : null}\n <Typography>\n Show an extra window size around each part of the split alignment.\n Using a larger value can allow you to see more genomic context.\n </Typography>\n\n <TextField\n value={windowSize}\n onChange={event => {\n setWindowSize(event.target.value)\n }}\n label=\"Set window size\"\n />\n </div>\n )}\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" color=\"secondary\" onClick={handleClose}>\n Cancel\n </Button>\n <Button\n disabled={!primaryFeature}\n variant=\"contained\"\n color=\"primary\"\n onClick={onSubmit}\n >\n Submit\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { keyframes, css, styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { getCircularProgressUtilityClass } from \"./circularProgressClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst SIZE = 44;\nconst circularRotateKeyframe = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\nconst circularDashKeyframe = keyframes`\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n`;\n\n// This implementation is for supporting both Styled-components v4+ and Pigment CSS.\n// A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).\n// which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).\nconst rotateAnimation = typeof circularRotateKeyframe !== 'string' ? css`\n animation: ${circularRotateKeyframe} 1.4s linear infinite;\n ` : null;\nconst dashAnimation = typeof circularDashKeyframe !== 'string' ? css`\n animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;\n ` : null;\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n color,\n disableShrink\n } = ownerState;\n const slots = {\n root: ['root', variant, `color${capitalize(color)}`],\n svg: ['svg'],\n circle: ['circle', `circle${capitalize(variant)}`, disableShrink && 'circleDisableShrink']\n };\n return composeClasses(slots, getCircularProgressUtilityClass, classes);\n};\nconst CircularProgressRoot = styled('span', {\n name: 'MuiCircularProgress',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'inline-block',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n transition: theme.transitions.create('transform')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: rotateAnimation || {\n animation: `${circularRotateKeyframe} 1.4s linear infinite`\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main\n }\n }))]\n})));\nconst CircularProgressSVG = styled('svg', {\n name: 'MuiCircularProgress',\n slot: 'Svg',\n overridesResolver: (props, styles) => styles.svg\n})({\n display: 'block' // Keeps the progress centered\n});\nconst CircularProgressCircle = styled('circle', {\n name: 'MuiCircularProgress',\n slot: 'Circle',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.circle, styles[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles.circleDisableShrink];\n }\n})(memoTheme(({\n theme\n}) => ({\n stroke: 'currentColor',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n transition: theme.transitions.create('stroke-dashoffset')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: {\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: 0 // Add the unit to fix a Edge 16 and below bug.\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' && !ownerState.disableShrink,\n style: dashAnimation || {\n // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.\n animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`\n }\n }]\n})));\n\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\nconst CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiCircularProgress'\n });\n const {\n className,\n color = 'primary',\n disableShrink = false,\n size = 40,\n style,\n thickness = 3.6,\n value = 0,\n variant = 'indeterminate',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n disableShrink,\n size,\n thickness,\n value,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const circleStyle = {};\n const rootStyle = {};\n const rootProps = {};\n if (variant === 'determinate') {\n const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;\n rootStyle.transform = 'rotate(-90deg)';\n }\n return /*#__PURE__*/_jsx(CircularProgressRoot, {\n className: clsx(classes.root, className),\n style: {\n width: size,\n height: size,\n ...rootStyle,\n ...style\n },\n ownerState: ownerState,\n ref: ref,\n role: \"progressbar\",\n ...rootProps,\n ...other,\n children: /*#__PURE__*/_jsx(CircularProgressSVG, {\n className: classes.svg,\n ownerState: ownerState,\n viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,\n children: /*#__PURE__*/_jsx(CircularProgressCircle, {\n className: classes.circle,\n style: circleStyle,\n ownerState: ownerState,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n * @default false\n */\n disableShrink: chainPropTypes(PropTypes.bool, props => {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('MUI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n return null;\n }),\n /**\n * The size of the component.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, for example '3rem'.\n * @default 40\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The thickness of the circle.\n * @default 3.6\n */\n thickness: PropTypes.number,\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n * @default 0\n */\n value: PropTypes.number,\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n * @default 'indeterminate'\n */\n variant: PropTypes.oneOf(['determinate', 'indeterminate'])\n} : void 0;\nexport default CircularProgress;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getCircularProgressUtilityClass(slot) {\n return generateUtilityClass('MuiCircularProgress', slot);\n}\nconst circularProgressClasses = generateUtilityClasses('MuiCircularProgress', ['root', 'determinate', 'indeterminate', 'colorPrimary', 'colorSecondary', 'svg', 'circle', 'circleDeterminate', 'circleIndeterminate', 'circleDisableShrink']);\nexport default circularProgressClasses;"],"names":["featurizeSA","getClip","getLength","getLengthSansClipping","getTag","MismatchParser","useStyles","makeStyles","root","width","ReadVsRefDialog","track","feature","preFeature","handleClose","classes","windowSizeText","setWindowSize","useState","error","setError","primaryFeature","setPrimaryFeature","windowSize","useEffect","undefined","get","primaryAln","split","saRef","saStart","rpcManager","getSession","adapterConfig","getConf","sessionId","getRpcSessionId","result","call","regions","refName","start","end","find","f","Error","e","console","React","Dialog","open","onClose","title","DialogContent","Typography","color","className","style","TextField","value","onChange","event","target","label","CircularProgress","DialogActions","Button","variant","onClick","disabled","session","view","getContainingView","cigar","flags","origStrand","SA","readName","clipPos","readAssembly","Date","now","trackAssembly","assemblyNames","trackId","trackName","assemblyManager","assembly","suppAlns","id","feat","toJSON","strand","mate","totalLength","CIGAR","features","forEach","idx","getCanonicalRefName","syntenyId","uniqueId","sort","a","b","featSeq","configFeatureStore","map","expand","refLen","reduce","seqTrackId","sequenceTrackConf","lgvRegions","gatherOverlaps","Math","max","assemblyName","addTemporaryAssembly","name","sequence","type","adapter","noAssemblyManager","seq","random","addView","views","hideHeader","offsetPx","bpPerPx","displayedRegions","tracks","configuration","displays","showReverse","showTranslation","height","viewTrackConfigs","displayName","circularRotateKeyframe","circularDashKeyframe","rotateAnimation","dashAnimation","CircularProgressRoot","slot","overridesResolver","props","styles","ownerState","theme","display","variants","transition","transitions","create","animation","Object","entries","palette","filter","vars","main","CircularProgressSVG","svg","CircularProgressCircle","circle","disableShrink","circleDisableShrink","stroke","strokeDasharray","strokeDashoffset","inProps","ref","size","thickness","other","slots","useUtilityClasses","circleStyle","rootStyle","rootProps","circumference","PI","toFixed","round","transform","role","children","viewBox","cx","cy","r","fill","strokeWidth","getCircularProgressUtilityClass"],"sourceRoot":""}