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AA,IAAAA,OACAA,IAAAA,UACCC,WACHyE,MAAO1E,IAAAA,OAAAA,WACPoJ,KAAMpJ,IAAAA,MAAgBmJ,EAAKU,OAC3BR,iBAAkBrJ,IAAAA,OAClBsJ,eAAgBtJ,IAAAA,OAChBuJ,eAAgBvJ,IAAAA,OAChBwJ,gBAAiBxJ,IAAAA,MAGnBmJ,EAAKjJ,aAAe,CAClBkJ,KAAM,KACNC,iBAAkB,KAClBC,eAAgB,KAChBC,eAAgB,KAChBC,iBAAiB,GAGnB,S,yFC5DA,EAAoE,2BCI9DM,EAAQ,SAAC5I,GACb,IAAQ6I,EAA4B7I,EAA5B6I,SAAUC,EAAkB9I,EAAlB8I,cAElB,OACE,sBAAInK,UAAcC,EAAL,KAAyBkK,GAAiB,KACpD3J,EAAAA,SAAAA,IACC0J,GACA,SAACE,GAAD,OAAYA,GAAS,sBAAIzF,IAAKyF,EAAMvF,OAAQuF,IAAgB,QAMpEH,EAAM/J,UAAY,CAChBgK,SAAU/J,IAAAA,KAAAA,WACVgK,cAAehK,IAAAA,QAGjB8J,EAAM5J,aAAe,CACnB8J,cAAe,MAGjB,S","sources":["webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/now.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/_trimmedEndIndex.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/_baseTrim.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/isSymbol.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/toNumber.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/debounce.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/throttle.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/area.scss?f28a","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Area.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/axis.scss?e63f","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Axis.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Tooltip/styles.scss?c373","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Tooltip/index.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/styles.scss?5736","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/index.js","webpack://StravaModern/./node_modules/@strava/ui/Stat/styles.scss?c158","webpack://StravaModern/./node_modules/@strava/ui/Stat/index.js","webpack://StravaModern/./node_modules/@strava/ui/Stats/styles.scss?803f","webpack://StravaModern/./node_modules/@strava/ui/Stats/index.js"],"sourcesContent":["import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","import debounce from './debounce.js';\nimport isObject from './isObject.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nexport default throttle;\n","// extracted by mini-css-extract-plugin\nexport default {\"area\":\"ElevationChart--area--MdwbJ\"};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { area } from 'd3-shape';\nimport styles from './area.scss';\n\nconst Area = ({ stream, xScale, yScale, height, clipPath, fill }) => {\n const formatData = stream.convertedElevation.map((elev, index) => ({\n elev,\n dist: stream.convertedDistance[index]\n }));\n\n const drawArea = area()\n .x((d) => xScale(d.dist))\n .y1((d) => yScale(d.elev))\n .y0(height);\n\n return (\n \n \n \n );\n};\n\nArea.propTypes = {\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n height: PropTypes.number.isRequired,\n stream: PropTypes.shape().isRequired,\n clipPath: PropTypes.string,\n fill: PropTypes.string\n};\n\nArea.defaultProps = {\n clipPath: null,\n fill: 'rgba(100, 100, 100, 0.66)'\n};\n\nexport default Area;\n","// extracted by mini-css-extract-plugin\nexport default {\"axis\":\"ElevationChart--axis--MSfnX\",\"y-axis\":\"ElevationChart--y-axis--3OIyj\",\"yAxis\":\"ElevationChart--y-axis--3OIyj\",\"x-axis\":\"ElevationChart--x-axis--hwPNg\",\"xAxis\":\"ElevationChart--x-axis--hwPNg\"};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { axisBottom, axisLeft } from 'd3-axis';\nimport { select } from 'd3-selection';\nimport styles from './axis.scss';\n\nclass Axis extends React.Component {\n xAxisNode = React.createRef();\n\n yAxisNode = React.createRef();\n\n componentDidMount() {\n this.drawAxes();\n }\n\n componentDidUpdate(prevProps) {\n const { scopeTo, width, xScale, yScale } = this.props;\n\n const hasScopeChanged =\n scopeTo &&\n (prevProps.scopeTo[0] !== scopeTo[0] ||\n prevProps.scopeTo[1] !== scopeTo[1]);\n\n const hasScaleChanged =\n !this.scalesAreEqual(xScale, prevProps.xScale) ||\n !this.scalesAreEqual(yScale, prevProps.yScale);\n\n const hasWidthChanged = prevProps.width !== width;\n\n if (hasScopeChanged || hasWidthChanged || hasScaleChanged) {\n this.drawAxes();\n }\n }\n\n scalesAreEqual = (scaleA, scaleB) => {\n return scaleA\n .domain()\n .every((domainElement) => scaleB.domain().includes(domainElement));\n };\n\n drawAxes() {\n const { xScale, yScale, width, formatters } = this.props;\n const { elevationFormatter, distanceFormatter } = formatters;\n const xAxis = axisBottom(xScale);\n const yAxis = axisLeft(yScale);\n const xTickCount = width > 480 ? 8 : 4;\n\n yAxis\n .ticks(4)\n .tickSize(-width)\n .tickFormat((e) =>\n // As e here is converted/formatted value we need to unconver it\n // so that the value does not get converted twice.\n elevationFormatter.formatShort(e / elevationFormatter.convert(1.0))\n );\n\n xAxis.ticks(xTickCount).tickFormat((d) =>\n // As d here is converted/formatted value we need to unconver it\n // so that the value does not get converted twice.\n distanceFormatter.formatShort(d / distanceFormatter.convert(1.0))\n );\n\n yAxis(select(this.yAxisNode.current));\n xAxis(select(this.xAxisNode.current));\n }\n\n render() {\n const { height } = this.props;\n\n return (\n <>\n \n \n \n );\n }\n}\n\nexport default Axis;\n\nAxis.propTypes = {\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n height: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired,\n formatters: PropTypes.shape().isRequired,\n scopeTo: PropTypes.arrayOf(PropTypes.number)\n};\n\nAxis.defaultProps = {\n scopeTo: null\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"group\":\"Tooltip--group--RhVw1\",\"info-box\":\"Tooltip--info-box---0mNo\",\"infoBox\":\"Tooltip--info-box---0mNo\",\"value\":\"Tooltip--value--S2pLE\"};","import React, { useLayoutEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport styles from './styles.scss';\n\nconst Tooltip = ({ content, position, clipPath, chartWidth, chartMargin }) => {\n const textRef = useRef([]);\n const [boxWidth, setBoxWidth] = useState(120);\n const padding = 6;\n const lineHeight = 16;\n\n const rightBound = position + boxWidth + padding * 2;\n const currBoxAlign =\n rightBound >= chartWidth ? chartWidth - rightBound + padding : padding;\n\n useLayoutEffect(() => {\n if (textRef.current && Object.keys(content).length !== 0) {\n const widths = textRef.current.map(\n (el) => el.getBoundingClientRect().width\n );\n const maxWidth = Math.max(...widths);\n const newSize = Math.round(maxWidth + padding * 2);\n if (boxWidth !== newSize) {\n setBoxWidth(newSize);\n }\n }\n }, [content, boxWidth]);\n\n const InfoBox = () => {\n const keys = Object.keys(content);\n const contentLength = keys.length;\n const boxHeight = contentLength * lineHeight + padding + 2;\n\n return (\n \n \n {keys.map((stat, index) => {\n const contentItem = content[stat];\n\n function setRef(el) {\n textRef.current[index] = el;\n }\n\n return (\n \n {contentItem.label}\n \n {contentItem.value}\n \n \n );\n })}\n \n );\n };\n\n return (\n \n \n \n \n );\n};\n\nexport default Tooltip;\n\nTooltip.propTypes = {\n content: PropTypes.shape().isRequired,\n position: PropTypes.number.isRequired,\n clipPath: PropTypes.string.isRequired,\n chartWidth: PropTypes.number.isRequired,\n chartMargin: PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n }).isRequired\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"hitbox\":\"ElevationChart--hitbox--ViqA5\",\"marker\":\"ElevationChart--marker--mSOJw\"};","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { scaleLinear } from 'd3-scale';\nimport { max, min, bisectLeft } from 'd3-array';\nimport { throttle } from 'lodash-es';\nimport Area from './Area';\nimport Axis from './Axis';\nimport Tooltip from './Tooltip';\nimport styles from './styles.scss';\n\nclass ElevationChart extends Component {\n state = {\n stream: null,\n xScale: null,\n yScale: null,\n height: 0,\n width: 0,\n markerPosition: this.props.margin.left,\n tooltipContent: {}\n };\n\n container = React.createRef();\n\n node = React.createRef();\n\n hitbox = React.createRef();\n\n handleResize = throttle(() => {\n this.buildScales();\n }, 250);\n\n componentDidMount() {\n window.addEventListener('resize', this.handleResize);\n this.buildScales();\n }\n\n componentDidUpdate({\n elevation: prevElevation,\n distance: prevDistance,\n units: prevUnits\n }) {\n const { distance, elevation, units } = this.props;\n const elevationChanged = prevElevation.length !== elevation.length;\n const distanceChanged = prevDistance.length !== distance.length;\n const unitsChanged = prevUnits !== units;\n\n if (elevationChanged || distanceChanged || unitsChanged) {\n this.buildScales();\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.handleResize);\n }\n\n // TODO: hover got really slow on long streams\n updateMarker = (e) => {\n const {\n onUpdateMarker,\n tooltipDistanceLabel,\n tooltipElevationLabel,\n tooltipGradeLabel\n } = this.props;\n const { xScale, stream } = this.state;\n const { elevationFormatter, distanceFormatter } = this.formatters();\n const bounds = this.hitbox.current.getBoundingClientRect();\n const cursorPosition = e.clientX - bounds.left;\n const markerPosition = cursorPosition;\n const distCursor = xScale.invert(cursorPosition);\n const streamIndex = bisectLeft(stream.convertedDistance, distCursor);\n\n const tooltipContent = {\n distance: {\n label: tooltipDistanceLabel,\n value: distanceFormatter.formatShort(stream.distance[streamIndex])\n },\n elevation: {\n label: tooltipElevationLabel,\n value: elevationFormatter.formatShort(stream.elevation[streamIndex])\n },\n grade: {\n label: tooltipGradeLabel,\n value: this.gradeAtIndex(streamIndex)\n }\n };\n\n onUpdateMarker(streamIndex);\n\n this.setState({\n markerPosition,\n tooltipContent\n });\n };\n\n handleMouseLeave = (e) => {\n const { onUpdateMarker, onMouseLeave } = this.props;\n onUpdateMarker(null);\n onMouseLeave(e);\n };\n\n formatters() {\n const { units, formatters } = this.props;\n\n return {\n elevationFormatter: new formatters.ElevationFormatter(units),\n distanceFormatter: new formatters.DistanceFormatter(units),\n gradePercentFormatter: new formatters.PercentFormatter()\n };\n }\n\n buildScales() {\n const { margin, height: heightProp, elevation, distance } = this.props;\n const { elevationFormatter, distanceFormatter } = this.formatters();\n\n const convertedElevation = elevation.map((elev) =>\n elevationFormatter.convert(elev)\n );\n const convertedDistance = distance.map((dist) =>\n distanceFormatter.convert(dist)\n );\n\n const width =\n this.container.current.offsetWidth - margin.left - margin.right;\n const height = heightProp - margin.top - margin.bottom;\n const yMax = max(convertedElevation);\n const yMin = min(convertedElevation);\n const xScale = scaleLinear().range([0, width]);\n const yScale = scaleLinear().range([height, 0]);\n\n xScale.domain([0, max(convertedDistance)]);\n yScale.domain([yMin, yMax + yMax * 0.02]);\n\n this.setState({\n height,\n width,\n xScale,\n yScale,\n stream: { elevation, convertedElevation, distance, convertedDistance }\n });\n }\n\n gradeAtIndex(index) {\n // Taken from charts.js: 1689 but extending the window to 5 data points\n const { stream } = this.state;\n const { gradePercentFormatter } = this.formatters();\n const { elevation, distance } = stream;\n const maxIndex = distance.length - 1;\n const threshold = 2;\n\n let streamIndex = index;\n\n if (streamIndex < threshold) {\n streamIndex = threshold;\n }\n if (maxIndex - streamIndex < threshold) {\n streamIndex = maxIndex - threshold;\n }\n\n const distanceDiff =\n distance[streamIndex + threshold] - distance[streamIndex - threshold];\n const elevationDiff =\n elevation[streamIndex + threshold] - elevation[streamIndex - threshold];\n const grade = (elevationDiff * 100) / distanceDiff;\n\n return gradePercentFormatter.formatShort(grade);\n }\n\n scopeTo() {\n const { scopeTo } = this.props;\n const { stream, xScale, yScale } = this.state;\n\n if (!stream || !scopeTo) {\n return;\n }\n\n const start = scopeTo[0];\n const end = scopeTo[1];\n\n // Taken from directory/ElevationChart.js.coffee: 263\n const range = end - start;\n // the padding on each side of the selected area should ideally be\n // 1/3 of the area itself, but this can't be the case if the start\n // or the end are too close to the edges\n const padding = parseInt(range / 3, 10);\n const enoughSpaceAtStart = start - padding <= 0;\n const enoughSpaceAtEnd = end + padding > stream.distance.length - 1;\n\n const paddedStart = enoughSpaceAtStart\n ? parseInt(start / 3, 10)\n : start - padding;\n\n const paddedEnd = enoughSpaceAtEnd\n ? parseInt(end + (stream.distance.length - 1 - end) / 3, 10)\n : end + padding;\n\n xScale.domain([\n stream.convertedDistance[paddedStart],\n stream.convertedDistance[paddedEnd]\n ]);\n\n const croppedElevationStream = stream.convertedElevation.slice(\n paddedStart,\n paddedEnd + 1\n );\n const yMax = max(croppedElevationStream);\n const yMin = min(croppedElevationStream);\n\n yScale.domain([yMin, yMax + yMax * 0.02]);\n }\n\n render() {\n const { margin, scopeTo, scopeColor } = this.props;\n const {\n stream,\n xScale,\n yScale,\n width,\n height,\n markerPosition,\n tooltipContent\n } = this.state;\n\n if (scopeTo) this.scopeTo();\n\n return (\n
\n {height && width && (\n \n \n \n\n \n\n {scopeTo && (\n \n )}\n\n \n \n \n\n \n \n \n \n \n \n )}\n
\n );\n }\n}\n\nElevationChart.propTypes = {\n height: PropTypes.number.isRequired,\n elevation: PropTypes.arrayOf(PropTypes.number).isRequired,\n distance: PropTypes.arrayOf(PropTypes.number).isRequired,\n units: PropTypes.string.isRequired,\n margin: PropTypes.shape({\n top: PropTypes.number.isRequired,\n right: PropTypes.number.isRequired,\n bottom: PropTypes.number.isRequired,\n left: PropTypes.number.isRequired\n }),\n scopeTo: PropTypes.arrayOf(PropTypes.number),\n scopeColor: PropTypes.string,\n onUpdateMarker: PropTypes.func,\n onMouseLeave: PropTypes.func,\n formatters: PropTypes.shape().isRequired,\n tooltipDistanceLabel: PropTypes.string,\n tooltipElevationLabel: PropTypes.string,\n tooltipGradeLabel: PropTypes.string\n};\n\nElevationChart.defaultProps = {\n margin: {\n top: 10,\n right: 24,\n bottom: 20,\n left: 45\n },\n scopeTo: null,\n scopeColor: 'rgb(23, 90, 189)',\n onUpdateMarker: () => null,\n onMouseLeave: () => null,\n tooltipDistanceLabel: 'Distance',\n tooltipElevationLabel: 'Elevation',\n tooltipGradeLabel: 'Grade'\n};\n\nexport default ElevationChart;\n","// extracted by mini-css-extract-plugin\nexport default {\"stat\":\"Stat--stat--AaawC\",\"stat-label\":\"Stat--stat-label--RZ+S4\",\"statLabel\":\"Stat--stat-label--RZ+S4\",\"stat-value\":\"Stat--stat-value--g-Ge3\",\"statValue\":\"Stat--stat-value--g-Ge3\",\"stat-xs\":\"Stat--stat-xs--beEWu\",\"statXs\":\"Stat--stat-xs--beEWu\",\"stat-sm\":\"Stat--stat-sm--q1LWG\",\"statSm\":\"Stat--stat-sm--q1LWG\",\"stat-lg\":\"Stat--stat-lg--aqKNh\",\"statLg\":\"Stat--stat-lg--aqKNh\",\"stat-xl\":\"Stat--stat-xl--Dpop4\",\"statXl\":\"Stat--stat-xl--Dpop4\"};","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport styles from './styles.scss';\n\nconst Stat = (props) => {\n const {\n value,\n label,\n type,\n wrapperClassName,\n labelClassName,\n valueClassName,\n labelAfterValue\n } = props;\n\n const labelElement = (\n \n {label}\n \n );\n\n const wrapperClasses = `${styles.stat} ${styles[type] || ''} ${\n wrapperClassName || ''\n }`;\n\n return (\n
\n {!labelAfterValue && labelElement}\n
\n {value}\n
\n {labelAfterValue && labelElement}\n
\n );\n};\n\nStat.TYPES = ['stat-xs', 'stat-sm', 'stat-lg', 'stat-xl'];\n\nStat.propTypes = {\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.element\n ]).isRequired,\n label: PropTypes.string.isRequired,\n type: PropTypes.oneOf(Stat.TYPES),\n wrapperClassName: PropTypes.string,\n labelClassName: PropTypes.string,\n valueClassName: PropTypes.string,\n labelAfterValue: PropTypes.bool\n};\n\nStat.defaultProps = {\n type: null,\n wrapperClassName: null,\n labelClassName: null,\n valueClassName: null,\n labelAfterValue: false\n};\n\nexport default Stat;\n","// extracted by mini-css-extract-plugin\nexport default {\"list-stats\":\"Stats--list-stats--N0R19\",\"listStats\":\"Stats--list-stats--N0R19\"};","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport styles from './styles.scss';\n\nconst Stats = (props) => {\n const { children, listClassName } = props;\n\n return (\n \n );\n};\n\nStats.propTypes = {\n children: PropTypes.node.isRequired,\n listClassName: PropTypes.string\n};\n\nStats.defaultProps = {\n listClassName: null\n};\n\nexport default Stats;\n"],"names":["root","reWhitespace","string","index","length","test","charAt","reTrimStart","slice","trimmedEndIndex","replace","value","isObjectLike","baseGetTag","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","isSymbol","isObject","other","valueOf","baseTrim","isBinary","nativeMax","Math","max","nativeMin","min","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","apply","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","now","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","arguments","this","clearTimeout","toNumber","cancel","flush","debounce","Area","stream","xScale","yScale","height","clipPath","fill","formatData","convertedElevation","map","elev","dist","convertedDistance","drawArea","area","x","d","y1","y0","className","styles","propTypes","PropTypes","isRequired","defaultProps","Axis","xAxisNode","React","yAxisNode","scalesAreEqual","scaleA","scaleB","domain","every","domainElement","includes","componentDidMount","drawAxes","componentDidUpdate","prevProps","props","scopeTo","width","hasScopeChanged","hasScaleChanged","hasWidthChanged","formatters","elevationFormatter","distanceFormatter","xAxis","axisBottom","yAxis","axisLeft","xTickCount","ticks","tickSize","tickFormat","e","formatShort","convert","select","current","render","id","ref","transform","Tooltip","content","position","chartWidth","chartMargin","textRef","useRef","useState","boxWidth","setBoxWidth","rightBound","padding","currBoxAlign","useLayoutEffect","Object","keys","widths","el","getBoundingClientRect","maxWidth","newSize","round","InfoBox","boxHeight","infoBox","y","stat","contentItem","key","dy","label","dx","group","marker","top","y2","x1","x2","right","bottom","left","ElevationChart","state","markerPosition","margin","tooltipContent","container","node","hitbox","handleResize","throttle","buildScales","updateMarker","onUpdateMarker","tooltipDistanceLabel","tooltipElevationLabel","tooltipGradeLabel","bounds","cursorPosition","clientX","distCursor","invert","streamIndex","bisectLeft","distance","elevation","grade","gradeAtIndex","setState","handleMouseLeave","onMouseLeave","window","addEventListener","prevElevation","prevDistance","prevUnits","units","elevationChanged","distanceChanged","componentWillUnmount","removeEventListener","ElevationFormatter","DistanceFormatter","gradePercentFormatter","PercentFormatter","heightProp","offsetWidth","yMax","yMin","scaleLinear","range","maxIndex","distanceDiff","start","end","enoughSpaceAtStart","enoughSpaceAtEnd","paddedStart","paddedEnd","croppedElevationStream","scopeColor","onMouseMove","Component","Stat","type","wrapperClassName","labelClassName","valueClassName","labelAfterValue","labelElement","statLabel","wrapperClasses","statValue","TYPES","Stats","children","listClassName","child"],"sourceRoot":""}