Mercurial > repos > fubar > jbrowse2
annotate x/static/js/7761.0cf7cf29.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 |
rev | line source |
---|---|
125
49f3d3878413
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
fubar
parents:
diff
changeset
|
1 {"version":3,"file":"static/js/7761.0cf7cf29.chunk.js","mappings":"6XAmCA,MAAMA,GAAYC,EAAAA,EAAAA,KAAAA,CAAa,CAC7BC,cAAe,CACbC,MAAO,QAETC,aAAc,CACZC,WAAY,iBAiOhB,GAxL0BC,EAAAA,EAAAA,WAAS,UAAU,MAC3CC,EAAK,YACLC,IAKA,MAAM,QAAEC,GAAYT,KACbU,EAAOC,IAAYC,EAAAA,EAAAA,aACnBC,EAAgBC,IAAqBF,EAAAA,EAAAA,aACrCG,EAAKC,IAAcJ,EAAAA,EAAAA,WAAS,IAC5BK,EAAQC,IAAaN,EAAAA,EAAAA,WAAS,IAC9BO,EAAMC,IAAiBR,EAAAA,EAAAA,WAAS,IACjC,WAAES,EAAU,YAAEC,GAAgBf,EAC9BgB,EAAUC,aAA2BC,IAAnBZ,IAExBa,EAAAA,EAAAA,YAAU,KACR,MAAMC,EAAa,IAAIC,gBAoBvB,MAjBC,WACC,IAIE,MAAMC,EAAYtB,EAAMuB,mBAAmBT,EAAYC,GACvD,GAAyB,IAArBO,EAAUE,OACZ,MAAM,IAAIC,MAAM,oCAElB,MAAMC,QA7DdC,eACE3B,EACA4B,EACAC,GAEA,MAAMC,GAAUC,EAAAA,EAAAA,YAAW/B,IACrB,WAAEc,EAAU,YAAEC,GAAgBf,EAEpC,IAAKc,IAAeC,EAClB,MAAM,IAAIU,MAAM,wCAGlB,GAAIX,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EAASC,GAC1E,MAAM1B,EAAQ0D,EAAcjC,IACtB,UACJ7D,EAAS,UACTmH,EAAY,MAAK,eACjBvB,GAAiB,EAAK,MACtBD,GAAQ,EAAK,SACb/G,EAAW,KACX/D,QAASuM,KACNpD,GACD5B,EACEE,EAAa,IACdF,EACH+E,YACAvB,iBACAD,QACA/G,YAII/D,EA9FgB,EAACyH,EAAY2D,KACrC,MAGM,QACJpL,EAAO,MACP8K,EAAK,eACLC,EAAc,SACdhH,GACE0D,EACE2B,EAAQ,CACZ1B,KAAM,CAAC,OAAQ3D,GAAY,YAAW,EAAA6G,EAAA,GAAWC,OAAO9G,MAAc+G,GAAS,QAASC,GAAkB,mBAE5G,OAAO,EAAAyB,EAAA,GAAepD,GAZW/B,IACxB,EAAAoF,EAAA,IAAqBrB,EAAe/D,IAWUrH,EAAQ,EAiF7CqJ,CAAkB5B,EAAY2D,GAC9C,OAGE,SAAKC,EAAe,CAClBqB,GAAIJ,EAGJ7E,WAAYA,EACZtC,WAAW,EAAAwH,EAAA,GAAK3M,EAAQ0H,KAAMvC,GAC9B8D,IAAKA,KACFE,GAGT,IAWA,OAAO5E,CACT,CC3IkBqI,CAAgB,CAChCzB,uBAAuB,QAAO,MAAO,CACnC/D,KAAM,eACNC,KAAM,OACNC,kBAAmB,CAACC,EAAOC,KACzB,MAAM,WACJC,GACEF,EACJ,MAAO,CAACC,EAAOE,KAAMF,EAAO,YAAW,OAAWqD,OAAOpD,EAAW1D,cAAe0D,EAAWqD,OAAStD,EAAOsD,MAAOrD,EAAWsD,gBAAkBvD,EAAOuD,eAAe,IAG5KE,cAAejC,IAAW,OAAc,CACtCzB,MAAOyB,EACP5B,KAAM,mBA8CV,G,mCCjEA,MACA,GADe,E,SAAA,K","sources":["../../../plugins/linear-genome-view/src/LinearGenomeView/components/GetSequenceDialog.tsx","../../../packages/core/util/formatFastaStrings.ts","../../../node_modules/@mui/icons-material/esm/GetApp.js","../../../node_modules/@mui/material/CircularProgress/CircularProgress.js","../../../node_modules/@mui/material/CircularProgress/circularProgressClasses.js","../../../node_modules/@mui/system/Container/createContainer.js","../../../node_modules/@mui/material/Container/Container.js","../../../node_modules/@mui/system/styled/styled.js"],"sourcesContent":["import React, { useEffect, useState } from 'react'\nimport { makeStyles } from 'tss-react/mui'\nimport {\n Button,\n Checkbox,\n CircularProgress,\n Container,\n DialogActions,\n DialogContent,\n FormGroup,\n FormControlLabel,\n TextField,\n Typography,\n} from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { saveAs } from 'file-saver'\nimport { getConf } from '@jbrowse/core/configuration'\nimport copy from 'copy-to-clipboard'\nimport { Dialog } from '@jbrowse/core/ui'\nimport {\n getSession,\n reverse,\n complement,\n Feature,\n Region,\n} from '@jbrowse/core/util'\nimport { formatSeqFasta } from '@jbrowse/core/util/formatFastaStrings'\n\n// icons\nimport { ContentCopy as ContentCopyIcon } from '@jbrowse/core/ui/Icons'\nimport GetAppIcon from '@mui/icons-material/GetApp'\n\n// locals\nimport { LinearGenomeViewModel } from '..'\n\nconst useStyles = makeStyles()({\n dialogContent: {\n width: '80em',\n },\n textAreaFont: {\n fontFamily: 'Courier New',\n },\n})\n\ntype LGV = LinearGenomeViewModel\n\n/**\n * Fetches and returns a list features for a given list of regions\n */\nasync function fetchSequence(\n model: LGV,\n regions: Region[],\n signal?: AbortSignal,\n) {\n const session = getSession(model)\n const { leftOffset, rightOffset } = model\n\n if (!leftOffset || !rightOffset) {\n throw new Error('no offsets on model to use for range')\n }\n\n if (leftOffset.assemblyName !== rightOffset.assemblyName) {\n throw new Error('not able to fetch sequences from multiple assemblies')\n }\n const { rpcManager, assemblyManager } = session\n const assemblyName = leftOffset.assemblyName || rightOffset.assemblyName || ''\n const assembly = assemblyManager.get(assemblyName)\n if (!assembly) {\n throw new Error(`assembly ${assemblyName} not found`)\n }\n const adapterConfig = getConf(assembly, ['sequence', 'adapter'])\n\n const sessionId = 'getSequence'\n return rpcManager.call(sessionId, 'CoreGetFeatures', {\n adapterConfig,\n regions,\n sessionId,\n signal,\n }) as Promise<Feature[]>\n}\n\nconst GetSequenceDialog = observer(function ({\n model,\n handleClose,\n}: {\n model: LGV\n handleClose: () => void\n}) {\n const { classes } = useStyles()\n const [error, setError] = useState<unknown>()\n const [sequenceChunks, setSequenceChunks] = useState<Feature[]>()\n const [rev, setReverse] = useState(false)\n const [copied, setCopied] = useState(false)\n const [comp, setComplement] = useState(false)\n const { leftOffset, rightOffset } = model\n const loading = Boolean(sequenceChunks === undefined)\n\n useEffect(() => {\n const controller = new AbortController()\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ;(async () => {\n try {\n // random note: the current selected region can't be a computed because\n // it uses action on base1dview even though it's on the ephemeral\n // base1dview\n const selection = model.getSelectedRegions(leftOffset, rightOffset)\n if (selection.length === 0) {\n throw new Error('Selected region is out of bounds')\n }\n const chunks = await fetchSequence(model, selection, controller.signal)\n setSequenceChunks(chunks)\n } catch (e) {\n console.error(e)\n setError(e)\n }\n })()\n\n return () => {\n controller.abort()\n }\n }, [model, leftOffset, rightOffset])\n\n const sequence = sequenceChunks\n ? formatSeqFasta(\n sequenceChunks.map(chunk => {\n let chunkSeq = chunk.get('seq')\n const chunkRefName = chunk.get('refName')\n const chunkStart = chunk.get('start') + 1\n const chunkEnd = chunk.get('end')\n const loc = `${chunkRefName}:${chunkStart}-${chunkEnd}`\n if (chunkSeq?.length !== chunkEnd - chunkStart + 1) {\n throw new Error(\n `${loc} returned ${chunkSeq.length.toLocaleString()} bases, but should have returned ${(\n chunkEnd - chunkStart\n ).toLocaleString()}`,\n )\n }\n\n if (rev) {\n chunkSeq = reverse(chunkSeq)\n }\n if (comp) {\n chunkSeq = complement(chunkSeq)\n }\n return {\n header: loc + (rev ? '-rev' : '') + (comp ? '-comp' : ''),\n seq: chunkSeq,\n }\n }),\n )\n : ''\n\n const sequenceTooLarge = sequence ? sequence.length > 1_000_000 : false\n\n return (\n <Dialog\n maxWidth=\"xl\"\n open\n onClose={() => {\n handleClose()\n model.setOffsets()\n }}\n title=\"Reference sequence\"\n >\n <DialogContent>\n {error ? (\n <Typography color=\"error\">{`${error}`}</Typography>\n ) : loading ? (\n <Container>\n Retrieving reference sequence...\n <CircularProgress\n style={{ marginLeft: 10 }}\n size={20}\n disableShrink\n />\n </Container>\n ) : null}\n <TextField\n data-testid=\"rubberband-sequence\"\n variant=\"outlined\"\n multiline\n minRows={5}\n maxRows={10}\n disabled={sequenceTooLarge}\n className={classes.dialogContent}\n fullWidth\n value={\n sequenceTooLarge\n ? 'Reference sequence too large to display, use the download FASTA button'\n : sequence\n }\n InputProps={{\n readOnly: true,\n classes: {\n input: classes.textAreaFont,\n },\n }}\n />\n <FormGroup>\n <FormControlLabel\n control={\n <Checkbox\n value={rev}\n onChange={event => {\n setReverse(event.target.checked)\n }}\n />\n }\n label=\"Reverse sequence\"\n />\n <FormControlLabel\n control={\n <Checkbox\n value={comp}\n onChange={event => {\n setComplement(event.target.checked)\n }}\n />\n }\n label=\"Complement sequence\"\n />\n </FormGroup>\n <Typography style={{ margin: 10 }}>\n Note: Check both boxes for the "reverse complement"\n </Typography>\n </DialogContent>\n <DialogActions>\n <Button\n onClick={() => {\n copy(sequence)\n setCopied(true)\n setTimeout(() => {\n setCopied(false)\n }, 500)\n }}\n disabled={loading || !!error || sequenceTooLarge}\n color=\"primary\"\n startIcon={<ContentCopyIcon />}\n >\n {copied ? 'Copied' : 'Copy to clipboard'}\n </Button>\n <Button\n onClick={() => {\n saveAs(\n new Blob([sequence || ''], {\n type: 'text/x-fasta;charset=utf-8',\n }),\n 'jbrowse_ref_seq.fa',\n )\n }}\n disabled={loading || !!error}\n color=\"primary\"\n startIcon={<GetAppIcon />}\n >\n Download FASTA\n </Button>\n <Button onClick={handleClose} variant=\"contained\">\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n})\n\nexport default GetSequenceDialog\n","export interface SeqChunk {\n header: string\n seq: string\n}\n/**\n * Returns sequence with new line every 80 characters\n * ref https://stackoverflow.com/a/51506718/2129219\n *\n * @param seqString - string\n * @returns formatted sequence string\n */\nexport function formatFastaLines(seqString: string) {\n return seqString.replaceAll(/(.{1,80})/g, '$1\\n').trimEnd()\n}\n/**\n * Formats the sequences chunks into Fasta format\n *\n * @param chunks - array of seq chunks of the form `{ header: string, seq: string }`\n * @returns formatted sequence in fasta format\n */\nexport function formatSeqFasta(chunks: SeqChunk[]) {\n return chunks\n .map(chunk => `>${chunk.header}\\n${formatFastaLines(chunk.seq)}`)\n .join('\\n')\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z\"\n}), 'GetApp');","'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;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from '@mui/utils/capitalize';\nimport useThemePropsSystem from \"../useThemeProps/index.js\";\nimport systemStyled from \"../styled/index.js\";\nimport createTheme from \"../createTheme/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultTheme = createTheme();\nconst defaultCreateStyledComponent = systemStyled('div', {\n name: 'MuiContainer',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];\n }\n});\nconst useThemePropsDefault = inProps => useThemePropsSystem({\n props: inProps,\n name: 'MuiContainer',\n defaultTheme\n});\nconst useUtilityClasses = (ownerState, componentName) => {\n const getContainerUtilityClass = slot => {\n return generateUtilityClass(componentName, slot);\n };\n const {\n classes,\n fixed,\n disableGutters,\n maxWidth\n } = ownerState;\n const slots = {\n root: ['root', maxWidth && `maxWidth${capitalize(String(maxWidth))}`, fixed && 'fixed', disableGutters && 'disableGutters']\n };\n return composeClasses(slots, getContainerUtilityClass, classes);\n};\nexport default function createContainer(options = {}) {\n const {\n // This will allow adding custom styled fn (for example for custom sx style function)\n createStyledComponent = defaultCreateStyledComponent,\n useThemeProps = useThemePropsDefault,\n componentName = 'MuiContainer'\n } = options;\n const ContainerRoot = createStyledComponent(({\n theme,\n ownerState\n }) => ({\n width: '100%',\n marginLeft: 'auto',\n boxSizing: 'border-box',\n marginRight: 'auto',\n ...(!ownerState.disableGutters && {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n // @ts-ignore module augmentation fails if custom breakpoints are used\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }\n })\n }), ({\n theme,\n ownerState\n }) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpointValueKey) => {\n const breakpoint = breakpointValueKey;\n const value = theme.breakpoints.values[breakpoint];\n if (value !== 0) {\n // @ts-ignore\n acc[theme.breakpoints.up(breakpoint)] = {\n maxWidth: `${value}${theme.breakpoints.unit}`\n };\n }\n return acc;\n }, {}), ({\n theme,\n ownerState\n }) => ({\n // @ts-ignore module augmentation fails if custom breakpoints are used\n ...(ownerState.maxWidth === 'xs' && {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n [theme.breakpoints.up('xs')]: {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n maxWidth: Math.max(theme.breakpoints.values.xs, 444)\n }\n }),\n ...(ownerState.maxWidth &&\n // @ts-ignore module augmentation fails if custom breakpoints are used\n ownerState.maxWidth !== 'xs' && {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n [theme.breakpoints.up(ownerState.maxWidth)]: {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`\n }\n })\n }));\n const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {\n const props = useThemeProps(inProps);\n const {\n className,\n component = 'div',\n disableGutters = false,\n fixed = false,\n maxWidth = 'lg',\n classes: classesProp,\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n disableGutters,\n fixed,\n maxWidth\n };\n\n // @ts-ignore module augmentation fails if custom breakpoints are used\n const classes = useUtilityClasses(ownerState, componentName);\n return (\n /*#__PURE__*/\n // @ts-ignore theme is injected by the styled util\n _jsx(ContainerRoot, {\n as: component\n // @ts-ignore module augmentation fails if custom breakpoints are used\n ,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other\n })\n );\n });\n process.env.NODE_ENV !== \"production\" ? Container.propTypes /* remove-proptypes */ = {\n children: PropTypes.node,\n classes: PropTypes.object,\n className: PropTypes.string,\n component: PropTypes.elementType,\n disableGutters: PropTypes.bool,\n fixed: PropTypes.bool,\n maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n } : void 0;\n return Container;\n}","'use client';\n\nimport PropTypes from 'prop-types';\nimport { createContainer } from '@mui/system';\nimport capitalize from \"../utils/capitalize.js\";\nimport styled from \"../styles/styled.js\";\nimport useThemeProps from \"../styles/useThemeProps.js\";\nconst Container = createContainer({\n createStyledComponent: styled('div', {\n name: 'MuiContainer',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];\n }\n }),\n useThemeProps: inProps => useThemeProps({\n props: inProps,\n name: 'MuiContainer'\n })\n});\nprocess.env.NODE_ENV !== \"production\" ? Container.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 * @ignore\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: PropTypes.bool,\n /**\n * Set the max-width to match the min-width of the current breakpoint.\n * This is useful if you'd prefer to design for a fixed set of sizes\n * instead of trying to accommodate a fully fluid viewport.\n * It's fluid by default.\n * @default false\n */\n fixed: PropTypes.bool,\n /**\n * Determine the max-width of the container.\n * The container width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n * @default 'lg'\n */\n maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),\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} : void 0;\nexport default Container;","import createStyled from \"../createStyled/index.js\";\nconst styled = createStyled();\nexport default styled;"],"names":["useStyles","makeStyles","dialogContent","width","textAreaFont","fontFamily","observer","model","handleClose","classes","error","setError","useState","sequenceChunks","setSequenceChunks","rev","setReverse","copied","setCopied","comp","setComplement","leftOffset","rightOffset","loading","Boolean","undefined","useEffect","controller","AbortController","selection","getSelectedRegions","length","Error","chunks","async","regions","signal","session","getSession","assemblyName","rpcManager","assemblyManager","assembly","get","adapterConfig","getConf","sessionId","call","fetchSequence","e","console","abort","sequence","map","chunk","chunkSeq","chunkRefName","chunkStart","chunkEnd","loc","toLocaleString","reverse","complement","header","seq","seqString","replaceAll","trimEnd","join","sequenceTooLarge","React","Dialog","maxWidth","open","onClose","setOffsets","title","DialogContent","Typography","color","Container","CircularProgress","style","marginLeft","size","disableShrink","TextField","variant","multiline","minRows","maxRows","disabled","className","fullWidth","value","InputProps","readOnly","input","FormGroup","FormControlLabel","control","Checkbox","onChange","event","target","checked","label","margin","DialogActions","Button","onClick","copy","setTimeout","startIcon","ContentCopyIcon","saveAs","Blob","type","GetAppIcon","d","circularRotateKeyframe","circularDashKeyframe","rotateAnimation","dashAnimation","CircularProgressRoot","name","slot","overridesResolver","props","styles","ownerState","root","theme","display","variants","transition","transitions","create","animation","Object","entries","palette","filter","vars","main","CircularProgressSVG","svg","CircularProgressCircle","circle","circleDisableShrink","stroke","strokeDasharray","strokeDashoffset","inProps","ref","thickness","other","slots","useUtilityClasses","circleStyle","rootStyle","rootProps","circumference","Math","PI","toFixed","round","transform","height","role","children","viewBox","cx","cy","r","fill","strokeWidth","getCircularProgressUtilityClass","defaultTheme","createTheme","defaultCreateStyledComponent","capitalize","String","fixed","disableGutters","useThemePropsDefault","useThemeProps","options","createStyledComponent","componentName","ContainerRoot","boxSizing","marginRight","paddingLeft","spacing","paddingRight","breakpoints","up","keys","values","reduce","acc","breakpointValueKey","breakpoint","unit","max","xs","component","classesProp","composeClasses","generateUtilityClass","as","clsx","createContainer"],"sourceRoot":""} |