\n );\n }\n\n render () {\n const { items, style, placement, arrowOffsetLeft, arrowOffsetTop } = this.props;\n const { mounted } = this.state;\n\n return (\n \n {({ opacity, scaleX, scaleY }) => (\n // It should not be transformed when mounting because the resulting\n // size will be used to determine the coordinate of the menu by\n // react-overlays\n
\n );\n }\n\n render () {\n const { items, style, placement, arrowOffsetLeft, arrowOffsetTop } = this.props;\n const { mounted } = this.state;\n\n return (\n \n {({ opacity, scaleX, scaleY }) => (\n // It should not be transformed when mounting because the resulting\n // size will be used to determine the coordinate of the menu by\n // react-overlays\n
\n );\n }\n\n}\n","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport StatusPrepend from './status_prepend';\nimport StatusHeader from './status_header';\nimport StatusIcons from './status_icons';\nimport StatusContent from './status_content';\nimport StatusActionBar from './status_action_bar';\nimport AttachmentList from './attachment_list';\nimport Card from '../features/status/components/card';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { MediaGallery, Video } from 'flavours/glitch/util/async-components';\nimport { HotKeys } from 'react-hotkeys';\nimport NotificationOverlayContainer from 'flavours/glitch/features/notifications/containers/overlay_container';\nimport classNames from 'classnames';\nimport { autoUnfoldCW } from 'flavours/glitch/util/content_warning';\n\n// We use the component (and not the container) since we do not want\n// to use the progress bar to show download progress\nimport Bundle from '../features/ui/components/bundle';\n\nexport const textForScreenReader = (intl, status, rebloggedByText = false, expanded = false) => {\n const displayName = status.getIn(['account', 'display_name']);\n\n const values = [\n displayName.length === 0 ? status.getIn(['account', 'acct']).split('@')[0] : displayName,\n status.get('spoiler_text') && !expanded ? status.get('spoiler_text') : status.get('search_index').slice(status.get('spoiler_text').length),\n intl.formatDate(status.get('created_at'), { hour: '2-digit', minute: '2-digit', month: 'short', day: 'numeric' }),\n status.getIn(['account', 'acct']),\n ];\n\n if (rebloggedByText) {\n values.push(rebloggedByText);\n }\n\n return values.join(', ');\n};\n\n@injectIntl\nexport default class Status extends ImmutablePureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n containerId: PropTypes.string,\n id: PropTypes.string,\n status: ImmutablePropTypes.map,\n account: ImmutablePropTypes.map,\n onReply: PropTypes.func,\n onFavourite: PropTypes.func,\n onReblog: PropTypes.func,\n onDelete: PropTypes.func,\n onDirect: PropTypes.func,\n onMention: PropTypes.func,\n onPin: PropTypes.func,\n onOpenMedia: PropTypes.func,\n onOpenVideo: PropTypes.func,\n onBlock: PropTypes.func,\n onEmbed: PropTypes.func,\n onHeightChange: PropTypes.func,\n muted: PropTypes.bool,\n collapse: PropTypes.bool,\n hidden: PropTypes.bool,\n prepend: PropTypes.string,\n withDismiss: PropTypes.bool,\n onMoveUp: PropTypes.func,\n onMoveDown: PropTypes.func,\n getScrollPosition: PropTypes.func,\n updateScrollBottom: PropTypes.func,\n expanded: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n };\n\n state = {\n isCollapsed: false,\n autoCollapsed: false,\n isExpanded: undefined,\n }\n\n // Avoid checking props that are functions (and whose equality will always\n // evaluate to false. See react-immutable-pure-component for usage.\n updateOnProps = [\n 'status',\n 'account',\n 'settings',\n 'prepend',\n 'boostModal',\n 'favouriteModal',\n 'muted',\n 'collapse',\n 'notification',\n 'hidden',\n 'expanded',\n ]\n\n updateOnStates = [\n 'isExpanded',\n 'isCollapsed',\n ]\n\n // If our settings have changed to disable collapsed statuses, then we\n // need to make sure that we uncollapse every one. We do that by watching\n // for changes to `settings.collapsed.enabled` in\n // `getderivedStateFromProps()`.\n\n // We also need to watch for changes on the `collapse` prop---if this\n // changes to anything other than `undefined`, then we need to collapse or\n // uncollapse our status accordingly.\n static getDerivedStateFromProps(nextProps, prevState) {\n let update = {};\n let updated = false;\n\n // Make sure the state mirrors props we track…\n if (nextProps.collapse !== prevState.collapseProp) {\n update.collapseProp = nextProps.collapse;\n updated = true;\n }\n if (nextProps.expanded !== prevState.expandedProp) {\n update.expandedProp = nextProps.expanded;\n updated = true;\n }\n\n // Update state based on new props\n if (!nextProps.settings.getIn(['collapsed', 'enabled'])) {\n if (prevState.isCollapsed) {\n update.isCollapsed = false;\n updated = true;\n }\n } else if (\n nextProps.collapse !== prevState.collapseProp &&\n nextProps.collapse !== undefined\n ) {\n update.isCollapsed = nextProps.collapse;\n if (nextProps.collapse) update.isExpanded = false;\n updated = true;\n }\n if (nextProps.expanded !== prevState.expandedProp &&\n nextProps.expanded !== undefined\n ) {\n update.isExpanded = nextProps.expanded;\n if (nextProps.expanded) update.isCollapsed = false;\n updated = true;\n }\n\n if (nextProps.expanded === undefined &&\n prevState.isExpanded === undefined &&\n update.isExpanded === undefined\n ) {\n const isExpanded = autoUnfoldCW(nextProps.settings, nextProps.status);\n if (isExpanded !== undefined) {\n update.isExpanded = isExpanded;\n updated = true;\n }\n }\n\n return updated ? update : null;\n }\n\n // When mounting, we just check to see if our status should be collapsed,\n // and collapse it if so. We don't need to worry about whether collapsing\n // is enabled here, because `setCollapsed()` already takes that into\n // account.\n\n // The cases where a status should be collapsed are:\n //\n // - The `collapse` prop has been set to `true`\n // - The user has decided in local settings to collapse all statuses.\n // - The user has decided to collapse all notifications ('muted'\n // statuses).\n // - The user has decided to collapse long statuses and the status is\n // over 400px (without media, or 650px with).\n // - The status is a reply and the user has decided to collapse all\n // replies.\n // - The status contains media and the user has decided to collapse all\n // statuses with media.\n // - The status is a reblog the user has decided to collapse all\n // statuses which are reblogs.\n componentDidMount () {\n const { node } = this;\n const {\n status,\n settings,\n collapse,\n muted,\n prepend,\n } = this.props;\n\n // Prevent a crash when node is undefined. Not completely sure why this\n // happens, might be because status === null.\n if (node === undefined) return;\n\n const autoCollapseSettings = settings.getIn(['collapsed', 'auto']);\n\n if (function () {\n switch (true) {\n case !!collapse:\n case !!autoCollapseSettings.get('all'):\n case autoCollapseSettings.get('notifications') && !!muted:\n case autoCollapseSettings.get('lengthy') && node.clientHeight > (\n status.get('media_attachments').size && !muted ? 650 : 400\n ):\n case autoCollapseSettings.get('reblogs') && prepend === 'reblogged_by':\n case autoCollapseSettings.get('replies') && status.get('in_reply_to_id', null) !== null:\n case autoCollapseSettings.get('media') && !(status.get('spoiler_text').length) && !!status.get('media_attachments').size:\n return true;\n default:\n return false;\n }\n }()) {\n this.setCollapsed(true);\n // Hack to fix timeline jumps on second rendering when auto-collapsing\n this.setState({ autoCollapsed: true });\n }\n }\n\n getSnapshotBeforeUpdate (prevProps, prevState) {\n if (this.props.getScrollPosition) {\n return this.props.getScrollPosition();\n } else {\n return null;\n }\n }\n\n // Hack to fix timeline jumps on second rendering when auto-collapsing\n componentDidUpdate (prevProps, prevState, snapshot) {\n if (this.state.autoCollapsed) {\n this.setState({ autoCollapsed: false });\n if (snapshot !== null && this.props.updateScrollBottom) {\n if (this.node.offsetTop < snapshot.top) {\n this.props.updateScrollBottom(snapshot.height - snapshot.top);\n }\n }\n }\n }\n\n // `setCollapsed()` sets the value of `isCollapsed` in our state, that is,\n // whether the toot is collapsed or not.\n\n // `setCollapsed()` automatically checks for us whether toot collapsing\n // is enabled, so we don't have to.\n setCollapsed = (value) => {\n if (this.props.settings.getIn(['collapsed', 'enabled'])) {\n this.setState({ isCollapsed: value });\n if (value) {\n this.setExpansion(false);\n }\n } else {\n this.setState({ isCollapsed: false });\n }\n }\n\n setExpansion = (value) => {\n this.setState({ isExpanded: value });\n if (value) {\n this.setCollapsed(false);\n }\n }\n\n // `parseClick()` takes a click event and responds appropriately.\n // If our status is collapsed, then clicking on it should uncollapse it.\n // If `Shift` is held, then clicking on it should collapse it.\n // Otherwise, we open the url handed to us in `destination`, if\n // applicable.\n parseClick = (e, destination) => {\n const { router } = this.context;\n const { status } = this.props;\n const { isCollapsed } = this.state;\n if (!router) return;\n if (destination === undefined) {\n destination = `/statuses/${\n status.getIn(['reblog', 'id'], status.get('id'))\n }`;\n }\n if (e.button === 0 && !(e.ctrlKey || e.altKey || e.metaKey)) {\n if (isCollapsed) this.setCollapsed(false);\n else if (e.shiftKey) {\n this.setCollapsed(true);\n document.getSelection().removeAllRanges();\n } else router.history.push(destination);\n e.preventDefault();\n }\n }\n\n handleAccountClick = (e) => {\n if (this.context.router && e.button === 0) {\n const id = e.currentTarget.getAttribute('data-id');\n e.preventDefault();\n this.context.router.history.push(`/accounts/${id}`);\n }\n }\n\n handleExpandedToggle = () => {\n if (this.props.status.get('spoiler_text')) {\n this.setExpansion(!this.state.isExpanded);\n }\n };\n\n handleOpenVideo = (media, startTime) => {\n this.props.onOpenVideo(media, startTime);\n }\n\n handleHotkeyReply = e => {\n e.preventDefault();\n this.props.onReply(this.props.status, this.context.router.history);\n }\n\n handleHotkeyFavourite = (e) => {\n this.props.onFavourite(this.props.status, e);\n }\n\n handleHotkeyBoost = e => {\n this.props.onReblog(this.props.status, e);\n }\n\n handleHotkeyMention = e => {\n e.preventDefault();\n this.props.onMention(this.props.status.get('account'), this.context.router.history);\n }\n\n handleHotkeyOpen = () => {\n this.context.router.history.push(`/statuses/${this.props.status.get('id')}`);\n }\n\n handleHotkeyOpenProfile = () => {\n this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);\n }\n\n handleHotkeyMoveUp = e => {\n this.props.onMoveUp(this.props.containerId || this.props.id, e.target.getAttribute('data-featured'));\n }\n\n handleHotkeyMoveDown = e => {\n this.props.onMoveDown(this.props.containerId || this.props.id, e.target.getAttribute('data-featured'));\n }\n\n handleRef = c => {\n this.node = c;\n }\n\n renderLoadingMediaGallery () {\n return ;\n }\n\n renderLoadingVideoPlayer () {\n return ;\n }\n\n render () {\n const {\n handleRef,\n parseClick,\n setExpansion,\n setCollapsed,\n } = this;\n const { router } = this.context;\n const {\n intl,\n status,\n account,\n settings,\n collapsed,\n muted,\n prepend,\n intersectionObserverWrapper,\n onOpenVideo,\n onOpenMedia,\n notification,\n hidden,\n featured,\n ...other\n } = this.props;\n const { isExpanded, isCollapsed } = this.state;\n let background = null;\n let attachments = null;\n let media = null;\n let mediaIcon = null;\n\n if (status === null) {\n return null;\n }\n\n if (hidden) {\n return (\n
\n \n );\n }\n\n // If user backgrounds for collapsed statuses are enabled, then we\n // initialize our background accordingly. This will only be rendered if\n // the status is collapsed.\n if (settings.getIn(['collapsed', 'backgrounds', 'user_backgrounds'])) {\n background = status.getIn(['account', 'header']);\n }\n\n // This handles our media attachments.\n // If a media file is of unknwon type or if the status is muted\n // (notification), we show a list of links instead of embedded media.\n\n // After we have generated our appropriate media element and stored it in\n // `media`, we snatch the thumbnail to use as our `background` if media\n // backgrounds for collapsed statuses are enabled.\n attachments = status.get('media_attachments');\n if (attachments.size > 0) {\n if (muted || attachments.some(item => item.get('type') === 'unknown')) {\n media = (\n \n );\n } else if (attachments.getIn([0, 'type']) === 'video') { // Media type is 'video'\n const video = status.getIn(['media_attachments', 0]);\n\n media = (\n \n {Component => ()}\n \n );\n mediaIcon = 'video-camera';\n } else { // Media type is 'image' or 'gifv'\n media = (\n \n {Component => (\n \n )}\n \n );\n mediaIcon = 'picture-o';\n }\n\n if (!status.get('sensitive') && !(status.get('spoiler_text').length > 0) && settings.getIn(['collapsed', 'backgrounds', 'preview_images'])) {\n background = attachments.getIn([0, 'preview_url']);\n }\n } else if (status.get('card') && settings.get('inline_preview_cards')) {\n media = (\n \n );\n mediaIcon = 'link';\n }\n\n // Here we prepare extra data-* attributes for CSS selectors.\n // Users can use those for theming, hiding avatars etc via UserStyle\n const selectorAttribs = {\n 'data-status-by': `@${status.getIn(['account', 'acct'])}`,\n };\n\n if (prepend && account) {\n const notifKind = {\n favourite: 'favourited',\n reblog: 'boosted',\n reblogged_by: 'boosted',\n }[prepend];\n\n selectorAttribs[`data-${notifKind}-by`] = `@${account.get('acct')}`;\n }\n\n let rebloggedByText;\n\n if (prepend === 'reblog') {\n rebloggedByText = intl.formatMessage({ id: 'status.reblogged_by', defaultMessage: '{name} boosted' }, { name: account.get('acct') });\n }\n\n const handlers = {\n reply: this.handleHotkeyReply,\n favourite: this.handleHotkeyFavourite,\n boost: this.handleHotkeyBoost,\n mention: this.handleHotkeyMention,\n open: this.handleHotkeyOpen,\n openProfile: this.handleHotkeyOpenProfile,\n moveUp: this.handleHotkeyMoveUp,\n moveDown: this.handleHotkeyMoveDown,\n toggleSpoiler: this.handleExpandedToggle,\n };\n\n const computedClass = classNames('status', `status-${status.get('visibility')}`, {\n collapsed: isCollapsed,\n 'has-background': isCollapsed && background,\n 'status__wrapper-reply': !!status.get('in_reply_to_id'),\n muted,\n }, 'focusable');\n\n return (\n \n
\n );\n }\n\n if (trackScroll) {\n return (\n \n {scrollableArea}\n \n );\n } else {\n return scrollableArea;\n }\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n load_more: { id: 'status.load_more', defaultMessage: 'Load more' },\n});\n\n@injectIntl\nexport default class LoadGap extends React.PureComponent {\n\n static propTypes = {\n disabled: PropTypes.bool,\n maxId: PropTypes.string,\n onClick: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n handleClick = () => {\n this.props.onClick(this.props.maxId);\n }\n\n render () {\n const { disabled, intl } = this.props;\n\n return (\n \n );\n }\n\n}\n","import { injectIntl } from 'react-intl';\nimport { connect } from 'react-redux';\n\n// Connects a component.\nexport function wrap (Component, mapStateToProps, mapDispatchToProps, options) {\n const withIntl = typeof options === 'object' ? options.withIntl : !!options;\n return (withIntl ? injectIntl : i => i)(connect(mapStateToProps, mapDispatchToProps)(Component));\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport Icon from 'mastodon/components/icon';\n\nconst messages = defineMessages({\n load_more: { id: 'status.load_more', defaultMessage: 'Load more' },\n});\n\nexport default @injectIntl\nclass LoadGap extends React.PureComponent {\n\n static propTypes = {\n disabled: PropTypes.bool,\n maxId: PropTypes.string,\n onClick: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n handleClick = () => {\n this.props.onClick(this.props.maxId);\n }\n\n render () {\n const { disabled, intl } = this.props;\n\n return (\n \n );\n }\n\n}\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nexport default class LoadMore extends React.PureComponent {\n\n static propTypes = {\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n visible: PropTypes.bool,\n }\n\n static defaultProps = {\n visible: true,\n }\n\n render() {\n const { disabled, visible } = this.props;\n\n return (\n \n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class TextIconButton extends React.PureComponent {\n\n static propTypes = {\n label: PropTypes.string.isRequired,\n title: PropTypes.string,\n active: PropTypes.bool,\n onClick: PropTypes.func.isRequired,\n ariaControls: PropTypes.string,\n };\n\n handleClick = (e) => {\n e.preventDefault();\n this.props.onClick();\n }\n\n render () {\n const { label, title, active, ariaControls } = this.props;\n\n return (\n \n );\n }\n\n}\n","// Package imports.\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport Toggle from 'react-toggle';\n\n// Components.\nimport Icon from 'flavours/glitch/components/icon';\n\n// Utils.\nimport { assignHandlers } from 'flavours/glitch/util/react_helpers';\n\n// Handlers.\nconst handlers = {\n\n // This function activates the dropdown item.\n handleActivate (e) {\n const {\n name,\n onChange,\n onClose,\n options: { on },\n } = this.props;\n\n // If the escape key was pressed, we close the dropdown.\n if (e.key === 'Escape' && onClose) {\n onClose();\n\n // Otherwise, we both close the dropdown and change the value.\n } else if (onChange && (!e.key || e.key === 'Enter')) {\n e.preventDefault(); // Prevents change in focus on click\n if ((on === null || typeof on === 'undefined') && onClose) {\n onClose();\n }\n onChange(name);\n }\n },\n};\n\n// The component.\nexport default class ComposerOptionsDropdownContentItem extends React.PureComponent {\n\n // Constructor.\n constructor (props) {\n super(props);\n assignHandlers(this, handlers);\n }\n\n // Rendering.\n render () {\n const { handleActivate } = this.handlers;\n const {\n active,\n options: {\n icon,\n meta,\n on,\n text,\n },\n } = this.props;\n const computedClass = classNames('composer--options--dropdown--content--item', {\n active,\n lengthy: meta,\n 'toggled-off': !on && on !== null && typeof on !== 'undefined',\n 'toggled-on': on,\n 'with-icon': icon,\n });\n\n // The result.\n return (\n
\n {function () {\n\n // We render a `` if we were provided an `on`\n // property, and otherwise show an `` if available.\n switch (true) {\n case on !== null && typeof on !== 'undefined':\n return (\n \n );\n case !!icon:\n return (\n \n );\n default:\n return null;\n }\n }()}\n {meta ? (\n
\n {text}\n {meta}\n
\n ) :\n
\n {text}\n
}\n
\n );\n }\n\n};\n\n// Props.\nComposerOptionsDropdownContentItem.propTypes = {\n active: PropTypes.bool,\n name: PropTypes.string,\n onChange: PropTypes.func,\n onClose: PropTypes.func,\n options: PropTypes.shape({\n icon: PropTypes.string,\n meta: PropTypes.node,\n on: PropTypes.bool,\n text: PropTypes.node,\n }),\n};\n","// Package imports.\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport spring from 'react-motion/lib/spring';\n\n// Components.\nimport ComposerOptionsDropdownContentItem from './item';\n\n// Utils.\nimport { withPassive } from 'flavours/glitch/util/dom_helpers';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport { assignHandlers } from 'flavours/glitch/util/react_helpers';\n\n// Handlers.\nconst handlers = {\n // When the document is clicked elsewhere, we close the dropdown.\n handleDocumentClick ({ target }) {\n const { node } = this;\n const { onClose } = this.props;\n if (onClose && node && !node.contains(target)) {\n onClose();\n }\n },\n\n // Stores our node in `this.node`.\n handleRef (node) {\n this.node = node;\n },\n};\n\n// The spring to use with our motion.\nconst springMotion = spring(1, {\n damping: 35,\n stiffness: 400,\n});\n\n// The component.\nexport default class ComposerOptionsDropdownContent extends React.PureComponent {\n\n // Constructor.\n constructor (props) {\n super(props);\n assignHandlers(this, handlers);\n\n // Instance variables.\n this.node = null;\n\n this.state = {\n mounted: false,\n };\n }\n\n // On mounting, we add our listeners.\n componentDidMount () {\n const { handleDocumentClick } = this.handlers;\n document.addEventListener('click', handleDocumentClick, false);\n document.addEventListener('touchend', handleDocumentClick, withPassive);\n this.setState({ mounted: true });\n }\n\n // On unmounting, we remove our listeners.\n componentWillUnmount () {\n const { handleDocumentClick } = this.handlers;\n document.removeEventListener('click', handleDocumentClick, false);\n document.removeEventListener('touchend', handleDocumentClick, withPassive);\n }\n\n // Rendering.\n render () {\n const { mounted } = this.state;\n const { handleRef } = this.handlers;\n const {\n items,\n onChange,\n onClose,\n style,\n value,\n } = this.props;\n\n // The result.\n return (\n \n {({ opacity, scaleX, scaleY }) => (\n // It should not be transformed when mounting because the resulting\n // size will be used to determine the coordinate of the menu by\n // react-overlays\n
\n );\n}\n\n// Props.\nComposerPublisher.propTypes = {\n countText: PropTypes.string,\n disabled: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n onSecondarySubmit: PropTypes.func,\n onSubmit: PropTypes.func,\n privacy: PropTypes.oneOf(['direct', 'private', 'unlisted', 'public']),\n sideArm: PropTypes.oneOf(['none', 'direct', 'private', 'unlisted', 'public']),\n};\n","// Package imports.\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages } from 'react-intl';\n\n// Components.\nimport AccountContainer from 'flavours/glitch/containers/account_container';\nimport IconButton from 'flavours/glitch/components/icon_button';\nimport AttachmentList from 'flavours/glitch/components/attachment_list';\n\n// Utils.\nimport { assignHandlers } from 'flavours/glitch/util/react_helpers';\nimport { isRtl } from 'flavours/glitch/util/rtl';\n\n// Messages.\nconst messages = defineMessages({\n cancel: {\n defaultMessage: 'Cancel',\n id: 'reply_indicator.cancel',\n },\n});\n\n// Handlers.\nconst handlers = {\n\n // Handles a click on the \"close\" button.\n handleClick () {\n const { onCancel } = this.props;\n if (onCancel) {\n onCancel();\n }\n },\n};\n\n// The component.\nexport default class ComposerReply extends React.PureComponent {\n\n // Constructor.\n constructor (props) {\n super(props);\n assignHandlers(this, handlers);\n }\n\n // Rendering.\n render () {\n const { handleClick } = this.handlers;\n const {\n status,\n intl,\n } = this.props;\n\n const account = status.get('account');\n const content = status.get('content');\n const attachments = status.get('media_attachments');\n\n // The result.\n return (\n \n \n \n {account && (\n \n )}\n \n \n {attachments.size > 0 && (\n \n )}\n \n );\n }\n\n}\n\nComposerReply.propTypes = {\n status: ImmutablePropTypes.map.isRequired,\n intl: PropTypes.object.isRequired,\n onCancel: PropTypes.func,\n};\n","// Package imports.\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, FormattedMessage } from 'react-intl';\n\n// Utils.\nimport {\n assignHandlers,\n hiddenComponent,\n} from 'flavours/glitch/util/react_helpers';\n\n// Messages.\nconst messages = defineMessages({\n placeholder: {\n defaultMessage: 'Write your warning here',\n id: 'compose_form.spoiler_placeholder',\n },\n});\n\n// Handlers.\nconst handlers = {\n\n // Handles a keypress.\n handleKeyDown ({\n ctrlKey,\n keyCode,\n metaKey,\n altKey,\n }) {\n const { onSubmit, onSecondarySubmit } = this.props;\n\n // We submit the status on control/meta + enter.\n if (onSubmit && keyCode === 13 && (ctrlKey || metaKey)) {\n onSubmit();\n }\n\n // Submit the status with secondary visibility on alt + enter.\n if (onSecondarySubmit && keyCode === 13 && altKey) {\n onSecondarySubmit();\n }\n },\n\n handleRefSpoilerText (spoilerText) {\n this.spoilerText = spoilerText;\n },\n\n // When the escape key is released, we focus the UI.\n handleKeyUp ({ key }) {\n if (key === 'Escape') {\n document.querySelector('.ui').parentElement.focus();\n }\n },\n};\n\n// The component.\nexport default class ComposerSpoiler extends React.PureComponent {\n\n // Constructor.\n constructor (props) {\n super(props);\n assignHandlers(this, handlers);\n }\n\n // Rendering.\n render () {\n const { handleKeyDown, handleKeyUp, handleRefSpoilerText } = this.handlers;\n const {\n hidden,\n intl,\n onChange,\n text,\n } = this.props;\n\n // The result.\n return (\n
\n \n
\n );\n }\n\n}\n\n// Props.\nComposerSpoiler.propTypes = {\n hidden: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n onChange: PropTypes.func,\n onSubmit: PropTypes.func,\n onSecondarySubmit: PropTypes.func,\n text: PropTypes.string,\n};\n","// Package imports.\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages } from 'react-intl';\n\n// Components.\nimport Icon from 'flavours/glitch/components/icon';\n\n// Messages.\nconst messages = defineMessages({\n localOnly: {\n defaultMessage: 'This post is local-only',\n id: 'advanced_options.local-only.tooltip',\n },\n threadedMode: {\n defaultMessage: 'Threaded mode enabled',\n id: 'advanced_options.threaded_mode.tooltip',\n },\n});\n\n// We use an array of tuples here instead of an object because it\n// preserves order.\nconst iconMap = [\n ['do_not_federate', 'home', messages.localOnly],\n ['threaded_mode', 'comments', messages.threadedMode],\n];\n\n// The component.\nexport default function ComposerTextareaIcons ({\n advancedOptions,\n intl,\n}) {\n\n // The result. We just map every active option to its icon.\n return (\n
\n );\n}\n\nComposerTextareaSuggestions.propTypes = {\n hidden: PropTypes.bool,\n onSuggestionClick: PropTypes.func,\n suggestions: ImmutablePropTypes.list,\n value: PropTypes.number,\n};\n","// Package imports.\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport {\n defineMessages,\n FormattedMessage,\n} from 'react-intl';\nimport Textarea from 'react-textarea-autosize';\n\n// Components.\nimport EmojiPicker from 'flavours/glitch/features/emoji_picker';\nimport ComposerTextareaIcons from './icons';\nimport ComposerTextareaSuggestions from './suggestions';\n\n// Utils.\nimport { isRtl } from 'flavours/glitch/util/rtl';\nimport {\n assignHandlers,\n hiddenComponent,\n} from 'flavours/glitch/util/react_helpers';\n\n// Messages.\nconst messages = defineMessages({\n placeholder: {\n defaultMessage: 'What is on your mind?',\n id: 'compose_form.placeholder',\n },\n});\n\n// Handlers.\nconst handlers = {\n\n // When blurring the textarea, suggestions are hidden.\n handleBlur () {\n this.setState({ suggestionsHidden: true });\n },\n\n // When the contents of the textarea change, we have to pull up new\n // autosuggest suggestions if applicable, and also change the value\n // of the textarea in our store.\n handleChange ({\n target: {\n selectionStart,\n value,\n },\n }) {\n const {\n onChange,\n onSuggestionsFetchRequested,\n onSuggestionsClearRequested,\n } = this.props;\n const { lastToken } = this.state;\n\n // This gets the token at the caret location, if it begins with an\n // `@` (mentions) or `:` (shortcodes).\n const left = value.slice(0, selectionStart).search(/[^\\s\\u200B]+$/);\n const right = value.slice(selectionStart).search(/[\\s\\u200B]/);\n const token = function () {\n switch (true) {\n case left < 0 || !/[@:#]/.test(value[left]):\n return null;\n case right < 0:\n return value.slice(left);\n default:\n return value.slice(left, right + selectionStart).trim().toLowerCase();\n }\n }();\n\n // We only request suggestions for tokens which are at least 3\n // characters long.\n if (onSuggestionsFetchRequested && token && token.length >= 3) {\n if (lastToken !== token) {\n this.setState({\n lastToken: token,\n selectedSuggestion: 0,\n tokenStart: left,\n });\n onSuggestionsFetchRequested(token);\n }\n } else {\n this.setState({ lastToken: null });\n if (onSuggestionsClearRequested) {\n onSuggestionsClearRequested();\n }\n }\n\n // Updates the value of the textarea.\n if (onChange) {\n onChange(value);\n }\n },\n\n // Handles a click on an autosuggestion.\n handleClickSuggestion (index) {\n const { textarea } = this;\n const {\n onSuggestionSelected,\n suggestions,\n } = this.props;\n const {\n lastToken,\n tokenStart,\n } = this.state;\n onSuggestionSelected(tokenStart, lastToken, suggestions.get(index));\n textarea.focus();\n },\n\n // Handles a keypress. If the autosuggestions are visible, we need\n // to allow keypresses to navigate and sleect them.\n handleKeyDown (e) {\n const {\n disabled,\n onSubmit,\n onSecondarySubmit,\n onSuggestionSelected,\n suggestions,\n } = this.props;\n const {\n lastToken,\n suggestionsHidden,\n selectedSuggestion,\n tokenStart,\n } = this.state;\n\n // Keypresses do nothing if the composer is disabled.\n if (disabled) {\n e.preventDefault();\n return;\n }\n\n // We submit the status on control/meta + enter.\n if (onSubmit && e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {\n onSubmit();\n }\n\n // Submit the status with secondary visibility on alt + enter.\n if (onSecondarySubmit && e.keyCode === 13 && e.altKey) {\n onSecondarySubmit();\n }\n\n // Switches over the pressed key.\n switch(e.key) {\n\n // On arrow down, we pick the next suggestion.\n case 'ArrowDown':\n if (suggestions && suggestions.size > 0 && !suggestionsHidden) {\n e.preventDefault();\n this.setState({ selectedSuggestion: Math.min(selectedSuggestion + 1, suggestions.size - 1) });\n }\n return;\n\n // On arrow up, we pick the previous suggestion.\n case 'ArrowUp':\n if (suggestions && suggestions.size > 0 && !suggestionsHidden) {\n e.preventDefault();\n this.setState({ selectedSuggestion: Math.max(selectedSuggestion - 1, 0) });\n }\n return;\n\n // On enter or tab, we select the suggestion.\n case 'Enter':\n case 'Tab':\n if (onSuggestionSelected && lastToken !== null && suggestions && suggestions.size > 0 && !suggestionsHidden) {\n e.preventDefault();\n e.stopPropagation();\n onSuggestionSelected(tokenStart, lastToken, suggestions.get(selectedSuggestion));\n }\n return;\n }\n },\n\n // When the escape key is released, we either close the suggestions\n // window or focus the UI.\n handleKeyUp ({ key }) {\n const { suggestionsHidden } = this.state;\n if (key === 'Escape') {\n if (!suggestionsHidden) {\n this.setState({ suggestionsHidden: true });\n } else {\n document.querySelector('.ui').parentElement.focus();\n }\n }\n },\n\n // Handles the pasting of images into the composer.\n handlePaste (e) {\n const { onPaste } = this.props;\n let d;\n if (onPaste && (d = e.clipboardData) && (d = d.files).length === 1) {\n onPaste(d);\n e.preventDefault();\n }\n },\n\n // Saves a reference to the textarea.\n handleRefTextarea (textarea) {\n this.textarea = textarea;\n },\n};\n\n// The component.\nexport default class ComposerTextarea extends React.Component {\n\n // Constructor.\n constructor (props) {\n super(props);\n assignHandlers(this, handlers);\n this.state = {\n suggestionsHidden: false,\n selectedSuggestion: 0,\n lastToken: null,\n tokenStart: 0,\n };\n\n // Instance variables.\n this.textarea = null;\n }\n\n // When we receive new suggestions, we unhide the suggestions window\n // if we didn't have any suggestions before.\n componentWillReceiveProps (nextProps) {\n const { suggestions } = this.props;\n const { suggestionsHidden } = this.state;\n if (nextProps.suggestions && nextProps.suggestions !== suggestions && nextProps.suggestions.size > 0 && suggestionsHidden) {\n this.setState({ suggestionsHidden: false });\n }\n }\n\n // Rendering.\n render () {\n const {\n handleBlur,\n handleChange,\n handleClickSuggestion,\n handleKeyDown,\n handleKeyUp,\n handlePaste,\n handleRefTextarea,\n } = this.handlers;\n const {\n advancedOptions,\n autoFocus,\n disabled,\n intl,\n onPickEmoji,\n suggestions,\n value,\n } = this.props;\n const {\n selectedSuggestion,\n suggestionsHidden,\n } = this.state;\n\n // The result.\n return (\n
\n \n \n \n
\n );\n }\n\n}\n\n// Props.\nComposerTextarea.propTypes = {\n advancedOptions: ImmutablePropTypes.map,\n autoFocus: PropTypes.bool,\n disabled: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n onChange: PropTypes.func,\n onPaste: PropTypes.func,\n onPickEmoji: PropTypes.func,\n onSubmit: PropTypes.func,\n onSecondarySubmit: PropTypes.func,\n onSuggestionsClearRequested: PropTypes.func,\n onSuggestionsFetchRequested: PropTypes.func,\n onSuggestionSelected: PropTypes.func,\n suggestions: ImmutablePropTypes.list,\n value: PropTypes.string,\n};\n\n// Default props.\nComposerTextarea.defaultProps = { autoFocus: true };\n","// Package imports.\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport {\n FormattedMessage,\n defineMessages,\n} from 'react-intl';\nimport spring from 'react-motion/lib/spring';\n\n// Components.\nimport IconButton from 'flavours/glitch/components/icon_button';\n\n// Utils.\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport { assignHandlers } from 'flavours/glitch/util/react_helpers';\nimport { isUserTouching } from 'flavours/glitch/util/is_mobile';\n\n// Messages.\nconst messages = defineMessages({\n undo: {\n defaultMessage: 'Undo',\n id: 'upload_form.undo',\n },\n description: {\n defaultMessage: 'Describe for the visually impaired',\n id: 'upload_form.description',\n },\n crop: {\n defaultMessage: 'Crop',\n id: 'upload_form.focus',\n },\n});\n\n// Handlers.\nconst handlers = {\n\n // On blur, we save the description for the media item.\n handleBlur () {\n const {\n id,\n onChangeDescription,\n } = this.props;\n const { dirtyDescription } = this.state;\n\n this.setState({ dirtyDescription: null, focused: false });\n\n if (id && onChangeDescription && dirtyDescription !== null) {\n onChangeDescription(id, dirtyDescription);\n }\n },\n\n // When the value of our description changes, we store it in the\n // temp value `dirtyDescription` in our state.\n handleChange ({ target: { value } }) {\n this.setState({ dirtyDescription: value });\n },\n\n // Records focus on the media item.\n handleFocus () {\n this.setState({ focused: true });\n },\n\n // Records the start of a hover over the media item.\n handleMouseEnter () {\n this.setState({ hovered: true });\n },\n\n // Records the end of a hover over the media item.\n handleMouseLeave () {\n this.setState({ hovered: false });\n },\n\n // Removes the media item.\n handleRemove () {\n const {\n id,\n onRemove,\n } = this.props;\n if (id && onRemove) {\n onRemove(id);\n }\n },\n\n // Opens the focal point modal.\n handleFocalPointClick () {\n const {\n id,\n onOpenFocalPointModal,\n } = this.props;\n if (id && onOpenFocalPointModal) {\n onOpenFocalPointModal(id);\n }\n },\n};\n\n// The component.\nexport default class ComposerUploadFormItem extends React.PureComponent {\n\n // Constructor.\n constructor (props) {\n super(props);\n assignHandlers(this, handlers);\n this.state = {\n hovered: false,\n focused: false,\n dirtyDescription: null,\n };\n }\n\n // Rendering.\n render () {\n const {\n handleBlur,\n handleChange,\n handleFocus,\n handleMouseEnter,\n handleMouseLeave,\n handleRemove,\n handleFocalPointClick,\n } = this.handlers;\n const {\n intl,\n preview,\n focusX,\n focusY,\n mediaType,\n } = this.props;\n const {\n focused,\n hovered,\n dirtyDescription,\n } = this.state;\n const active = hovered || focused || isUserTouching();\n const computedClass = classNames('composer--upload_form--item', { active });\n const x = ((focusX / 2) + .5) * 100;\n const y = ((focusY / -2) + .5) * 100;\n const description = dirtyDescription || (dirtyDescription !== '' && this.props.description) || '';\n\n // The result.\n return (\n
\n \n {({ scale }) => (\n
\n
\n \n \n \n {mediaType === 'image' && }\n
\n \n
\n )}\n \n
\n );\n }\n\n}\n\n// Props.\nComposerUploadFormItem.propTypes = {\n description: PropTypes.string,\n id: PropTypes.string,\n intl: PropTypes.object.isRequired,\n onChangeDescription: PropTypes.func.isRequired,\n onOpenFocalPointModal: PropTypes.func.isRequired,\n onRemove: PropTypes.func.isRequired,\n focusX: PropTypes.number,\n focusY: PropTypes.number,\n mediaType: PropTypes.string,\n preview: PropTypes.string,\n};\n","// Package imports.\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport {\n defineMessages,\n FormattedMessage,\n} from 'react-intl';\nimport spring from 'react-motion/lib/spring';\n\n// Components.\nimport Icon from 'flavours/glitch/components/icon';\n\n// Utils.\nimport Motion from 'flavours/glitch/util/optional_motion';\n\n// Messages.\nconst messages = defineMessages({\n upload: {\n defaultMessage: 'Uploading...',\n id: 'upload_progress.label',\n },\n});\n\n// The component.\nexport default function ComposerUploadFormProgress ({ progress }) {\n\n // The result.\n return (\n
\n \n
\n \n
\n \n {({ width }) =>\n ()\n }\n \n
\n
\n
\n );\n}\n\n// Props.\nComposerUploadFormProgress.propTypes = { progress: PropTypes.number };\n","// Package imports.\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\n\n// Components.\nimport ComposerUploadFormItem from './item';\nimport ComposerUploadFormProgress from './progress';\n\n// The component.\nexport default function ComposerUploadForm ({\n intl,\n media,\n onChangeDescription,\n onOpenFocalPointModal,\n onRemove,\n progress,\n uploading,\n handleRef,\n}) {\n const computedClass = classNames('composer--upload_form', { uploading });\n\n // The result.\n return (\n
\n {uploading ? : null}\n {media ? (\n
\n {media.map(item => (\n \n ))}\n
\n ) : null}\n
\n );\n}\n\n// Props.\nComposerUploadForm.propTypes = {\n intl: PropTypes.object.isRequired,\n media: ImmutablePropTypes.list,\n onChangeDescription: PropTypes.func.isRequired,\n onRemove: PropTypes.func.isRequired,\n progress: PropTypes.number,\n uploading: PropTypes.bool,\n handleRef: PropTypes.func,\n};\n","import React from 'react';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport { defineMessages, FormattedMessage } from 'react-intl';\nimport { profileLink } from 'flavours/glitch/util/backend_links';\n\n// This is the spring used with our motion.\nconst motionSpring = spring(1, { damping: 35, stiffness: 400 });\n\n// Messages.\nconst messages = defineMessages({\n disclaimer: {\n defaultMessage: 'Your account is not {locked}. Anyone can follow you to view your follower-only posts.',\n id: 'compose_form.lock_disclaimer',\n },\n locked: {\n defaultMessage: 'locked',\n id: 'compose_form.lock_disclaimer.lock',\n },\n});\n\n// The component.\nexport default function ComposerWarning () {\n let lockedLink = ;\n if (profileLink !== undefined) {\n lockedLink = {lockedLink};\n }\n return (\n \n {({ opacity, scaleX, scaleY }) => (\n
\n \n
\n )}\n \n );\n}\n\nComposerWarning.propTypes = {};\n","import React from 'react';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport { defineMessages, FormattedMessage } from 'react-intl';\n\n// This is the spring used with our motion.\nconst motionSpring = spring(1, { damping: 35, stiffness: 400 });\n\n// Messages.\nconst messages = defineMessages({\n disclaimer: {\n defaultMessage: 'This toot won\\'t be listed under any hashtag as it is unlisted. Only public toots can be searched by hashtag.',\n id: 'compose_form.hashtag_warning',\n },\n});\n\n// The component.\nexport default function ComposerHashtagWarning () {\n return (\n \n {({ opacity, scaleX, scaleY }) => (\n
\n \n
\n )}\n \n );\n}\n\nComposerHashtagWarning.propTypes = {};\n","import React from 'react';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport { defineMessages, FormattedMessage } from 'react-intl';\nimport { termsLink} from 'flavours/glitch/util/backend_links';\n\n// This is the spring used with our motion.\nconst motionSpring = spring(1, { damping: 35, stiffness: 400 });\n\n// Messages.\nconst messages = defineMessages({\n disclaimer: {\n defaultMessage: 'This toot will only be sent to all the mentioned users.',\n id: 'compose_form.direct_message_warning',\n },\n learn_more: {\n defaultMessage: 'Learn more',\n id: 'compose_form.direct_message_warning_learn_more'\n }\n});\n\n// The component.\nexport default function ComposerDirectWarning () {\n return (\n \n {({ opacity, scaleX, scaleY }) => (\n
\n \n \n { termsLink !== undefined && }\n \n
\n )}\n \n );\n}\n\nComposerDirectWarning.propTypes = {};\n","const regexen = {};\n\nconst regexSupplant = function(regex, flags) {\n flags = flags || '';\n if (typeof regex !== 'string') {\n if (regex.global && flags.indexOf('g') < 0) {\n flags += 'g';\n }\n if (regex.ignoreCase && flags.indexOf('i') < 0) {\n flags += 'i';\n }\n if (regex.multiline && flags.indexOf('m') < 0) {\n flags += 'm';\n }\n\n regex = regex.source;\n }\n return new RegExp(regex.replace(/#\\{(\\w+)\\}/g, function(match, name) {\n var newRegex = regexen[name] || '';\n if (typeof newRegex !== 'string') {\n newRegex = newRegex.source;\n }\n return newRegex;\n }), flags);\n};\n\nconst stringSupplant = function(str, values) {\n return str.replace(/#\\{(\\w+)\\}/g, function(match, name) {\n return values[name] || '';\n });\n};\n\nexport const urlRegex = (function() {\n regexen.spaces_group = /\\x09-\\x0D\\x20\\x85\\xA0\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000/;\n regexen.invalid_chars_group = /\\uFFFE\\uFEFF\\uFFFF\\u202A-\\u202E/;\n regexen.punct = /\\!'#%&'\\(\\)*\\+,\\\\\\-\\.\\/:;<=>\\?@\\[\\]\\^_{|}~\\$/;\n regexen.validUrlPrecedingChars = regexSupplant(/(?:[^A-Za-z0-9@@$###{invalid_chars_group}]|^)/);\n regexen.invalidDomainChars = stringSupplant('#{punct}#{spaces_group}#{invalid_chars_group}', regexen);\n regexen.validDomainChars = regexSupplant(/[^#{invalidDomainChars}]/);\n regexen.validSubdomain = regexSupplant(/(?:(?:#{validDomainChars}(?:[_-]|#{validDomainChars})*)?#{validDomainChars}\\.)/);\n regexen.validDomainName = regexSupplant(/(?:(?:#{validDomainChars}(?:-|#{validDomainChars})*)?#{validDomainChars}\\.)/);\n regexen.validGTLD = regexSupplant(RegExp(\n '(?:(?:' +\n '삼성|닷컴|닷넷|香格里拉|餐厅|食品|飞利浦|電訊盈科|集团|通販|购物|谷歌|诺基亚|联通|网络|网站|网店|网址|组织机构|移动|珠宝|点看|游戏|淡马锡|机构|書籍|时尚|新闻|政府|' +\n '政务|手表|手机|我爱你|慈善|微博|广东|工行|家電|娱乐|天主教|大拿|大众汽车|在线|嘉里大酒店|嘉里|商标|商店|商城|公益|公司|八卦|健康|信息|佛山|企业|中文网|中信|世界|' +\n 'ポイント|ファッション|セール|ストア|コム|グーグル|クラウド|みんな|คอม|संगठन|नेट|कॉम|همراه|موقع|موبايلي|كوم|كاثوليك|عرب|شبكة|' +\n 'بيتك|بازار|العليان|ارامكو|اتصالات|ابوظبي|קום|сайт|рус|орг|онлайн|москва|ком|католик|дети|' +\n 'zuerich|zone|zippo|zip|zero|zara|zappos|yun|youtube|you|yokohama|yoga|yodobashi|yandex|yamaxun|' +\n 'yahoo|yachts|xyz|xxx|xperia|xin|xihuan|xfinity|xerox|xbox|wtf|wtc|wow|world|works|work|woodside|' +\n 'wolterskluwer|wme|winners|wine|windows|win|williamhill|wiki|wien|whoswho|weir|weibo|wedding|wed|' +\n 'website|weber|webcam|weatherchannel|weather|watches|watch|warman|wanggou|wang|walter|walmart|' +\n 'wales|vuelos|voyage|voto|voting|vote|volvo|volkswagen|vodka|vlaanderen|vivo|viva|vistaprint|' +\n 'vista|vision|visa|virgin|vip|vin|villas|viking|vig|video|viajes|vet|versicherung|' +\n 'vermögensberatung|vermögensberater|verisign|ventures|vegas|vanguard|vana|vacations|ups|uol|uno|' +\n 'university|unicom|uconnect|ubs|ubank|tvs|tushu|tunes|tui|tube|trv|trust|travelersinsurance|' +\n 'travelers|travelchannel|travel|training|trading|trade|toys|toyota|town|tours|total|toshiba|' +\n 'toray|top|tools|tokyo|today|tmall|tkmaxx|tjx|tjmaxx|tirol|tires|tips|tiffany|tienda|tickets|' +\n 'tiaa|theatre|theater|thd|teva|tennis|temasek|telefonica|telecity|tel|technology|tech|team|tdk|' +\n 'tci|taxi|tax|tattoo|tatar|tatamotors|target|taobao|talk|taipei|tab|systems|symantec|sydney|' +\n 'swiss|swiftcover|swatch|suzuki|surgery|surf|support|supply|supplies|sucks|style|study|studio|' +\n 'stream|store|storage|stockholm|stcgroup|stc|statoil|statefarm|statebank|starhub|star|staples|' +\n 'stada|srt|srl|spreadbetting|spot|spiegel|space|soy|sony|song|solutions|solar|sohu|software|' +\n 'softbank|social|soccer|sncf|smile|smart|sling|skype|sky|skin|ski|site|singles|sina|silk|shriram|' +\n 'showtime|show|shouji|shopping|shop|shoes|shiksha|shia|shell|shaw|sharp|shangrila|sfr|sexy|sex|' +\n 'sew|seven|ses|services|sener|select|seek|security|secure|seat|search|scot|scor|scjohnson|' +\n 'science|schwarz|schule|school|scholarships|schmidt|schaeffler|scb|sca|sbs|sbi|saxo|save|sas|' +\n 'sarl|sapo|sap|sanofi|sandvikcoromant|sandvik|samsung|samsclub|salon|sale|sakura|safety|safe|' +\n 'saarland|ryukyu|rwe|run|ruhr|rugby|rsvp|room|rogers|rodeo|rocks|rocher|rmit|rip|rio|ril|' +\n 'rightathome|ricoh|richardli|rich|rexroth|reviews|review|restaurant|rest|republican|report|' +\n 'repair|rentals|rent|ren|reliance|reit|reisen|reise|rehab|redumbrella|redstone|red|recipes|' +\n 'realty|realtor|realestate|read|raid|radio|racing|qvc|quest|quebec|qpon|pwc|pub|prudential|pru|' +\n 'protection|property|properties|promo|progressive|prof|productions|prod|pro|prime|press|praxi|' +\n 'pramerica|post|porn|politie|poker|pohl|pnc|plus|plumbing|playstation|play|place|pizza|pioneer|' +\n 'pink|ping|pin|pid|pictures|pictet|pics|piaget|physio|photos|photography|photo|phone|philips|phd|' +\n 'pharmacy|pfizer|pet|pccw|pay|passagens|party|parts|partners|pars|paris|panerai|panasonic|' +\n 'pamperedchef|page|ovh|ott|otsuka|osaka|origins|orientexpress|organic|org|orange|oracle|open|ooo|' +\n 'onyourside|online|onl|ong|one|omega|ollo|oldnavy|olayangroup|olayan|okinawa|office|off|observer|' +\n 'obi|nyc|ntt|nrw|nra|nowtv|nowruz|now|norton|northwesternmutual|nokia|nissay|nissan|ninja|nikon|' +\n 'nike|nico|nhk|ngo|nfl|nexus|nextdirect|next|news|newholland|new|neustar|network|netflix|netbank|' +\n 'net|nec|nba|navy|natura|nationwide|name|nagoya|nadex|nab|mutuelle|mutual|museum|mtr|mtpc|mtn|' +\n 'msd|movistar|movie|mov|motorcycles|moto|moscow|mortgage|mormon|mopar|montblanc|monster|money|' +\n 'monash|mom|moi|moe|moda|mobily|mobile|mobi|mma|mls|mlb|mitsubishi|mit|mint|mini|mil|microsoft|' +\n 'miami|metlife|merckmsd|meo|menu|men|memorial|meme|melbourne|meet|media|med|mckinsey|mcdonalds|' +\n 'mcd|mba|mattel|maserati|marshalls|marriott|markets|marketing|market|map|mango|management|man|' +\n 'makeup|maison|maif|madrid|macys|luxury|luxe|lupin|lundbeck|ltda|ltd|lplfinancial|lpl|love|lotto|' +\n 'lotte|london|lol|loft|locus|locker|loans|loan|lixil|living|live|lipsy|link|linde|lincoln|limo|' +\n 'limited|lilly|like|lighting|lifestyle|lifeinsurance|life|lidl|liaison|lgbt|lexus|lego|legal|' +\n 'lefrak|leclerc|lease|lds|lawyer|law|latrobe|latino|lat|lasalle|lanxess|landrover|land|lancome|' +\n 'lancia|lancaster|lamer|lamborghini|ladbrokes|lacaixa|kyoto|kuokgroup|kred|krd|kpn|kpmg|kosher|' +\n 'komatsu|koeln|kiwi|kitchen|kindle|kinder|kim|kia|kfh|kerryproperties|kerrylogistics|kerryhotels|' +\n 'kddi|kaufen|juniper|juegos|jprs|jpmorgan|joy|jot|joburg|jobs|jnj|jmp|jll|jlc|jio|jewelry|jetzt|' +\n 'jeep|jcp|jcb|java|jaguar|iwc|iveco|itv|itau|istanbul|ist|ismaili|iselect|irish|ipiranga|' +\n 'investments|intuit|international|intel|int|insure|insurance|institute|ink|ing|info|infiniti|' +\n 'industries|immobilien|immo|imdb|imamat|ikano|iinet|ifm|ieee|icu|ice|icbc|ibm|hyundai|hyatt|' +\n 'hughes|htc|hsbc|how|house|hotmail|hotels|hoteles|hot|hosting|host|hospital|horse|honeywell|' +\n 'honda|homesense|homes|homegoods|homedepot|holiday|holdings|hockey|hkt|hiv|hitachi|hisamitsu|' +\n 'hiphop|hgtv|hermes|here|helsinki|help|healthcare|health|hdfcbank|hdfc|hbo|haus|hangout|hamburg|' +\n 'hair|guru|guitars|guide|guge|gucci|guardian|group|grocery|gripe|green|gratis|graphics|grainger|' +\n 'gov|got|gop|google|goog|goodyear|goodhands|goo|golf|goldpoint|gold|godaddy|gmx|gmo|gmbh|gmail|' +\n 'globo|global|gle|glass|glade|giving|gives|gifts|gift|ggee|george|genting|gent|gea|gdn|gbiz|' +\n 'garden|gap|games|game|gallup|gallo|gallery|gal|fyi|futbol|furniture|fund|fun|fujixerox|fujitsu|' +\n 'ftr|frontier|frontdoor|frogans|frl|fresenius|free|fox|foundation|forum|forsale|forex|ford|' +\n 'football|foodnetwork|food|foo|fly|flsmidth|flowers|florist|flir|flights|flickr|fitness|fit|' +\n 'fishing|fish|firmdale|firestone|fire|financial|finance|final|film|fido|fidelity|fiat|ferrero|' +\n 'ferrari|feedback|fedex|fast|fashion|farmers|farm|fans|fan|family|faith|fairwinds|fail|fage|' +\n 'extraspace|express|exposed|expert|exchange|everbank|events|eus|eurovision|etisalat|esurance|' +\n 'estate|esq|erni|ericsson|equipment|epson|epost|enterprises|engineering|engineer|energy|emerck|' +\n 'email|education|edu|edeka|eco|eat|earth|dvr|dvag|durban|dupont|duns|dunlop|duck|dubai|dtv|drive|' +\n 'download|dot|doosan|domains|doha|dog|dodge|doctor|docs|dnp|diy|dish|discover|discount|directory|' +\n 'direct|digital|diet|diamonds|dhl|dev|design|desi|dentist|dental|democrat|delta|deloitte|dell|' +\n 'delivery|degree|deals|dealer|deal|dds|dclk|day|datsun|dating|date|data|dance|dad|dabur|cyou|' +\n 'cymru|cuisinella|csc|cruises|cruise|crs|crown|cricket|creditunion|creditcard|credit|courses|' +\n 'coupons|coupon|country|corsica|coop|cool|cookingchannel|cooking|contractors|contact|consulting|' +\n 'construction|condos|comsec|computer|compare|company|community|commbank|comcast|com|cologne|' +\n 'college|coffee|codes|coach|clubmed|club|cloud|clothing|clinique|clinic|click|cleaning|claims|' +\n 'cityeats|city|citic|citi|citadel|cisco|circle|cipriani|church|chrysler|chrome|christmas|chloe|' +\n 'chintai|cheap|chat|chase|channel|chanel|cfd|cfa|cern|ceo|center|ceb|cbs|cbre|cbn|cba|catholic|' +\n 'catering|cat|casino|cash|caseih|case|casa|cartier|cars|careers|career|care|cards|caravan|car|' +\n 'capitalone|capital|capetown|canon|cancerresearch|camp|camera|cam|calvinklein|call|cal|cafe|cab|' +\n 'bzh|buzz|buy|business|builders|build|bugatti|budapest|brussels|brother|broker|broadway|' +\n 'bridgestone|bradesco|box|boutique|bot|boston|bostik|bosch|boots|booking|book|boo|bond|bom|bofa|' +\n 'boehringer|boats|bnpparibas|bnl|bmw|bms|blue|bloomberg|blog|blockbuster|blanco|blackfriday|' +\n 'black|biz|bio|bingo|bing|bike|bid|bible|bharti|bet|bestbuy|best|berlin|bentley|beer|beauty|' +\n 'beats|bcn|bcg|bbva|bbt|bbc|bayern|bauhaus|basketball|baseball|bargains|barefoot|barclays|' +\n 'barclaycard|barcelona|bar|bank|band|bananarepublic|banamex|baidu|baby|azure|axa|aws|avianca|' +\n 'autos|auto|author|auspost|audio|audible|audi|auction|attorney|athleta|associates|asia|asda|arte|' +\n 'art|arpa|army|archi|aramco|arab|aquarelle|apple|app|apartments|aol|anz|anquan|android|analytics|' +\n 'amsterdam|amica|amfam|amex|americanfamily|americanexpress|alstom|alsace|ally|allstate|allfinanz|' +\n 'alipay|alibaba|alfaromeo|akdn|airtel|airforce|airbus|aigo|aig|agency|agakhan|africa|afl|' +\n 'afamilycompany|aetna|aero|aeg|adult|ads|adac|actor|active|aco|accountants|accountant|accenture|' +\n 'academy|abudhabi|abogado|able|abc|abbvie|abbott|abb|abarth|aarp|aaa|onion' +\n ')(?=[^0-9a-zA-Z@]|$))'));\n regexen.validCCTLD = regexSupplant(RegExp(\n '(?:(?:' +\n '한국|香港|澳門|新加坡|台灣|台湾|中國|中国|გე|ไทย|ලංකා|ഭാരതം|ಭಾರತ|భారత్|சிங்கப்பூர்|இலங்கை|இந்தியா|ଭାରତ|ભારત|ਭਾਰਤ|' +\n 'ভাৰত|ভারত|বাংলা|भारोत|भारतम्|भारत|ڀارت|پاکستان|مليسيا|مصر|قطر|فلسطين|عمان|عراق|سورية|سودان|تونس|' +\n 'بھارت|بارت|ایران|امارات|المغرب|السعودية|الجزائر|الاردن|հայ|қаз|укр|срб|рф|мон|мкд|ею|бел|бг|ελ|' +\n 'zw|zm|za|yt|ye|ws|wf|vu|vn|vi|vg|ve|vc|va|uz|uy|us|um|uk|ug|ua|tz|tw|tv|tt|tr|tp|to|tn|tm|tl|tk|' +\n 'tj|th|tg|tf|td|tc|sz|sy|sx|sv|su|st|ss|sr|so|sn|sm|sl|sk|sj|si|sh|sg|se|sd|sc|sb|sa|rw|ru|rs|ro|' +\n 're|qa|py|pw|pt|ps|pr|pn|pm|pl|pk|ph|pg|pf|pe|pa|om|nz|nu|nr|np|no|nl|ni|ng|nf|ne|nc|na|mz|my|mx|' +\n 'mw|mv|mu|mt|ms|mr|mq|mp|mo|mn|mm|ml|mk|mh|mg|mf|me|md|mc|ma|ly|lv|lu|lt|ls|lr|lk|li|lc|lb|la|kz|' +\n 'ky|kw|kr|kp|kn|km|ki|kh|kg|ke|jp|jo|jm|je|it|is|ir|iq|io|in|im|il|ie|id|hu|ht|hr|hn|hm|hk|gy|gw|' +\n 'gu|gt|gs|gr|gq|gp|gn|gm|gl|gi|gh|gg|gf|ge|gd|gb|ga|fr|fo|fm|fk|fj|fi|eu|et|es|er|eh|eg|ee|ec|dz|' +\n 'do|dm|dk|dj|de|cz|cy|cx|cw|cv|cu|cr|co|cn|cm|cl|ck|ci|ch|cg|cf|cd|cc|ca|bz|by|bw|bv|bt|bs|br|bq|' +\n 'bo|bn|bm|bl|bj|bi|bh|bg|bf|be|bd|bb|ba|az|ax|aw|au|at|as|ar|aq|ao|an|am|al|ai|ag|af|ae|ad|ac' +\n ')(?=[^0-9a-zA-Z@]|$))'));\n regexen.validPunycode = /(?:xn--[0-9a-z]+)/;\n regexen.validSpecialCCTLD = /(?:(?:co|tv)(?=[^0-9a-zA-Z@]|$))/;\n regexen.validDomain = regexSupplant(/(?:#{validSubdomain}*#{validDomainName}(?:#{validGTLD}|#{validCCTLD}|#{validPunycode}))/);\n regexen.validPortNumber = /[0-9]+/;\n regexen.pd = /\\u002d\\u058a\\u05be\\u1400\\u1806\\u2010-\\u2015\\u2e17\\u2e1a\\u2e3a\\u2e40\\u301c\\u3030\\u30a0\\ufe31\\ufe58\\ufe63\\uff0d/;\n regexen.validGeneralUrlPathChars = regexSupplant(/[^#{spaces_group}\\(\\)\\?]/i);\n // Allow URL paths to contain up to two nested levels of balanced parens\n // 1. Used in Wikipedia URLs like /Primer_(film)\n // 2. Used in IIS sessions like /S(dfd346)/\n // 3. Used in Rdio URLs like /track/We_Up_(Album_Version_(Edited))/\n regexen.validUrlBalancedParens = regexSupplant(\n '\\\\(' +\n '(?:' +\n '#{validGeneralUrlPathChars}+' +\n '|' +\n // allow one nested level of balanced parentheses\n '(?:' +\n '#{validGeneralUrlPathChars}*' +\n '\\\\(' +\n '#{validGeneralUrlPathChars}+' +\n '\\\\)' +\n '#{validGeneralUrlPathChars}*' +\n ')' +\n ')' +\n '\\\\)'\n , 'i');\n // Valid end-of-path chracters (so /foo. does not gobble the period).\n // 1. Allow = for empty URL parameters and other URL-join artifacts\n regexen.validUrlPathEndingChars = regexSupplant(/[^#{spaces_group}\\(\\)\\?!\\*';:=\\,\\.\\$%\\[\\]#{pd}~&\\|@]|(?:#{validUrlBalancedParens})/i);\n // Allow @ in a url, but only in the middle. Catch things like http://example.com/@user/\n regexen.validUrlPath = regexSupplant('(?:' +\n '(?:' +\n '#{validGeneralUrlPathChars}*' +\n '(?:#{validUrlBalancedParens}#{validGeneralUrlPathChars}*)*' +\n '#{validUrlPathEndingChars}'+\n ')|(?:@#{validGeneralUrlPathChars}+\\/)'+\n ')', 'i');\n regexen.validUrlQueryChars = /[a-z0-9!?\\*'@\\(\\);:&=\\+\\$\\/%#\\[\\]\\-_\\.,~|]/i;\n regexen.validUrlQueryEndingChars = /[a-z0-9_&=#\\/]/i;\n regexen.validUrl = regexSupplant(\n '(' + // $1 URL\n '(https?:\\\\/\\\\/)' + // $2 Protocol\n '(#{validDomain})' + // $3 Domain(s)\n '(?::(#{validPortNumber}))?' + // $4 Port number (optional)\n '(\\\\/#{validUrlPath}*)?' + // $5 URL Path\n '(\\\\?#{validUrlQueryChars}*#{validUrlQueryEndingChars})?' + // $6 Query String\n ')'\n , 'gi');\n return regexen.validUrl;\n}());\n","// Package imports.\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages } from 'react-intl';\n\nconst APPROX_HASHTAG_RE = /(?:^|[^\\/\\)\\w])#(\\S+)/i;\n\n// Actions.\nimport {\n cancelReplyCompose,\n changeCompose,\n changeComposeAdvancedOption,\n changeComposeSensitivity,\n changeComposeSpoilerText,\n changeComposeSpoilerness,\n changeComposeVisibility,\n changeUploadCompose,\n clearComposeSuggestions,\n fetchComposeSuggestions,\n insertEmojiCompose,\n mountCompose,\n selectComposeSuggestion,\n submitCompose,\n undoUploadCompose,\n unmountCompose,\n uploadCompose,\n} from 'flavours/glitch/actions/compose';\nimport {\n closeModal,\n openModal,\n} from 'flavours/glitch/actions/modal';\nimport { changeLocalSetting } from 'flavours/glitch/actions/local_settings';\n\n// Components.\nimport ComposerOptions from './options';\nimport ComposerPublisher from './publisher';\nimport ComposerReply from './reply';\nimport ComposerSpoiler from './spoiler';\nimport ComposerTextarea from './textarea';\nimport ComposerUploadForm from './upload_form';\nimport ComposerWarning from './warning';\nimport ComposerHashtagWarning from './hashtag_warning';\nimport ComposerDirectWarning from './direct_warning';\n\n// Utils.\nimport { countableText } from 'flavours/glitch/util/counter';\nimport { me } from 'flavours/glitch/util/initial_state';\nimport { isMobile } from 'flavours/glitch/util/is_mobile';\nimport { assignHandlers } from 'flavours/glitch/util/react_helpers';\nimport { wrap } from 'flavours/glitch/util/redux_helpers';\nimport { privacyPreference } from 'flavours/glitch/util/privacy_preference';\n\nconst messages = defineMessages({\n missingDescriptionMessage: { id: 'confirmations.missing_media_description.message',\n defaultMessage: 'At least one media attachment is lacking a description. Consider describing all media attachments for the visually impaired before sending your toot.' },\n missingDescriptionConfirm: { id: 'confirmations.missing_media_description.confirm',\n defaultMessage: 'Send anyway' },\n});\n\n// State mapping.\nfunction mapStateToProps (state) {\n const spoilersAlwaysOn = state.getIn(['local_settings', 'always_show_spoilers_field']);\n const inReplyTo = state.getIn(['compose', 'in_reply_to']);\n const replyPrivacy = inReplyTo ? state.getIn(['statuses', inReplyTo, 'visibility']) : null;\n const sideArmBasePrivacy = state.getIn(['local_settings', 'side_arm']);\n const sideArmRestrictedPrivacy = replyPrivacy ? privacyPreference(replyPrivacy, sideArmBasePrivacy) : null;\n let sideArmPrivacy = null;\n switch (state.getIn(['local_settings', 'side_arm_reply_mode'])) {\n case 'copy':\n sideArmPrivacy = replyPrivacy;\n break;\n case 'restrict':\n sideArmPrivacy = sideArmRestrictedPrivacy;\n break;\n }\n sideArmPrivacy = sideArmPrivacy || sideArmBasePrivacy;\n return {\n acceptContentTypes: state.getIn(['media_attachments', 'accept_content_types']).toArray().join(','),\n advancedOptions: state.getIn(['compose', 'advanced_options']),\n amUnlocked: !state.getIn(['accounts', me, 'locked']),\n focusDate: state.getIn(['compose', 'focusDate']),\n caretPosition: state.getIn(['compose', 'caretPosition']),\n isSubmitting: state.getIn(['compose', 'is_submitting']),\n isChangingUpload: state.getIn(['compose', 'is_changing_upload']),\n isUploading: state.getIn(['compose', 'is_uploading']),\n layout: state.getIn(['local_settings', 'layout']),\n media: state.getIn(['compose', 'media_attachments']),\n preselectDate: state.getIn(['compose', 'preselectDate']),\n privacy: state.getIn(['compose', 'privacy']),\n progress: state.getIn(['compose', 'progress']),\n inReplyTo: inReplyTo ? state.getIn(['statuses', inReplyTo]) : null,\n replyAccount: inReplyTo ? state.getIn(['statuses', inReplyTo, 'account']) : null,\n replyContent: inReplyTo ? state.getIn(['statuses', inReplyTo, 'contentHtml']) : null,\n resetFileKey: state.getIn(['compose', 'resetFileKey']),\n sideArm: sideArmPrivacy,\n sensitive: state.getIn(['compose', 'sensitive']),\n showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']),\n spoiler: spoilersAlwaysOn || state.getIn(['compose', 'spoiler']),\n spoilerText: state.getIn(['compose', 'spoiler_text']),\n suggestionToken: state.getIn(['compose', 'suggestion_token']),\n suggestions: state.getIn(['compose', 'suggestions']),\n text: state.getIn(['compose', 'text']),\n anyMedia: state.getIn(['compose', 'media_attachments']).size > 0,\n spoilersAlwaysOn: spoilersAlwaysOn,\n mediaDescriptionConfirmation: state.getIn(['local_settings', 'confirm_missing_media_description']),\n preselectOnReply: state.getIn(['local_settings', 'preselect_on_reply']),\n };\n};\n\n// Dispatch mapping.\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n onCancelReply() {\n dispatch(cancelReplyCompose());\n },\n onChangeAdvancedOption(option, value) {\n dispatch(changeComposeAdvancedOption(option, value));\n },\n onChangeDescription(id, description) {\n dispatch(changeUploadCompose(id, { description }));\n },\n onChangeSensitivity() {\n dispatch(changeComposeSensitivity());\n },\n onChangeSpoilerText(text) {\n dispatch(changeComposeSpoilerText(text));\n },\n onChangeSpoilerness() {\n dispatch(changeComposeSpoilerness());\n },\n onChangeText(text) {\n dispatch(changeCompose(text));\n },\n onChangeVisibility(value) {\n dispatch(changeComposeVisibility(value));\n },\n onClearSuggestions() {\n dispatch(clearComposeSuggestions());\n },\n onCloseModal() {\n dispatch(closeModal());\n },\n onFetchSuggestions(token) {\n dispatch(fetchComposeSuggestions(token));\n },\n onInsertEmoji(position, emoji) {\n dispatch(insertEmojiCompose(position, emoji));\n },\n onMount() {\n dispatch(mountCompose());\n },\n onOpenActionsModal(props) {\n dispatch(openModal('ACTIONS', props));\n },\n onOpenDoodleModal() {\n dispatch(openModal('DOODLE', { noEsc: true }));\n },\n onOpenFocalPointModal(id) {\n dispatch(openModal('FOCAL_POINT', { id }));\n },\n onSelectSuggestion(position, token, suggestion) {\n dispatch(selectComposeSuggestion(position, token, suggestion));\n },\n onMediaDescriptionConfirm(routerHistory) {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.missingDescriptionMessage),\n confirm: intl.formatMessage(messages.missingDescriptionConfirm),\n onConfirm: () => dispatch(submitCompose(routerHistory)),\n onDoNotAsk: () => dispatch(changeLocalSetting(['confirm_missing_media_description'], false)),\n }));\n },\n onSubmit(routerHistory) {\n dispatch(submitCompose(routerHistory));\n },\n onUndoUpload(id) {\n dispatch(undoUploadCompose(id));\n },\n onUnmount() {\n dispatch(unmountCompose());\n },\n onUpload(files) {\n dispatch(uploadCompose(files));\n },\n});\n\n// Handlers.\nconst handlers = {\n\n // Changes the text value of the spoiler.\n handleChangeSpoiler ({ target: { value } }) {\n const { onChangeSpoilerText } = this.props;\n if (onChangeSpoilerText) {\n onChangeSpoilerText(value);\n }\n },\n\n // Inserts an emoji at the caret.\n handleEmoji (data) {\n const { textarea: { selectionStart } } = this;\n const { onInsertEmoji } = this.props;\n if (onInsertEmoji) {\n onInsertEmoji(selectionStart, data);\n }\n },\n\n // Handles the secondary submit button.\n handleSecondarySubmit () {\n const { handleSubmit } = this.handlers;\n const {\n onChangeVisibility,\n sideArm,\n } = this.props;\n if (sideArm !== 'none' && onChangeVisibility) {\n onChangeVisibility(sideArm);\n }\n handleSubmit();\n },\n\n // Selects a suggestion from the autofill.\n handleSelect (tokenStart, token, value) {\n const { onSelectSuggestion } = this.props;\n if (onSelectSuggestion) {\n onSelectSuggestion(tokenStart, token, value);\n }\n },\n\n // Submits the status.\n handleSubmit () {\n const { textarea: { value }, uploadForm } = this;\n const {\n onChangeText,\n onSubmit,\n isSubmitting,\n isChangingUpload,\n isUploading,\n media,\n anyMedia,\n text,\n mediaDescriptionConfirmation,\n onMediaDescriptionConfirm,\n } = this.props;\n\n // If something changes inside the textarea, then we update the\n // state before submitting.\n if (onChangeText && text !== value) {\n onChangeText(value);\n }\n\n // Submit disabled:\n if (isSubmitting || isUploading || isChangingUpload || (!text.trim().length && !anyMedia)) {\n return;\n }\n\n // Submit unless there are media with missing descriptions\n if (mediaDescriptionConfirmation && onMediaDescriptionConfirm && media && media.some(item => !item.get('description'))) {\n const firstWithoutDescription = media.findIndex(item => !item.get('description'));\n if (uploadForm) {\n const inputs = uploadForm.querySelectorAll('.composer--upload_form--item input');\n if (inputs.length == media.size && firstWithoutDescription !== -1) {\n inputs[firstWithoutDescription].focus();\n }\n }\n onMediaDescriptionConfirm(this.context.router ? this.context.router.history : null);\n } else if (onSubmit) {\n onSubmit(this.context.router ? this.context.router.history : null);\n }\n },\n\n // Sets a reference to the upload form.\n handleRefUploadForm (uploadFormComponent) {\n this.uploadForm = uploadFormComponent;\n },\n\n // Sets a reference to the textarea.\n handleRefTextarea (textareaComponent) {\n if (textareaComponent) {\n this.textarea = textareaComponent.textarea;\n }\n },\n\n // Sets a reference to the CW field.\n handleRefSpoilerText (spoilerComponent) {\n if (spoilerComponent) {\n this.spoilerText = spoilerComponent.spoilerText;\n }\n }\n};\n\n// The component.\nclass Composer extends React.Component {\n\n // Constructor.\n constructor (props) {\n super(props);\n assignHandlers(this, handlers);\n\n // Instance variables.\n this.textarea = null;\n this.spoilerText = null;\n }\n\n // Tells our state the composer has been mounted.\n componentDidMount () {\n const { onMount } = this.props;\n if (onMount) {\n onMount();\n }\n }\n\n // Tells our state the composer has been unmounted.\n componentWillUnmount () {\n const { onUnmount } = this.props;\n if (onUnmount) {\n onUnmount();\n }\n }\n\n // This statement does several things:\n // - If we're beginning a reply, and,\n // - Replying to zero or one users, places the cursor at the end\n // of the textbox.\n // - Replying to more than one user, selects any usernames past\n // the first; this provides a convenient shortcut to drop\n // everyone else from the conversation.\n componentDidUpdate (prevProps) {\n const {\n textarea,\n spoilerText,\n } = this;\n const {\n focusDate,\n caretPosition,\n isSubmitting,\n preselectDate,\n text,\n preselectOnReply,\n } = this.props;\n let selectionEnd, selectionStart;\n\n // Caret/selection handling.\n if (focusDate !== prevProps.focusDate) {\n switch (true) {\n case preselectDate !== prevProps.preselectDate && preselectOnReply:\n selectionStart = text.search(/\\s/) + 1;\n selectionEnd = text.length;\n break;\n case !isNaN(caretPosition) && caretPosition !== null:\n selectionStart = selectionEnd = caretPosition;\n break;\n default:\n selectionStart = selectionEnd = text.length;\n }\n if (textarea) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n textarea.focus();\n textarea.scrollIntoView();\n }\n\n // Refocuses the textarea after submitting.\n } else if (textarea && prevProps.isSubmitting && !isSubmitting) {\n textarea.focus();\n } else if (this.props.spoiler !== prevProps.spoiler) {\n if (this.props.spoiler) {\n if (spoilerText) {\n spoilerText.focus();\n }\n } else {\n if (textarea) {\n textarea.focus();\n }\n }\n }\n }\n\n render () {\n const {\n handleChangeSpoiler,\n handleEmoji,\n handleSecondarySubmit,\n handleSelect,\n handleSubmit,\n handleRefUploadForm,\n handleRefTextarea,\n handleRefSpoilerText,\n } = this.handlers;\n const {\n acceptContentTypes,\n advancedOptions,\n amUnlocked,\n anyMedia,\n intl,\n isSubmitting,\n isChangingUpload,\n isUploading,\n layout,\n media,\n onCancelReply,\n onChangeAdvancedOption,\n onChangeDescription,\n onChangeSensitivity,\n onChangeSpoilerness,\n onChangeText,\n onChangeVisibility,\n onClearSuggestions,\n onCloseModal,\n onFetchSuggestions,\n onOpenActionsModal,\n onOpenDoodleModal,\n onOpenFocalPointModal,\n onUndoUpload,\n onUpload,\n privacy,\n progress,\n inReplyTo,\n resetFileKey,\n sensitive,\n showSearch,\n sideArm,\n spoiler,\n spoilerText,\n suggestions,\n text,\n spoilersAlwaysOn,\n } = this.props;\n\n let disabledButton = isSubmitting || isUploading || isChangingUpload || (!text.trim().length && !anyMedia);\n\n return (\n
\n );\n}\n\n// Props.\nDrawerAccount.propTypes = { account: ImmutablePropTypes.map };\n","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactSparklines\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"ReactSparklines\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 11);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright 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\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(14)(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(16)();\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (data) {\n return data.reduce(function (a, b) {\n return a + b;\n }) / data.length;\n};\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\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 * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\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 */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 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\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (data) {\n return Math.min.apply(Math, data);\n};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright 2014-2015, 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 */\n\n\n\nvar emptyFunction = __webpack_require__(4);\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 warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + 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 warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (data) {\n return Math.max.apply(Math, data);\n};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _mean = __webpack_require__(3);\n\nvar _mean2 = _interopRequireDefault(_mean);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (data) {\n var dataMean = (0, _mean2.default)(data);\n var sqDiff = data.map(function (n) {\n return Math.pow(n - dataMean, 2);\n });\n var avgSqDiff = (0, _mean2.default)(sqDiff);\n return Math.sqrt(avgSqDiff);\n};\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(12);\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = __webpack_require__(13);\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SparklinesText = exports.SparklinesNormalBand = exports.SparklinesReferenceLine = exports.SparklinesSpots = exports.SparklinesBars = exports.SparklinesCurve = exports.SparklinesLine = exports.Sparklines = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _propTypes = __webpack_require__(0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SparklinesText = __webpack_require__(17);\n\nvar _SparklinesText2 = _interopRequireDefault(_SparklinesText);\n\nvar _SparklinesLine = __webpack_require__(18);\n\nvar _SparklinesLine2 = _interopRequireDefault(_SparklinesLine);\n\nvar _SparklinesCurve = __webpack_require__(19);\n\nvar _SparklinesCurve2 = _interopRequireDefault(_SparklinesCurve);\n\nvar _SparklinesBars = __webpack_require__(20);\n\nvar _SparklinesBars2 = _interopRequireDefault(_SparklinesBars);\n\nvar _SparklinesSpots = __webpack_require__(21);\n\nvar _SparklinesSpots2 = _interopRequireDefault(_SparklinesSpots);\n\nvar _SparklinesReferenceLine = __webpack_require__(22);\n\nvar _SparklinesReferenceLine2 = _interopRequireDefault(_SparklinesReferenceLine);\n\nvar _SparklinesNormalBand = __webpack_require__(27);\n\nvar _SparklinesNormalBand2 = _interopRequireDefault(_SparklinesNormalBand);\n\nvar _dataToPoints = __webpack_require__(28);\n\nvar _dataToPoints2 = _interopRequireDefault(_dataToPoints);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Sparklines = function (_PureComponent) {\n _inherits(Sparklines, _PureComponent);\n\n function Sparklines(props) {\n _classCallCheck(this, Sparklines);\n\n return _possibleConstructorReturn(this, (Sparklines.__proto__ || Object.getPrototypeOf(Sparklines)).call(this, props));\n }\n\n _createClass(Sparklines, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n data = _props.data,\n limit = _props.limit,\n width = _props.width,\n height = _props.height,\n svgWidth = _props.svgWidth,\n svgHeight = _props.svgHeight,\n preserveAspectRatio = _props.preserveAspectRatio,\n margin = _props.margin,\n style = _props.style,\n max = _props.max,\n min = _props.min;\n\n\n if (data.length === 0) return null;\n\n var points = (0, _dataToPoints2.default)({ data: data, limit: limit, width: width, height: height, margin: margin, max: max, min: min });\n\n var svgOpts = { style: style, viewBox: '0 0 ' + width + ' ' + height, preserveAspectRatio: preserveAspectRatio };\n if (svgWidth > 0) svgOpts.width = svgWidth;\n if (svgHeight > 0) svgOpts.height = svgHeight;\n\n return _react2.default.createElement(\n 'svg',\n svgOpts,\n _react2.default.Children.map(this.props.children, function (child) {\n return _react2.default.cloneElement(child, { data: data, points: points, width: width, height: height, margin: margin });\n })\n );\n }\n }]);\n\n return Sparklines;\n}(_react.PureComponent);\n\nSparklines.propTypes = {\n data: _propTypes2.default.array,\n limit: _propTypes2.default.number,\n width: _propTypes2.default.number,\n height: _propTypes2.default.number,\n svgWidth: _propTypes2.default.number,\n svgHeight: _propTypes2.default.number,\n preserveAspectRatio: _propTypes2.default.string,\n margin: _propTypes2.default.number,\n style: _propTypes2.default.object,\n min: _propTypes2.default.number,\n max: _propTypes2.default.number,\n onMouseMove: _propTypes2.default.func\n};\nSparklines.defaultProps = {\n data: [],\n width: 240,\n height: 60,\n //Scale the graphic content of the given element non-uniformly if necessary such that the element's bounding box exactly matches the viewport rectangle.\n preserveAspectRatio: 'none', //https://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute\n margin: 2\n};\nexports.Sparklines = Sparklines;\nexports.SparklinesLine = _SparklinesLine2.default;\nexports.SparklinesCurve = _SparklinesCurve2.default;\nexports.SparklinesBars = _SparklinesBars2.default;\nexports.SparklinesSpots = _SparklinesSpots2.default;\nexports.SparklinesReferenceLine = _SparklinesReferenceLine2.default;\nexports.SparklinesNormalBand = _SparklinesNormalBand2.default;\nexports.SparklinesText = _SparklinesText2.default;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright 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\n\n\nvar emptyFunction = __webpack_require__(4);\nvar invariant = __webpack_require__(5);\nvar warning = __webpack_require__(8);\n\nvar ReactPropTypesSecret = __webpack_require__(6);\nvar checkPropTypes = __webpack_require__(15);\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n warning(\n false,\n 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +\n 'received %s at index %s.',\n getPostfixForTypeWarning(checker),\n i\n );\n return emptyFunction.thatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright 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\n\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant = __webpack_require__(5);\n var warning = __webpack_require__(8);\n var ReactPropTypesSecret = __webpack_require__(6);\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 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\n\n\nvar emptyFunction = __webpack_require__(4);\nvar invariant = __webpack_require__(5);\nvar ReactPropTypesSecret = __webpack_require__(6);\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _propTypes = __webpack_require__(0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SparklinesText = function (_React$Component) {\n _inherits(SparklinesText, _React$Component);\n\n function SparklinesText() {\n _classCallCheck(this, SparklinesText);\n\n return _possibleConstructorReturn(this, (SparklinesText.__proto__ || Object.getPrototypeOf(SparklinesText)).apply(this, arguments));\n }\n\n _createClass(SparklinesText, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n point = _props.point,\n text = _props.text,\n fontSize = _props.fontSize,\n fontFamily = _props.fontFamily;\n var x = point.x,\n y = point.y;\n\n return _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement(\n 'text',\n { x: x, y: y, fontFamily: fontFamily || \"Verdana\", fontSize: fontSize || 10 },\n text\n )\n );\n }\n }]);\n\n return SparklinesText;\n}(_react2.default.Component);\n\nSparklinesText.propTypes = {\n text: _propTypes2.default.string,\n point: _propTypes2.default.object,\n fontSize: _propTypes2.default.number,\n fontFamily: _propTypes2.default.string\n};\nSparklinesText.defaultProps = {\n text: '',\n point: { x: 0, y: 0 }\n};\nexports.default = SparklinesText;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _propTypes = __webpack_require__(0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SparklinesLine = function (_React$Component) {\n _inherits(SparklinesLine, _React$Component);\n\n function SparklinesLine() {\n _classCallCheck(this, SparklinesLine);\n\n return _possibleConstructorReturn(this, (SparklinesLine.__proto__ || Object.getPrototypeOf(SparklinesLine)).apply(this, arguments));\n }\n\n _createClass(SparklinesLine, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n data = _props.data,\n points = _props.points,\n width = _props.width,\n height = _props.height,\n margin = _props.margin,\n color = _props.color,\n style = _props.style,\n onMouseMove = _props.onMouseMove;\n\n\n var linePoints = points.map(function (p) {\n return [p.x, p.y];\n }).reduce(function (a, b) {\n return a.concat(b);\n });\n\n var closePolyPoints = [points[points.length - 1].x, height - margin, margin, height - margin, margin, points[0].y];\n\n var fillPoints = linePoints.concat(closePolyPoints);\n\n var lineStyle = {\n stroke: color || style.stroke || 'slategray',\n strokeWidth: style.strokeWidth || '1',\n strokeLinejoin: style.strokeLinejoin || 'round',\n strokeLinecap: style.strokeLinecap || 'round',\n fill: 'none'\n };\n var fillStyle = {\n stroke: style.stroke || 'none',\n strokeWidth: '0',\n fillOpacity: style.fillOpacity || '.1',\n fill: style.fill || color || 'slategray',\n pointerEvents: 'auto'\n };\n\n var tooltips = points.map(function (p, i) {\n return _react2.default.createElement('circle', {\n key: i,\n cx: p.x,\n cy: p.y,\n r: 2,\n style: fillStyle,\n onMouseEnter: function onMouseEnter(e) {\n return onMouseMove('enter', data[i], p);\n },\n onClick: function onClick(e) {\n return onMouseMove('click', data[i], p);\n }\n });\n });\n\n return _react2.default.createElement(\n 'g',\n null,\n tooltips,\n _react2.default.createElement('polyline', { points: fillPoints.join(' '), style: fillStyle }),\n _react2.default.createElement('polyline', { points: linePoints.join(' '), style: lineStyle })\n );\n }\n }]);\n\n return SparklinesLine;\n}(_react2.default.Component);\n\nSparklinesLine.propTypes = {\n color: _propTypes2.default.string,\n style: _propTypes2.default.object\n};\nSparklinesLine.defaultProps = {\n style: {},\n onMouseMove: function onMouseMove() {}\n};\nexports.default = SparklinesLine;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _propTypes = __webpack_require__(0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SparklinesCurve = function (_React$Component) {\n _inherits(SparklinesCurve, _React$Component);\n\n function SparklinesCurve() {\n _classCallCheck(this, SparklinesCurve);\n\n return _possibleConstructorReturn(this, (SparklinesCurve.__proto__ || Object.getPrototypeOf(SparklinesCurve)).apply(this, arguments));\n }\n\n _createClass(SparklinesCurve, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n points = _props.points,\n width = _props.width,\n height = _props.height,\n margin = _props.margin,\n color = _props.color,\n style = _props.style,\n _props$divisor = _props.divisor,\n divisor = _props$divisor === undefined ? 0.25 : _props$divisor;\n\n var prev = void 0;\n var curve = function curve(p) {\n var res = void 0;\n if (!prev) {\n res = [p.x, p.y];\n } else {\n var len = (p.x - prev.x) * divisor;\n res = [\"C\",\n //x1\n prev.x + len,\n //y1\n prev.y,\n //x2,\n p.x - len,\n //y2,\n p.y,\n //x,\n p.x,\n //y\n p.y];\n }\n prev = p;\n return res;\n };\n var linePoints = points.map(function (p) {\n return curve(p);\n }).reduce(function (a, b) {\n return a.concat(b);\n });\n var closePolyPoints = [\"L\" + points[points.length - 1].x, height - margin, margin, height - margin, margin, points[0].y];\n var fillPoints = linePoints.concat(closePolyPoints);\n\n var lineStyle = {\n stroke: color || style.stroke || 'slategray',\n strokeWidth: style.strokeWidth || '1',\n strokeLinejoin: style.strokeLinejoin || 'round',\n strokeLinecap: style.strokeLinecap || 'round',\n fill: 'none'\n };\n var fillStyle = {\n stroke: style.stroke || 'none',\n strokeWidth: '0',\n fillOpacity: style.fillOpacity || '.1',\n fill: style.fill || color || 'slategray'\n };\n\n return _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: \"M\" + fillPoints.join(' '), style: fillStyle }),\n _react2.default.createElement('path', { d: \"M\" + linePoints.join(' '), style: lineStyle })\n );\n }\n }]);\n\n return SparklinesCurve;\n}(_react2.default.Component);\n\nSparklinesCurve.propTypes = {\n color: _propTypes2.default.string,\n style: _propTypes2.default.object\n};\nSparklinesCurve.defaultProps = {\n style: {}\n};\nexports.default = SparklinesCurve;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _propTypes = __webpack_require__(0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SparklinesBars = function (_React$Component) {\n _inherits(SparklinesBars, _React$Component);\n\n function SparklinesBars() {\n _classCallCheck(this, SparklinesBars);\n\n return _possibleConstructorReturn(this, (SparklinesBars.__proto__ || Object.getPrototypeOf(SparklinesBars)).apply(this, arguments));\n }\n\n _createClass(SparklinesBars, [{\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props,\n points = _props.points,\n height = _props.height,\n style = _props.style,\n barWidth = _props.barWidth,\n margin = _props.margin,\n onMouseMove = _props.onMouseMove;\n\n var strokeWidth = 1 * (style && style.strokeWidth || 0);\n var marginWidth = margin ? 2 * margin : 0;\n var width = barWidth || (points && points.length >= 2 ? Math.max(0, points[1].x - points[0].x - strokeWidth - marginWidth) : 0);\n\n return _react2.default.createElement(\n 'g',\n { transform: 'scale(1,-1)' },\n points.map(function (p, i) {\n return _react2.default.createElement('rect', {\n key: i,\n x: p.x - (width + strokeWidth) / 2,\n y: -height,\n width: width,\n height: Math.max(0, height - p.y),\n style: style,\n onMouseMove: onMouseMove && onMouseMove.bind(_this2, p)\n });\n })\n );\n }\n }]);\n\n return SparklinesBars;\n}(_react2.default.Component);\n\nSparklinesBars.propTypes = {\n points: _propTypes2.default.arrayOf(_propTypes2.default.object),\n height: _propTypes2.default.number,\n style: _propTypes2.default.object,\n barWidth: _propTypes2.default.number,\n margin: _propTypes2.default.number,\n onMouseMove: _propTypes2.default.func\n};\nSparklinesBars.defaultProps = {\n style: { fill: 'slategray' }\n};\nexports.default = SparklinesBars;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _propTypes = __webpack_require__(0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SparklinesSpots = function (_React$Component) {\n _inherits(SparklinesSpots, _React$Component);\n\n function SparklinesSpots() {\n _classCallCheck(this, SparklinesSpots);\n\n return _possibleConstructorReturn(this, (SparklinesSpots.__proto__ || Object.getPrototypeOf(SparklinesSpots)).apply(this, arguments));\n }\n\n _createClass(SparklinesSpots, [{\n key: 'lastDirection',\n value: function lastDirection(points) {\n\n Math.sign = Math.sign || function (x) {\n return x > 0 ? 1 : -1;\n };\n\n return points.length < 2 ? 0 : Math.sign(points[points.length - 2].y - points[points.length - 1].y);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n points = _props.points,\n width = _props.width,\n height = _props.height,\n size = _props.size,\n style = _props.style,\n spotColors = _props.spotColors;\n\n\n var startSpot = _react2.default.createElement('circle', {\n cx: points[0].x,\n cy: points[0].y,\n r: size,\n style: style });\n\n var endSpot = _react2.default.createElement('circle', {\n cx: points[points.length - 1].x,\n cy: points[points.length - 1].y,\n r: size,\n style: style || { fill: spotColors[this.lastDirection(points)] } });\n\n return _react2.default.createElement(\n 'g',\n null,\n style && startSpot,\n endSpot\n );\n }\n }]);\n\n return SparklinesSpots;\n}(_react2.default.Component);\n\nSparklinesSpots.propTypes = {\n size: _propTypes2.default.number,\n style: _propTypes2.default.object,\n spotColors: _propTypes2.default.object\n};\nSparklinesSpots.defaultProps = {\n size: 2,\n spotColors: {\n '-1': 'red',\n '0': 'black',\n '1': 'green'\n }\n};\nexports.default = SparklinesSpots;\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _propTypes = __webpack_require__(0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _dataProcessing = __webpack_require__(23);\n\nvar dataProcessing = _interopRequireWildcard(_dataProcessing);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SparklinesReferenceLine = function (_React$Component) {\n _inherits(SparklinesReferenceLine, _React$Component);\n\n function SparklinesReferenceLine() {\n _classCallCheck(this, SparklinesReferenceLine);\n\n return _possibleConstructorReturn(this, (SparklinesReferenceLine.__proto__ || Object.getPrototypeOf(SparklinesReferenceLine)).apply(this, arguments));\n }\n\n _createClass(SparklinesReferenceLine, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n points = _props.points,\n margin = _props.margin,\n type = _props.type,\n style = _props.style,\n value = _props.value;\n\n\n var ypoints = points.map(function (p) {\n return p.y;\n });\n var y = type == 'custom' ? value : dataProcessing[type](ypoints);\n\n return _react2.default.createElement('line', {\n x1: points[0].x, y1: y + margin,\n x2: points[points.length - 1].x, y2: y + margin,\n style: style });\n }\n }]);\n\n return SparklinesReferenceLine;\n}(_react2.default.Component);\n\nSparklinesReferenceLine.propTypes = {\n type: _propTypes2.default.oneOf(['max', 'min', 'mean', 'avg', 'median', 'custom']),\n value: _propTypes2.default.number,\n style: _propTypes2.default.object\n};\nSparklinesReferenceLine.defaultProps = {\n type: 'mean',\n style: { stroke: 'red', strokeOpacity: .75, strokeDasharray: '2, 2' }\n};\nexports.default = SparklinesReferenceLine;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.variance = exports.stdev = exports.median = exports.midRange = exports.avg = exports.mean = exports.max = exports.min = undefined;\n\nvar _min2 = __webpack_require__(7);\n\nvar _min3 = _interopRequireDefault(_min2);\n\nvar _mean2 = __webpack_require__(3);\n\nvar _mean3 = _interopRequireDefault(_mean2);\n\nvar _midRange2 = __webpack_require__(24);\n\nvar _midRange3 = _interopRequireDefault(_midRange2);\n\nvar _median2 = __webpack_require__(25);\n\nvar _median3 = _interopRequireDefault(_median2);\n\nvar _stdev2 = __webpack_require__(10);\n\nvar _stdev3 = _interopRequireDefault(_stdev2);\n\nvar _variance2 = __webpack_require__(26);\n\nvar _variance3 = _interopRequireDefault(_variance2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.min = _min3.default;\nexports.max = _min3.default;\nexports.mean = _mean3.default;\nexports.avg = _mean3.default;\nexports.midRange = _midRange3.default;\nexports.median = _median3.default;\nexports.stdev = _stdev3.default;\nexports.variance = _variance3.default;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _min = __webpack_require__(7);\n\nvar _min2 = _interopRequireDefault(_min);\n\nvar _max = __webpack_require__(9);\n\nvar _max2 = _interopRequireDefault(_max);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (data) {\n return (0, _max2.default)(data) - (0, _min2.default)(data) / 2;\n};\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (data) {\n return data.sort(function (a, b) {\n return a - b;\n })[Math.floor(data.length / 2)];\n};\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _mean = __webpack_require__(3);\n\nvar _mean2 = _interopRequireDefault(_mean);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (data) {\n var dataMean = (0, _mean2.default)(data);\n var sq = data.map(function (n) {\n return Math.pow(n - dataMean, 2);\n });\n return (0, _mean2.default)(sq);\n};\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _propTypes = __webpack_require__(0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = __webpack_require__(1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _mean = __webpack_require__(3);\n\nvar _mean2 = _interopRequireDefault(_mean);\n\nvar _stdev = __webpack_require__(10);\n\nvar _stdev2 = _interopRequireDefault(_stdev);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SparklinesNormalBand = function (_React$Component) {\n _inherits(SparklinesNormalBand, _React$Component);\n\n function SparklinesNormalBand() {\n _classCallCheck(this, SparklinesNormalBand);\n\n return _possibleConstructorReturn(this, (SparklinesNormalBand.__proto__ || Object.getPrototypeOf(SparklinesNormalBand)).apply(this, arguments));\n }\n\n _createClass(SparklinesNormalBand, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n points = _props.points,\n margin = _props.margin,\n style = _props.style;\n\n\n var ypoints = points.map(function (p) {\n return p.y;\n });\n var dataMean = (0, _mean2.default)(ypoints);\n var dataStdev = (0, _stdev2.default)(ypoints);\n\n return _react2.default.createElement('rect', { x: points[0].x, y: dataMean - dataStdev + margin,\n width: points[points.length - 1].x - points[0].x, height: _stdev2.default * 2,\n style: style });\n }\n }]);\n\n return SparklinesNormalBand;\n}(_react2.default.Component);\n\nSparklinesNormalBand.propTypes = {\n style: _propTypes2.default.object\n};\nSparklinesNormalBand.defaultProps = {\n style: { fill: 'red', fillOpacity: .1 }\n};\nexports.default = SparklinesNormalBand;\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _min = __webpack_require__(7);\n\nvar _min2 = _interopRequireDefault(_min);\n\nvar _max = __webpack_require__(9);\n\nvar _max2 = _interopRequireDefault(_max);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (_ref) {\n var data = _ref.data,\n limit = _ref.limit,\n _ref$width = _ref.width,\n width = _ref$width === undefined ? 1 : _ref$width,\n _ref$height = _ref.height,\n height = _ref$height === undefined ? 1 : _ref$height,\n _ref$margin = _ref.margin,\n margin = _ref$margin === undefined ? 0 : _ref$margin,\n _ref$max = _ref.max,\n max = _ref$max === undefined ? (0, _max2.default)(data) : _ref$max,\n _ref$min = _ref.min,\n min = _ref$min === undefined ? (0, _min2.default)(data) : _ref$min;\n\n\n var len = data.length;\n\n if (limit && limit < len) {\n data = data.slice(len - limit);\n }\n\n var vfactor = (height - margin * 2) / (max - min || 2);\n var hfactor = (width - margin * 2) / ((limit || len) - (len > 1 ? 1 : 0));\n\n return data.map(function (d, i) {\n return {\n x: i * hfactor + margin,\n y: (max === min ? 1 : max - d) * vfactor + margin\n };\n });\n};\n\n/***/ })\n/******/ ]);\n});","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport SettingText from 'flavours/glitch/components/setting_text';\nimport SettingToggle from 'flavours/glitch/features/notifications/components/setting_toggle';\n\nconst messages = defineMessages({\n filter_regex: { id: 'home.column_settings.filter_regex', defaultMessage: 'Filter out by regular expressions' },\n settings: { id: 'home.settings', defaultMessage: 'Column settings' },\n});\n\n@injectIntl\nexport default class ColumnSettings extends React.PureComponent {\n\n static propTypes = {\n settings: ImmutablePropTypes.map.isRequired,\n onChange: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n columnId: PropTypes.string,\n };\n\n render () {\n const { settings, onChange, intl } = this.props;\n\n return (\n
\n
\n } />\n
\n\n \n\n
\n \n
\n
\n );\n }\n\n}\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.makeAsyncSelect = exports.defaultProps = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _Select = require('./Select');\n\nvar _Select2 = _interopRequireDefault(_Select);\n\nvar _utils = require('./utils');\n\nvar _stateManager = require('./stateManager');\n\nvar _stateManager2 = _interopRequireDefault(_stateManager);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar defaultProps = exports.defaultProps = {\n cacheOptions: false,\n defaultOptions: false\n};\n\nvar makeAsyncSelect = function makeAsyncSelect(SelectComponent) {\n var _class, _temp;\n\n return _temp = _class = function (_Component) {\n _inherits(Async, _Component);\n\n function Async(props) {\n _classCallCheck(this, Async);\n\n var _this = _possibleConstructorReturn(this, (Async.__proto__ || Object.getPrototypeOf(Async)).call(this));\n\n _this.mounted = false;\n _this.optionsCache = {};\n\n _this.handleInputChange = function (newValue, actionMeta) {\n var _this$props = _this.props,\n cacheOptions = _this$props.cacheOptions,\n onInputChange = _this$props.onInputChange;\n // TODO\n\n var inputValue = (0, _utils.handleInputChange)(newValue, actionMeta, onInputChange);\n if (!inputValue) {\n delete _this.lastRequest;\n _this.setState({\n inputValue: '',\n loadedInputValue: '',\n loadedOptions: [],\n isLoading: false,\n passEmptyOptions: false\n });\n return;\n }\n if (cacheOptions && _this.optionsCache[inputValue]) {\n _this.setState({\n inputValue: inputValue,\n loadedInputValue: inputValue,\n loadedOptions: _this.optionsCache[inputValue],\n isLoading: false,\n passEmptyOptions: false\n });\n } else {\n var request = _this.lastRequest = {};\n _this.setState({\n inputValue: inputValue,\n isLoading: true,\n passEmptyOptions: !_this.state.loadedInputValue\n }, function () {\n _this.loadOptions(inputValue, function (options) {\n if (!_this.mounted) return;\n if (options) {\n _this.optionsCache[inputValue] = options;\n }\n if (request !== _this.lastRequest) return;\n delete _this.lastRequest;\n _this.setState({\n isLoading: false,\n loadedInputValue: inputValue,\n loadedOptions: options || [],\n passEmptyOptions: false\n });\n });\n });\n }\n return inputValue;\n };\n\n _this.state = {\n defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined,\n inputValue: props.inputValue,\n isLoading: props.defaultOptions === true ? true : false,\n loadedOptions: [],\n passEmptyOptions: false\n };\n return _this;\n }\n\n _createClass(Async, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n this.mounted = true;\n var defaultOptions = this.props.defaultOptions;\n var inputValue = this.state.inputValue;\n\n if (defaultOptions === true) {\n this.loadOptions(inputValue, function (options) {\n if (!_this2.mounted) return;\n var isLoading = !!_this2.lastRequest;\n _this2.setState({ defaultOptions: options || [], isLoading: isLoading });\n });\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n // if the cacheOptions prop changes, clear the cache\n if (nextProps.cacheOptions !== this.props.cacheOptions) {\n this.optionsCache = {};\n }\n if (nextProps.defaultOptions !== this.props.defaultOptions) {\n this.setState({\n defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined\n });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.mounted = false;\n }\n }, {\n key: 'focus',\n value: function focus() {\n this.select.focus();\n }\n }, {\n key: 'blur',\n value: function blur() {\n this.select.blur();\n }\n }, {\n key: 'loadOptions',\n value: function loadOptions(inputValue, callback) {\n var loadOptions = this.props.loadOptions;\n\n if (!loadOptions) return callback();\n var loader = loadOptions(inputValue, callback);\n if (loader && typeof loader.then === 'function') {\n loader.then(callback, function () {\n return callback();\n });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this3 = this;\n\n var _props = this.props,\n loadOptions = _props.loadOptions,\n props = _objectWithoutProperties(_props, ['loadOptions']);\n\n var _state = this.state,\n defaultOptions = _state.defaultOptions,\n inputValue = _state.inputValue,\n isLoading = _state.isLoading,\n loadedInputValue = _state.loadedInputValue,\n loadedOptions = _state.loadedOptions,\n passEmptyOptions = _state.passEmptyOptions;\n\n var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || [];\n return (\n // $FlowFixMe\n _react2.default.createElement(SelectComponent, _extends({}, props, {\n filterOption: this.props.filterOption || null,\n ref: function ref(_ref) {\n _this3.select = _ref;\n },\n options: options,\n isLoading: isLoading,\n onInputChange: this.handleInputChange\n }))\n );\n }\n }]);\n\n return Async;\n }(_react.Component), _class.defaultProps = defaultProps, _temp;\n};\n\nexports.makeAsyncSelect = makeAsyncSelect;\nexports.default = makeAsyncSelect((0, _stateManager2.default)(_Select2.default));","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.IndicatorsContainer = exports.indicatorsContainerCSS = exports.ValueContainer = exports.valueContainerCSS = exports.SelectContainer = exports.containerCSS = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// ==============================\n// Root Container\n// ==============================\n\nvar containerCSS = exports.containerCSS = function containerCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n isRtl = _ref.isRtl;\n return {\n direction: isRtl ? 'rtl' : null,\n pointerEvents: isDisabled ? 'none' : null, // cancel mouse events when disabled\n position: 'relative'\n };\n};\nvar SelectContainer = exports.SelectContainer = function SelectContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n isDisabled = props.isDisabled,\n isRtl = props.isRtl,\n emotion = props.emotion;\n\n return _react2.default.createElement(\n 'div',\n _extends({\n className: cx(emotion.css(getStyles('container', props)), {\n '--is-disabled': isDisabled,\n '--is-rtl': isRtl\n }, className)\n }, innerProps),\n children\n );\n};\n\n// ==============================\n// Value Container\n// ==============================\n\nvar valueContainerCSS = exports.valueContainerCSS = function valueContainerCSS(_ref2) {\n var spacing = _ref2.theme.spacing;\n return {\n alignItems: 'center',\n display: 'flex',\n flex: 1,\n flexWrap: 'wrap',\n padding: spacing.baseUnit / 2 + 'px ' + spacing.baseUnit * 2 + 'px',\n WebkitOverflowScrolling: 'touch',\n position: 'relative',\n overflow: 'hidden'\n };\n};\n\nvar ValueContainer = exports.ValueContainer = function (_Component) {\n _inherits(ValueContainer, _Component);\n\n function ValueContainer() {\n _classCallCheck(this, ValueContainer);\n\n return _possibleConstructorReturn(this, (ValueContainer.__proto__ || Object.getPrototypeOf(ValueContainer)).apply(this, arguments));\n }\n\n _createClass(ValueContainer, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n className = _props.className,\n cx = _props.cx,\n isMulti = _props.isMulti,\n getStyles = _props.getStyles,\n hasValue = _props.hasValue,\n emotion = _props.emotion;\n\n\n return _react2.default.createElement(\n 'div',\n {\n className: cx(emotion.css(getStyles('valueContainer', this.props)), {\n 'value-container': true,\n 'value-container--is-multi': isMulti,\n 'value-container--has-value': hasValue\n }, className)\n },\n children\n );\n }\n }]);\n\n return ValueContainer;\n}(_react.Component);\n\n// ==============================\n// Indicator Container\n// ==============================\n\nvar indicatorsContainerCSS = exports.indicatorsContainerCSS = function indicatorsContainerCSS() {\n return {\n alignItems: 'center',\n alignSelf: 'stretch',\n display: 'flex',\n flexShrink: 0\n };\n};\nvar IndicatorsContainer = exports.IndicatorsContainer = function IndicatorsContainer(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n emotion = props.emotion;\n\n\n return _react2.default.createElement(\n 'div',\n {\n className: cx(emotion.css(getStyles('indicatorsContainer', props)), {\n 'indicators': true\n }, className)\n },\n children\n );\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.css = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar css = exports.css = function css(_ref) {\n var isDisabled = _ref.isDisabled,\n isFocused = _ref.isFocused,\n _ref$theme = _ref.theme,\n colors = _ref$theme.colors,\n borderRadius = _ref$theme.borderRadius,\n spacing = _ref$theme.spacing;\n return {\n alignItems: 'center',\n backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,\n borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,\n borderRadius: borderRadius,\n borderStyle: 'solid',\n borderWidth: 1,\n boxShadow: isFocused ? '0 0 0 1px ' + colors.primary : null,\n cursor: 'default',\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n minHeight: spacing.controlHeight,\n outline: '0 !important',\n position: 'relative',\n transition: 'all 100ms',\n\n '&:hover': {\n borderColor: isFocused ? colors.primary : colors.neutral30\n }\n };\n};\n\nvar Control = function Control(props) {\n var children = props.children,\n cx = props.cx,\n getStyles = props.getStyles,\n className = props.className,\n isDisabled = props.isDisabled,\n isFocused = props.isFocused,\n innerRef = props.innerRef,\n innerProps = props.innerProps,\n emotion = props.emotion;\n\n return _react2.default.createElement(\n 'div',\n _extends({\n ref: innerRef,\n className: cx(emotion.css(getStyles('control', props)), {\n 'control': true,\n 'control--is-disabled': isDisabled,\n 'control--is-focused': isFocused\n }, className)\n }, innerProps),\n children\n );\n};\n\nexports.default = Control;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.GroupHeading = exports.groupHeadingCSS = exports.groupCSS = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar groupCSS = exports.groupCSS = function groupCSS(_ref) {\n var spacing = _ref.theme.spacing;\n return {\n paddingBottom: spacing.baseUnit * 2,\n paddingTop: spacing.baseUnit * 2\n };\n};\n\nvar Group = function Group(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n Heading = props.Heading,\n headingProps = props.headingProps,\n label = props.label,\n theme = props.theme,\n emotion = props.emotion,\n selectProps = props.selectProps;\n\n return _react2.default.createElement(\n 'div',\n {\n className: cx(emotion.css(getStyles('group', props)), { 'group': true }, className)\n },\n _react2.default.createElement(\n Heading,\n _extends({}, headingProps, {\n selectProps: selectProps,\n emotion: emotion,\n theme: theme,\n getStyles: getStyles,\n cx: cx\n }),\n label\n ),\n _react2.default.createElement(\n 'div',\n null,\n children\n )\n );\n};\n\nvar groupHeadingCSS = exports.groupHeadingCSS = function groupHeadingCSS(_ref2) {\n var spacing = _ref2.theme.spacing;\n return {\n color: '#999',\n cursor: 'default',\n display: 'block',\n fontSize: '75%',\n fontWeight: '500',\n marginBottom: '0.25em',\n paddingLeft: spacing.baseUnit * 3,\n paddingRight: spacing.baseUnit * 3,\n textTransform: 'uppercase'\n };\n};\n\nvar GroupHeading = function GroupHeading(props) {\n var className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n theme = props.theme,\n emotion = props.emotion,\n selectProps = props.selectProps,\n cleanProps = _objectWithoutProperties(props, ['className', 'cx', 'getStyles', 'theme', 'emotion', 'selectProps']);\n\n return _react2.default.createElement('div', _extends({\n className: cx(emotion.css(getStyles('groupHeading', _extends({ theme: theme }, cleanProps))), { 'group-heading': true }, className)\n }, cleanProps));\n};\n\nexports.GroupHeading = GroupHeading;\nexports.default = Group;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.inputCSS = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactInputAutosize = require('react-input-autosize');\n\nvar _reactInputAutosize2 = _interopRequireDefault(_reactInputAutosize);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar inputCSS = exports.inputCSS = function inputCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n margin: spacing.baseUnit / 2,\n paddingBottom: spacing.baseUnit / 2,\n paddingTop: spacing.baseUnit / 2,\n visibility: isDisabled ? 'hidden' : 'visible',\n color: colors.neutral80\n };\n};\nvar inputStyle = function inputStyle(isHidden) {\n return {\n background: 0,\n border: 0,\n fontSize: 'inherit',\n opacity: isHidden ? 0 : 1,\n outline: 0,\n padding: 0,\n color: 'inherit'\n };\n};\n\nvar Input = function Input(_ref2) {\n var className = _ref2.className,\n cx = _ref2.cx,\n getStyles = _ref2.getStyles,\n innerRef = _ref2.innerRef,\n isHidden = _ref2.isHidden,\n isDisabled = _ref2.isDisabled,\n theme = _ref2.theme,\n emotion = _ref2.emotion,\n selectProps = _ref2.selectProps,\n props = _objectWithoutProperties(_ref2, ['className', 'cx', 'getStyles', 'innerRef', 'isHidden', 'isDisabled', 'theme', 'emotion', 'selectProps']);\n\n return _react2.default.createElement(\n 'div',\n { className: emotion.css(getStyles('input', _extends({ theme: theme }, props))) },\n _react2.default.createElement(_reactInputAutosize2.default, _extends({\n className: cx(null, { 'input': true }, className),\n inputRef: innerRef,\n inputStyle: inputStyle(isHidden),\n disabled: isDisabled\n }, props))\n );\n};\n\nexports.default = Input;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MultiValueRemove = exports.MultiValueLabel = exports.MultiValueContainer = exports.MultiValueGeneric = exports.multiValueRemoveCSS = exports.multiValueLabelCSS = exports.multiValueCSS = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _indicators = require('./indicators');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar multiValueCSS = exports.multiValueCSS = function multiValueCSS(_ref) {\n var _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n borderRadius = _ref$theme.borderRadius,\n colors = _ref$theme.colors;\n return {\n backgroundColor: colors.neutral10,\n borderRadius: borderRadius / 2,\n display: 'flex',\n margin: spacing.baseUnit / 2,\n minWidth: 0 // resolves flex/text-overflow bug\n };\n};\n\nvar multiValueLabelCSS = exports.multiValueLabelCSS = function multiValueLabelCSS(_ref2) {\n var _ref2$theme = _ref2.theme,\n borderRadius = _ref2$theme.borderRadius,\n colors = _ref2$theme.colors,\n cropWithEllipsis = _ref2.cropWithEllipsis;\n return {\n borderRadius: borderRadius / 2,\n color: colors.neutral80,\n fontSize: '85%',\n overflow: 'hidden',\n padding: 3,\n paddingLeft: 6,\n textOverflow: cropWithEllipsis ? 'ellipsis' : null,\n whiteSpace: 'nowrap'\n };\n};\n\nvar multiValueRemoveCSS = exports.multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) {\n var _ref3$theme = _ref3.theme,\n spacing = _ref3$theme.spacing,\n borderRadius = _ref3$theme.borderRadius,\n colors = _ref3$theme.colors,\n isFocused = _ref3.isFocused;\n return {\n alignItems: 'center',\n borderRadius: borderRadius / 2,\n backgroundColor: isFocused && colors.dangerLight,\n display: 'flex',\n paddingLeft: spacing.baseUnit,\n paddingRight: spacing.baseUnit,\n ':hover': {\n backgroundColor: colors.dangerLight,\n color: colors.danger\n }\n };\n};\n\nvar MultiValueGeneric = exports.MultiValueGeneric = function MultiValueGeneric(_ref4) {\n var children = _ref4.children,\n innerProps = _ref4.innerProps;\n return _react2.default.createElement(\n 'div',\n innerProps,\n children\n );\n};\n\nvar MultiValueContainer = exports.MultiValueContainer = MultiValueGeneric;\nvar MultiValueLabel = exports.MultiValueLabel = MultiValueGeneric;\n\nvar MultiValueRemove = exports.MultiValueRemove = function (_Component) {\n _inherits(MultiValueRemove, _Component);\n\n function MultiValueRemove() {\n _classCallCheck(this, MultiValueRemove);\n\n return _possibleConstructorReturn(this, (MultiValueRemove.__proto__ || Object.getPrototypeOf(MultiValueRemove)).apply(this, arguments));\n }\n\n _createClass(MultiValueRemove, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n innerProps = _props.innerProps,\n emotion = _props.emotion;\n\n return _react2.default.createElement(\n 'div',\n innerProps,\n children || _react2.default.createElement(_indicators.CrossIcon, { size: 14, emotion: emotion })\n );\n }\n }]);\n\n return MultiValueRemove;\n}(_react.Component);\n\nvar MultiValue = function (_Component2) {\n _inherits(MultiValue, _Component2);\n\n function MultiValue() {\n _classCallCheck(this, MultiValue);\n\n return _possibleConstructorReturn(this, (MultiValue.__proto__ || Object.getPrototypeOf(MultiValue)).apply(this, arguments));\n }\n\n _createClass(MultiValue, [{\n key: 'render',\n value: function render() {\n var _props2 = this.props,\n children = _props2.children,\n className = _props2.className,\n components = _props2.components,\n cx = _props2.cx,\n data = _props2.data,\n getStyles = _props2.getStyles,\n innerProps = _props2.innerProps,\n isDisabled = _props2.isDisabled,\n removeProps = _props2.removeProps,\n selectProps = _props2.selectProps,\n emotion = _props2.emotion;\n var Container = components.Container,\n Label = components.Label,\n Remove = components.Remove;\n\n\n var containerInnerProps = _extends({\n className: cx(emotion.css(getStyles('multiValue', this.props)), {\n 'multi-value': true,\n 'multi-value--is-disabled': isDisabled\n }, className)\n }, innerProps);\n\n var labelInnerProps = {\n className: cx(emotion.css(getStyles('multiValueLabel', this.props)), {\n 'multi-value__label': true\n }, className)\n };\n\n var removeInnerProps = _extends({\n className: cx(emotion.css(getStyles('multiValueRemove', this.props)), {\n 'multi-value__remove': true\n }, className)\n }, removeProps);\n\n return _react2.default.createElement(\n Container,\n {\n data: data,\n innerProps: containerInnerProps,\n selectProps: selectProps\n },\n _react2.default.createElement(\n Label,\n {\n data: data,\n innerProps: labelInnerProps,\n selectProps: selectProps\n },\n children\n ),\n _react2.default.createElement(Remove, {\n data: data,\n innerProps: removeInnerProps,\n selectProps: selectProps,\n emotion: emotion\n })\n );\n }\n }]);\n\n return MultiValue;\n}(_react.Component);\n\nMultiValue.defaultProps = {\n cropWithEllipsis: true\n};\nexports.default = MultiValue;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.optionCSS = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar optionCSS = exports.optionCSS = function optionCSS(_ref) {\n var isDisabled = _ref.isDisabled,\n isFocused = _ref.isFocused,\n isSelected = _ref.isSelected,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',\n color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',\n cursor: 'default',\n display: 'block',\n fontSize: 'inherit',\n padding: spacing.baseUnit * 2 + 'px ' + spacing.baseUnit * 3 + 'px',\n width: '100%',\n userSelect: 'none',\n WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',\n\n // provide some affordance on touch devices\n ':active': {\n backgroundColor: isSelected ? colors.primary : colors.primary50\n }\n };\n};\n\nvar Option = function Option(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n isDisabled = props.isDisabled,\n isFocused = props.isFocused,\n isSelected = props.isSelected,\n innerRef = props.innerRef,\n innerProps = props.innerProps,\n emotion = props.emotion;\n\n return _react2.default.createElement(\n 'div',\n _extends({\n ref: innerRef,\n className: cx(emotion.css(getStyles('option', props)), {\n 'option': true,\n 'option--is-disabled': isDisabled,\n 'option--is-focused': isFocused,\n 'option--is-selected': isSelected\n }, className)\n }, innerProps),\n children\n );\n};\n\nexports.default = Option;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.placeholderCSS = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar placeholderCSS = exports.placeholderCSS = function placeholderCSS(_ref) {\n var _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n color: colors.neutral50,\n marginLeft: spacing.baseUnit / 2,\n marginRight: spacing.baseUnit / 2,\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)'\n };\n};\n\nvar Placeholder = function Placeholder(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n innerProps = props.innerProps,\n emotion = props.emotion;\n\n return _react2.default.createElement(\n 'div',\n _extends({\n className: cx(emotion.css(getStyles('placeholder', props)), {\n 'placeholder': true\n }, className)\n }, innerProps),\n children\n );\n};\n\nexports.default = Placeholder;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.css = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar css = exports.css = function css(_ref) {\n var isDisabled = _ref.isDisabled,\n _ref$theme = _ref.theme,\n spacing = _ref$theme.spacing,\n colors = _ref$theme.colors;\n return {\n color: isDisabled ? colors.neutral40 : colors.neutral80,\n marginLeft: spacing.baseUnit / 2,\n marginRight: spacing.baseUnit / 2,\n maxWidth: 'calc(100% - ' + spacing.baseUnit * 2 + 'px)',\n overflow: 'hidden',\n position: 'absolute',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n top: '50%',\n transform: 'translateY(-50%)'\n };\n};\n\nvar SingleValue = function SingleValue(props) {\n var children = props.children,\n className = props.className,\n cx = props.cx,\n getStyles = props.getStyles,\n isDisabled = props.isDisabled,\n innerProps = props.innerProps,\n emotion = props.emotion;\n\n return _react2.default.createElement(\n 'div',\n _extends({\n className: cx(emotion.css(getStyles('singleValue', props)), {\n 'single-value': true,\n 'single-value--is-disabled': isDisabled\n }, className)\n }, innerProps),\n children\n );\n};\n\nexports.default = SingleValue;","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { changeListEditorTitle, submitListEditor } from 'flavours/glitch/actions/lists';\nimport IconButton from 'flavours/glitch/components/icon_button';\nimport { defineMessages, injectIntl } from 'react-intl';\n\nconst messages = defineMessages({\n label: { id: 'lists.new.title_placeholder', defaultMessage: 'New list title' },\n title: { id: 'lists.new.create', defaultMessage: 'Add list' },\n});\n\nconst mapStateToProps = state => ({\n value: state.getIn(['listEditor', 'title']),\n disabled: state.getIn(['listEditor', 'isSubmitting']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onChange: value => dispatch(changeListEditorTitle(value)),\n onSubmit: () => dispatch(submitListEditor(true)),\n});\n\n@connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nexport default class NewListForm extends React.PureComponent {\n\n static propTypes = {\n value: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n };\n\n handleChange = e => {\n this.props.onChange(e.target.value);\n }\n\n handleSubmit = e => {\n e.preventDefault();\n this.props.onSubmit();\n }\n\n handleClick = () => {\n this.props.onSubmit();\n }\n\n render () {\n const { value, disabled, intl } = this.props;\n\n const label = intl.formatMessage(messages.label);\n const title = intl.formatMessage(messages.title);\n\n return (\n \n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Avatar from 'flavours/glitch/components/avatar';\nimport DisplayName from 'flavours/glitch/components/display_name';\nimport IconButton from 'flavours/glitch/components/icon_button';\nimport { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' },\n add: { id: 'lists.account.add', defaultMessage: 'Add to list' },\n});\n\nexport default class Account extends ImmutablePureComponent {\n\n static propTypes = {\n account: ImmutablePropTypes.map.isRequired,\n intl: PropTypes.object.isRequired,\n onRemove: PropTypes.func.isRequired,\n onAdd: PropTypes.func.isRequired,\n added: PropTypes.bool,\n };\n\n static defaultProps = {\n added: false,\n };\n\n render () {\n const { account, intl, onRemove, onAdd, added } = this.props;\n\n let button;\n\n if (added) {\n button = ;\n } else {\n button = ;\n }\n\n return (\n
\n
\n
\n
\n \n
\n\n
\n {button}\n
\n
\n
\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages } from 'react-intl';\nimport classNames from 'classnames';\n\nconst messages = defineMessages({\n search: { id: 'lists.search', defaultMessage: 'Search among people you follow' },\n});\n\nexport default class Search extends React.PureComponent {\n\n static propTypes = {\n intl: PropTypes.object.isRequired,\n value: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n };\n\n handleChange = e => {\n this.props.onChange(e.target.value);\n }\n\n handleKeyUp = e => {\n if (e.keyCode === 13) {\n this.props.onSubmit(this.props.value);\n }\n }\n\n handleClear = () => {\n this.props.onClear();\n }\n\n render () {\n const { value, intl } = this.props;\n const hasValue = value.length > 0;\n\n return (\n
\n \n\n
\n \n \n
\n
\n );\n }\n\n}\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","import React, { Fragment } from 'react';\nimport { FormattedNumber } from 'react-intl';\n\nexport const shortNumberFormat = number => {\n if (number < 1000) {\n return ;\n } else {\n return K;\n }\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport SettingToggle from '../../notifications/components/setting_toggle';\n\nexport default @injectIntl\nclass ColumnSettings extends React.PureComponent {\n\n static propTypes = {\n settings: ImmutablePropTypes.map.isRequired,\n onChange: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n columnId: PropTypes.string,\n };\n\n render () {\n const { settings, onChange } = this.props;\n\n return (\n
\n
\n } />\n
\n
\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\nimport Icon from 'mastodon/components/icon';\n\nconst ColumnLink = ({ icon, text, to, href, method, badge }) => {\n const badgeElement = typeof badge !== 'undefined' ? {badge} : null;\n\n if (href) {\n return (\n \n \n {text}\n {badgeElement}\n \n );\n } else {\n return (\n \n \n {text}\n {badgeElement}\n \n );\n }\n};\n\nColumnLink.propTypes = {\n icon: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n to: PropTypes.string,\n href: PropTypes.string,\n method: PropTypes.string,\n badge: PropTypes.node,\n};\n\nexport default ColumnLink;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst ColumnSubheading = ({ text }) => {\n return (\n
\n {text}\n
\n );\n};\n\nColumnSubheading.propTypes = {\n text: PropTypes.string.isRequired,\n};\n\nexport default ColumnSubheading;\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { changeListEditorTitle, submitListEditor } from '../../../actions/lists';\nimport IconButton from '../../../components/icon_button';\nimport { defineMessages, injectIntl } from 'react-intl';\n\nconst messages = defineMessages({\n label: { id: 'lists.new.title_placeholder', defaultMessage: 'New list title' },\n title: { id: 'lists.new.create', defaultMessage: 'Add list' },\n});\n\nconst mapStateToProps = state => ({\n value: state.getIn(['listEditor', 'title']),\n disabled: state.getIn(['listEditor', 'isSubmitting']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onChange: value => dispatch(changeListEditorTitle(value)),\n onSubmit: () => dispatch(submitListEditor(true)),\n});\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass NewListForm extends React.PureComponent {\n\n static propTypes = {\n value: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n };\n\n handleChange = e => {\n this.props.onChange(e.target.value);\n }\n\n handleSubmit = e => {\n e.preventDefault();\n this.props.onSubmit();\n }\n\n handleClick = () => {\n this.props.onSubmit();\n }\n\n render () {\n const { value, disabled, intl } = this.props;\n\n const label = intl.formatMessage(messages.label);\n const title = intl.formatMessage(messages.title);\n\n return (\n \n );\n }\n\n}\n","/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n return tag;\n}\n\nvar StyleSheet =\n/*#__PURE__*/\nfunction () {\n function StyleSheet(options) {\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n var _tag = createStyleElement(this);\n\n var before;\n\n if (this.tags.length === 0) {\n before = this.before;\n } else {\n before = this.tags[this.tags.length - 1].nextSibling;\n }\n\n this.container.insertBefore(_tag, before);\n this.tags.push(_tag);\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is a really hot path\n // we check the second character first because having \"i\"\n // as the second character will happen less often than\n // having \"@\" as the first character\n var isImportRule = rule.charCodeAt(1) === 105 && rule.charCodeAt(0) === 64; // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n\n sheet.insertRule(rule, // we need to insert @import rules before anything else\n // otherwise there will be an error\n // technically this means that the @import rules will\n // _usually_(not always since there could be multiple style tags)\n // be the first ones in prod and generally later in dev\n // this shouldn't really matter in the real world though\n // @import is generally only used for font faces from google fonts and etc.\n // so while this could be technically correct then it would be slower and larger\n // for a tiny bit of correctness that won't matter in the real world\n isImportRule ? 0 : sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","function stylis_min (W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n\n default:\n f += e.charAt(l);\n }\n\n g = 59;\n }\n\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n\n case 125:\n k--;\n break;\n\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n\n break;\n\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n\n }\n }\n\n l = u;\n }\n\n }\n\n break;\n\n case 91:\n g++;\n\n case 40:\n g++;\n\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {\n }\n\n }\n\n if (0 === k) break;\n l++;\n }\n\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n\n default:\n r = O;\n }\n\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n\n default:\n z++;\n y = e.charAt(l);\n\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n\n default:\n 32 !== g && (y = ' ');\n }\n break;\n\n case 0:\n y = '\\\\0';\n break;\n\n case 12:\n y = '\\\\f';\n break;\n\n case 11:\n y = '\\\\v';\n break;\n\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n case 8:\n 111 === K && (E = K);\n }\n break;\n\n case 58:\n 0 === n + b + m && (u = l);\n break;\n\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n\n case 91:\n 0 === n + b + v && m++;\n break;\n\n case 93:\n 0 === n + b + v && m--;\n break;\n\n case 41:\n 0 === n + b + m && v--;\n break;\n\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n\n default:\n q = 1;\n }\n v++;\n }\n\n break;\n\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n\n case 220:\n t = l, b = 42;\n }\n\n break;\n\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n\n 0 === b && (f += y);\n }\n\n K = x;\n x = g;\n l++;\n }\n\n t = p.length;\n\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n\n E = 0;\n }\n }\n\n return G + p + F;\n }\n\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e, m).trim();\n }\n\n break;\n\n default:\n var v = b = 0;\n\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e, m).trim();\n }\n }\n\n }\n\n return c;\n }\n\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n\n return d + c;\n }\n\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n\n if (0 === w || 2 === w && !L(a, 1)) return a;\n\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n\n case 969:\n case 942:\n return '-webkit-' + a + a;\n\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n\n case 220:\n b = a.replace(G, 'lr');\n break;\n\n default:\n return a;\n }\n\n return '-webkit-' + a + '-ms-' + b + a;\n\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n\n return a + ';';\n\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n\n return a;\n }\n\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n\n default:\n x = w;\n }\n }\n\n if (x !== c) return x;\n }\n\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n\n default:\n if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n } else Y = !!d | 0;\n }\n\n return T;\n }\n\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\n\nexport default stylis_min;\n","import { StyleSheet } from '@emotion/sheet';\nimport Stylis from '@emotion/stylis';\nimport '@emotion/weak-memoize';\n\n// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet\n// inlined to avoid umd wrapper and peerDep warnings/installing stylis\n// since we use stylis after closure compiler\nvar delimiter = '/*|*/';\nvar needle = delimiter + '}';\n\nfunction toSheet(block) {\n if (block) {\n Sheet.current.insert(block + '}');\n }\n}\n\nvar Sheet = {\n current: null\n};\nvar ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {\n switch (context) {\n // property\n case 1:\n {\n switch (content.charCodeAt(0)) {\n case 64:\n {\n // @import\n Sheet.current.insert(content + ';');\n return '';\n }\n // charcode for l\n\n case 108:\n {\n // charcode for b\n // this ignores label\n if (content.charCodeAt(2) === 98) {\n return '';\n }\n }\n }\n\n break;\n }\n // selector\n\n case 2:\n {\n if (ns === 0) return content + delimiter;\n break;\n }\n // at-rule\n\n case 3:\n {\n switch (ns) {\n // @font-face, @page\n case 102:\n case 112:\n {\n Sheet.current.insert(selectors[0] + content);\n return '';\n }\n\n default:\n {\n return content + (at === 0 ? delimiter : '');\n }\n }\n }\n\n case -2:\n {\n content.split(needle).forEach(toSheet);\n }\n }\n};\n\nvar createCache = function createCache(options) {\n if (options === undefined) options = {};\n var key = options.key || 'css';\n var stylisOptions;\n\n if (options.prefix !== undefined) {\n stylisOptions = {\n prefix: options.prefix\n };\n }\n\n var stylis = new Stylis(stylisOptions);\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var inserted = {}; // $FlowFixMe\n\n var container;\n\n {\n container = options.container || document.head;\n var nodes = document.querySelectorAll(\"style[data-emotion-\" + key + \"]\");\n Array.prototype.forEach.call(nodes, function (node) {\n var attrib = node.getAttribute(\"data-emotion-\" + key); // $FlowFixMe\n\n attrib.split(' ').forEach(function (id) {\n inserted[id] = true;\n });\n\n if (node.parentNode !== container) {\n container.appendChild(node);\n }\n });\n }\n\n var _insert;\n\n {\n stylis.use(options.stylisPlugins)(ruleSheet);\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n var name = serialized.name;\n Sheet.current = sheet;\n\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n var map = serialized.map;\n Sheet.current = {\n insert: function insert(rule) {\n sheet.insert(rule + map);\n }\n };\n }\n\n stylis(selector, serialized.styles);\n\n if (shouldCache) {\n cache.inserted[name] = true;\n }\n };\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a\n var commentStart = /\\/\\*/g;\n var commentEnd = /\\*\\//g;\n stylis.use(function (context, content) {\n switch (context) {\n case -1:\n {\n while (commentStart.test(content)) {\n commentEnd.lastIndex = commentStart.lastIndex;\n\n if (commentEnd.test(content)) {\n commentStart.lastIndex = commentEnd.lastIndex;\n continue;\n }\n\n throw new Error('Your styles have an unterminated comment (\"/*\" without corresponding \"*/\").');\n }\n\n commentStart.lastIndex = 0;\n break;\n }\n }\n });\n stylis.use(function (context, content, selectors) {\n switch (context) {\n case 2:\n {\n for (var i = 0, len = selectors.length; len > i; i++) {\n // :last-child isn't included here since it's safe\n // because a style element will never be the last element\n var match = selectors[i].match(/:(first|nth|nth-last)-child/);\n\n if (match !== null) {\n console.error(\"The pseudo class \\\"\" + match[0] + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + match[1] + \"-of-type\\\"\");\n }\n }\n\n break;\n }\n }\n });\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n return cache;\n};\n\nexport default createCache;\n","/* eslint-disable */\n// murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js\nfunction murmurhash2_32_gc(str) {\n var l = str.length,\n h = l ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n k ^= k >>> 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n }\n\n h ^= h >>> 13;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h ^= h >>> 15;\n return (h >>> 0).toString(36);\n}\n\nexport default murmurhash2_32_gc;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\nvar processStyleName = memoize(function (styleName) {\n return styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n if (value == null || typeof value === 'boolean') {\n return '';\n }\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n value = value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && key.charCodeAt(1) !== 45 && // custom properties\n typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(attr|calc|counters?|url)\\(/;\n var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n console.error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n if (key.charCodeAt(1) !== 45 && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, char) {\n return char.toUpperCase();\n }) + \"?\");\n }\n\n return oldProcessStyleValue(key, value);\n };\n}\n\nvar shouldWarnAboutInterpolatingClassNameFromCss = true;\n\nfunction handleInterpolation(mergedProps, registered, interpolation, couldBeSelectorInterpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles;\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result, couldBeSelectorInterpolation);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n }\n // eslint-disable-next-line no-fallthrough\n\n default:\n {\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n\n if (process.env.NODE_ENV !== 'production' && couldBeSelectorInterpolation && shouldWarnAboutInterpolatingClassNameFromCss && cached !== undefined) {\n console.error('Interpolating a className from css`` is not recommended and will cause problems with composition.\\n' + 'Interpolating a className from css`` will be completely unsupported in a future major version of Emotion');\n shouldWarnAboutInterpolatingClassNameFromCss = false;\n }\n\n return cached !== undefined && !couldBeSelectorInterpolation ? cached : interpolation;\n }\n }\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i], false);\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n } else {\n string += _key + \"{\" + handleInterpolation(mergedProps, registered, value, false) + \"}\";\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*;/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings, false);\n } else {\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i], styles.charCodeAt(styles.length - 1) === 46);\n\n if (stringMode) {\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className]);\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n var maybeStyles = cache.insert(\".\" + className, current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles };\n","import createCache from '@emotion/cache';\nimport { serializeStyles } from '@emotion/serialize';\nimport { insertStyles, getRegisteredStyles } from '@emotion/utils';\n\nfunction insertWithoutScoping(cache, serialized) {\n if (cache.inserted[serialized.name] === undefined) {\n return cache.insert('', serialized, cache.sheet, true);\n }\n}\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar createEmotion = function createEmotion(options) {\n var cache = createCache(options); // $FlowFixMe\n\n cache.sheet.speedy = function (value) {\n if (process.env.NODE_ENV !== 'production' && this.ctr !== 0) {\n throw new Error('speedy must be changed before any rules are inserted');\n }\n\n this.isSpeedy = value;\n };\n\n cache.compat = true;\n\n var css = function css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered, this !== undefined ? this.mergedProps : undefined);\n insertStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var keyframes = function keyframes() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n var animation = \"animation-\" + serialized.name;\n insertWithoutScoping(cache, {\n name: serialized.name,\n styles: \"@keyframes \" + animation + \"{\" + serialized.styles + \"}\"\n });\n return animation;\n };\n\n var injectGlobal = function injectGlobal() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n insertWithoutScoping(cache, serialized);\n };\n\n var cx = function cx() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n return {\n css: css,\n cx: cx,\n injectGlobal: injectGlobal,\n keyframes: keyframes,\n hydrate: function hydrate(ids) {\n ids.forEach(function (key) {\n cache.inserted[key] = true;\n });\n },\n flush: function flush() {\n cache.registered = {};\n cache.inserted = {};\n cache.sheet.flush();\n },\n // $FlowFixMe\n sheet: cache.sheet,\n cache: cache,\n getRegisteredStyles: getRegisteredStyles.bind(null, cache.registered),\n merge: merge.bind(null, cache.registered, css)\n };\n};\n\nvar classnames = function classnames(args) {\n var cls = '';\n\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nexport default createEmotion;\n","// Package imports.\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport {\n FormattedMessage,\n defineMessages,\n} from 'react-intl';\nimport spring from 'react-motion/lib/spring';\n\n// Utils.\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport { searchEnabled } from 'flavours/glitch/util/initial_state';\n\n// Messages.\nconst messages = defineMessages({\n format: {\n defaultMessage: 'Advanced search format',\n id: 'search_popout.search_format',\n },\n hashtag: {\n defaultMessage: 'hashtag',\n id: 'search_popout.tips.hashtag',\n },\n status: {\n defaultMessage: 'status',\n id: 'search_popout.tips.status',\n },\n text: {\n defaultMessage: 'Simple text returns matching display names, usernames and hashtags',\n id: 'search_popout.tips.text',\n },\n full_text: {\n defaultMessage: 'Simple text returns statuses you have written, favourited, boosted, or have been mentioned in, as well as matching usernames, display names, and hashtags.',\n id: 'search_popout.tips.full_text',\n },\n user: {\n defaultMessage: 'user',\n id: 'search_popout.tips.user',\n },\n});\n\n// The spring used by our motion.\nconst motionSpring = spring(1, { damping: 35, stiffness: 400 });\n\n// The component.\nexport default function DrawerSearchPopout ({ style }) {\n\n // The result.\n return (\n