\n * );\n * ```\n */\n\n\nexport default function useTimeout() {\n var isMounted = useMounted(); // types are confused between node and web here IDK\n\n var handleRef = useRef();\n useWillUnmount(function () {\n return clearTimeout(handleRef.current);\n });\n return useMemo(function () {\n var clear = function clear() {\n return clearTimeout(handleRef.current);\n };\n\n function set(fn, delayMs) {\n if (delayMs === void 0) {\n delayMs = 0;\n }\n\n if (!isMounted()) return;\n clear();\n\n if (delayMs <= MAX_DELAY_MS) {\n // For simplicity, if the timeout is short, just set a normal timeout.\n handleRef.current = setTimeout(fn, delayMs);\n } else {\n setChainedTimeout(handleRef, fn, Date.now() + delayMs);\n }\n }\n\n return {\n set: set,\n clear: clear\n };\n }, []);\n}","import createWithBsPrefix from './createWithBsPrefix';\nexport default createWithBsPrefix('carousel-caption');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"bsPrefix\", \"children\", \"className\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar CarouselItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n bsPrefix = _ref.bsPrefix,\n children = _ref.children,\n className = _ref.className,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var finalClassName = classNames(className, useBootstrapPrefix(bsPrefix, 'carousel-item'));\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: finalClassName\n }), children);\n});\nCarouselItem.displayName = 'CarouselItem';\nexport default CarouselItem;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"bsPrefix\", \"slide\", \"fade\", \"controls\", \"indicators\", \"activeIndex\", \"onSelect\", \"onSlide\", \"onSlid\", \"interval\", \"keyboard\", \"onKeyDown\", \"pause\", \"onMouseOver\", \"onMouseOut\", \"wrap\", \"touch\", \"onTouchStart\", \"onTouchMove\", \"onTouchEnd\", \"prevIcon\", \"prevLabel\", \"nextIcon\", \"nextLabel\", \"className\", \"children\"];\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport useUpdateEffect from '@restart/hooks/useUpdateEffect';\nimport useCommittedRef from '@restart/hooks/useCommittedRef';\nimport useTimeout from '@restart/hooks/useTimeout';\nimport classNames from 'classnames';\nimport Transition from 'react-transition-group/Transition';\nimport PropTypes from 'prop-types';\nimport React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';\nimport { useUncontrolled } from 'uncontrollable';\nimport CarouselCaption from './CarouselCaption';\nimport CarouselItem from './CarouselItem';\nimport { map, forEach } from './ElementChildren';\nimport SafeAnchor from './SafeAnchor';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport transitionEndListener from './transitionEndListener';\nimport triggerBrowserReflow from './triggerBrowserReflow';\nvar SWIPE_THRESHOLD = 40;\nvar propTypes = {\n /**\n * @default 'carousel'\n */\n bsPrefix: PropTypes.string,\n as: PropTypes.elementType,\n\n /**\n * Enables animation on the Carousel as it transitions between slides.\n */\n slide: PropTypes.bool,\n\n /** Animates slides with a crossfade animation instead of the default slide animation */\n fade: PropTypes.bool,\n\n /**\n * Show the Carousel previous and next arrows for changing the current slide\n */\n controls: PropTypes.bool,\n\n /**\n * Show a set of slide position indicators\n */\n indicators: PropTypes.bool,\n\n /**\n * Controls the current visible slide\n *\n * @controllable onSelect\n */\n activeIndex: PropTypes.number,\n\n /**\n * Callback fired when the active item changes.\n *\n * ```js\n * (eventKey: number, event: Object | null) => void\n * ```\n *\n * @controllable activeIndex\n */\n onSelect: PropTypes.func,\n\n /**\n * Callback fired when a slide transition starts.\n *\n * ```js\n * (eventKey: number, direction: 'left' | 'right') => void\n */\n onSlide: PropTypes.func,\n\n /**\n * Callback fired when a slide transition ends.\n *\n * ```js\n * (eventKey: number, direction: 'left' | 'right') => void\n */\n onSlid: PropTypes.func,\n\n /**\n * The amount of time to delay between automatically cycling an item. If `null`, carousel will not automatically cycle.\n */\n interval: PropTypes.number,\n\n /** Whether the carousel should react to keyboard events. */\n keyboard: PropTypes.bool,\n\n /**\n * If set to `\"hover\"`, pauses the cycling of the carousel on `mouseenter` and resumes the cycling of the carousel on `mouseleave`. If set to `false`, hovering over the carousel won't pause it.\n *\n * On touch-enabled devices, when set to `\"hover\"`, cycling will pause on `touchend` (once the user finished interacting with the carousel) for two intervals, before automatically resuming. Note that this is in addition to the above mouse behavior.\n */\n pause: PropTypes.oneOf(['hover', false]),\n\n /** Whether the carousel should cycle continuously or have hard stops. */\n wrap: PropTypes.bool,\n\n /**\n * Whether the carousel should support left/right swipe interactions on touchscreen devices.\n */\n touch: PropTypes.bool,\n\n /** Override the default button icon for the \"previous\" control */\n prevIcon: PropTypes.node,\n\n /**\n * Label shown to screen readers only, can be used to show the previous element\n * in the carousel.\n * Set to null to deactivate.\n */\n prevLabel: PropTypes.string,\n\n /** Override the default button icon for the \"next\" control */\n nextIcon: PropTypes.node,\n\n /**\n * Label shown to screen readers only, can be used to show the next element\n * in the carousel.\n * Set to null to deactivate.\n */\n nextLabel: PropTypes.string\n};\nvar defaultProps = {\n slide: true,\n fade: false,\n controls: true,\n indicators: true,\n defaultActiveIndex: 0,\n interval: 5000,\n keyboard: true,\n pause: 'hover',\n wrap: true,\n touch: true,\n prevIcon: /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\",\n className: \"carousel-control-prev-icon\"\n }),\n prevLabel: 'Previous',\n nextIcon: /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\",\n className: \"carousel-control-next-icon\"\n }),\n nextLabel: 'Next'\n};\n\nfunction isVisible(element) {\n if (!element || !element.style || !element.parentNode || !element.parentNode.style) {\n return false;\n }\n\n var elementStyle = getComputedStyle(element);\n return elementStyle.display !== 'none' && elementStyle.visibility !== 'hidden' && getComputedStyle(element.parentNode).display !== 'none';\n}\n\nfunction CarouselFunc(uncontrolledProps, ref) {\n var _useUncontrolled = useUncontrolled(uncontrolledProps, {\n activeIndex: 'onSelect'\n }),\n _useUncontrolled$as = _useUncontrolled.as,\n Component = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,\n bsPrefix = _useUncontrolled.bsPrefix,\n slide = _useUncontrolled.slide,\n fade = _useUncontrolled.fade,\n controls = _useUncontrolled.controls,\n indicators = _useUncontrolled.indicators,\n activeIndex = _useUncontrolled.activeIndex,\n onSelect = _useUncontrolled.onSelect,\n onSlide = _useUncontrolled.onSlide,\n onSlid = _useUncontrolled.onSlid,\n interval = _useUncontrolled.interval,\n keyboard = _useUncontrolled.keyboard,\n onKeyDown = _useUncontrolled.onKeyDown,\n pause = _useUncontrolled.pause,\n onMouseOver = _useUncontrolled.onMouseOver,\n onMouseOut = _useUncontrolled.onMouseOut,\n wrap = _useUncontrolled.wrap,\n touch = _useUncontrolled.touch,\n onTouchStart = _useUncontrolled.onTouchStart,\n onTouchMove = _useUncontrolled.onTouchMove,\n onTouchEnd = _useUncontrolled.onTouchEnd,\n prevIcon = _useUncontrolled.prevIcon,\n prevLabel = _useUncontrolled.prevLabel,\n nextIcon = _useUncontrolled.nextIcon,\n nextLabel = _useUncontrolled.nextLabel,\n className = _useUncontrolled.className,\n children = _useUncontrolled.children,\n props = _objectWithoutPropertiesLoose(_useUncontrolled, _excluded);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'carousel');\n var nextDirectionRef = useRef(null);\n\n var _useState = useState('next'),\n direction = _useState[0],\n setDirection = _useState[1];\n\n var _useState2 = useState(false),\n paused = _useState2[0],\n setPaused = _useState2[1];\n\n var _useState3 = useState(false),\n isSliding = _useState3[0],\n setIsSliding = _useState3[1];\n\n var _useState4 = useState(activeIndex || 0),\n renderedActiveIndex = _useState4[0],\n setRenderedActiveIndex = _useState4[1];\n\n if (!isSliding && activeIndex !== renderedActiveIndex) {\n if (nextDirectionRef.current) {\n setDirection(nextDirectionRef.current);\n } else {\n setDirection((activeIndex || 0) > renderedActiveIndex ? 'next' : 'prev');\n }\n\n if (slide) {\n setIsSliding(true);\n }\n\n setRenderedActiveIndex(activeIndex || 0);\n }\n\n useEffect(function () {\n if (nextDirectionRef.current) {\n nextDirectionRef.current = null;\n }\n });\n var numChildren = 0;\n var activeChildInterval; // Iterate to grab all of the children's interval values\n // (and count them, too)\n\n forEach(children, function (child, index) {\n ++numChildren;\n\n if (index === activeIndex) {\n activeChildInterval = child.props.interval;\n }\n });\n var activeChildIntervalRef = useCommittedRef(activeChildInterval);\n var prev = useCallback(function (event) {\n if (isSliding) {\n return;\n }\n\n var nextActiveIndex = renderedActiveIndex - 1;\n\n if (nextActiveIndex < 0) {\n if (!wrap) {\n return;\n }\n\n nextActiveIndex = numChildren - 1;\n }\n\n nextDirectionRef.current = 'prev';\n\n if (onSelect) {\n onSelect(nextActiveIndex, event);\n }\n }, [isSliding, renderedActiveIndex, onSelect, wrap, numChildren]); // This is used in the setInterval, so it should not invalidate.\n\n var next = useEventCallback(function (event) {\n if (isSliding) {\n return;\n }\n\n var nextActiveIndex = renderedActiveIndex + 1;\n\n if (nextActiveIndex >= numChildren) {\n if (!wrap) {\n return;\n }\n\n nextActiveIndex = 0;\n }\n\n nextDirectionRef.current = 'next';\n\n if (onSelect) {\n onSelect(nextActiveIndex, event);\n }\n });\n var elementRef = useRef();\n useImperativeHandle(ref, function () {\n return {\n element: elementRef.current,\n prev: prev,\n next: next\n };\n }); // This is used in the setInterval, so it should not invalidate.\n\n var nextWhenVisible = useEventCallback(function () {\n if (!document.hidden && isVisible(elementRef.current)) {\n next();\n }\n });\n var slideDirection = direction === 'next' ? 'left' : 'right';\n useUpdateEffect(function () {\n if (slide) {\n // These callbacks will be handled by the callbacks.\n return;\n }\n\n if (onSlide) {\n onSlide(renderedActiveIndex, slideDirection);\n }\n\n if (onSlid) {\n onSlid(renderedActiveIndex, slideDirection);\n }\n }, [renderedActiveIndex]);\n var orderClassName = prefix + \"-item-\" + direction;\n var directionalClassName = prefix + \"-item-\" + slideDirection;\n var handleEnter = useCallback(function (node) {\n triggerBrowserReflow(node);\n\n if (onSlide) {\n onSlide(renderedActiveIndex, slideDirection);\n }\n }, [onSlide, renderedActiveIndex, slideDirection]);\n var handleEntered = useCallback(function () {\n setIsSliding(false);\n\n if (onSlid) {\n onSlid(renderedActiveIndex, slideDirection);\n }\n }, [onSlid, renderedActiveIndex, slideDirection]);\n var handleKeyDown = useCallback(function (event) {\n if (keyboard && !/input|textarea/i.test(event.target.tagName)) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n prev(event);\n return;\n\n case 'ArrowRight':\n event.preventDefault();\n next(event);\n return;\n\n default:\n }\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n }, [keyboard, onKeyDown, prev, next]);\n var handleMouseOver = useCallback(function (event) {\n if (pause === 'hover') {\n setPaused(true);\n }\n\n if (onMouseOver) {\n onMouseOver(event);\n }\n }, [pause, onMouseOver]);\n var handleMouseOut = useCallback(function (event) {\n setPaused(false);\n\n if (onMouseOut) {\n onMouseOut(event);\n }\n }, [onMouseOut]);\n var touchStartXRef = useRef(0);\n var touchDeltaXRef = useRef(0);\n var touchUnpauseTimeout = useTimeout();\n var handleTouchStart = useCallback(function (event) {\n touchStartXRef.current = event.touches[0].clientX;\n touchDeltaXRef.current = 0;\n\n if (pause === 'hover') {\n setPaused(true);\n }\n\n if (onTouchStart) {\n onTouchStart(event);\n }\n }, [pause, onTouchStart]);\n var handleTouchMove = useCallback(function (event) {\n if (event.touches && event.touches.length > 1) {\n touchDeltaXRef.current = 0;\n } else {\n touchDeltaXRef.current = event.touches[0].clientX - touchStartXRef.current;\n }\n\n if (onTouchMove) {\n onTouchMove(event);\n }\n }, [onTouchMove]);\n var handleTouchEnd = useCallback(function (event) {\n if (touch) {\n var touchDeltaX = touchDeltaXRef.current;\n\n if (Math.abs(touchDeltaX) > SWIPE_THRESHOLD) {\n if (touchDeltaX > 0) {\n prev(event);\n } else {\n next(event);\n }\n }\n }\n\n if (pause === 'hover') {\n touchUnpauseTimeout.set(function () {\n setPaused(false);\n }, interval || undefined);\n }\n\n if (onTouchEnd) {\n onTouchEnd(event);\n }\n }, [touch, pause, prev, next, touchUnpauseTimeout, interval, onTouchEnd]);\n var shouldPlay = interval != null && !paused && !isSliding;\n var intervalHandleRef = useRef();\n useEffect(function () {\n var _ref, _activeChildIntervalR;\n\n if (!shouldPlay) {\n return undefined;\n }\n\n intervalHandleRef.current = window.setInterval(document.visibilityState ? nextWhenVisible : next, (_ref = (_activeChildIntervalR = activeChildIntervalRef.current) != null ? _activeChildIntervalR : interval) != null ? _ref : undefined);\n return function () {\n if (intervalHandleRef.current !== null) {\n clearInterval(intervalHandleRef.current);\n }\n };\n }, [shouldPlay, next, activeChildIntervalRef, interval, nextWhenVisible]);\n var indicatorOnClicks = useMemo(function () {\n return indicators && Array.from({\n length: numChildren\n }, function (_, index) {\n return function (event) {\n if (onSelect) {\n onSelect(index, event);\n }\n };\n });\n }, [indicators, numChildren, onSelect]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: elementRef\n }, props, {\n onKeyDown: handleKeyDown,\n onMouseOver: handleMouseOver,\n onMouseOut: handleMouseOut,\n onTouchStart: handleTouchStart,\n onTouchMove: handleTouchMove,\n onTouchEnd: handleTouchEnd,\n className: classNames(className, prefix, slide && 'slide', fade && prefix + \"-fade\")\n }), indicators && /*#__PURE__*/React.createElement(\"ol\", {\n className: prefix + \"-indicators\"\n }, map(children, function (_child, index) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: index,\n className: index === renderedActiveIndex ? 'active' : undefined,\n onClick: indicatorOnClicks ? indicatorOnClicks[index] : undefined\n });\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: prefix + \"-inner\"\n }, map(children, function (child, index) {\n var isActive = index === renderedActiveIndex;\n return slide ? /*#__PURE__*/React.createElement(Transition, {\n in: isActive,\n onEnter: isActive ? handleEnter : undefined,\n onEntered: isActive ? handleEntered : undefined,\n addEndListener: transitionEndListener\n }, function (status) {\n return /*#__PURE__*/React.cloneElement(child, {\n className: classNames(child.props.className, isActive && status !== 'entered' && orderClassName, (status === 'entered' || status === 'exiting') && 'active', (status === 'entering' || status === 'exiting') && directionalClassName)\n });\n }) : /*#__PURE__*/React.cloneElement(child, {\n className: classNames(child.props.className, isActive && 'active')\n });\n })), controls && /*#__PURE__*/React.createElement(React.Fragment, null, (wrap || activeIndex !== 0) && /*#__PURE__*/React.createElement(SafeAnchor, {\n className: prefix + \"-control-prev\",\n onClick: prev\n }, prevIcon, prevLabel && /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, prevLabel)), (wrap || activeIndex !== numChildren - 1) && /*#__PURE__*/React.createElement(SafeAnchor, {\n className: prefix + \"-control-next\",\n onClick: next\n }, nextIcon, nextLabel && /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, nextLabel))));\n}\n\nvar Carousel = /*#__PURE__*/React.forwardRef(CarouselFunc);\nCarousel.displayName = 'Carousel';\nCarousel.propTypes = propTypes;\nCarousel.defaultProps = defaultProps;\nCarousel.Caption = CarouselCaption;\nCarousel.Item = CarouselItem;\nexport default Carousel;","import React from 'react';\n/**\n * Iterates through children that are typically specified as `props.children`,\n * but only maps over children that are \"valid elements\".\n *\n * The mapFunction provided index will be normalised to the components mapped,\n * so an invalid component would not increase the index.\n *\n */\n\nfunction map(children, func) {\n var index = 0;\n return React.Children.map(children, function (child) {\n return /*#__PURE__*/React.isValidElement(child) ? func(child, index++) : child;\n });\n}\n/**\n * Iterates through children that are \"valid elements\".\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child with the index reflecting the position relative to \"valid components\".\n */\n\n\nfunction forEach(children, func) {\n var index = 0;\n React.Children.forEach(children, function (child) {\n if ( /*#__PURE__*/React.isValidElement(child)) func(child, index++);\n });\n}\n\nexport { map, forEach };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"disabled\", \"onKeyDown\"];\nimport React from 'react';\nimport createChainedFunction from './createChainedFunction';\n\nfunction isTrivialHref(href) {\n return !href || href.trim() === '#';\n}\n/**\n * There are situations due to browser quirks or Bootstrap CSS where\n * an anchor tag is needed, when semantically a button tag is the\n * better choice. SafeAnchor ensures that when an anchor is used like a\n * button its accessible. It also emulates input `disabled` behavior for\n * links, which is usually desirable for Buttons, NavItems, DropdownItems, etc.\n */\n\n\nvar SafeAnchor = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'a' : _ref$as,\n disabled = _ref.disabled,\n onKeyDown = _ref.onKeyDown,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var handleClick = function handleClick(event) {\n var href = props.href,\n onClick = props.onClick;\n\n if (disabled || isTrivialHref(href)) {\n event.preventDefault();\n }\n\n if (disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n if (event.key === ' ') {\n event.preventDefault();\n handleClick(event);\n }\n };\n\n if (isTrivialHref(props.href)) {\n props.role = props.role || 'button'; // we want to make sure there is a href attribute on the node\n // otherwise, the cursor incorrectly styled (except with role='button')\n\n props.href = props.href || '#';\n }\n\n if (disabled) {\n props.tabIndex = -1;\n props['aria-disabled'] = true;\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n onClick: handleClick,\n onKeyDown: createChainedFunction(handleKeyDown, onKeyDown)\n }));\n});\nSafeAnchor.displayName = 'SafeAnchor';\nexport default SafeAnchor;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React, { useContext, useMemo } from 'react';\nvar ThemeContext = /*#__PURE__*/React.createContext({});\nvar Consumer = ThemeContext.Consumer,\n Provider = ThemeContext.Provider;\n\nfunction ThemeProvider(_ref) {\n var prefixes = _ref.prefixes,\n children = _ref.children;\n var copiedPrefixes = useMemo(function () {\n return _extends({}, prefixes);\n }, [prefixes]);\n return /*#__PURE__*/React.createElement(Provider, {\n value: copiedPrefixes\n }, children);\n}\n\nexport function useBootstrapPrefix(prefix, defaultPrefix) {\n var prefixes = useContext(ThemeContext);\n return prefix || prefixes[defaultPrefix] || defaultPrefix;\n}\n\nfunction createBootstrapComponent(Component, opts) {\n if (typeof opts === 'string') opts = {\n prefix: opts\n };\n var isClassy = Component.prototype && Component.prototype.isReactComponent; // If it's a functional component make sure we don't break it with a ref\n\n var _opts = opts,\n prefix = _opts.prefix,\n _opts$forwardRefAs = _opts.forwardRefAs,\n forwardRefAs = _opts$forwardRefAs === void 0 ? isClassy ? 'ref' : 'innerRef' : _opts$forwardRefAs;\n var Wrapped = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {\n var props = _extends({}, _ref2);\n\n props[forwardRefAs] = ref;\n var bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n bsPrefix: bsPrefix\n }));\n });\n Wrapped.displayName = \"Bootstrap(\" + (Component.displayName || Component.name) + \")\";\n return Wrapped;\n}\n\nexport { createBootstrapComponent, Consumer as ThemeConsumer };\nexport default ThemeProvider;","/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nfunction createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.filter(function (f) {\n return f != null;\n }).reduce(function (acc, f) {\n if (typeof f !== 'function') {\n throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n\n if (acc === null) return f;\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n } // @ts-ignore\n\n\n acc.apply(this, args); // @ts-ignore\n\n f.apply(this, args);\n };\n }, null);\n}\n\nexport default createChainedFunction;","var rHyphen = /-(.)/g;\nexport default function camelize(string) {\n return string.replace(rHyphen, function (_, chr) {\n return chr.toUpperCase();\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"bsPrefix\", \"as\"];\nimport classNames from 'classnames';\nimport camelize from 'dom-helpers/camelize';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\n\nvar pascalCase = function pascalCase(str) {\n return str[0].toUpperCase() + camelize(str).slice(1);\n}; // TODO: emstricten & fix the typing here! `createWithBsPrefix...`\n\n\nexport default function createWithBsPrefix(prefix, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$displayName = _ref.displayName,\n displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,\n Component = _ref.Component,\n defaultProps = _ref.defaultProps;\n\n var BsComponent = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {\n var className = _ref2.className,\n bsPrefix = _ref2.bsPrefix,\n _ref2$as = _ref2.as,\n Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,\n props = _objectWithoutPropertiesLoose(_ref2, _excluded);\n\n var resolvedPrefix = useBootstrapPrefix(bsPrefix, prefix);\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: ref,\n className: classNames(className, resolvedPrefix)\n }, props));\n });\n BsComponent.defaultProps = defaultProps;\n BsComponent.displayName = displayName;\n return BsComponent;\n}","import css from './css';\nimport listen from './listen';\nimport triggerEvent from './triggerEvent';\n\nfunction parseDuration(node) {\n var str = css(node, 'transitionDuration') || '';\n var mult = str.indexOf('ms') === -1 ? 1000 : 1;\n return parseFloat(str) * mult;\n}\n\nfunction emulateTransitionEnd(element, duration, padding) {\n if (padding === void 0) {\n padding = 5;\n }\n\n var called = false;\n var handle = setTimeout(function () {\n if (!called) triggerEvent(element, 'transitionend', true);\n }, duration + padding);\n var remove = listen(element, 'transitionend', function () {\n called = true;\n }, {\n once: true\n });\n return function () {\n clearTimeout(handle);\n remove();\n };\n}\n\nexport default function transitionEnd(element, handler, duration, padding) {\n if (duration == null) duration = parseDuration(element) || 0;\n var removeEmulate = emulateTransitionEnd(element, duration, padding);\n var remove = listen(element, 'transitionend', handler);\n return function () {\n removeEmulate();\n remove();\n };\n}","/**\n * Triggers an event on a given element.\n * \n * @param node the element\n * @param eventName the event name to trigger\n * @param bubbles whether the event should bubble up\n * @param cancelable whether the event should be cancelable\n */\nexport default function triggerEvent(node, eventName, bubbles, cancelable) {\n if (bubbles === void 0) {\n bubbles = false;\n }\n\n if (cancelable === void 0) {\n cancelable = true;\n }\n\n if (node) {\n var event = document.createEvent('HTMLEvents');\n event.initEvent(eventName, bubbles, cancelable);\n node.dispatchEvent(event);\n }\n}","import css from 'dom-helpers/css';\nimport transitionEnd from 'dom-helpers/transitionEnd';\n\nfunction parseDuration(node, property) {\n var str = css(node, property) || '';\n var mult = str.indexOf('ms') === -1 ? 1000 : 1;\n return parseFloat(str) * mult;\n}\n\nexport default function transitionEndListener(element, handler) {\n var duration = parseDuration(element, 'transitionDuration');\n var delay = parseDuration(element, 'transitionDelay');\n var remove = transitionEnd(element, function (e) {\n if (e.target === element) {\n remove();\n handler(e);\n }\n }, duration + delay);\n}","// reading a dimension prop will cause the browser to recalculate,\n// which will let our animations work\nexport default function triggerBrowserReflow(node) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n node.offsetHeight;\n}","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView; // Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n var length, i, keys;\n\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!equal(a[i], b[i])) return false;\n }\n\n return true;\n } // START: Modifications:\n // 1. Extra `has &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n\n\n var it;\n\n if (hasMap && a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false;\n it = a.entries();\n\n while (!(i = it.next()).done) {\n if (!b.has(i.value[0])) return false;\n }\n\n it = a.entries();\n\n while (!(i = it.next()).done) {\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n }\n\n return true;\n }\n\n if (hasSet && a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false;\n it = a.entries();\n\n while (!(i = it.next()).done) {\n if (!b.has(i.value[0])) return false;\n }\n\n return true;\n } // END: Modifications\n\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) {\n if (a[i] !== b[i]) return false;\n }\n\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n } // END: fast-deep-equal\n // START: react-fast-compare\n // custom handling for DOM elements\n\n\n if (hasElementType && a instanceof Element) return false; // custom handling for React/Preact\n\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n continue;\n } // all other properties should be traversed as usual\n\n\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n } // END: react-fast-compare\n // START: fast-deep-equal\n\n\n return true;\n }\n\n return a !== a && b !== b;\n} // end fast-deep-equal\n\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if ((error.message || '').match(/stack|recursion/i)) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n } // some other error. we should definitely know about these\n\n\n throw error;\n }\n};","import PropTypes from 'prop-types';\nimport withSideEffect from 'react-side-effect';\nimport isEqual from 'react-fast-compare';\nimport React from 'react';\nimport objectAssign from 'object-assign';\nvar ATTRIBUTE_NAMES = {\n BODY: \"bodyAttributes\",\n HTML: \"htmlAttributes\",\n TITLE: \"titleAttributes\"\n};\nvar TAG_NAMES = {\n BASE: \"base\",\n BODY: \"body\",\n HEAD: \"head\",\n HTML: \"html\",\n LINK: \"link\",\n META: \"meta\",\n NOSCRIPT: \"noscript\",\n SCRIPT: \"script\",\n STYLE: \"style\",\n TITLE: \"title\"\n};\nvar VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {\n return TAG_NAMES[name];\n});\nvar TAG_PROPERTIES = {\n CHARSET: \"charset\",\n CSS_TEXT: \"cssText\",\n HREF: \"href\",\n HTTPEQUIV: \"http-equiv\",\n INNER_HTML: \"innerHTML\",\n ITEM_PROP: \"itemprop\",\n NAME: \"name\",\n PROPERTY: \"property\",\n REL: \"rel\",\n SRC: \"src\",\n TARGET: \"target\"\n};\nvar REACT_TAG_MAP = {\n accesskey: \"accessKey\",\n charset: \"charSet\",\n class: \"className\",\n contenteditable: \"contentEditable\",\n contextmenu: \"contextMenu\",\n \"http-equiv\": \"httpEquiv\",\n itemprop: \"itemProp\",\n tabindex: \"tabIndex\"\n};\nvar HELMET_PROPS = {\n DEFAULT_TITLE: \"defaultTitle\",\n DEFER: \"defer\",\n ENCODE_SPECIAL_CHARACTERS: \"encodeSpecialCharacters\",\n ON_CHANGE_CLIENT_STATE: \"onChangeClientState\",\n TITLE_TEMPLATE: \"titleTemplate\"\n};\nvar HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key]] = key;\n return obj;\n}, {});\nvar SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];\nvar HELMET_ATTRIBUTE = \"data-react-helmet\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar inherits = function inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar objectWithoutProperties = function objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar encodeSpecialCharacters = function encodeSpecialCharacters(str) {\n var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (encode === false) {\n return String(str);\n }\n\n return String(str).replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n};\n\nvar getTitleFromPropsList = function getTitleFromPropsList(propsList) {\n var innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE);\n var innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n\n if (innermostTemplate && innermostTitle) {\n // use function arg to avoid need to escape $ characters\n return innermostTemplate.replace(/%s/g, function () {\n return Array.isArray(innermostTitle) ? innermostTitle.join(\"\") : innermostTitle;\n });\n }\n\n var innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n return innermostTitle || innermostDefaultTitle || undefined;\n};\n\nvar getOnChangeClientState = function getOnChangeClientState(propsList) {\n return getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};\n};\n\nvar getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {\n return propsList.filter(function (props) {\n return typeof props[tagType] !== \"undefined\";\n }).map(function (props) {\n return props[tagType];\n }).reduce(function (tagAttrs, current) {\n return _extends({}, tagAttrs, current);\n }, {});\n};\n\nvar getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {\n return propsList.filter(function (props) {\n return typeof props[TAG_NAMES.BASE] !== \"undefined\";\n }).map(function (props) {\n return props[TAG_NAMES.BASE];\n }).reverse().reduce(function (innermostBaseTag, tag) {\n if (!innermostBaseTag.length) {\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n\n return innermostBaseTag;\n }, []);\n};\n\nvar getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {\n // Calculate list of tags, giving priority innermost component (end of the propslist)\n var approvedSeenTags = {};\n return propsList.filter(function (props) {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n\n if (typeof props[tagName] !== \"undefined\") {\n warn(\"Helmet: \" + tagName + \" should be of type \\\"Array\\\". Instead found type \\\"\" + _typeof(props[tagName]) + \"\\\"\");\n }\n\n return false;\n }).map(function (props) {\n return props[tagName];\n }).reverse().reduce(function (approvedTags, instanceTags) {\n var instanceSeenTags = {};\n instanceTags.filter(function (tag) {\n var primaryAttributeKey = void 0;\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase(); // Special rule with link tags, since rel and href are both primary tags, rel takes priority\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === \"canonical\") && !(lowerCaseAttributeKey === TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === \"stylesheet\")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n } // Special case for innerHTML which doesn't work lowercased\n\n\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)) {\n primaryAttributeKey = attributeKey;\n }\n }\n\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n\n var value = tag[primaryAttributeKey].toLowerCase();\n\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n\n return false;\n }).reverse().forEach(function (tag) {\n return approvedTags.push(tag);\n }); // Update seen tags with tags from this instance\n\n var keys = Object.keys(instanceSeenTags);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var tagUnion = objectAssign({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);\n approvedSeenTags[attributeKey] = tagUnion;\n }\n\n return approvedTags;\n }, []).reverse();\n};\n\nvar getInnermostProperty = function getInnermostProperty(propsList, property) {\n for (var i = propsList.length - 1; i >= 0; i--) {\n var props = propsList[i];\n\n if (props.hasOwnProperty(property)) {\n return props[property];\n }\n }\n\n return null;\n};\n\nvar reducePropsToState = function reducePropsToState(propsList) {\n return {\n baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF, TAG_PROPERTIES.TARGET], propsList),\n bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList),\n defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList),\n linkTags: getTagsFromPropsList(TAG_NAMES.LINK, [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF], propsList),\n metaTags: getTagsFromPropsList(TAG_NAMES.META, [TAG_PROPERTIES.NAME, TAG_PROPERTIES.CHARSET, TAG_PROPERTIES.HTTPEQUIV, TAG_PROPERTIES.PROPERTY, TAG_PROPERTIES.ITEM_PROP], propsList),\n noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(TAG_NAMES.SCRIPT, [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML], propsList),\n styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList)\n };\n};\n\nvar rafPolyfill = function () {\n var clock = Date.now();\n return function (callback) {\n var currentTime = Date.now();\n\n if (currentTime - clock > 16) {\n clock = currentTime;\n callback(currentTime);\n } else {\n setTimeout(function () {\n rafPolyfill(callback);\n }, 0);\n }\n };\n}();\n\nvar cafPolyfill = function cafPolyfill(id) {\n return clearTimeout(id);\n};\n\nvar requestAnimationFrame = typeof window !== \"undefined\" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;\nvar cancelAnimationFrame = typeof window !== \"undefined\" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;\n\nvar warn = function warn(msg) {\n return console && typeof console.warn === \"function\" && console.warn(msg);\n};\n\nvar _helmetCallback = null;\n\nvar handleClientStateChange = function handleClientStateChange(newState) {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(function () {\n commitTagChanges(newState, function () {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\n\nvar commitTagChanges = function commitTagChanges(newState, cb) {\n var baseTag = newState.baseTag,\n bodyAttributes = newState.bodyAttributes,\n htmlAttributes = newState.htmlAttributes,\n linkTags = newState.linkTags,\n metaTags = newState.metaTags,\n noscriptTags = newState.noscriptTags,\n onChangeClientState = newState.onChangeClientState,\n scriptTags = newState.scriptTags,\n styleTags = newState.styleTags,\n title = newState.title,\n titleAttributes = newState.titleAttributes;\n updateAttributes(TAG_NAMES.BODY, bodyAttributes);\n updateAttributes(TAG_NAMES.HTML, htmlAttributes);\n updateTitle(title, titleAttributes);\n var tagUpdates = {\n baseTag: updateTags(TAG_NAMES.BASE, baseTag),\n linkTags: updateTags(TAG_NAMES.LINK, linkTags),\n metaTags: updateTags(TAG_NAMES.META, metaTags),\n noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags),\n scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags),\n styleTags: updateTags(TAG_NAMES.STYLE, styleTags)\n };\n var addedTags = {};\n var removedTags = {};\n Object.keys(tagUpdates).forEach(function (tagType) {\n var _tagUpdates$tagType = tagUpdates[tagType],\n newTags = _tagUpdates$tagType.newTags,\n oldTags = _tagUpdates$tagType.oldTags;\n\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n cb && cb();\n onChangeClientState(newState, addedTags, removedTags);\n};\n\nvar flattenArray = function flattenArray(possibleArray) {\n return Array.isArray(possibleArray) ? possibleArray.join(\"\") : possibleArray;\n};\n\nvar updateTitle = function updateTitle(title, attributes) {\n if (typeof title !== \"undefined\" && document.title !== title) {\n document.title = flattenArray(title);\n }\n\n updateAttributes(TAG_NAMES.TITLE, attributes);\n};\n\nvar updateAttributes = function updateAttributes(tagName, attributes) {\n var elementTag = document.getElementsByTagName(tagName)[0];\n\n if (!elementTag) {\n return;\n }\n\n var helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(\",\") : [];\n var attributesToRemove = [].concat(helmetAttributes);\n var attributeKeys = Object.keys(attributes);\n\n for (var i = 0; i < attributeKeys.length; i++) {\n var attribute = attributeKeys[i];\n var value = attributes[attribute] || \"\";\n\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n\n var indexToSave = attributesToRemove.indexOf(attribute);\n\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n\n for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {\n elementTag.removeAttribute(attributesToRemove[_i]);\n }\n\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(\",\")) {\n elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(\",\"));\n }\n};\n\nvar updateTags = function updateTags(type, tags) {\n var headElement = document.head || document.querySelector(TAG_NAMES.HEAD);\n var tagNodes = headElement.querySelectorAll(type + \"[\" + HELMET_ATTRIBUTE + \"]\");\n var oldTags = Array.prototype.slice.call(tagNodes);\n var newTags = [];\n var indexToDelete = void 0;\n\n if (tags && tags.length) {\n tags.forEach(function (tag) {\n var newElement = document.createElement(type);\n\n for (var attribute in tag) {\n if (tag.hasOwnProperty(attribute)) {\n if (attribute === TAG_PROPERTIES.INNER_HTML) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === TAG_PROPERTIES.CSS_TEXT) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n var value = typeof tag[attribute] === \"undefined\" ? \"\" : tag[attribute];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n\n newElement.setAttribute(HELMET_ATTRIBUTE, \"true\"); // Remove a duplicate tag from domTagstoRemove, so it isn't cleared.\n\n if (oldTags.some(function (existingTag, index) {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n\n oldTags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n newTags.forEach(function (tag) {\n return headElement.appendChild(tag);\n });\n return {\n oldTags: oldTags,\n newTags: newTags\n };\n};\n\nvar generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {\n return Object.keys(attributes).reduce(function (str, key) {\n var attr = typeof attributes[key] !== \"undefined\" ? key + \"=\\\"\" + attributes[key] + \"\\\"\" : \"\" + key;\n return str ? str + \" \" + attr : attr;\n }, \"\");\n};\n\nvar generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {\n var attributeString = generateElementAttributesAsString(attributes);\n var flattenedTitle = flattenArray(title);\n return attributeString ? \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeString + \">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"\" + type + \">\" : \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"\" + type + \">\";\n};\n\nvar generateTagsAsString = function generateTagsAsString(type, tags, encode) {\n return tags.reduce(function (str, tag) {\n var attributeHtml = Object.keys(tag).filter(function (attribute) {\n return !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT);\n }).reduce(function (string, attribute) {\n var attr = typeof tag[attribute] === \"undefined\" ? attribute : attribute + \"=\\\"\" + encodeSpecialCharacters(tag[attribute], encode) + \"\\\"\";\n return string ? string + \" \" + attr : attr;\n }, \"\");\n var tagContent = tag.innerHTML || tag.cssText || \"\";\n var isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n return str + \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeHtml + (isSelfClosing ? \"/>\" : \">\" + tagContent + \"\" + type + \">\");\n }, \"\");\n};\n\nvar convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {\n var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return Object.keys(attributes).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key] || key] = attributes[key];\n return obj;\n }, initProps);\n};\n\nvar convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {\n var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return Object.keys(props).reduce(function (obj, key) {\n obj[HTML_TAG_MAP[key] || key] = props[key];\n return obj;\n }, initAttributes);\n};\n\nvar generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {\n var _initProps; // assigning into an array to define toString function on it\n\n\n var initProps = (_initProps = {\n key: title\n }, _initProps[HELMET_ATTRIBUTE] = true, _initProps);\n var props = convertElementAttributestoReactProps(attributes, initProps);\n return [React.createElement(TAG_NAMES.TITLE, props, title)];\n};\n\nvar generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {\n return tags.map(function (tag, i) {\n var _mappedTag;\n\n var mappedTag = (_mappedTag = {\n key: i\n }, _mappedTag[HELMET_ATTRIBUTE] = true, _mappedTag);\n Object.keys(tag).forEach(function (attribute) {\n var mappedAttribute = REACT_TAG_MAP[attribute] || attribute;\n\n if (mappedAttribute === TAG_PROPERTIES.INNER_HTML || mappedAttribute === TAG_PROPERTIES.CSS_TEXT) {\n var content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = {\n __html: content\n };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n return React.createElement(type, mappedTag);\n });\n};\n\nvar getMethodsForTag = function getMethodsForTag(type, tags, encode) {\n switch (type) {\n case TAG_NAMES.TITLE:\n return {\n toComponent: function toComponent() {\n return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode);\n },\n toString: function toString() {\n return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);\n }\n };\n\n case ATTRIBUTE_NAMES.BODY:\n case ATTRIBUTE_NAMES.HTML:\n return {\n toComponent: function toComponent() {\n return convertElementAttributestoReactProps(tags);\n },\n toString: function toString() {\n return generateElementAttributesAsString(tags);\n }\n };\n\n default:\n return {\n toComponent: function toComponent() {\n return generateTagsAsReactComponent(type, tags);\n },\n toString: function toString() {\n return generateTagsAsString(type, tags, encode);\n }\n };\n }\n};\n\nvar mapStateOnServer = function mapStateOnServer(_ref) {\n var baseTag = _ref.baseTag,\n bodyAttributes = _ref.bodyAttributes,\n encode = _ref.encode,\n htmlAttributes = _ref.htmlAttributes,\n linkTags = _ref.linkTags,\n metaTags = _ref.metaTags,\n noscriptTags = _ref.noscriptTags,\n scriptTags = _ref.scriptTags,\n styleTags = _ref.styleTags,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? \"\" : _ref$title,\n titleAttributes = _ref.titleAttributes;\n return {\n base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),\n bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),\n link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),\n meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),\n noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),\n script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),\n style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),\n title: getMethodsForTag(TAG_NAMES.TITLE, {\n title: title,\n titleAttributes: titleAttributes\n }, encode)\n };\n};\n\nvar Helmet = function Helmet(Component) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n inherits(HelmetWrapper, _React$Component);\n\n function HelmetWrapper() {\n classCallCheck(this, HelmetWrapper);\n return possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !isEqual(this.props, nextProps);\n };\n\n HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n\n switch (child.type) {\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.NOSCRIPT:\n return {\n innerHTML: nestedChildren\n };\n\n case TAG_NAMES.STYLE:\n return {\n cssText: nestedChildren\n };\n }\n\n throw new Error(\"<\" + child.type + \" /> elements are self-closing and can not contain children. Refer to our API for more information.\");\n };\n\n HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {\n var _babelHelpers$extends;\n\n var child = _ref.child,\n arrayTypeChildren = _ref.arrayTypeChildren,\n newChildProps = _ref.newChildProps,\n nestedChildren = _ref.nestedChildren;\n return _extends({}, arrayTypeChildren, (_babelHelpers$extends = {}, _babelHelpers$extends[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _babelHelpers$extends));\n };\n\n HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {\n var _babelHelpers$extends2, _babelHelpers$extends3;\n\n var child = _ref2.child,\n newProps = _ref2.newProps,\n newChildProps = _ref2.newChildProps,\n nestedChildren = _ref2.nestedChildren;\n\n switch (child.type) {\n case TAG_NAMES.TITLE:\n return _extends({}, newProps, (_babelHelpers$extends2 = {}, _babelHelpers$extends2[child.type] = nestedChildren, _babelHelpers$extends2.titleAttributes = _extends({}, newChildProps), _babelHelpers$extends2));\n\n case TAG_NAMES.BODY:\n return _extends({}, newProps, {\n bodyAttributes: _extends({}, newChildProps)\n });\n\n case TAG_NAMES.HTML:\n return _extends({}, newProps, {\n htmlAttributes: _extends({}, newChildProps)\n });\n }\n\n return _extends({}, newProps, (_babelHelpers$extends3 = {}, _babelHelpers$extends3[child.type] = _extends({}, newChildProps), _babelHelpers$extends3));\n };\n\n HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n var newFlattenedProps = _extends({}, newProps);\n\n Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {\n var _babelHelpers$extends4;\n\n newFlattenedProps = _extends({}, newFlattenedProps, (_babelHelpers$extends4 = {}, _babelHelpers$extends4[arrayChildName] = arrayTypeChildren[arrayChildName], _babelHelpers$extends4));\n });\n return newFlattenedProps;\n };\n\n HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!VALID_TAG_NAMES.some(function (name) {\n return child.type === name;\n })) {\n if (typeof child.type === \"function\") {\n return warn(\"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.\");\n }\n\n return warn(\"Only elements types \" + VALID_TAG_NAMES.join(\", \") + \" are allowed. Helmet does not support rendering <\" + child.type + \"> elements. Refer to our API for more information.\");\n }\n\n if (nestedChildren && typeof nestedChildren !== \"string\" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) {\n return typeof nestedChild !== \"string\";\n }))) {\n throw new Error(\"Helmet expects a string as a child of <\" + child.type + \">. Did you forget to wrap your children in braces? ( <\" + child.type + \">{``}\" + child.type + \"> ) Refer to our API for more information.\");\n }\n }\n\n return true;\n };\n\n HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {\n var _this2 = this;\n\n var arrayTypeChildren = {};\n React.Children.forEach(children, function (child) {\n if (!child || !child.props) {\n return;\n }\n\n var _child$props = child.props,\n nestedChildren = _child$props.children,\n childProps = objectWithoutProperties(_child$props, [\"children\"]);\n var newChildProps = convertReactPropstoHtmlAttributes(childProps);\n\n _this2.warnOnInvalidChildren(child, nestedChildren);\n\n switch (child.type) {\n case TAG_NAMES.LINK:\n case TAG_NAMES.META:\n case TAG_NAMES.NOSCRIPT:\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.STYLE:\n arrayTypeChildren = _this2.flattenArrayTypeChildren({\n child: child,\n arrayTypeChildren: arrayTypeChildren,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n\n default:\n newProps = _this2.mapObjectTypeChildren({\n child: child,\n newProps: newProps,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n }\n });\n newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n return newProps;\n };\n\n HelmetWrapper.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n props = objectWithoutProperties(_props, [\"children\"]);\n\n var newProps = _extends({}, props);\n\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n\n return React.createElement(Component, newProps);\n };\n\n createClass(HelmetWrapper, null, [{\n key: \"canUseDOM\",\n // Component.peek comes from react-side-effect:\n // For testing, you may use a static peek() method available on the returned component.\n // It lets you get the current state without resetting the mounted instance stack.\n // Don’t use it for anything other than testing.\n\n /**\n * @param {Object} base: {\"target\": \"_blank\", \"href\": \"http://mysite.com/\"}\n * @param {Object} bodyAttributes: {\"className\": \"root\"}\n * @param {String} defaultTitle: \"Default Title\"\n * @param {Boolean} defer: true\n * @param {Boolean} encodeSpecialCharacters: true\n * @param {Object} htmlAttributes: {\"lang\": \"en\", \"amp\": undefined}\n * @param {Array} link: [{\"rel\": \"canonical\", \"href\": \"http://mysite.com/example\"}]\n * @param {Array} meta: [{\"name\": \"description\", \"content\": \"Test description\"}]\n * @param {Array} noscript: [{\"innerHTML\": \" console.log(newState)\"\n * @param {Array} script: [{\"type\": \"text/javascript\", \"src\": \"http://mysite.com/js/test.js\"}]\n * @param {Array} style: [{\"type\": \"text/css\", \"cssText\": \"div { display: block; color: blue; }\"}]\n * @param {String} title: \"Title\"\n * @param {Object} titleAttributes: {\"itemprop\": \"name\"}\n * @param {String} titleTemplate: \"MySite.com - %s\"\n */\n set: function set$$1(canUseDOM) {\n Component.canUseDOM = canUseDOM;\n }\n }]);\n return HelmetWrapper;\n }(React.Component), _class.propTypes = {\n base: PropTypes.object,\n bodyAttributes: PropTypes.object,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n defaultTitle: PropTypes.string,\n defer: PropTypes.bool,\n encodeSpecialCharacters: PropTypes.bool,\n htmlAttributes: PropTypes.object,\n link: PropTypes.arrayOf(PropTypes.object),\n meta: PropTypes.arrayOf(PropTypes.object),\n noscript: PropTypes.arrayOf(PropTypes.object),\n onChangeClientState: PropTypes.func,\n script: PropTypes.arrayOf(PropTypes.object),\n style: PropTypes.arrayOf(PropTypes.object),\n title: PropTypes.string,\n titleAttributes: PropTypes.object,\n titleTemplate: PropTypes.string\n }, _class.defaultProps = {\n defer: true,\n encodeSpecialCharacters: true\n }, _class.peek = Component.peek, _class.rewind = function () {\n var mappedState = Component.rewind();\n\n if (!mappedState) {\n // provide fallback if mappedState is undefined\n mappedState = mapStateOnServer({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: \"\",\n titleAttributes: {}\n });\n }\n\n return mappedState;\n }, _temp;\n};\n\nvar NullComponent = function NullComponent() {\n return null;\n};\n\nvar HelmetSideEffects = withSideEffect(reducePropsToState, handleClientStateChange, mapStateOnServer)(NullComponent);\nvar HelmetExport = Helmet(HelmetSideEffects);\nHelmetExport.renderStatic = HelmetExport.rewind;\nexport default HelmetExport;\nexport { HelmetExport as Helmet };","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar b = \"function\" === typeof Symbol && Symbol.for,\n c = b ? Symbol.for(\"react.element\") : 60103,\n d = b ? Symbol.for(\"react.portal\") : 60106,\n e = b ? Symbol.for(\"react.fragment\") : 60107,\n f = b ? Symbol.for(\"react.strict_mode\") : 60108,\n g = b ? Symbol.for(\"react.profiler\") : 60114,\n h = b ? Symbol.for(\"react.provider\") : 60109,\n k = b ? Symbol.for(\"react.context\") : 60110,\n l = b ? Symbol.for(\"react.async_mode\") : 60111,\n m = b ? Symbol.for(\"react.concurrent_mode\") : 60111,\n n = b ? Symbol.for(\"react.forward_ref\") : 60112,\n p = b ? Symbol.for(\"react.suspense\") : 60113,\n q = b ? Symbol.for(\"react.suspense_list\") : 60120,\n r = b ? Symbol.for(\"react.memo\") : 60115,\n t = b ? Symbol.for(\"react.lazy\") : 60116,\n v = b ? Symbol.for(\"react.block\") : 60121,\n w = b ? Symbol.for(\"react.fundamental\") : 60117,\n x = b ? Symbol.for(\"react.responder\") : 60118,\n y = b ? Symbol.for(\"react.scope\") : 60119;\n\nfunction z(a) {\n if (\"object\" === typeof a && null !== a) {\n var u = a.$$typeof;\n\n switch (u) {\n case c:\n switch (a = a.type, a) {\n case l:\n case m:\n case e:\n case g:\n case f:\n case p:\n return a;\n\n default:\n switch (a = a && a.$$typeof, a) {\n case k:\n case n:\n case t:\n case r:\n case h:\n return a;\n\n default:\n return u;\n }\n\n }\n\n case d:\n return u;\n }\n }\n}\n\nfunction A(a) {\n return z(a) === m;\n}\n\nexports.AsyncMode = l;\nexports.ConcurrentMode = m;\nexports.ContextConsumer = k;\nexports.ContextProvider = h;\nexports.Element = c;\nexports.ForwardRef = n;\nexports.Fragment = e;\nexports.Lazy = t;\nexports.Memo = r;\nexports.Portal = d;\nexports.Profiler = g;\nexports.StrictMode = f;\nexports.Suspense = p;\n\nexports.isAsyncMode = function (a) {\n return A(a) || z(a) === l;\n};\n\nexports.isConcurrentMode = A;\n\nexports.isContextConsumer = function (a) {\n return z(a) === k;\n};\n\nexports.isContextProvider = function (a) {\n return z(a) === h;\n};\n\nexports.isElement = function (a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === c;\n};\n\nexports.isForwardRef = function (a) {\n return z(a) === n;\n};\n\nexports.isFragment = function (a) {\n return z(a) === e;\n};\n\nexports.isLazy = function (a) {\n return z(a) === t;\n};\n\nexports.isMemo = function (a) {\n return z(a) === r;\n};\n\nexports.isPortal = function (a) {\n return z(a) === d;\n};\n\nexports.isProfiler = function (a) {\n return z(a) === g;\n};\n\nexports.isStrictMode = function (a) {\n return z(a) === f;\n};\n\nexports.isSuspense = function (a) {\n return z(a) === p;\n};\n\nexports.isValidElementType = function (a) {\n return \"string\" === typeof a || \"function\" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || \"object\" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);\n};\n\nexports.typeOf = z;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","'use strict';\n\nvar React = require('react');\n\nvar xtend = require('xtend');\n\nvar ReactIs = require('react-is');\n\nfunction astToReact(node, options) {\n var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var renderer = options.renderers[node.type]; // Nodes created by plugins do not have positional info, in which case we set\n // an object that matches the positon interface.\n\n if (!node.position) {\n node.position = {\n start: {\n line: null,\n column: null,\n offset: null\n },\n end: {\n line: null,\n column: null,\n offset: null\n }\n };\n }\n\n var pos = node.position.start;\n var key = [node.type, pos.line, pos.column, index].join('-');\n\n if (!ReactIs.isValidElementType(renderer)) {\n throw new Error(\"Renderer for type `\".concat(node.type, \"` not defined or is not renderable\"));\n }\n\n var nodeProps = getNodeProps(node, key, options, renderer, parent, index);\n return React.createElement(renderer, nodeProps, nodeProps.children || resolveChildren() || undefined);\n\n function resolveChildren() {\n return node.children && node.children.map(function (childNode, i) {\n return astToReact(childNode, options, {\n node: node,\n props: nodeProps\n }, i);\n });\n }\n} // eslint-disable-next-line max-params, complexity\n\n\nfunction getNodeProps(node, key, opts, renderer, parent, index) {\n var props = {\n key: key\n };\n var isSimpleRenderer = typeof renderer === 'string' || renderer === React.Fragment; // `sourcePos` is true if the user wants source information (line/column info from markdown source)\n\n if (opts.sourcePos && node.position) {\n props['data-sourcepos'] = flattenPosition(node.position);\n }\n\n if (opts.rawSourcePos && !isSimpleRenderer) {\n props.sourcePosition = node.position;\n } // If `includeNodeIndex` is true, pass node index info to all non-tag renderers\n\n\n if (opts.includeNodeIndex && parent.node && parent.node.children && !isSimpleRenderer) {\n props.index = parent.node.children.indexOf(node);\n props.parentChildCount = parent.node.children.length;\n }\n\n var ref = node.identifier !== null && node.identifier !== undefined ?\n /* istanbul ignore next - plugins could inject an undefined reference. */\n opts.definitions[node.identifier.toUpperCase()] || {} : null;\n\n switch (node.type) {\n case 'root':\n assignDefined(props, {\n className: opts.className\n });\n break;\n\n case 'text':\n props.nodeKey = key;\n props.children = node.value;\n break;\n\n case 'heading':\n props.level = node.depth;\n break;\n\n case 'list':\n props.start = node.start;\n props.ordered = node.ordered;\n props.spread = node.spread;\n props.depth = node.depth;\n break;\n\n case 'listItem':\n props.checked = node.checked;\n props.spread = node.spread;\n props.ordered = node.ordered;\n props.index = node.index;\n props.children = getListItemChildren(node, parent).map(function (childNode, i) {\n return astToReact(childNode, opts, {\n node: node,\n props: props\n }, i);\n });\n break;\n\n case 'definition':\n assignDefined(props, {\n identifier: node.identifier,\n title: node.title,\n url: node.url\n });\n break;\n\n case 'code':\n assignDefined(props, {\n language: node.lang && node.lang.split(/\\s/, 1)[0]\n });\n break;\n\n case 'inlineCode':\n props.children = node.value;\n props.inline = true;\n break;\n\n case 'link':\n assignDefined(props, {\n title: node.title || undefined,\n target: typeof opts.linkTarget === 'function' ? opts.linkTarget(node.url, node.children, node.title) : opts.linkTarget,\n href: opts.transformLinkUri ? opts.transformLinkUri(node.url, node.children, node.title) : node.url\n });\n break;\n\n case 'image':\n assignDefined(props, {\n src: opts.transformImageUri ? opts.transformImageUri(node.url, node.children, node.title, node.alt) : node.url,\n alt: node.alt || '',\n title: node.title || undefined\n });\n break;\n\n case 'linkReference':\n assignDefined(props, xtend(ref, {\n href: opts.transformLinkUri ? opts.transformLinkUri(ref.href) : ref.href\n }));\n break;\n\n case 'imageReference':\n assignDefined(props, {\n src: opts.transformImageUri && ref.href ? opts.transformImageUri(ref.href, node.children, ref.title, node.alt) : ref.href,\n alt: node.alt || '',\n title: ref.title || undefined\n });\n break;\n\n case 'table':\n case 'tableHead':\n case 'tableBody':\n props.columnAlignment = node.align;\n break;\n\n case 'tableRow':\n props.isHeader = parent.node.type === 'tableHead';\n props.columnAlignment = parent.props.columnAlignment;\n break;\n\n case 'tableCell':\n assignDefined(props, {\n isHeader: parent.props.isHeader,\n align: parent.props.columnAlignment[index]\n });\n break;\n\n case 'virtualHtml':\n props.tag = node.tag;\n break;\n\n case 'html':\n // @todo find a better way than this\n props.isBlock = node.position.start.line !== node.position.end.line;\n props.allowDangerousHtml = opts.allowDangerousHtml;\n props.escapeHtml = opts.escapeHtml;\n props.skipHtml = opts.skipHtml;\n break;\n\n case 'parsedHtml':\n {\n var parsedChildren;\n\n if (node.children) {\n parsedChildren = node.children.map(function (child, i) {\n return astToReact(child, opts, {\n node: node,\n props: props\n }, i);\n });\n }\n\n props.allowDangerousHtml = opts.allowDangerousHtml;\n props.escapeHtml = opts.escapeHtml;\n props.skipHtml = opts.skipHtml;\n props.element = node.element ? mergeNodeChildren(node, parsedChildren) : null;\n break;\n }\n\n default:\n assignDefined(props, xtend(node, {\n type: undefined,\n position: undefined,\n children: undefined\n }));\n }\n\n if (!isSimpleRenderer && node.value) {\n props.value = node.value;\n }\n\n if (!isSimpleRenderer) {\n props.node = node;\n }\n\n return props;\n}\n\nfunction assignDefined(target, attrs) {\n for (var key in attrs) {\n if (typeof attrs[key] !== 'undefined') {\n target[key] = attrs[key];\n }\n }\n}\n\nfunction mergeNodeChildren(node, parsedChildren) {\n var el = node.element;\n\n if (Array.isArray(el)) {\n /* istanbul ignore next - `div` fallback for old React. */\n var Fragment = React.Fragment || 'div';\n return React.createElement(Fragment, null, el);\n }\n\n if (el.props.children || parsedChildren) {\n var children = React.Children.toArray(el.props.children).concat(parsedChildren);\n return React.cloneElement(el, null, children);\n }\n\n return React.cloneElement(el, null);\n}\n\nfunction flattenPosition(pos) {\n return [pos.start.line, ':', pos.start.column, '-', pos.end.line, ':', pos.end.column].map(String).join('');\n}\n\nfunction getListItemChildren(node, parent) {\n /* istanbul ignore next - list items are always in a list, but best to be sure. */\n var loose = parent && parent.node ? listLoose(parent.node) : listItemLoose(node);\n return loose ? node.children : unwrapParagraphs(node);\n}\n\nfunction unwrapParagraphs(node) {\n return node.children.reduce(function (array, child) {\n return array.concat(child.type === 'paragraph' ? child.children : [child]);\n }, []);\n}\n\nfunction listLoose(node) {\n var children = node.children;\n var loose = node.spread;\n var index = -1;\n\n while (!loose && ++index < children.length) {\n loose = listItemLoose(children[index]);\n }\n\n return loose;\n}\n\nfunction listItemLoose(node) {\n var spread = node.spread;\n /* istanbul ignore next - spread is present from remark-parse, but maybe plugins don’t set it. */\n\n return spread === undefined || spread === null ? node.children.length > 1 : spread;\n}\n\nmodule.exports = astToReact;","'use strict';\n\nvar visit = require('unist-util-visit');\n\nmodule.exports = function getDefinitions(tree) {\n var definitions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n visit(tree, 'definition', function (node) {\n var identifier = node.identifier.toUpperCase();\n if (identifier in definitions) return;\n definitions[identifier] = {\n href: node.url,\n title: node.title\n };\n });\n return definitions;\n};","\"use strict\";\n\nvar visit = require('unist-util-visit');\n\nvar splice = [].splice;\n\nexports.ofType = function (types, mode) {\n return ifNotMatch(allow, mode);\n\n function allow(node, index, parent) {\n return !types.includes(node.type);\n }\n};\n\nexports.ifNotMatch = ifNotMatch;\n\nfunction ifNotMatch(allow, mode) {\n return transform;\n\n function transform(tree) {\n visit(tree, filter);\n return tree;\n } // eslint-disable-next-line consistent-return\n\n\n function filter(node, index, parent) {\n if (parent && !allow(node, index, parent)) {\n var parameters = [index, 1];\n\n if (mode === 'unwrap' && node.children) {\n parameters = parameters.concat(node.children);\n }\n\n splice.apply(parent.children, parameters);\n return index;\n }\n }\n}","\"use strict\";\n/**\n * Naive, simple plugin to match inline nodes without attributes\n * This allows say foo, but not foo\n * For proper HTML support, you'll want a different plugin\n **/\n\nvar visit = require('unist-util-visit');\n\nvar type = 'virtualHtml';\nvar selfClosingRe = /^<(area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)\\s*\\/?>$/i;\nvar simpleTagRe = /^<(\\/?)([a-z]+)\\s*>$/;\n\nmodule.exports = function (tree) {\n var open;\n var currentParent;\n visit(tree, 'html', function (node, index, parent) {\n if (currentParent !== parent) {\n open = [];\n currentParent = parent;\n }\n\n var selfClosing = getSelfClosing(node);\n\n if (selfClosing) {\n parent.children.splice(index, 1, {\n type: type,\n tag: selfClosing,\n position: node.position\n });\n return true;\n }\n\n var current = getSimpleTag(node, parent);\n\n if (!current) {\n return true;\n }\n\n var matching = findAndPull(open, current.tag);\n\n if (matching) {\n parent.children.splice(index, 0, virtual(current, matching, parent));\n } else if (!current.opening) {\n open.push(current);\n }\n\n return true;\n }, true // Iterate in reverse\n );\n return tree;\n};\n\nfunction findAndPull(open, matchingTag) {\n var i = open.length;\n\n while (i--) {\n if (open[i].tag === matchingTag) {\n return open.splice(i, 1)[0];\n }\n }\n\n return false;\n}\n\nfunction getSimpleTag(node, parent) {\n var match = node.value.match(simpleTagRe);\n return match ? {\n tag: match[2],\n opening: !match[1],\n node: node\n } : false;\n}\n\nfunction getSelfClosing(node) {\n var match = node.value.match(selfClosingRe);\n return match ? match[1] : false;\n}\n\nfunction virtual(fromNode, toNode, parent) {\n var fromIndex = parent.children.indexOf(fromNode.node);\n var toIndex = parent.children.indexOf(toNode.node);\n var extracted = parent.children.splice(fromIndex, toIndex - fromIndex + 1);\n var children = extracted.slice(1, -1);\n return {\n type: type,\n children: children,\n tag: fromNode.tag,\n position: {\n start: fromNode.node.position.start,\n end: toNode.node.position.end,\n indent: []\n }\n };\n}","'use strict';\n\nvar xtend = require('xtend');\n\nvar unified = require('unified');\n\nvar parse = require('remark-parse');\n\nvar PropTypes = require('prop-types');\n\nvar addListMetadata = require('mdast-add-list-metadata');\n\nvar naiveHtml = require('./plugins/naive-html');\n\nvar disallowNode = require('./plugins/disallow-node');\n\nvar astToReact = require('./ast-to-react');\n\nvar wrapTableRows = require('./wrap-table-rows');\n\nvar getDefinitions = require('./get-definitions');\n\nvar uriTransformer = require('./uri-transformer');\n\nvar defaultRenderers = require('./renderers');\n\nvar symbols = require('./symbols');\n\nvar allTypes = Object.keys(defaultRenderers);\n\nvar ReactMarkdown = function ReactMarkdown(props) {\n // To do in next major: remove `source`.\n var src = props.source || props.children || '';\n\n if (props.allowedTypes && props.disallowedTypes) {\n throw new Error('Only one of `allowedTypes` and `disallowedTypes` should be defined');\n }\n\n var renderers = xtend(defaultRenderers, props.renderers);\n var processor = unified().use(parse).use(props.plugins || []); // eslint-disable-next-line no-sync\n\n var tree = processor.runSync(processor.parse(src));\n var renderProps = xtend(props, {\n renderers: renderers,\n definitions: getDefinitions(tree)\n });\n determineAstToReactTransforms(props).forEach(function (transform) {\n tree = transform(tree, renderProps);\n });\n return tree;\n};\n\nfunction determineAstToReactTransforms(props) {\n var transforms = [wrapTableRows, addListMetadata()];\n var disallowedTypes = props.disallowedTypes;\n\n if (props.allowedTypes) {\n disallowedTypes = allTypes.filter(function (type) {\n return type !== 'root' && props.allowedTypes.indexOf(type) === -1;\n });\n }\n\n var removalMethod = props.unwrapDisallowed ? 'unwrap' : 'remove';\n\n if (disallowedTypes && disallowedTypes.length > 0) {\n transforms.push(disallowNode.ofType(disallowedTypes, removalMethod));\n }\n\n if (props.allowNode) {\n transforms.push(disallowNode.ifNotMatch(props.allowNode, removalMethod));\n } // To do in next major: remove `escapeHtml`.\n\n\n var renderHtml = (props.allowDangerousHtml || props.escapeHtml === false) && !props.skipHtml;\n var hasHtmlParser = (props.astPlugins || []).some(function (transform) {\n return transform.identity === symbols.HtmlParser;\n });\n\n if (renderHtml && !hasHtmlParser) {\n transforms.push(naiveHtml);\n }\n\n if (props.astPlugins) {\n transforms = transforms.concat(props.astPlugins);\n } // Add the final transform to turn everything into React.\n\n\n transforms.push(astToReact);\n return transforms;\n}\n\nReactMarkdown.defaultProps = {\n transformLinkUri: uriTransformer\n};\nReactMarkdown.propTypes = {\n className: PropTypes.string,\n source: PropTypes.string,\n children: PropTypes.string,\n sourcePos: PropTypes.bool,\n rawSourcePos: PropTypes.bool,\n escapeHtml: PropTypes.bool,\n allowDangerousHtml: PropTypes.bool,\n skipHtml: PropTypes.bool,\n allowNode: PropTypes.func,\n allowedTypes: PropTypes.arrayOf(PropTypes.oneOf(allTypes)),\n disallowedTypes: PropTypes.arrayOf(PropTypes.oneOf(allTypes)),\n transformLinkUri: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n linkTarget: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n transformImageUri: PropTypes.func,\n astPlugins: PropTypes.arrayOf(PropTypes.func),\n unwrapDisallowed: PropTypes.bool,\n renderers: PropTypes.object,\n plugins: PropTypes.array\n};\nReactMarkdown.types = allTypes;\nReactMarkdown.renderers = defaultRenderers;\nReactMarkdown.uriTransformer = uriTransformer;\nmodule.exports = ReactMarkdown;","/* eslint-disable react/prop-types, react/no-multi-comp */\n'use strict';\n\nvar xtend = require('xtend');\n\nvar React = require('react');\n/* istanbul ignore next - Don’t crash on old React. */\n\n\nvar supportsStringRender = parseInt((React.version || '16').slice(0, 2), 10) >= 16;\nvar createElement = React.createElement;\nmodule.exports = {\n break: 'br',\n paragraph: 'p',\n emphasis: 'em',\n strong: 'strong',\n thematicBreak: 'hr',\n blockquote: 'blockquote',\n delete: 'del',\n link: 'a',\n image: 'img',\n linkReference: 'a',\n imageReference: 'img',\n table: SimpleRenderer.bind(null, 'table'),\n tableHead: SimpleRenderer.bind(null, 'thead'),\n tableBody: SimpleRenderer.bind(null, 'tbody'),\n tableRow: SimpleRenderer.bind(null, 'tr'),\n tableCell: TableCell,\n root: Root,\n text: TextRenderer,\n list: List,\n listItem: ListItem,\n definition: NullRenderer,\n heading: Heading,\n inlineCode: InlineCode,\n code: CodeBlock,\n html: Html,\n virtualHtml: VirtualHtml,\n parsedHtml: ParsedHtml\n};\n\nfunction TextRenderer(props) {\n /* istanbul ignore next - a text node w/o a value could be injected by plugins */\n var children = props.children || '';\n /* istanbul ignore next - `span` is a fallback for old React. */\n\n return supportsStringRender ? children : createElement('span', null, children);\n}\n\nfunction Root(props) {\n var className = props.className;\n var root = !className && React.Fragment || 'div';\n return createElement(root, className ? {\n className: className\n } : null, props.children);\n}\n\nfunction SimpleRenderer(tag, props) {\n return createElement(tag, getCoreProps(props), props.children);\n}\n\nfunction TableCell(props) {\n var style = props.align ? {\n textAlign: props.align\n } : undefined;\n var coreProps = getCoreProps(props);\n return createElement(props.isHeader ? 'th' : 'td', style ? xtend({\n style: style\n }, coreProps) : coreProps, props.children);\n}\n\nfunction Heading(props) {\n return createElement(\"h\".concat(props.level), getCoreProps(props), props.children);\n}\n\nfunction List(props) {\n var attrs = getCoreProps(props);\n\n if (props.start !== null && props.start !== 1 && props.start !== undefined) {\n attrs.start = props.start.toString();\n }\n\n return createElement(props.ordered ? 'ol' : 'ul', attrs, props.children);\n}\n\nfunction ListItem(props) {\n var checkbox = null;\n\n if (props.checked !== null && props.checked !== undefined) {\n var checked = props.checked;\n checkbox = createElement('input', {\n type: 'checkbox',\n checked: checked,\n readOnly: true\n });\n }\n\n return createElement('li', getCoreProps(props), checkbox, props.children);\n}\n\nfunction CodeBlock(props) {\n var className = props.language && \"language-\".concat(props.language);\n var code = createElement('code', className ? {\n className: className\n } : null, props.value);\n return createElement('pre', getCoreProps(props), code);\n}\n\nfunction InlineCode(props) {\n return createElement('code', getCoreProps(props), props.children);\n}\n\nfunction Html(props) {\n if (props.skipHtml) {\n return null;\n }\n\n var dangerous = props.allowDangerousHtml || props.escapeHtml === false;\n var tag = props.isBlock ? 'div' : 'span';\n\n if (!dangerous) {\n /* istanbul ignore next - `tag` is a fallback for old React. */\n return createElement(React.Fragment || tag, null, props.value);\n }\n\n var nodeProps = {\n dangerouslySetInnerHTML: {\n __html: props.value\n }\n };\n return createElement(tag, nodeProps);\n}\n\nfunction ParsedHtml(props) {\n /* To do: `React.cloneElement` is slow, is it really needed? */\n return props['data-sourcepos'] ? React.cloneElement(props.element, {\n 'data-sourcepos': props['data-sourcepos']\n }) : props.element;\n}\n\nfunction VirtualHtml(props) {\n return createElement(props.tag, getCoreProps(props), props.children);\n}\n\nfunction NullRenderer() {\n return null;\n}\n\nfunction getCoreProps(props) {\n var source = props['data-sourcepos'];\n /* istanbul ignore next - nodes from plugins w/o position */\n\n return source ? {\n 'data-sourcepos': source\n } : {};\n}","\"use strict\";\n\nvar HtmlParser = '__RMD_HTML_PARSER__';\n/* istanbul ignore next - Fallback for `Symbol`. */\n\nexports.HtmlParser = typeof Symbol === 'undefined' ? HtmlParser : Symbol(HtmlParser);","\"use strict\";\n\nvar protocols = ['http', 'https', 'mailto', 'tel'];\n\nmodule.exports = function uriTransformer(uri) {\n var url = (uri || '').trim();\n var first = url.charAt(0);\n\n if (first === '#' || first === '/') {\n return url;\n }\n\n var colon = url.indexOf(':');\n\n if (colon === -1) {\n return url;\n }\n\n var length = protocols.length;\n var index = -1;\n\n while (++index < length) {\n var protocol = protocols[index];\n\n if (colon === protocol.length && url.slice(0, protocol.length).toLowerCase() === protocol) {\n return url;\n }\n }\n\n index = url.indexOf('?');\n\n if (index !== -1 && colon > index) {\n return url;\n }\n\n index = url.indexOf('#');\n\n if (index !== -1 && colon > index) {\n return url;\n } // eslint-disable-next-line no-script-url\n\n\n return 'javascript:void(0)';\n};","'use strict';\n\nvar visit = require('unist-util-visit');\n\nmodule.exports = function (node) {\n visit(node, 'table', wrap);\n return node;\n};\n\nfunction wrap(table) {\n var children = table.children;\n table.children = [{\n type: 'tableHead',\n align: table.align,\n children: [children[0]],\n position: children[0].position\n }];\n\n if (children.length > 1) {\n table.children.push({\n type: 'tableBody',\n align: table.align,\n children: children.slice(1),\n position: {\n start: children[1].position.start,\n end: children[children.length - 1].position.end\n }\n });\n }\n}","'use strict';\n\nfunction _interopDefault(ex) {\n return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;\n}\n\nvar React = require('react');\n\nvar React__default = _interopDefault(React);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n\n var SideEffect = /*#__PURE__*/function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n } // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n\n\n SideEffect.peek = function peek() {\n return state;\n };\n\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React__default.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(React.PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n\n return SideEffect;\n };\n}\n\nmodule.exports = withSideEffect;","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n * \n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\n\n// Name the function so it is clearer in the documentation\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","'use strict';\n\nmodule.exports = parse;\n\nvar fromMarkdown = require('mdast-util-from-markdown');\n\nfunction parse(options) {\n var self = this;\n this.Parser = parse;\n\n function parse(doc) {\n return fromMarkdown(doc, Object.assign({}, self.data('settings'), options, {\n // Note: these options are not in the readme.\n // The goal is for them to be set by plugins on `data` instead of being\n // passed by users.\n extensions: self.data('micromarkExtensions') || [],\n mdastExtensions: self.data('fromMarkdownExtensions') || []\n }));\n }\n}","'use strict';\n\nvar wrap = require('./wrap.js');\n\nmodule.exports = trough;\ntrough.wrap = wrap;\nvar slice = [].slice; // Create new middleware.\n\nfunction trough() {\n var fns = [];\n var middleware = {};\n middleware.run = run;\n middleware.use = use;\n return middleware; // Run `fns`. Last argument must be a completion handler.\n\n function run() {\n var index = -1;\n var input = slice.call(arguments, 0, -1);\n var done = arguments[arguments.length - 1];\n\n if (typeof done !== 'function') {\n throw new Error('Expected function as last argument, not ' + done);\n }\n\n next.apply(null, [null].concat(input)); // Run the next `fn`, if any.\n\n function next(err) {\n var fn = fns[++index];\n var params = slice.call(arguments, 0);\n var values = params.slice(1);\n var length = input.length;\n var pos = -1;\n\n if (err) {\n done(err);\n return;\n } // Copy non-nully input into values.\n\n\n while (++pos < length) {\n if (values[pos] === null || values[pos] === undefined) {\n values[pos] = input[pos];\n }\n }\n\n input = values; // Next or done.\n\n if (fn) {\n wrap(fn, next).apply(null, input);\n } else {\n done.apply(null, [null].concat(input));\n }\n }\n } // Add `fn` to the list.\n\n\n function use(fn) {\n if (typeof fn !== 'function') {\n throw new Error('Expected `fn` to be a function, not ' + fn);\n }\n\n fns.push(fn);\n return middleware;\n }\n}","'use strict';\n\nvar slice = [].slice;\nmodule.exports = wrap; // Wrap `fn`.\n// Can be sync or async; return a promise, receive a completion handler, return\n// new values and errors.\n\nfunction wrap(fn, callback) {\n var invoked;\n return wrapped;\n\n function wrapped() {\n var params = slice.call(arguments, 0);\n var callback = fn.length > params.length;\n var result;\n\n if (callback) {\n params.push(done);\n }\n\n try {\n result = fn.apply(null, params);\n } catch (error) {\n // Well, this is quite the pickle.\n // `fn` received a callback and invoked it (thus continuing the pipeline),\n // but later also threw an error.\n // We’re not about to restart the pipeline again, so the only thing left\n // to do is to throw the thing instead.\n if (callback && invoked) {\n throw error;\n }\n\n return done(error);\n }\n\n if (!callback) {\n if (result && typeof result.then === 'function') {\n result.then(then, done);\n } else if (result instanceof Error) {\n done(result);\n } else {\n then(result);\n }\n }\n } // Invoke `next`, only once.\n\n\n function done() {\n if (!invoked) {\n invoked = true;\n callback.apply(null, arguments);\n }\n } // Invoke `done` with one value.\n // Tracks if an error is passed, too.\n\n\n function then(value) {\n done(null, value);\n }\n}","import invariant from 'invariant';\n\nvar noop = function noop() {};\n\nfunction readOnlyPropType(handler, name) {\n return function (props, propName) {\n if (props[propName] !== undefined) {\n if (!props[handler]) {\n return new Error(\"You have provided a `\" + propName + \"` prop to `\" + name + \"` \" + (\"without an `\" + handler + \"` handler prop. This will render a read-only field. \") + (\"If the field should be mutable use `\" + defaultKey(propName) + \"`. \") + (\"Otherwise, set `\" + handler + \"`.\"));\n }\n }\n };\n}\n\nexport function uncontrolledPropTypes(controlledValues, displayName) {\n var propTypes = {};\n Object.keys(controlledValues).forEach(function (prop) {\n // add default propTypes for folks that use runtime checks\n propTypes[defaultKey(prop)] = noop;\n\n if (process.env.NODE_ENV !== 'production') {\n var handler = controlledValues[prop];\n !(typeof handler === 'string' && handler.trim().length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop) : invariant(false) : void 0;\n propTypes[prop] = readOnlyPropType(handler, displayName);\n }\n });\n return propTypes;\n}\nexport function isProp(props, prop) {\n return props[prop] !== undefined;\n}\nexport function defaultKey(key) {\n return 'default' + key.charAt(0).toUpperCase() + key.substr(1);\n}\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nexport function canAcceptRef(component) {\n return !!component && (typeof component !== 'function' || component.prototype && component.prototype.isReactComponent);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n\n return (hint === \"string\" ? String : Number)(input);\n}\n\nimport { useCallback, useRef, useState } from 'react';\nimport * as Utils from './utils';\n\nfunction useUncontrolledProp(propValue, defaultValue, handler) {\n var wasPropRef = useRef(propValue !== undefined);\n\n var _useState = useState(defaultValue),\n stateValue = _useState[0],\n setState = _useState[1];\n\n var isProp = propValue !== undefined;\n var wasProp = wasPropRef.current;\n wasPropRef.current = isProp;\n /**\n * If a prop switches from controlled to Uncontrolled\n * reset its value to the defaultValue\n */\n\n if (!isProp && wasProp && stateValue !== defaultValue) {\n setState(defaultValue);\n }\n\n return [isProp ? propValue : stateValue, useCallback(function (value) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (handler) handler.apply(void 0, [value].concat(args));\n setState(value);\n }, [handler])];\n}\n\nexport { useUncontrolledProp };\nexport default function useUncontrolled(props, config) {\n return Object.keys(config).reduce(function (result, fieldName) {\n var _extends2;\n\n var _ref = result,\n defaultValue = _ref[Utils.defaultKey(fieldName)],\n propsValue = _ref[fieldName],\n rest = _objectWithoutPropertiesLoose(_ref, [Utils.defaultKey(fieldName), fieldName].map(_toPropertyKey));\n\n var handlerName = config[fieldName];\n\n var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]),\n value = _useUncontrolledProp[0],\n handler = _useUncontrolledProp[1];\n\n return _extends({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2));\n }, props);\n}","'use strict';\n\nvar bail = require('bail');\n\nvar buffer = require('is-buffer');\n\nvar extend = require('extend');\n\nvar plain = require('is-plain-obj');\n\nvar trough = require('trough');\n\nvar vfile = require('vfile'); // Expose a frozen processor.\n\n\nmodule.exports = unified().freeze();\nvar slice = [].slice;\nvar own = {}.hasOwnProperty; // Process pipeline.\n\nvar pipeline = trough().use(pipelineParse).use(pipelineRun).use(pipelineStringify);\n\nfunction pipelineParse(p, ctx) {\n ctx.tree = p.parse(ctx.file);\n}\n\nfunction pipelineRun(p, ctx, next) {\n p.run(ctx.tree, ctx.file, done);\n\n function done(error, tree, file) {\n if (error) {\n next(error);\n } else {\n ctx.tree = tree;\n ctx.file = file;\n next();\n }\n }\n}\n\nfunction pipelineStringify(p, ctx) {\n var result = p.stringify(ctx.tree, ctx.file);\n\n if (result === undefined || result === null) {// Empty.\n } else if (typeof result === 'string' || buffer(result)) {\n ctx.file.contents = result;\n } else {\n ctx.file.result = result;\n }\n} // Function to create the first processor.\n\n\nfunction unified() {\n var attachers = [];\n var transformers = trough();\n var namespace = {};\n var freezeIndex = -1;\n var frozen; // Data management.\n\n processor.data = data; // Lock.\n\n processor.freeze = freeze; // Plugins.\n\n processor.attachers = attachers;\n processor.use = use; // API.\n\n processor.parse = parse;\n processor.stringify = stringify;\n processor.run = run;\n processor.runSync = runSync;\n processor.process = process;\n processor.processSync = processSync; // Expose.\n\n return processor; // Create a new processor based on the processor in the current scope.\n\n function processor() {\n var destination = unified();\n var index = -1;\n\n while (++index < attachers.length) {\n destination.use.apply(null, attachers[index]);\n }\n\n destination.data(extend(true, {}, namespace));\n return destination;\n } // Freeze: used to signal a processor that has finished configuration.\n //\n // For example, take unified itself: it’s frozen.\n // Plugins should not be added to it.\n // Rather, it should be extended, by invoking it, before modifying it.\n //\n // In essence, always invoke this when exporting a processor.\n\n\n function freeze() {\n var values;\n var transformer;\n\n if (frozen) {\n return processor;\n }\n\n while (++freezeIndex < attachers.length) {\n values = attachers[freezeIndex];\n\n if (values[1] === false) {\n continue;\n }\n\n if (values[1] === true) {\n values[1] = undefined;\n }\n\n transformer = values[0].apply(processor, values.slice(1));\n\n if (typeof transformer === 'function') {\n transformers.use(transformer);\n }\n }\n\n frozen = true;\n freezeIndex = Infinity;\n return processor;\n } // Data management.\n // Getter / setter for processor-specific informtion.\n\n\n function data(key, value) {\n if (typeof key === 'string') {\n // Set `key`.\n if (arguments.length === 2) {\n assertUnfrozen('data', frozen);\n namespace[key] = value;\n return processor;\n } // Get `key`.\n\n\n return own.call(namespace, key) && namespace[key] || null;\n } // Set space.\n\n\n if (key) {\n assertUnfrozen('data', frozen);\n namespace = key;\n return processor;\n } // Get space.\n\n\n return namespace;\n } // Plugin management.\n //\n // Pass it:\n // * an attacher and options,\n // * a preset,\n // * a list of presets, attachers, and arguments (list of attachers and\n // options).\n\n\n function use(value) {\n var settings;\n assertUnfrozen('use', frozen);\n\n if (value === null || value === undefined) {// Empty.\n } else if (typeof value === 'function') {\n addPlugin.apply(null, arguments);\n } else if (typeof value === 'object') {\n if ('length' in value) {\n addList(value);\n } else {\n addPreset(value);\n }\n } else {\n throw new Error('Expected usable value, not `' + value + '`');\n }\n\n if (settings) {\n namespace.settings = extend(namespace.settings || {}, settings);\n }\n\n return processor;\n\n function addPreset(result) {\n addList(result.plugins);\n\n if (result.settings) {\n settings = extend(settings || {}, result.settings);\n }\n }\n\n function add(value) {\n if (typeof value === 'function') {\n addPlugin(value);\n } else if (typeof value === 'object') {\n if ('length' in value) {\n addPlugin.apply(null, value);\n } else {\n addPreset(value);\n }\n } else {\n throw new Error('Expected usable value, not `' + value + '`');\n }\n }\n\n function addList(plugins) {\n var index = -1;\n\n if (plugins === null || plugins === undefined) {// Empty.\n } else if (typeof plugins === 'object' && 'length' in plugins) {\n while (++index < plugins.length) {\n add(plugins[index]);\n }\n } else {\n throw new Error('Expected a list of plugins, not `' + plugins + '`');\n }\n }\n\n function addPlugin(plugin, value) {\n var entry = find(plugin);\n\n if (entry) {\n if (plain(entry[1]) && plain(value)) {\n value = extend(true, entry[1], value);\n }\n\n entry[1] = value;\n } else {\n attachers.push(slice.call(arguments));\n }\n }\n }\n\n function find(plugin) {\n var index = -1;\n\n while (++index < attachers.length) {\n if (attachers[index][0] === plugin) {\n return attachers[index];\n }\n }\n } // Parse a file (in string or vfile representation) into a unist node using\n // the `Parser` on the processor.\n\n\n function parse(doc) {\n var file = vfile(doc);\n var Parser;\n freeze();\n Parser = processor.Parser;\n assertParser('parse', Parser);\n\n if (newable(Parser, 'parse')) {\n return new Parser(String(file), file).parse();\n }\n\n return Parser(String(file), file); // eslint-disable-line new-cap\n } // Run transforms on a unist node representation of a file (in string or\n // vfile representation), async.\n\n\n function run(node, file, cb) {\n assertNode(node);\n freeze();\n\n if (!cb && typeof file === 'function') {\n cb = file;\n file = null;\n }\n\n if (!cb) {\n return new Promise(executor);\n }\n\n executor(null, cb);\n\n function executor(resolve, reject) {\n transformers.run(node, vfile(file), done);\n\n function done(error, tree, file) {\n tree = tree || node;\n\n if (error) {\n reject(error);\n } else if (resolve) {\n resolve(tree);\n } else {\n cb(null, tree, file);\n }\n }\n }\n } // Run transforms on a unist node representation of a file (in string or\n // vfile representation), sync.\n\n\n function runSync(node, file) {\n var result;\n var complete;\n run(node, file, done);\n assertDone('runSync', 'run', complete);\n return result;\n\n function done(error, tree) {\n complete = true;\n result = tree;\n bail(error);\n }\n } // Stringify a unist node representation of a file (in string or vfile\n // representation) into a string using the `Compiler` on the processor.\n\n\n function stringify(node, doc) {\n var file = vfile(doc);\n var Compiler;\n freeze();\n Compiler = processor.Compiler;\n assertCompiler('stringify', Compiler);\n assertNode(node);\n\n if (newable(Compiler, 'compile')) {\n return new Compiler(node, file).compile();\n }\n\n return Compiler(node, file); // eslint-disable-line new-cap\n } // Parse a file (in string or vfile representation) into a unist node using\n // the `Parser` on the processor, then run transforms on that node, and\n // compile the resulting node using the `Compiler` on the processor, and\n // store that result on the vfile.\n\n\n function process(doc, cb) {\n freeze();\n assertParser('process', processor.Parser);\n assertCompiler('process', processor.Compiler);\n\n if (!cb) {\n return new Promise(executor);\n }\n\n executor(null, cb);\n\n function executor(resolve, reject) {\n var file = vfile(doc);\n pipeline.run(processor, {\n file: file\n }, done);\n\n function done(error) {\n if (error) {\n reject(error);\n } else if (resolve) {\n resolve(file);\n } else {\n cb(null, file);\n }\n }\n }\n } // Process the given document (in string or vfile representation), sync.\n\n\n function processSync(doc) {\n var file;\n var complete;\n freeze();\n assertParser('processSync', processor.Parser);\n assertCompiler('processSync', processor.Compiler);\n file = vfile(doc);\n process(file, done);\n assertDone('processSync', 'process', complete);\n return file;\n\n function done(error) {\n complete = true;\n bail(error);\n }\n }\n} // Check if `value` is a constructor.\n\n\nfunction newable(value, name) {\n return typeof value === 'function' && value.prototype && ( // A function with keys in its prototype is probably a constructor.\n // Classes’ prototype methods are not enumerable, so we check if some value\n // exists in the prototype.\n keys(value.prototype) || name in value.prototype);\n} // Check if `value` is an object with keys.\n\n\nfunction keys(value) {\n var key;\n\n for (key in value) {\n return true;\n }\n\n return false;\n} // Assert a parser is available.\n\n\nfunction assertParser(name, Parser) {\n if (typeof Parser !== 'function') {\n throw new Error('Cannot `' + name + '` without `Parser`');\n }\n} // Assert a compiler is available.\n\n\nfunction assertCompiler(name, Compiler) {\n if (typeof Compiler !== 'function') {\n throw new Error('Cannot `' + name + '` without `Compiler`');\n }\n} // Assert the processor is not frozen.\n\n\nfunction assertUnfrozen(name, frozen) {\n if (frozen) {\n throw new Error('Cannot invoke `' + name + '` on a frozen processor.\\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.');\n }\n} // Assert `node` is a unist node.\n\n\nfunction assertNode(node) {\n if (!node || typeof node.type !== 'string') {\n throw new Error('Expected node, got `' + node + '`');\n }\n} // Assert that `complete` is `true`.\n\n\nfunction assertDone(name, asyncName, complete) {\n if (!complete) {\n throw new Error('`' + name + '` finished async. Use `' + asyncName + '` instead');\n }\n}","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nmodule.exports = function isBuffer(obj) {\n return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);\n};","'use strict';\n\nmodule.exports = function (value) {\n if (Object.prototype.toString.call(value) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(value);\n return prototype === null || prototype === Object.prototype;\n};","'use strict';\n\nmodule.exports = convert;\n\nfunction convert(test) {\n if (test == null) {\n return ok;\n }\n\n if (typeof test === 'string') {\n return typeFactory(test);\n }\n\n if (typeof test === 'object') {\n return 'length' in test ? anyFactory(test) : allFactory(test);\n }\n\n if (typeof test === 'function') {\n return test;\n }\n\n throw new Error('Expected function, string, or object as test');\n} // Utility assert each property in `test` is represented in `node`, and each\n// values are strictly equal.\n\n\nfunction allFactory(test) {\n return all;\n\n function all(node) {\n var key;\n\n for (key in test) {\n if (node[key] !== test[key]) return false;\n }\n\n return true;\n }\n}\n\nfunction anyFactory(tests) {\n var checks = [];\n var index = -1;\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index]);\n }\n\n return any;\n\n function any() {\n var index = -1;\n\n while (++index < checks.length) {\n if (checks[index].apply(this, arguments)) {\n return true;\n }\n }\n\n return false;\n }\n} // Utility to convert a string into a function which checks a given node’s type\n// for said string.\n\n\nfunction typeFactory(test) {\n return type;\n\n function type(node) {\n return Boolean(node && node.type === test);\n }\n} // Utility to return true.\n\n\nfunction ok() {\n return true;\n}","'use strict';\n\nvar own = {}.hasOwnProperty;\nmodule.exports = stringify;\n\nfunction stringify(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return '';\n } // Node.\n\n\n if (own.call(value, 'position') || own.call(value, 'type')) {\n return position(value.position);\n } // Position.\n\n\n if (own.call(value, 'start') || own.call(value, 'end')) {\n return position(value);\n } // Point.\n\n\n if (own.call(value, 'line') || own.call(value, 'column')) {\n return point(value);\n } // ?\n\n\n return '';\n}\n\nfunction point(point) {\n if (!point || typeof point !== 'object') {\n point = {};\n }\n\n return index(point.line) + ':' + index(point.column);\n}\n\nfunction position(pos) {\n if (!pos || typeof pos !== 'object') {\n pos = {};\n }\n\n return point(pos.start) + '-' + point(pos.end);\n}\n\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1;\n}","module.exports = identity;\n\nfunction identity(d) {\n return d;\n}","'use strict';\n\nmodule.exports = visitParents;\n\nvar convert = require('unist-util-is/convert');\n\nvar color = require('./color');\n\nvar CONTINUE = true;\nvar SKIP = 'skip';\nvar EXIT = false;\nvisitParents.CONTINUE = CONTINUE;\nvisitParents.SKIP = SKIP;\nvisitParents.EXIT = EXIT;\n\nfunction visitParents(tree, test, visitor, reverse) {\n var step;\n var is;\n\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor;\n visitor = test;\n test = null;\n }\n\n is = convert(test);\n step = reverse ? -1 : 1;\n factory(tree, null, [])();\n\n function factory(node, index, parents) {\n var value = typeof node === 'object' && node !== null ? node : {};\n var name;\n\n if (typeof value.type === 'string') {\n name = typeof value.tagName === 'string' ? value.tagName : typeof value.name === 'string' ? value.name : undefined;\n visit.displayName = 'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')';\n }\n\n return visit;\n\n function visit() {\n var grandparents = parents.concat(node);\n var result = [];\n var subresult;\n var offset;\n\n if (!test || is(node, index, parents[parents.length - 1] || null)) {\n result = toResult(visitor(node, parents));\n\n if (result[0] === EXIT) {\n return result;\n }\n }\n\n if (node.children && result[0] !== SKIP) {\n offset = (reverse ? node.children.length : -1) + step;\n\n while (offset > -1 && offset < node.children.length) {\n subresult = factory(node.children[offset], offset, grandparents)();\n\n if (subresult[0] === EXIT) {\n return subresult;\n }\n\n offset = typeof subresult[1] === 'number' ? subresult[1] : offset + step;\n }\n }\n\n return result;\n }\n }\n}\n\nfunction toResult(value) {\n if (value !== null && typeof value === 'object' && 'length' in value) {\n return value;\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value];\n }\n\n return [value];\n}","'use strict';\n\nmodule.exports = visit;\n\nvar visitParents = require('unist-util-visit-parents');\n\nvar CONTINUE = visitParents.CONTINUE;\nvar SKIP = visitParents.SKIP;\nvar EXIT = visitParents.EXIT;\nvisit.CONTINUE = CONTINUE;\nvisit.SKIP = SKIP;\nvisit.EXIT = EXIT;\n\nfunction visit(tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor;\n visitor = test;\n test = null;\n }\n\n visitParents(tree, test, overload, reverse);\n\n function overload(node, parents) {\n var parent = parents[parents.length - 1];\n var index = parent ? parent.children.indexOf(node) : null;\n return visitor(node, index, parent);\n }\n}","'use strict';\n\nvar stringify = require('unist-util-stringify-position');\n\nmodule.exports = VMessage; // Inherit from `Error#`.\n\nfunction VMessagePrototype() {}\n\nVMessagePrototype.prototype = Error.prototype;\nVMessage.prototype = new VMessagePrototype(); // Message properties.\n\nvar proto = VMessage.prototype;\nproto.file = '';\nproto.name = '';\nproto.reason = '';\nproto.message = '';\nproto.stack = '';\nproto.fatal = null;\nproto.column = null;\nproto.line = null; // Construct a new VMessage.\n//\n// Note: We cannot invoke `Error` on the created context, as that adds readonly\n// `line` and `column` attributes on Safari 9, thus throwing and failing the\n// data.\n\nfunction VMessage(reason, position, origin) {\n var parts;\n var range;\n var location;\n\n if (typeof position === 'string') {\n origin = position;\n position = null;\n }\n\n parts = parseOrigin(origin);\n range = stringify(position) || '1:1';\n location = {\n start: {\n line: null,\n column: null\n },\n end: {\n line: null,\n column: null\n }\n }; // Node.\n\n if (position && position.position) {\n position = position.position;\n }\n\n if (position) {\n // Position.\n if (position.start) {\n location = position;\n position = position.start;\n } else {\n // Point.\n location.start = position;\n }\n }\n\n if (reason.stack) {\n this.stack = reason.stack;\n reason = reason.message;\n }\n\n this.message = reason;\n this.name = range;\n this.reason = reason;\n this.line = position ? position.line : null;\n this.column = position ? position.column : null;\n this.location = location;\n this.source = parts[0];\n this.ruleId = parts[1];\n}\n\nfunction parseOrigin(origin) {\n var result = [null, null];\n var index;\n\n if (typeof origin === 'string') {\n index = origin.indexOf(':');\n\n if (index === -1) {\n result[1] = origin;\n } else {\n result[0] = origin.slice(0, index);\n result[1] = origin.slice(index + 1);\n }\n }\n\n return result;\n}","'use strict';\n\nmodule.exports = require('./lib');","'use strict';\n\nvar p = require('./minpath');\n\nvar proc = require('./minproc');\n\nvar buffer = require('is-buffer');\n\nmodule.exports = VFile;\nvar own = {}.hasOwnProperty; // Order of setting (least specific to most), we need this because otherwise\n// `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a\n// stem can be set.\n\nvar order = ['history', 'path', 'basename', 'stem', 'extname', 'dirname'];\nVFile.prototype.toString = toString; // Access full path (`~/index.min.js`).\n\nObject.defineProperty(VFile.prototype, 'path', {\n get: getPath,\n set: setPath\n}); // Access parent path (`~`).\n\nObject.defineProperty(VFile.prototype, 'dirname', {\n get: getDirname,\n set: setDirname\n}); // Access basename (`index.min.js`).\n\nObject.defineProperty(VFile.prototype, 'basename', {\n get: getBasename,\n set: setBasename\n}); // Access extname (`.js`).\n\nObject.defineProperty(VFile.prototype, 'extname', {\n get: getExtname,\n set: setExtname\n}); // Access stem (`index.min`).\n\nObject.defineProperty(VFile.prototype, 'stem', {\n get: getStem,\n set: setStem\n}); // Construct a new file.\n\nfunction VFile(options) {\n var prop;\n var index;\n\n if (!options) {\n options = {};\n } else if (typeof options === 'string' || buffer(options)) {\n options = {\n contents: options\n };\n } else if ('message' in options && 'messages' in options) {\n return options;\n }\n\n if (!(this instanceof VFile)) {\n return new VFile(options);\n }\n\n this.data = {};\n this.messages = [];\n this.history = [];\n this.cwd = proc.cwd(); // Set path related properties in the correct order.\n\n index = -1;\n\n while (++index < order.length) {\n prop = order[index];\n\n if (own.call(options, prop)) {\n this[prop] = options[prop];\n }\n } // Set non-path related properties.\n\n\n for (prop in options) {\n if (order.indexOf(prop) < 0) {\n this[prop] = options[prop];\n }\n }\n}\n\nfunction getPath() {\n return this.history[this.history.length - 1];\n}\n\nfunction setPath(path) {\n assertNonEmpty(path, 'path');\n\n if (this.path !== path) {\n this.history.push(path);\n }\n}\n\nfunction getDirname() {\n return typeof this.path === 'string' ? p.dirname(this.path) : undefined;\n}\n\nfunction setDirname(dirname) {\n assertPath(this.path, 'dirname');\n this.path = p.join(dirname || '', this.basename);\n}\n\nfunction getBasename() {\n return typeof this.path === 'string' ? p.basename(this.path) : undefined;\n}\n\nfunction setBasename(basename) {\n assertNonEmpty(basename, 'basename');\n assertPart(basename, 'basename');\n this.path = p.join(this.dirname || '', basename);\n}\n\nfunction getExtname() {\n return typeof this.path === 'string' ? p.extname(this.path) : undefined;\n}\n\nfunction setExtname(extname) {\n assertPart(extname, 'extname');\n assertPath(this.path, 'extname');\n\n if (extname) {\n if (extname.charCodeAt(0) !== 46\n /* `.` */\n ) {\n throw new Error('`extname` must start with `.`');\n }\n\n if (extname.indexOf('.', 1) > -1) {\n throw new Error('`extname` cannot contain multiple dots');\n }\n }\n\n this.path = p.join(this.dirname, this.stem + (extname || ''));\n}\n\nfunction getStem() {\n return typeof this.path === 'string' ? p.basename(this.path, this.extname) : undefined;\n}\n\nfunction setStem(stem) {\n assertNonEmpty(stem, 'stem');\n assertPart(stem, 'stem');\n this.path = p.join(this.dirname || '', stem + (this.extname || ''));\n} // Get the value of the file.\n\n\nfunction toString(encoding) {\n return (this.contents || '').toString(encoding);\n} // Assert that `part` is not a path (i.e., does not contain `p.sep`).\n\n\nfunction assertPart(part, name) {\n if (part && part.indexOf(p.sep) > -1) {\n throw new Error('`' + name + '` cannot be a path: did not expect `' + p.sep + '`');\n }\n} // Assert that `part` is not empty.\n\n\nfunction assertNonEmpty(part, name) {\n if (!part) {\n throw new Error('`' + name + '` cannot be empty');\n }\n} // Assert `path` exists.\n\n\nfunction assertPath(path, name) {\n if (!path) {\n throw new Error('Setting `' + name + '` requires `path` to be set too');\n }\n}","'use strict';\n\nvar VMessage = require('vfile-message');\n\nvar VFile = require('./core.js');\n\nmodule.exports = VFile;\nVFile.prototype.message = message;\nVFile.prototype.info = info;\nVFile.prototype.fail = fail; // Create a message with `reason` at `position`.\n// When an error is passed in as `reason`, copies the stack.\n\nfunction message(reason, position, origin) {\n var message = new VMessage(reason, position, origin);\n\n if (this.path) {\n message.name = this.path + ':' + message.name;\n message.file = this.path;\n }\n\n message.fatal = false;\n this.messages.push(message);\n return message;\n} // Fail: creates a vmessage, associates it with the file, and throws it.\n\n\nfunction fail() {\n var message = this.message.apply(this, arguments);\n message.fatal = true;\n throw message;\n} // Info: creates a vmessage, associates it with the file, and marks the fatality\n// as null.\n\n\nfunction info() {\n var message = this.message.apply(this, arguments);\n message.fatal = null;\n return message;\n}","'use strict'; // A derivative work based on:\n// .\n// Which is licensed:\n//\n// MIT License\n//\n// Copyright (c) 2013 James Halliday\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A derivative work based on:\n//\n// Parts of that are extracted from Node’s internal `path` module:\n// .\n// Which is licensed:\n//\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nexports.basename = basename;\nexports.dirname = dirname;\nexports.extname = extname;\nexports.join = join;\nexports.sep = '/';\n\nfunction basename(path, ext) {\n var start = 0;\n var end = -1;\n var index;\n var firstNonSlashEnd;\n var seenNonSlash;\n var extIndex;\n\n if (ext !== undefined && typeof ext !== 'string') {\n throw new TypeError('\"ext\" argument must be a string');\n }\n\n assertPath(path);\n index = path.length;\n\n if (ext === undefined || !ext.length || ext.length > path.length) {\n while (index--) {\n if (path.charCodeAt(index) === 47\n /* `/` */\n ) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1;\n break;\n }\n } else if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // path component.\n seenNonSlash = true;\n end = index + 1;\n }\n }\n\n return end < 0 ? '' : path.slice(start, end);\n }\n\n if (ext === path) {\n return '';\n }\n\n firstNonSlashEnd = -1;\n extIndex = ext.length - 1;\n\n while (index--) {\n if (path.charCodeAt(index) === 47\n /* `/` */\n ) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd < 0) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching.\n seenNonSlash = true;\n firstNonSlashEnd = index + 1;\n }\n\n if (extIndex > -1) {\n // Try to match the explicit extension.\n if (path.charCodeAt(index) === ext.charCodeAt(extIndex--)) {\n if (extIndex < 0) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = index;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIndex = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) {\n end = firstNonSlashEnd;\n } else if (end < 0) {\n end = path.length;\n }\n\n return path.slice(start, end);\n}\n\nfunction dirname(path) {\n var end;\n var unmatchedSlash;\n var index;\n assertPath(path);\n\n if (!path.length) {\n return '.';\n }\n\n end = -1;\n index = path.length; // Prefix `--` is important to not run on `0`.\n\n while (--index) {\n if (path.charCodeAt(index) === 47\n /* `/` */\n ) {\n if (unmatchedSlash) {\n end = index;\n break;\n }\n } else if (!unmatchedSlash) {\n // We saw the first non-path separator\n unmatchedSlash = true;\n }\n }\n\n return end < 0 ? path.charCodeAt(0) === 47\n /* `/` */\n ? '/' : '.' : end === 1 && path.charCodeAt(0) === 47\n /* `/` */\n ? '//' : path.slice(0, end);\n}\n\nfunction extname(path) {\n var startDot = -1;\n var startPart = 0;\n var end = -1; // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find.\n\n var preDotState = 0;\n var unmatchedSlash;\n var code;\n var index;\n assertPath(path);\n index = path.length;\n\n while (index--) {\n code = path.charCodeAt(index);\n\n if (code === 47\n /* `/` */\n ) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (unmatchedSlash) {\n startPart = index + 1;\n break;\n }\n\n continue;\n }\n\n if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // extension.\n unmatchedSlash = true;\n end = index + 1;\n }\n\n if (code === 46\n /* `.` */\n ) {\n // If this is our first dot, mark it as the start of our extension.\n if (startDot < 0) {\n startDot = index;\n } else if (preDotState !== 1) {\n preDotState = 1;\n }\n } else if (startDot > -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension.\n preDotState = -1;\n }\n }\n\n if (startDot < 0 || end < 0 || // We saw a non-dot character immediately before the dot.\n preDotState === 0 || // The (right-most) trimmed path component is exactly `..`.\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n\n return path.slice(startDot, end);\n}\n\nfunction join() {\n var index = -1;\n var joined;\n\n while (++index < arguments.length) {\n assertPath(arguments[index]);\n\n if (arguments[index]) {\n joined = joined === undefined ? arguments[index] : joined + '/' + arguments[index];\n }\n }\n\n return joined === undefined ? '.' : normalize(joined);\n} // Note: `normalize` is not exposed as `path.normalize`, so some code is\n// manually removed from it.\n\n\nfunction normalize(path) {\n var absolute;\n var value;\n assertPath(path);\n absolute = path.charCodeAt(0) === 47;\n /* `/` */\n // Normalize the path according to POSIX rules.\n\n value = normalizeString(path, !absolute);\n\n if (!value.length && !absolute) {\n value = '.';\n }\n\n if (value.length && path.charCodeAt(path.length - 1) === 47\n /* / */\n ) {\n value += '/';\n }\n\n return absolute ? '/' + value : value;\n} // Resolve `.` and `..` elements in a path with directory names.\n\n\nfunction normalizeString(path, allowAboveRoot) {\n var result = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var index = -1;\n var code;\n var lastSlashIndex;\n\n while (++index <= path.length) {\n if (index < path.length) {\n code = path.charCodeAt(index);\n } else if (code === 47\n /* `/` */\n ) {\n break;\n } else {\n code = 47;\n /* `/` */\n }\n\n if (code === 47\n /* `/` */\n ) {\n if (lastSlash === index - 1 || dots === 1) {// Empty.\n } else if (lastSlash !== index - 1 && dots === 2) {\n if (result.length < 2 || lastSegmentLength !== 2 || result.charCodeAt(result.length - 1) !== 46\n /* `.` */\n || result.charCodeAt(result.length - 2) !== 46\n /* `.` */\n ) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf('/');\n /* istanbul ignore else - No clue how to cover it. */\n\n if (lastSlashIndex !== result.length - 1) {\n if (lastSlashIndex < 0) {\n result = '';\n lastSegmentLength = 0;\n } else {\n result = result.slice(0, lastSlashIndex);\n lastSegmentLength = result.length - 1 - result.lastIndexOf('/');\n }\n\n lastSlash = index;\n dots = 0;\n continue;\n }\n } else if (result.length) {\n result = '';\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n\n if (allowAboveRoot) {\n result = result.length ? result + '/..' : '..';\n lastSegmentLength = 2;\n }\n } else {\n if (result.length) {\n result += '/' + path.slice(lastSlash + 1, index);\n } else {\n result = path.slice(lastSlash + 1, index);\n }\n\n lastSegmentLength = index - lastSlash - 1;\n }\n\n lastSlash = index;\n dots = 0;\n } else if (code === 46\n /* `.` */\n && dots > -1) {\n dots++;\n } else {\n dots = -1;\n }\n }\n\n return result;\n}\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}","'use strict'; // Somewhat based on:\n// .\n// But I don’t think one tiny line of code can be copyrighted. 😅\n\nexports.cwd = cwd;\n\nfunction cwd() {\n return '/';\n}","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nmodule.exports = function isBuffer(obj) {\n return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);\n};","module.exports = extend;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {};\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n}","export default !!(typeof window !== 'undefined' && window.document && window.document.createElement);","/* eslint-disable no-return-assign */\nimport canUseDOM from './canUseDOM';\nexport var optionsSupported = false;\nexport var onceSupported = false;\n\ntry {\n var options = {\n get passive() {\n return optionsSupported = true;\n },\n\n get once() {\n // eslint-disable-next-line no-multi-assign\n return onceSupported = optionsSupported = true;\n }\n\n };\n\n if (canUseDOM) {\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, true);\n }\n} catch (e) {\n /* */\n}\n\n/**\n * An `addEventListener` ponyfill, supports the `once` option\n * \n * @param node the element\n * @param eventName the event name\n * @param handle the handler\n * @param options event options\n */\nfunction addEventListener(node, eventName, handler, options) {\n if (options && typeof options !== 'boolean' && !onceSupported) {\n var once = options.once,\n capture = options.capture;\n var wrappedHandler = handler;\n\n if (!onceSupported && once) {\n wrappedHandler = handler.__once || function onceHandler(event) {\n this.removeEventListener(eventName, onceHandler, capture);\n handler.call(this, event);\n };\n\n handler.__once = wrappedHandler;\n }\n\n node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);\n }\n\n node.addEventListener(eventName, handler, options);\n}\n\nexport default addEventListener;","import ownerWindow from './ownerWindow';\n/**\n * Returns one or all computed style properties of an element.\n * \n * @param node the element\n * @param psuedoElement the style property\n */\n\nexport default function getComputedStyle(node, psuedoElement) {\n return ownerWindow(node).getComputedStyle(node, psuedoElement);\n}","import ownerDocument from './ownerDocument';\n/**\n * Returns the owner window of a given element.\n * \n * @param node the element\n */\n\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc && doc.defaultView || window;\n}","var rUpper = /([A-Z])/g;\nexport default function hyphenate(string) {\n return string.replace(rUpper, '-$1').toLowerCase();\n}","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js\n */\nimport hyphenate from './hyphenate';\nvar msPattern = /^ms-/;\nexport default function hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}","var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;\nexport default function isTransform(value) {\n return !!(value && supportedTransforms.test(value));\n}","import getComputedStyle from './getComputedStyle';\nimport hyphenate from './hyphenateStyle';\nimport isTransform from './isTransform';\n\nfunction style(node, property) {\n var css = '';\n var transforms = '';\n\n if (typeof property === 'string') {\n return node.style.getPropertyValue(hyphenate(property)) || getComputedStyle(node).getPropertyValue(hyphenate(property));\n }\n\n Object.keys(property).forEach(function (key) {\n var value = property[key];\n\n if (!value && value !== 0) {\n node.style.removeProperty(hyphenate(key));\n } else if (isTransform(key)) {\n transforms += key + \"(\" + value + \") \";\n } else {\n css += hyphenate(key) + \": \" + value + \";\";\n }\n });\n\n if (transforms) {\n css += \"transform: \" + transforms + \";\";\n }\n\n node.style.cssText += \";\" + css;\n}\n\nexport default style;","/**\n * A `removeEventListener` ponyfill\n * \n * @param node the element\n * @param eventName the event name\n * @param handle the handler\n * @param options event options\n */\nfunction removeEventListener(node, eventName, handler, options) {\n var capture = options && typeof options !== 'boolean' ? options.capture : options;\n node.removeEventListener(eventName, handler, capture);\n\n if (handler.__once) {\n node.removeEventListener(eventName, handler.__once, capture);\n }\n}\n\nexport default removeEventListener;","import addEventListener from './addEventListener';\nimport removeEventListener from './removeEventListener';\n\nfunction listen(node, eventName, handler, options) {\n addEventListener(node, eventName, handler, options);\n return function () {\n removeEventListener(node, eventName, handler, options);\n };\n}\n\nexport default listen;","/**\n * Returns the owner document of a given element.\n * \n * @param node the element\n */\nexport default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import { library } from '@fortawesome/fontawesome-svg-core'\nimport { fab } from '@fortawesome/free-brands-svg-icons'\nimport {\n faMapMarkerAlt,\n faCalendarAlt,\n faChevronDown,\n faFile,\n faLink\n} from '@fortawesome/free-solid-svg-icons'\n\nlibrary.add(fab, faMapMarkerAlt, faCalendarAlt, faChevronDown, faLink, faFile)\n\n\n// FaFacebookF, FaYoutube, FaLinkedinIn, FaTwitter, FaInstagram, FaTiktok","import { graphql, useStaticQuery } from 'gatsby'\n\nconst globalConfig = () => {\n const query = useStaticQuery(graphql`\n {\n allStrapiGlobalConfig {\n nodes {\n author\n robots\n pageMetadata {\n siteDesc: pageDescription\n siteKeywords: pageKeywords\n siteTitle: pageTitle\n }\n siteURL\n }\n }\n }\n `)\n return query\n}\nexport default globalConfig\n","import * as React from 'react'\nimport PropTypes from 'prop-types'\nimport { Helmet } from 'react-helmet'\nimport globalConfig from '../utils/querys/globalConfig'\n\nfunction Seo({ description, lang, meta, title, keywords }) {\n const data = globalConfig()\n let siteDesc= 'Sitio web UCC'\n let siteTitle = 'Universidad Católica de Córdoba'\n let siteKeywords = 'Universidad Católica de Córdoba, UCC'\n const {\n author,\n robots,\n pageMetadata\n } = data?.allStrapiGlobalConfig?.nodes[0]\n\n if(pageMetadata !== null){\n siteDesc = pageMetadata.siteDesc\n siteKeywords = pageMetadata.pageKeywords\n siteTitle = pageMetadata.siteTitle\n }\n \n\n const metaDescription = description ? description : siteDesc\n const defaultTitle = title ? title : siteTitle\n const preventIndex = robots ? 'index, follow' : 'noindex, nofollow'\n const defaultKeywords = keywords ? keywords : siteKeywords\n\n return (\n \n )\n}\n\nSeo.defaultProps = {\n lang: 'es',\n meta: [],\n description: '',\n}\n\nSeo.propTypes = {\n description: PropTypes.string,\n keywords: PropTypes.string,\n lang: PropTypes.string,\n meta: PropTypes.arrayOf(PropTypes.object),\n title: PropTypes.string,\n}\n\nexport default Seo","import React, { createContext, useEffect, useState, useContext } from 'react'\nimport PropTypes from 'prop-types'\n\nconst themes = {\n light: {\n '--nav-primary': '#666666',\n '--nav-container': '#ffffff',\n '--nav-active': '#191919',\n '--nav-menu': '#fff',\n\n '--form-field-background': '#0e192a',\n\n '--body-title': '#182c49',\n\n '--primary': '#555',\n '--primary-invert': '#ffffff',\n '--primary-info': '#1d317d',\n '--primary-grey': '#666666',\n '--primary-container': '#ffffff',\n '--primary-container-dark': '#182c49',\n '--primary-container-lightblue': '#009abb',\n\n '--course-container': '#f8f9fa',\n\n '--cards-container': '#ffffff',\n '--cards-container-secondary': '#f7f7f7',\n\n '--secondary': '#182c49',\n '--secondary-container': '#182c49',\n '--terciary-container': '#f8f9fa',\n },\n dark: {\n '--nav-primary': '#cecece',\n '--nav-container': '#383838',\n '--nav-active': '#e7e7e7',\n '--nav-menu': 'rgba(255, 255, 255, 0.95)',\n\n '--form-field-background': '#292929',\n\n '--body-title': '#ffffff',\n\n '--primary': '#ffffff',\n '--primary-invert': '#555',\n '--primary-info': '#0063aa',\n '--primary-grey': '#ffffff',\n '--primary-container': '#292929',\n '--primary-container-dark': '#ffffff14',\n\n '--course-container': '#292929',\n\n '--cards-container': '#373737',\n '--cards-container-secondary': '#ffffff14',\n\n '--secondary': '#ffffff',\n '--secondary-container': '#191919',\n '--terciary-container': '#191919',\n }\n}\n\nconst ThemeContext = createContext(null)\n\n// const { theme, setTheme, toggleTheme } = useTheme()\nexport const useTheme = () => useContext(ThemeContext)\n\n// cambiar si cambia el tema por defecto\nconst DEFAULT_THEME = 'light'\n\nconst ThemeProvider = ({ children }) => {\n const localTheme =\n typeof window !== 'undefined' ? localStorage.getItem('theme') : undefined\n const deviseTheme = getDeviseTheme()\n const [theme, setTheme] = useState(null)\n\n // Guarda el estado del Tema del Sitio\n useEffect(() => {\n setTheme(localTheme || deviseTheme || DEFAULT_THEME)\n }, [])\n // Guarda el estado del Tema del Sitio\n useEffect(() => {\n localStorage.setItem('theme', theme)\n }, [theme])\n\n // Cambiando de Tema con el boton del sitio\n const toggleTheme = () => {\n setTheme((prevTheme) => (prevTheme === 'light' ? 'dark' : 'light'))\n }\n\n // Cambio a \"light\" al recargar el sitio\n const reload =\n typeof window !== 'undefined'\n ? (window.onbeforeunload = function () {\n localStorage.setItem('theme', 'light')\n })\n : undefined\n reload // Llamando a la funcion\n\n return (\n \n
\n {children}\n
\n \n )\n}\n\nconst getDeviseTheme = () => {\n if (typeof window !== 'undefined') {\n if (window.matchMedia) {\n if (window.matchMedia('(prefers-color-scheme: dark)').matches) {\n return 'dark'\n } else {\n return 'light'\n }\n } else {\n return DEFAULT_THEME\n }\n } else {\n return undefined\n }\n}\nThemeProvider.propTypes = {\n children: PropTypes.object\n}\n\nexport default ThemeProvider\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n"],"sourceRoot":""}