{"version":3,"sources":["webpack:///./node_modules/@material-ui/core/esm/Tab/Tab.js","webpack:///./node_modules/@material-ui/core/esm/utils/scrollLeft.js","webpack:///./node_modules/@material-ui/core/esm/internal/animate.js","webpack:///./node_modules/@material-ui/core/esm/Tabs/ScrollbarSize.js","webpack:///./node_modules/@material-ui/core/esm/Tabs/TabIndicator.js","webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js","webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js","webpack:///./node_modules/@material-ui/core/esm/TabScrollButton/TabScrollButton.js","webpack:///./node_modules/@material-ui/core/esm/Tabs/Tabs.js"],"names":["Tab","props","ref","classes","className","_props$disabled","disabled","_props$disableFocusRi","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","_props$textColor","textColor","value","_props$wrapped","wrapped","other","focusRipple","root","concat","labelIcon","role","event","tabIndex","wrapper","theme","_extends2","typography","button","maxWidth","minWidth","position","boxSizing","minHeight","flexShrink","padding","breakpoints","up","paddingTop","marginBottom","textColorInherit","color","opacity","textColorPrimary","palette","text","secondary","primary","main","textColorSecondary","flexGrow","flexBasis","fontSize","pxToRem","lineHeight","display","alignItems","justifyContent","width","flexDirection","name","cachedType","detectScrollType","dummy","document","createElement","appendChild","createTextNode","dir","style","height","top","overflow","body","scrollLeft","removeChild","getNormalizedScrollLeft","element","direction","scrollWidth","clientWidth","easeInOutSin","time","Math","sin","PI","ScrollbarSize","scrollbarHeight","nodeRef","setMeasurements","current","offsetHeight","clientHeight","handleResize","debounce","prevHeight","window","addEventListener","clear","removeEventListener","orientation","capitalize","vertical","withStyles","bottom","transition","transitions","create","colorPrimary","backgroundColor","colorSecondary","right","createSvgIcon","d","_ref","KeyboardArrowLeft","_ref2","KeyboardArrowRight","classNameProp","ButtonBase","component","transform","ariaLabel","ariaLabelledBy","action","_props$centered","centered","childrenProp","children","_props$component","Component","_props$indicatorColor","indicatorColor","_props$orientation","_props$ScrollButtonCo","ScrollButtonComponent","_props$scrollButtons","scrollButtons","_props$TabIndicatorPr","TabIndicatorProps","TabScrollButtonProps","_props$variant","variant","useTheme","scrollable","isRtl","scrollStart","start","end","clientSize","size","_React$useState","mounted","setMounted","_React$useState2","indicatorStyle","setIndicatorStyle","_React$useState3","displayScroll","setDisplayScroll","_React$useState4","scrollerStyle","setScrollerStyle","valueToIndex","Map","tabsRef","tabListRef","getTabsMeta","tabsMeta","tabMeta","tabsNode","rect","getBoundingClientRect","scrollTop","scrollLeftNormalized","left","_children","length","tab","get","updateIndicatorState","useEventCallback","_newIndicatorStyle","_getTabsMeta","startValue","correction","newIndicatorStyle","isNaN","dStart","abs","dSize","scroll","scrollValue","property","to","options","arguments","undefined","cb","_options$ease","ease","_options$duration","duration","from","cancelled","cancel","step","timestamp","Error","min","requestAnimationFrame","animate","moveTabsScroll","delta","handleStartScrollClick","handleEndScrollClick","handleScrollbarSizeChange","scrollSelectedIntoView","_getTabsMeta2","nextScrollStart","_nextScrollStart","updateScrollButtonState","showStartScroll","showEndScroll","_tabsRef$current","scrollHeight","win","ownerWindow","handleTabsScroll","updateIndicator","updateScrollButtons","childIndex","map","child","childValue","set","conditionalElements","scrollbarSizeListener","scrollButtonsActive","showScrollButtons","scrollButtonStart","scrollButtonsDesktop","scrollButtonEnd","getConditionalElements","scroller","fixed","onScroll","flexContainer","flexContainerVertical","onKeyDown","target","getAttribute","newFocusTarget","previousItemKey","nextItemKey","key","previousElementSibling","lastChild","nextElementSibling","firstChild","focus","preventDefault","WebkitOverflowScrolling","flex","whiteSpace","overflowX","scrollbarWidth","down"],"mappings":"4FAAA,oGAqGIA,EAAmB,cAAiB,SAAaC,EAAOC,GAC1D,IAAIC,EAAUF,EAAME,QAChBC,EAAYH,EAAMG,UAClBC,EAAkBJ,EAAMK,SACxBA,OAA+B,IAApBD,GAAqCA,EAChDE,EAAwBN,EAAMO,mBAC9BA,OAA+C,IAA1BD,GAA2CA,EAChEE,EAAY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AAS,QAIXiM,sBAAuB,CACrB7L,cAAe,UAIjBmE,SAAU,CACRrE,eAAgB,UAIlB2L,SAAU,CACRrN,SAAU,WACVwB,QAAS,eACTgN,KAAM,WACNC,WAAY,UAIdnB,MAAO,CACLoB,UAAW,SACX/M,MAAO,QAITsF,WAAY,CACVyH,UAAW,SAEXC,eAAgB,OAEhB,uBAAwB,CACtBnN,QAAS,SAMbkF,cAAe,GAGfwG,qBAAsB,YAAgB,GAAIxN,EAAMW,YAAYuO,KAAK,MAAO,CACtEpN,QAAS,SAIXnD,UAAW,MA+YmB,CAChCwD,KAAM,WADO,CAEZ","file":"7fd32102fdec6bba2240758d0c04f6e2ddafa39d-f3c6651d26cd360169be.js","sourcesContent":["import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nimport unsupportedProp from '../utils/unsupportedProp';\nexport var styles = function styles(theme) {\n  var _extends2;\n\n  return {\n    /* Styles applied to the root element. */\n    root: _extends({}, theme.typography.button, (_extends2 = {\n      maxWidth: 264,\n      minWidth: 72,\n      position: 'relative',\n      boxSizing: 'border-box',\n      minHeight: 48,\n      flexShrink: 0,\n      padding: '6px 12px'\n    }, _defineProperty(_extends2, theme.breakpoints.up('sm'), {\n      padding: '6px 24px'\n    }), _defineProperty(_extends2, \"overflow\", 'hidden'), _defineProperty(_extends2, \"whiteSpace\", 'normal'), _defineProperty(_extends2, \"textAlign\", 'center'), _defineProperty(_extends2, theme.breakpoints.up('sm'), {\n      minWidth: 160\n    }), _extends2)),\n\n    /* Styles applied to the root element if both `icon` and `label` are provided. */\n    labelIcon: {\n      minHeight: 72,\n      paddingTop: 9,\n      '& $wrapper > *:first-child': {\n        marginBottom: 6\n      }\n    },\n\n    /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor=\"inherit\"`. */\n    textColorInherit: {\n      color: 'inherit',\n      opacity: 0.7,\n      '&$selected': {\n        opacity: 1\n      },\n      '&$disabled': {\n        opacity: 0.5\n      }\n    },\n\n    /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor=\"primary\"`. */\n    textColorPrimary: {\n      color: theme.palette.text.secondary,\n      '&$selected': {\n        color: theme.palette.primary.main\n      },\n      '&$disabled': {\n        color: theme.palette.text.disabled\n      }\n    },\n\n    /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor=\"secondary\"`. */\n    textColorSecondary: {\n      color: theme.palette.text.secondary,\n      '&$selected': {\n        color: theme.palette.secondary.main\n      },\n      '&$disabled': {\n        color: theme.palette.text.disabled\n      }\n    },\n\n    /* Pseudo-class applied to the root element if `selected={true}` (controlled by the Tabs component). */\n    selected: {},\n\n    /* Pseudo-class applied to the root element if `disabled={true}` (controlled by the Tabs component). */\n    disabled: {},\n\n    /* Styles applied to the root element if `fullWidth={true}` (controlled by the Tabs component). */\n    fullWidth: {\n      flexShrink: 1,\n      flexGrow: 1,\n      flexBasis: 0,\n      maxWidth: 'none'\n    },\n\n    /* Styles applied to the root element if `wrapped={true}`. */\n    wrapped: {\n      fontSize: theme.typography.pxToRem(12),\n      lineHeight: 1.5\n    },\n\n    /* Styles applied to the `icon` and `label`'s wrapper element. */\n    wrapper: {\n      display: 'inline-flex',\n      alignItems: 'center',\n      justifyContent: 'center',\n      width: '100%',\n      flexDirection: 'column'\n    }\n  };\n};\nvar Tab = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {\n  var classes = props.classes,\n      className = props.className,\n      _props$disabled = props.disabled,\n      disabled = _props$disabled === void 0 ? false : _props$disabled,\n      _props$disableFocusRi = props.disableFocusRipple,\n      disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n      fullWidth = props.fullWidth,\n      icon = props.icon,\n      indicator = props.indicator,\n      label = props.label,\n      onChange = props.onChange,\n      onClick = props.onClick,\n      onFocus = props.onFocus,\n      selected = props.selected,\n      selectionFollowsFocus = props.selectionFollowsFocus,\n      _props$textColor = props.textColor,\n      textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n      value = props.value,\n      _props$wrapped = props.wrapped,\n      wrapped = _props$wrapped === void 0 ? false : _props$wrapped,\n      other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disabled\", \"disableFocusRipple\", \"fullWidth\", \"icon\", \"indicator\", \"label\", \"onChange\", \"onClick\", \"onFocus\", \"selected\", \"selectionFollowsFocus\", \"textColor\", \"value\", \"wrapped\"]);\n\n  var handleClick = function handleClick(event) {\n    if (onChange) {\n      onChange(event, value);\n    }\n\n    if (onClick) {\n      onClick(event);\n    }\n  };\n\n  var handleFocus = function handleFocus(event) {\n    if (selectionFollowsFocus && !selected && onChange) {\n      onChange(event, value);\n    }\n\n    if (onFocus) {\n      onFocus(event);\n    }\n  };\n\n  return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n    focusRipple: !disableFocusRipple,\n    className: clsx(classes.root, classes[\"textColor\".concat(capitalize(textColor))], className, disabled && classes.disabled, selected && classes.selected, label && icon && classes.labelIcon, fullWidth && classes.fullWidth, wrapped && classes.wrapped),\n    ref: ref,\n    role: \"tab\",\n    \"aria-selected\": selected,\n    disabled: disabled,\n    onClick: handleClick,\n    onFocus: handleFocus,\n    tabIndex: selected ? 0 : -1\n  }, other), /*#__PURE__*/React.createElement(\"span\", {\n    className: classes.wrapper\n  }, icon, label), indicator);\n});\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\nexport default withStyles(styles, {\n  name: 'MuiTab'\n})(Tab);","// Source from https://github.com/alitaheri/normalize-scroll-left\nvar cachedType;\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assiming scrollWidth=100 and direction is rtl.\n *\n * Browser        | Type          | <- Most Left | Most Right -> | Initial\n * -------------- | ------------- | ------------ | ------------- | -------\n * WebKit         | default       | 0            | 100           | 100\n * Firefox/Opera  | negative      | -100         | 0             | 0\n * IE/Edge        | reverse       | 100          | 0             | 0\n */\n\nexport function detectScrollType() {\n  if (cachedType) {\n    return cachedType;\n  }\n\n  var dummy = document.createElement('div');\n  dummy.appendChild(document.createTextNode('ABCD'));\n  dummy.dir = 'rtl';\n  dummy.style.fontSize = '14px';\n  dummy.style.width = '4px';\n  dummy.style.height = '1px';\n  dummy.style.position = 'absolute';\n  dummy.style.top = '-1000px';\n  dummy.style.overflow = 'scroll';\n  document.body.appendChild(dummy);\n  cachedType = 'reverse';\n\n  if (dummy.scrollLeft > 0) {\n    cachedType = 'default';\n  } else {\n    dummy.scrollLeft = 1;\n\n    if (dummy.scrollLeft === 0) {\n      cachedType = 'negative';\n    }\n  }\n\n  document.body.removeChild(dummy);\n  return cachedType;\n} // Based on https://stackoverflow.com/a/24394376\n\nexport function getNormalizedScrollLeft(element, direction) {\n  var scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr bahavior\n\n  if (direction !== 'rtl') {\n    return scrollLeft;\n  }\n\n  var type = detectScrollType();\n\n  switch (type) {\n    case 'negative':\n      return element.scrollWidth - element.clientWidth + scrollLeft;\n\n    case 'reverse':\n      return element.scrollWidth - element.clientWidth - scrollLeft;\n\n    default:\n      return scrollLeft;\n  }\n}","function easeInOutSin(time) {\n  return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nexport default function animate(property, element, to) {\n  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};\n  var _options$ease = options.ease,\n      ease = _options$ease === void 0 ? easeInOutSin : _options$ease,\n      _options$duration = options.duration,\n      duration = _options$duration === void 0 ? 300 : _options$duration;\n  var start = null;\n  var from = element[property];\n  var cancelled = false;\n\n  var cancel = function cancel() {\n    cancelled = true;\n  };\n\n  var step = function step(timestamp) {\n    if (cancelled) {\n      cb(new Error('Animation cancelled'));\n      return;\n    }\n\n    if (start === null) {\n      start = timestamp;\n    }\n\n    var time = Math.min(1, (timestamp - start) / duration);\n    element[property] = ease(time) * (to - from) + from;\n\n    if (time >= 1) {\n      requestAnimationFrame(function () {\n        cb(null);\n      });\n      return;\n    }\n\n    requestAnimationFrame(step);\n  };\n\n  if (from === to) {\n    cb(new Error('Element already at target position'));\n    return cancel;\n  }\n\n  requestAnimationFrame(step);\n  return cancel;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport debounce from '../utils/debounce';\nvar styles = {\n  width: 99,\n  height: 99,\n  position: 'absolute',\n  top: -9999,\n  overflow: 'scroll'\n};\n/**\n * @ignore - internal component.\n * The component originates from https://github.com/STORIS/react-scrollbar-size.\n * It has been moved into the core in order to minimize the bundle size.\n */\n\nexport default function ScrollbarSize(props) {\n  var onChange = props.onChange,\n      other = _objectWithoutProperties(props, [\"onChange\"]);\n\n  var scrollbarHeight = React.useRef();\n  var nodeRef = React.useRef(null);\n\n  var setMeasurements = function setMeasurements() {\n    scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;\n  };\n\n  React.useEffect(function () {\n    var handleResize = debounce(function () {\n      var prevHeight = scrollbarHeight.current;\n      setMeasurements();\n\n      if (prevHeight !== scrollbarHeight.current) {\n        onChange(scrollbarHeight.current);\n      }\n    });\n    window.addEventListener('resize', handleResize);\n    return function () {\n      handleResize.clear();\n      window.removeEventListener('resize', handleResize);\n    };\n  }, [onChange]);\n  React.useEffect(function () {\n    setMeasurements();\n    onChange(scrollbarHeight.current);\n  }, [onChange]);\n  return /*#__PURE__*/React.createElement(\"div\", _extends({\n    style: styles,\n    ref: nodeRef\n  }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n  return {\n    root: {\n      position: 'absolute',\n      height: 2,\n      bottom: 0,\n      width: '100%',\n      transition: theme.transitions.create()\n    },\n    colorPrimary: {\n      backgroundColor: theme.palette.primary.main\n    },\n    colorSecondary: {\n      backgroundColor: theme.palette.secondary.main\n    },\n    vertical: {\n      height: '100%',\n      width: 2,\n      right: 0\n    }\n  };\n};\n/**\n * @ignore - internal component.\n */\n\nvar TabIndicator = /*#__PURE__*/React.forwardRef(function TabIndicator(props, ref) {\n  var classes = props.classes,\n      className = props.className,\n      color = props.color,\n      orientation = props.orientation,\n      other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"orientation\"]);\n\n  return /*#__PURE__*/React.createElement(\"span\", _extends({\n    className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, orientation === 'vertical' && classes.vertical),\n    ref: ref\n  }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\nexport default withStyles(styles, {\n  name: 'PrivateTabIndicator'\n})(TabIndicator);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n  d: \"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z\"\n}), 'KeyboardArrowLeft');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n  d: \"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z\"\n}), 'KeyboardArrowRight');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n/* eslint-disable jsx-a11y/aria-role */\n\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = {\n  /* Styles applied to the root element. */\n  root: {\n    width: 40,\n    flexShrink: 0,\n    opacity: 0.8,\n    '&$disabled': {\n      opacity: 0\n    }\n  },\n\n  /* Styles applied to the root element if `orientation=\"vertical\"`. */\n  vertical: {\n    width: '100%',\n    height: 40,\n    '& svg': {\n      transform: 'rotate(90deg)'\n    }\n  },\n\n  /* Pseudo-class applied to the root element if `disabled={true}`. */\n  disabled: {}\n};\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowLeft, {\n  fontSize: \"small\"\n});\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowRight, {\n  fontSize: \"small\"\n});\n\nvar TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(props, ref) {\n  var classes = props.classes,\n      classNameProp = props.className,\n      direction = props.direction,\n      orientation = props.orientation,\n      disabled = props.disabled,\n      other = _objectWithoutProperties(props, [\"classes\", \"className\", \"direction\", \"orientation\", \"disabled\"]);\n\n  return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n    component: \"div\",\n    className: clsx(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical),\n    ref: ref,\n    role: null,\n    tabIndex: null\n  }, other), direction === 'left' ? _ref : _ref2);\n});\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\nexport default withStyles(styles, {\n  name: 'MuiTabScrollButton'\n})(TabScrollButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport debounce from '../utils/debounce';\nimport ownerWindow from '../utils/ownerWindow';\nimport { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';\nimport animate from '../internal/animate';\nimport ScrollbarSize from './ScrollbarSize';\nimport withStyles from '../styles/withStyles';\nimport TabIndicator from './TabIndicator';\nimport TabScrollButton from '../TabScrollButton';\nimport useEventCallback from '../utils/useEventCallback';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n  return {\n    /* Styles applied to the root element. */\n    root: {\n      overflow: 'hidden',\n      minHeight: 48,\n      WebkitOverflowScrolling: 'touch',\n      // Add iOS momentum scrolling.\n      display: 'flex'\n    },\n\n    /* Styles applied to the root element if `orientation=\"vertical\"`. */\n    vertical: {\n      flexDirection: 'column'\n    },\n\n    /* Styles applied to the flex container element. */\n    flexContainer: {\n      display: 'flex'\n    },\n\n    /* Styles applied to the flex container element if `orientation=\"vertical\"`. */\n    flexContainerVertical: {\n      flexDirection: 'column'\n    },\n\n    /* Styles applied to the flex container element if `centered={true}` & `!variant=\"scrollable\"`. */\n    centered: {\n      justifyContent: 'center'\n    },\n\n    /* Styles applied to the tablist element. */\n    scroller: {\n      position: 'relative',\n      display: 'inline-block',\n      flex: '1 1 auto',\n      whiteSpace: 'nowrap'\n    },\n\n    /* Styles applied to the tablist element if `!variant=\"scrollable\"`\b\b\b. */\n    fixed: {\n      overflowX: 'hidden',\n      width: '100%'\n    },\n\n    /* Styles applied to the tablist element if `variant=\"scrollable\"`. */\n    scrollable: {\n      overflowX: 'scroll',\n      // Hide dimensionless scrollbar on MacOS\n      scrollbarWidth: 'none',\n      // Firefox\n      '&::-webkit-scrollbar': {\n        display: 'none' // Safari + Chrome\n\n      }\n    },\n\n    /* Styles applied to the `ScrollButtonComponent` component. */\n    scrollButtons: {},\n\n    /* Styles applied to the `ScrollButtonComponent` component if `scrollButtons=\"auto\"` or scrollButtons=\"desktop\"`. */\n    scrollButtonsDesktop: _defineProperty({}, theme.breakpoints.down('xs'), {\n      display: 'none'\n    }),\n\n    /* Styles applied to the `TabIndicator` component. */\n    indicator: {}\n  };\n};\nvar Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {\n  var ariaLabel = props['aria-label'],\n      ariaLabelledBy = props['aria-labelledby'],\n      action = props.action,\n      _props$centered = props.centered,\n      centered = _props$centered === void 0 ? false : _props$centered,\n      childrenProp = props.children,\n      classes = props.classes,\n      className = props.className,\n      _props$component = props.component,\n      Component = _props$component === void 0 ? 'div' : _props$component,\n      _props$indicatorColor = props.indicatorColor,\n      indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor,\n      onChange = props.onChange,\n      _props$orientation = props.orientation,\n      orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n      _props$ScrollButtonCo = props.ScrollButtonComponent,\n      ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? TabScrollButton : _props$ScrollButtonCo,\n      _props$scrollButtons = props.scrollButtons,\n      scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,\n      selectionFollowsFocus = props.selectionFollowsFocus,\n      _props$TabIndicatorPr = props.TabIndicatorProps,\n      TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,\n      TabScrollButtonProps = props.TabScrollButtonProps,\n      _props$textColor = props.textColor,\n      textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n      value = props.value,\n      _props$variant = props.variant,\n      variant = _props$variant === void 0 ? 'standard' : _props$variant,\n      other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"action\", \"centered\", \"children\", \"classes\", \"className\", \"component\", \"indicatorColor\", \"onChange\", \"orientation\", \"ScrollButtonComponent\", \"scrollButtons\", \"selectionFollowsFocus\", \"TabIndicatorProps\", \"TabScrollButtonProps\", \"textColor\", \"value\", \"variant\"]);\n\n  var theme = useTheme();\n  var scrollable = variant === 'scrollable';\n  var isRtl = theme.direction === 'rtl';\n  var vertical = orientation === 'vertical';\n  var scrollStart = vertical ? 'scrollTop' : 'scrollLeft';\n  var start = vertical ? 'top' : 'left';\n  var end = vertical ? 'bottom' : 'right';\n  var clientSize = vertical ? 'clientHeight' : 'clientWidth';\n  var size = vertical ? 'height' : 'width';\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (centered && scrollable) {\n      console.error('Material-UI: You can not use the `centered={true}` and `variant=\"scrollable\"` properties ' + 'at the same time on a `Tabs` component.');\n    }\n  }\n\n  var _React$useState = React.useState(false),\n      mounted = _React$useState[0],\n      setMounted = _React$useState[1];\n\n  var _React$useState2 = React.useState({}),\n      indicatorStyle = _React$useState2[0],\n      setIndicatorStyle = _React$useState2[1];\n\n  var _React$useState3 = React.useState({\n    start: false,\n    end: false\n  }),\n      displayScroll = _React$useState3[0],\n      setDisplayScroll = _React$useState3[1];\n\n  var _React$useState4 = React.useState({\n    overflow: 'hidden',\n    marginBottom: null\n  }),\n      scrollerStyle = _React$useState4[0],\n      setScrollerStyle = _React$useState4[1];\n\n  var valueToIndex = new Map();\n  var tabsRef = React.useRef(null);\n  var tabListRef = React.useRef(null);\n\n  var getTabsMeta = function getTabsMeta() {\n    var tabsNode = tabsRef.current;\n    var tabsMeta;\n\n    if (tabsNode) {\n      var rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft\n\n      tabsMeta = {\n        clientWidth: tabsNode.clientWidth,\n        scrollLeft: tabsNode.scrollLeft,\n        scrollTop: tabsNode.scrollTop,\n        scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),\n        scrollWidth: tabsNode.scrollWidth,\n        top: rect.top,\n        bottom: rect.bottom,\n        left: rect.left,\n        right: rect.right\n      };\n    }\n\n    var tabMeta;\n\n    if (tabsNode && value !== false) {\n      var _children = tabListRef.current.children;\n\n      if (_children.length > 0) {\n        var tab = _children[valueToIndex.get(value)];\n\n        if (process.env.NODE_ENV !== 'production') {\n          if (!tab) {\n            console.error([\"Material-UI: The value provided to the Tabs component is invalid.\", \"None of the Tabs' children match with `\".concat(value, \"`.\"), valueToIndex.keys ? \"You can provide one of the following values: \".concat(Array.from(valueToIndex.keys()).join(', '), \".\") : null].join('\\n'));\n          }\n        }\n\n        tabMeta = tab ? tab.getBoundingClientRect() : null;\n      }\n    }\n\n    return {\n      tabsMeta: tabsMeta,\n      tabMeta: tabMeta\n    };\n  };\n\n  var updateIndicatorState = useEventCallback(function () {\n    var _newIndicatorStyle;\n\n    var _getTabsMeta = getTabsMeta(),\n        tabsMeta = _getTabsMeta.tabsMeta,\n        tabMeta = _getTabsMeta.tabMeta;\n\n    var startValue = 0;\n\n    if (tabMeta && tabsMeta) {\n      if (vertical) {\n        startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;\n      } else {\n        var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;\n        startValue = tabMeta.left - tabsMeta.left + correction;\n      }\n    }\n\n    var newIndicatorStyle = (_newIndicatorStyle = {}, _defineProperty(_newIndicatorStyle, start, startValue), _defineProperty(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle); // IE 11 support, replace with Number.isNaN\n    // eslint-disable-next-line no-restricted-globals\n\n    if (isNaN(indicatorStyle[start]) || isNaN(indicatorStyle[size])) {\n      setIndicatorStyle(newIndicatorStyle);\n    } else {\n      var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]);\n      var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);\n\n      if (dStart >= 1 || dSize >= 1) {\n        setIndicatorStyle(newIndicatorStyle);\n      }\n    }\n  });\n\n  var scroll = function scroll(scrollValue) {\n    animate(scrollStart, tabsRef.current, scrollValue);\n  };\n\n  var moveTabsScroll = function moveTabsScroll(delta) {\n    var scrollValue = tabsRef.current[scrollStart];\n\n    if (vertical) {\n      scrollValue += delta;\n    } else {\n      scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge\n\n      scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;\n    }\n\n    scroll(scrollValue);\n  };\n\n  var handleStartScrollClick = function handleStartScrollClick() {\n    moveTabsScroll(-tabsRef.current[clientSize]);\n  };\n\n  var handleEndScrollClick = function handleEndScrollClick() {\n    moveTabsScroll(tabsRef.current[clientSize]);\n  };\n\n  var handleScrollbarSizeChange = React.useCallback(function (scrollbarHeight) {\n    setScrollerStyle({\n      overflow: null,\n      marginBottom: -scrollbarHeight\n    });\n  }, []);\n\n  var getConditionalElements = function getConditionalElements() {\n    var conditionalElements = {};\n    conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/React.createElement(ScrollbarSize, {\n      className: classes.scrollable,\n      onChange: handleScrollbarSizeChange\n    }) : null;\n    var scrollButtonsActive = displayScroll.start || displayScroll.end;\n    var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on');\n    conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n      orientation: orientation,\n      direction: isRtl ? 'right' : 'left',\n      onClick: handleStartScrollClick,\n      disabled: !displayScroll.start,\n      className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n    }, TabScrollButtonProps)) : null;\n    conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n      orientation: orientation,\n      direction: isRtl ? 'left' : 'right',\n      onClick: handleEndScrollClick,\n      disabled: !displayScroll.end,\n      className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n    }, TabScrollButtonProps)) : null;\n    return conditionalElements;\n  };\n\n  var scrollSelectedIntoView = useEventCallback(function () {\n    var _getTabsMeta2 = getTabsMeta(),\n        tabsMeta = _getTabsMeta2.tabsMeta,\n        tabMeta = _getTabsMeta2.tabMeta;\n\n    if (!tabMeta || !tabsMeta) {\n      return;\n    }\n\n    if (tabMeta[start] < tabsMeta[start]) {\n      // left side of button is out of view\n      var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);\n      scroll(nextScrollStart);\n    } else if (tabMeta[end] > tabsMeta[end]) {\n      // right side of button is out of view\n      var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);\n\n      scroll(_nextScrollStart);\n    }\n  });\n  var updateScrollButtonState = useEventCallback(function () {\n    if (scrollable && scrollButtons !== 'off') {\n      var _tabsRef$current = tabsRef.current,\n          scrollTop = _tabsRef$current.scrollTop,\n          scrollHeight = _tabsRef$current.scrollHeight,\n          clientHeight = _tabsRef$current.clientHeight,\n          scrollWidth = _tabsRef$current.scrollWidth,\n          clientWidth = _tabsRef$current.clientWidth;\n      var showStartScroll;\n      var showEndScroll;\n\n      if (vertical) {\n        showStartScroll = scrollTop > 1;\n        showEndScroll = scrollTop < scrollHeight - clientHeight - 1;\n      } else {\n        var scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.\n\n        showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n        showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n      }\n\n      if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {\n        setDisplayScroll({\n          start: showStartScroll,\n          end: showEndScroll\n        });\n      }\n    }\n  });\n  React.useEffect(function () {\n    var handleResize = debounce(function () {\n      updateIndicatorState();\n      updateScrollButtonState();\n    });\n    var win = ownerWindow(tabsRef.current);\n    win.addEventListener('resize', handleResize);\n    return function () {\n      handleResize.clear();\n      win.removeEventListener('resize', handleResize);\n    };\n  }, [updateIndicatorState, updateScrollButtonState]);\n  var handleTabsScroll = React.useMemo(function () {\n    return debounce(function () {\n      updateScrollButtonState();\n    });\n  }, [updateScrollButtonState]);\n  React.useEffect(function () {\n    return function () {\n      handleTabsScroll.clear();\n    };\n  }, [handleTabsScroll]);\n  React.useEffect(function () {\n    setMounted(true);\n  }, []);\n  React.useEffect(function () {\n    updateIndicatorState();\n    updateScrollButtonState();\n  });\n  React.useEffect(function () {\n    scrollSelectedIntoView();\n  }, [scrollSelectedIntoView, indicatorStyle]);\n  React.useImperativeHandle(action, function () {\n    return {\n      updateIndicator: updateIndicatorState,\n      updateScrollButtons: updateScrollButtonState\n    };\n  }, [updateIndicatorState, updateScrollButtonState]);\n  var indicator = /*#__PURE__*/React.createElement(TabIndicator, _extends({\n    className: classes.indicator,\n    orientation: orientation,\n    color: indicatorColor\n  }, TabIndicatorProps, {\n    style: _extends({}, indicatorStyle, TabIndicatorProps.style)\n  }));\n  var childIndex = 0;\n  var children = React.Children.map(childrenProp, function (child) {\n    if (! /*#__PURE__*/React.isValidElement(child)) {\n      return null;\n    }\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (isFragment(child)) {\n        console.error([\"Material-UI: The Tabs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n      }\n    }\n\n    var childValue = child.props.value === undefined ? childIndex : child.props.value;\n    valueToIndex.set(childValue, childIndex);\n    var selected = childValue === value;\n    childIndex += 1;\n    return /*#__PURE__*/React.cloneElement(child, {\n      fullWidth: variant === 'fullWidth',\n      indicator: selected && !mounted && indicator,\n      selected: selected,\n      selectionFollowsFocus: selectionFollowsFocus,\n      onChange: onChange,\n      textColor: textColor,\n      value: childValue\n    });\n  });\n\n  var handleKeyDown = function handleKeyDown(event) {\n    var target = event.target; // Keyboard navigation assumes that [role=\"tab\"] are siblings\n    // though we might warn in the future about nested, interactive elements\n    // as a a11y violation\n\n    var role = target.getAttribute('role');\n\n    if (role !== 'tab') {\n      return;\n    }\n\n    var newFocusTarget = null;\n    var previousItemKey = orientation !== \"vertical\" ? 'ArrowLeft' : 'ArrowUp';\n    var nextItemKey = orientation !== \"vertical\" ? 'ArrowRight' : 'ArrowDown';\n\n    if (orientation !== \"vertical\" && theme.direction === 'rtl') {\n      // swap previousItemKey with nextItemKey\n      previousItemKey = 'ArrowRight';\n      nextItemKey = 'ArrowLeft';\n    }\n\n    switch (event.key) {\n      case previousItemKey:\n        newFocusTarget = target.previousElementSibling || tabListRef.current.lastChild;\n        break;\n\n      case nextItemKey:\n        newFocusTarget = target.nextElementSibling || tabListRef.current.firstChild;\n        break;\n\n      case 'Home':\n        newFocusTarget = tabListRef.current.firstChild;\n        break;\n\n      case 'End':\n        newFocusTarget = tabListRef.current.lastChild;\n        break;\n\n      default:\n        break;\n    }\n\n    if (newFocusTarget !== null) {\n      newFocusTarget.focus();\n      event.preventDefault();\n    }\n  };\n\n  var conditionalElements = getConditionalElements();\n  return /*#__PURE__*/React.createElement(Component, _extends({\n    className: clsx(classes.root, className, vertical && classes.vertical),\n    ref: ref\n  }, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/React.createElement(\"div\", {\n    className: clsx(classes.scroller, scrollable ? classes.scrollable : classes.fixed),\n    style: scrollerStyle,\n    ref: tabsRef,\n    onScroll: handleTabsScroll\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    \"aria-label\": ariaLabel,\n    \"aria-labelledby\": ariaLabelledBy,\n    className: clsx(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered),\n    onKeyDown: handleKeyDown,\n    ref: tabListRef,\n    role: \"tablist\"\n  }, children), mounted && indicator), conditionalElements.scrollButtonEnd);\n});\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\nexport default withStyles(styles, {\n  name: 'MuiTabs'\n})(Tabs);"],"sourceRoot":""}