\n );\n\n let embed = '';\n let thumbnail = ;\n\n if (interactive) {\n if (embedded) {\n embed = this.renderVideo();\n } else {\n let iconVariant = 'play';\n\n if (card.get('type') === 'photo') {\n iconVariant = 'search-plus';\n }\n\n embed = (\n
\n {thumbnail}\n\n
\n
\n \n {horizontal && }\n
\n
\n
\n );\n }\n\n return (\n
\n {embed}\n {!compact && description}\n
\n );\n } else if (card.get('image')) {\n embed = (\n
\n {thumbnail}\n
\n );\n } else {\n embed = (\n
\n \n
\n );\n }\n\n return (\n \n {embed}\n {description}\n \n );\n }\n\n}\n","// Package imports //\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\nconst messages = defineMessages({\n public: { id: 'privacy.public.short', defaultMessage: 'Public' },\n unlisted: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' },\n private: { id: 'privacy.private.short', defaultMessage: 'Followers-only' },\n direct: { id: 'privacy.direct.short', defaultMessage: 'Direct' },\n});\n\n@injectIntl\nexport default class VisibilityIcon extends ImmutablePureComponent {\n\n static propTypes = {\n visibility: PropTypes.string,\n intl: PropTypes.object.isRequired,\n withLabel: PropTypes.bool,\n };\n\n render() {\n const { withLabel, visibility, intl } = this.props;\n\n const visibilityClass = {\n public: 'globe',\n unlisted: 'unlock',\n private: 'lock',\n direct: 'envelope',\n }[visibility];\n\n const label = intl.formatMessage(messages[visibility]);\n\n const icon = ();\n\n if (withLabel) {\n return ({icon} {label});\n } else {\n return icon;\n }\n }\n\n}\n","'use strict'; // Simple FIFO queue implementation to avoid having to do shift()\n// on an array, which is slow.\n\nfunction Queue() {\n this.length = 0;\n}\n\nQueue.prototype.push = function (item) {\n var node = {\n item: item\n };\n\n if (this.last) {\n this.last = this.last.next = node;\n } else {\n this.last = this.first = node;\n }\n\n this.length++;\n};\n\nQueue.prototype.shift = function () {\n var node = this.first;\n\n if (node) {\n this.first = node.next;\n\n if (! --this.length) {\n this.last = undefined;\n }\n\n return node.item;\n }\n};\n\nQueue.prototype.slice = function (start, end) {\n start = typeof start === 'undefined' ? 0 : start;\n end = typeof end === 'undefined' ? Infinity : end;\n var output = [];\n var i = 0;\n\n for (var node = this.first; node; node = node.next) {\n if (--end < 0) {\n break;\n } else if (++i > start) {\n output.push(node.item);\n }\n }\n\n return output;\n};\n\nmodule.exports = Queue;","import { connect } from 'react-redux';\nimport Poll from 'mastodon/components/poll';\n\nconst mapStateToProps = (state, { pollId }) => ({\n poll: state.getIn(['polls', pollId]),\n});\n\nexport default connect(mapStateToProps)(Poll);\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nvar backoff = require('backoff');\n\nvar WebSocketClient = function () {\n /**\n * @param url DOMString The URL to which to connect; this should be the URL to which the WebSocket server will respond.\n * @param protocols DOMString|DOMString[] Either a single protocol string or an array of protocol strings. These strings are used to indicate sub-protocols, so that a single server can implement multiple WebSocket sub-protocols (for example, you might want one server to be able to handle different types of interactions depending on the specified protocol). If you don't specify a protocol string, an empty string is assumed.\n */\n function WebSocketClient(url, protocols) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n _classCallCheck(this, WebSocketClient);\n\n this.url = url;\n this.protocols = protocols;\n this.reconnectEnabled = true;\n this.listeners = {};\n this.backoff = backoff[options.backoff || 'fibonacci'](options);\n this.backoff.on('backoff', this.onBackoffStart.bind(this));\n this.backoff.on('ready', this.onBackoffReady.bind(this));\n this.backoff.on('fail', this.onBackoffFail.bind(this));\n this.open();\n }\n\n _createClass(WebSocketClient, [{\n key: 'open',\n value: function open() {\n var reconnect = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.isReconnect = reconnect;\n this.ws = new WebSocket(this.url, this.protocols);\n this.ws.onclose = this.onCloseCallback.bind(this);\n this.ws.onerror = this.onErrorCallback.bind(this);\n this.ws.onmessage = this.onMessageCallback.bind(this);\n this.ws.onopen = this.onOpenCallback.bind(this);\n }\n /**\n * @ignore\n */\n\n }, {\n key: 'onBackoffStart',\n value: function onBackoffStart(number, delay) {}\n /**\n * @ignore\n */\n\n }, {\n key: 'onBackoffReady',\n value: function onBackoffReady(number, delay) {\n // console.log(\"onBackoffReady\", number + ' ' + delay + 'ms');\n this.open(true);\n }\n /**\n * @ignore\n */\n\n }, {\n key: 'onBackoffFail',\n value: function onBackoffFail() {}\n /**\n * @ignore\n */\n\n }, {\n key: 'onCloseCallback',\n value: function onCloseCallback() {\n if (!this.isReconnect && this.listeners['onclose']) this.listeners['onclose'].apply(null, arguments);\n\n if (this.reconnectEnabled) {\n this.backoff.backoff();\n }\n }\n /**\n * @ignore\n */\n\n }, {\n key: 'onErrorCallback',\n value: function onErrorCallback() {\n if (this.listeners['onerror']) this.listeners['onerror'].apply(null, arguments);\n }\n /**\n * @ignore\n */\n\n }, {\n key: 'onMessageCallback',\n value: function onMessageCallback() {\n if (this.listeners['onmessage']) this.listeners['onmessage'].apply(null, arguments);\n }\n /**\n * @ignore\n */\n\n }, {\n key: 'onOpenCallback',\n value: function onOpenCallback() {\n if (this.listeners['onopen']) this.listeners['onopen'].apply(null, arguments);\n if (this.isReconnect && this.listeners['onreconnect']) this.listeners['onreconnect'].apply(null, arguments);\n this.isReconnect = false;\n }\n /**\n * The number of bytes of data that have been queued using calls to send()\n * but not yet transmitted to the network. This value does not reset to zero\n * when the connection is closed; if you keep calling send(), this will\n * continue to climb.\n *\n * @type unsigned long\n * @readonly\n */\n\n }, {\n key: 'close',\n\n /**\n * Closes the WebSocket connection or connection attempt, if any. If the\n * connection is already CLOSED, this method does nothing.\n *\n * @param code A numeric value indicating the status code explaining why the connection is being closed. If this parameter is not specified, a default value of 1000 (indicating a normal \"transaction complete\" closure) is assumed. See the list of status codes on the CloseEvent page for permitted values.\n * @param reason A human-readable string explaining why the connection is closing. This string must be no longer than 123 bytes of UTF-8 text (not characters).\n *\n * @return void\n */\n value: function close(code, reason) {\n if (typeof code == 'undefined') {\n code = 1000;\n }\n\n this.reconnectEnabled = false;\n this.ws.close(code, reason);\n }\n /**\n * Transmits data to the server over the WebSocket connection.\n * @param data DOMString|ArrayBuffer|Blob\n * @return void\n */\n\n }, {\n key: 'send',\n value: function send(data) {\n this.ws.send(data);\n }\n /**\n * An event listener to be called when the WebSocket connection's readyState changes to CLOSED. The listener receives a CloseEvent named \"close\".\n * @param listener EventListener\n */\n\n }, {\n key: 'bufferedAmount',\n get: function get() {\n return this.ws.bufferedAmount;\n }\n /**\n * The current state of the connection; this is one of the Ready state constants.\n * @type unsigned short\n * @readonly\n */\n\n }, {\n key: 'readyState',\n get: function get() {\n return this.ws.readyState;\n }\n /**\n * A string indicating the type of binary data being transmitted by the\n * connection. This should be either \"blob\" if DOM Blob objects are being\n * used or \"arraybuffer\" if ArrayBuffer objects are being used.\n * @type DOMString\n */\n\n }, {\n key: 'binaryType',\n get: function get() {\n return this.ws.binaryType;\n },\n set: function set(binaryType) {\n this.ws.binaryType = binaryType;\n }\n /**\n * The extensions selected by the server. This is currently only the empty\n * string or a list of extensions as negotiated by the connection.\n * @type DOMString\n */\n\n }, {\n key: 'extensions',\n get: function get() {\n return this.ws.extensions;\n },\n set: function set(extensions) {\n this.ws.extensions = extensions;\n }\n /**\n * A string indicating the name of the sub-protocol the server selected;\n * this will be one of the strings specified in the protocols parameter when\n * creating the WebSocket object.\n * @type DOMString\n */\n\n }, {\n key: 'protocol',\n get: function get() {\n return this.ws.protocol;\n },\n set: function set(protocol) {\n this.ws.protocol = protocol;\n }\n }, {\n key: 'onclose',\n set: function set(listener) {\n this.listeners['onclose'] = listener;\n },\n get: function get() {\n return this.listeners['onclose'];\n }\n /**\n * An event listener to be called when an error occurs. This is a simple event named \"error\".\n * @param listener EventListener\n */\n\n }, {\n key: 'onerror',\n set: function set(listener) {\n this.listeners['onerror'] = listener;\n },\n get: function get() {\n return this.listeners['onerror'];\n }\n /**\n * An event listener to be called when a message is received from the server. The listener receives a MessageEvent named \"message\".\n * @param listener EventListener\n */\n\n }, {\n key: 'onmessage',\n set: function set(listener) {\n this.listeners['onmessage'] = listener;\n },\n get: function get() {\n return this.listeners['onmessage'];\n }\n /**\n * An event listener to be called when the WebSocket connection's readyState changes to OPEN; this indicates that the connection is ready to send and receive data. The event is a simple one with the name \"open\".\n * @param listener EventListener\n */\n\n }, {\n key: 'onopen',\n set: function set(listener) {\n this.listeners['onopen'] = listener;\n },\n get: function get() {\n return this.listeners['onopen'];\n }\n /**\n * @param listener EventListener\n */\n\n }, {\n key: 'onreconnect',\n set: function set(listener) {\n this.listeners['onreconnect'] = listener;\n },\n get: function get() {\n return this.listeners['onreconnect'];\n }\n }]);\n\n return WebSocketClient;\n}();\n/**\n* The connection is not yet open.\n*/\n\n\nWebSocketClient.CONNECTING = WebSocket.CONNECTING;\n/**\n* The connection is open and ready to communicate.\n*/\n\nWebSocketClient.OPEN = WebSocket.OPEN;\n/**\n* The connection is in the process of closing.\n*/\n\nWebSocketClient.CLOSING = WebSocket.CLOSING;\n/**\n* The connection is closed or couldn't be opened.\n*/\n\nWebSocketClient.CLOSED = WebSocket.CLOSED;\nexports.default = WebSocketClient;","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Icon from 'mastodon/components/icon';\n\nconst filename = url => url.split('/').pop().split('#')[0].split('?')[0];\n\nexport default class AttachmentList extends ImmutablePureComponent {\n\n static propTypes = {\n media: ImmutablePropTypes.list.isRequired,\n compact: PropTypes.bool,\n };\n\n render () {\n const { media, compact } = this.props;\n\n if (compact) {\n return (\n
\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport Poll from 'mastodon/components/poll';\n\nconst mapStateToProps = (state, { pollId }) => ({\n poll: state.getIn(['polls', pollId]),\n});\n\nexport default connect(mapStateToProps)(Poll);\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nvar isIE = !!document.documentElement.currentStyle;\nvar HIDDEN_TEXTAREA_STYLE = {\n 'min-height': '0',\n 'max-height': 'none',\n height: '0',\n visibility: 'hidden',\n overflow: 'hidden',\n position: 'absolute',\n 'z-index': '-1000',\n top: '0',\n right: '0'\n};\nvar SIZING_STYLE = ['letter-spacing', 'line-height', 'font-family', 'font-weight', 'font-size', 'font-style', 'tab-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left', 'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width', 'box-sizing'];\nvar computedStyleCache = {};\nvar hiddenTextarea = document.createElement('textarea');\n\nvar forceHiddenStyles = function forceHiddenStyles(node) {\n Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function (key) {\n node.style.setProperty(key, HIDDEN_TEXTAREA_STYLE[key], 'important');\n });\n};\n\n{\n forceHiddenStyles(hiddenTextarea);\n}\n\nfunction calculateNodeHeight(uiTextNode, uid, useCache, minRows, maxRows) {\n if (useCache === void 0) {\n useCache = false;\n }\n\n if (minRows === void 0) {\n minRows = null;\n }\n\n if (maxRows === void 0) {\n maxRows = null;\n }\n\n if (hiddenTextarea.parentNode === null) {\n document.body.appendChild(hiddenTextarea);\n } // Copy all CSS properties that have an impact on the height of the content in\n // the textbox\n\n\n var nodeStyling = calculateNodeStyling(uiTextNode, uid, useCache);\n\n if (nodeStyling === null) {\n return null;\n }\n\n var paddingSize = nodeStyling.paddingSize,\n borderSize = nodeStyling.borderSize,\n boxSizing = nodeStyling.boxSizing,\n sizingStyle = nodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise\n // text-lines will not calculated properly as the shadow will technically be\n // narrower for content\n\n Object.keys(sizingStyle).forEach(function (key) {\n hiddenTextarea.style[key] = sizingStyle[key];\n });\n forceHiddenStyles(hiddenTextarea);\n hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || 'x';\n var minHeight = -Infinity;\n var maxHeight = Infinity;\n var height = hiddenTextarea.scrollHeight;\n\n if (boxSizing === 'border-box') {\n // border-box: add border, since height = content + padding + border\n height = height + borderSize;\n } else if (boxSizing === 'content-box') {\n // remove padding, since height = content\n height = height - paddingSize;\n } // measure height of a textarea with a single row\n\n\n hiddenTextarea.value = 'x';\n var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize; // Stores the value's rows count rendered in `hiddenTextarea`,\n // regardless if `maxRows` or `minRows` props are passed\n\n var valueRowCount = Math.floor(height / singleRowHeight);\n\n if (minRows !== null) {\n minHeight = singleRowHeight * minRows;\n\n if (boxSizing === 'border-box') {\n minHeight = minHeight + paddingSize + borderSize;\n }\n\n height = Math.max(minHeight, height);\n }\n\n if (maxRows !== null) {\n maxHeight = singleRowHeight * maxRows;\n\n if (boxSizing === 'border-box') {\n maxHeight = maxHeight + paddingSize + borderSize;\n }\n\n height = Math.min(maxHeight, height);\n }\n\n var rowCount = Math.floor(height / singleRowHeight);\n return {\n height: height,\n minHeight: minHeight,\n maxHeight: maxHeight,\n rowCount: rowCount,\n valueRowCount: valueRowCount\n };\n}\n\nfunction calculateNodeStyling(node, uid, useCache) {\n if (useCache === void 0) {\n useCache = false;\n }\n\n if (useCache && computedStyleCache[uid]) {\n return computedStyleCache[uid];\n }\n\n var style = window.getComputedStyle(node);\n\n if (style === null) {\n return null;\n }\n\n var sizingStyle = SIZING_STYLE.reduce(function (obj, name) {\n obj[name] = style.getPropertyValue(name);\n return obj;\n }, {});\n var boxSizing = sizingStyle['box-sizing']; // probably node is detached from DOM, can't read computed dimensions\n\n if (boxSizing === '') {\n return null;\n } // IE (Edge has already correct behaviour) returns content width as computed width\n // so we need to add manually padding and border widths\n\n\n if (isIE && boxSizing === 'border-box') {\n sizingStyle.width = parseFloat(sizingStyle.width) + parseFloat(style['border-right-width']) + parseFloat(style['border-left-width']) + parseFloat(style['padding-right']) + parseFloat(style['padding-left']) + 'px';\n }\n\n var paddingSize = parseFloat(sizingStyle['padding-bottom']) + parseFloat(sizingStyle['padding-top']);\n var borderSize = parseFloat(sizingStyle['border-bottom-width']) + parseFloat(sizingStyle['border-top-width']);\n var nodeInfo = {\n sizingStyle: sizingStyle,\n paddingSize: paddingSize,\n borderSize: borderSize,\n boxSizing: boxSizing\n };\n\n if (useCache) {\n computedStyleCache[uid] = nodeInfo;\n }\n\n return nodeInfo;\n}\n\nvar purgeCache = function purgeCache(uid) {\n delete computedStyleCache[uid];\n};\n\nvar noop = function noop() {};\n\nvar uid = 0;\n\nvar TextareaAutosize =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(TextareaAutosize, _React$Component);\n\n function TextareaAutosize(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n _this._onRef = function (node) {\n _this._ref = node;\n var inputRef = _this.props.inputRef;\n\n if (typeof inputRef === 'function') {\n inputRef(node);\n return;\n }\n\n inputRef.current = node;\n };\n\n _this._onChange = function (event) {\n if (!_this._controlled) {\n _this._resizeComponent();\n }\n\n _this.props.onChange(event, _assertThisInitialized(_assertThisInitialized(_this)));\n };\n\n _this._resizeComponent = function (callback) {\n if (callback === void 0) {\n callback = noop;\n }\n\n var nodeHeight = calculateNodeHeight(_this._ref, _this._uid, _this.props.useCacheForDOMMeasurements, _this.props.minRows, _this.props.maxRows);\n\n if (nodeHeight === null) {\n callback();\n return;\n }\n\n var height = nodeHeight.height,\n minHeight = nodeHeight.minHeight,\n maxHeight = nodeHeight.maxHeight,\n rowCount = nodeHeight.rowCount,\n valueRowCount = nodeHeight.valueRowCount;\n _this.rowCount = rowCount;\n _this.valueRowCount = valueRowCount;\n\n if (_this.state.height !== height || _this.state.minHeight !== minHeight || _this.state.maxHeight !== maxHeight) {\n _this.setState({\n height: height,\n minHeight: minHeight,\n maxHeight: maxHeight\n }, callback);\n\n return;\n }\n\n callback();\n };\n\n _this.state = {\n height: props.style && props.style.height || 0,\n minHeight: -Infinity,\n maxHeight: Infinity\n };\n _this._uid = uid++;\n _this._controlled = props.value !== undefined;\n _this._resizeLock = false;\n return _this;\n }\n\n var _proto = TextareaAutosize.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n _inputRef = _this$props.inputRef,\n _maxRows = _this$props.maxRows,\n _minRows = _this$props.minRows,\n _onHeightChange = _this$props.onHeightChange,\n _useCacheForDOMMeasurements = _this$props.useCacheForDOMMeasurements,\n props = _objectWithoutPropertiesLoose(_this$props, [\"inputRef\", \"maxRows\", \"minRows\", \"onHeightChange\", \"useCacheForDOMMeasurements\"]);\n\n props.style = _extends({}, props.style, {\n height: this.state.height\n });\n var maxHeight = Math.max(props.style.maxHeight || Infinity, this.state.maxHeight);\n\n if (maxHeight < this.state.height) {\n props.style.overflow = 'hidden';\n }\n\n return React.createElement(\"textarea\", _extends({}, props, {\n onChange: this._onChange,\n ref: this._onRef\n }));\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n this._resizeComponent(); // Working around Firefox bug which runs resize listeners even when other JS is running at the same moment\n // causing competing rerenders (due to setState in the listener) in React.\n // More can be found here - facebook/react#6324\n\n\n this._resizeListener = function () {\n if (_this2._resizeLock) {\n return;\n }\n\n _this2._resizeLock = true;\n\n _this2._resizeComponent(function () {\n _this2._resizeLock = false;\n });\n };\n\n window.addEventListener('resize', this._resizeListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps !== this.props) {\n this._resizeComponent();\n }\n\n if (this.state.height !== prevState.height) {\n this.props.onHeightChange(this.state.height, this);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener('resize', this._resizeListener);\n purgeCache(this._uid);\n };\n\n return TextareaAutosize;\n}(React.Component);\n\nTextareaAutosize.defaultProps = {\n inputRef: noop,\n onChange: noop,\n onHeightChange: noop,\n useCacheForDOMMeasurements: false\n};\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\nexport default TextareaAutosize;","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _off = require('dom-helpers/events/off');\n\nvar _off2 = _interopRequireDefault(_off);\n\nvar _on = require('dom-helpers/events/on');\n\nvar _on2 = _interopRequireDefault(_on);\n\nvar _scrollLeft = require('dom-helpers/query/scrollLeft');\n\nvar _scrollLeft2 = _interopRequireDefault(_scrollLeft);\n\nvar _scrollTop = require('dom-helpers/query/scrollTop');\n\nvar _scrollTop2 = _interopRequireDefault(_scrollTop);\n\nvar _requestAnimationFrame = require('dom-helpers/util/requestAnimationFrame');\n\nvar _requestAnimationFrame2 = _interopRequireDefault(_requestAnimationFrame);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _utils = require('./utils');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n/* eslint-disable no-underscore-dangle */\n// Try at most this many times to scroll, to avoid getting stuck.\n\n\nvar MAX_SCROLL_ATTEMPTS = 2;\n\nvar ScrollBehavior = function () {\n function ScrollBehavior(_ref) {\n var _this = this;\n\n var addTransitionHook = _ref.addTransitionHook,\n stateStorage = _ref.stateStorage,\n getCurrentLocation = _ref.getCurrentLocation,\n shouldUpdateScroll = _ref.shouldUpdateScroll;\n\n _classCallCheck(this, ScrollBehavior);\n\n this._onWindowScroll = function () {\n // It's possible that this scroll operation was triggered by what will be a\n // `POP` transition. Instead of updating the saved location immediately, we\n // have to enqueue the update, then potentially cancel it if we observe a\n // location update.\n if (!_this._saveWindowPositionHandle) {\n _this._saveWindowPositionHandle = (0, _requestAnimationFrame2.default)(_this._saveWindowPosition);\n }\n\n if (_this._windowScrollTarget) {\n var _windowScrollTarget = _this._windowScrollTarget,\n xTarget = _windowScrollTarget[0],\n yTarget = _windowScrollTarget[1];\n var x = (0, _scrollLeft2.default)(window);\n var y = (0, _scrollTop2.default)(window);\n\n if (x === xTarget && y === yTarget) {\n _this._windowScrollTarget = null;\n\n _this._cancelCheckWindowScroll();\n }\n }\n };\n\n this._saveWindowPosition = function () {\n _this._saveWindowPositionHandle = null;\n\n _this._savePosition(null, window);\n };\n\n this._checkWindowScrollPosition = function () {\n _this._checkWindowScrollHandle = null; // We can only get here if scrollTarget is set. Every code path that unsets\n // scroll target also cancels the handle to avoid calling this handler.\n // Still, check anyway just in case.\n\n /* istanbul ignore if: paranoid guard */\n\n if (!_this._windowScrollTarget) {\n return;\n }\n\n _this.scrollToTarget(window, _this._windowScrollTarget);\n\n ++_this._numWindowScrollAttempts;\n /* istanbul ignore if: paranoid guard */\n\n if (_this._numWindowScrollAttempts >= MAX_SCROLL_ATTEMPTS) {\n _this._windowScrollTarget = null;\n return;\n }\n\n _this._checkWindowScrollHandle = (0, _requestAnimationFrame2.default)(_this._checkWindowScrollPosition);\n };\n\n this._stateStorage = stateStorage;\n this._getCurrentLocation = getCurrentLocation;\n this._shouldUpdateScroll = shouldUpdateScroll; // This helps avoid some jankiness in fighting against the browser's\n // default scroll behavior on `POP` transitions.\n\n /* istanbul ignore else: Travis browsers all support this */\n\n if ('scrollRestoration' in window.history && // Unfortunately, Safari on iOS freezes for 2-6s after the user swipes to\n // navigate through history with scrollRestoration being 'manual', so we\n // need to detect this browser and exclude it from the following code\n // until this bug is fixed by Apple.\n !(0, _utils.isMobileSafari)()) {\n this._oldScrollRestoration = window.history.scrollRestoration;\n\n try {\n window.history.scrollRestoration = 'manual';\n } catch (e) {\n this._oldScrollRestoration = null;\n }\n } else {\n this._oldScrollRestoration = null;\n }\n\n this._saveWindowPositionHandle = null;\n this._checkWindowScrollHandle = null;\n this._windowScrollTarget = null;\n this._numWindowScrollAttempts = 0;\n this._scrollElements = {}; // We have to listen to each window scroll update rather than to just\n // location updates, because some browsers will update scroll position\n // before emitting the location change.\n\n (0, _on2.default)(window, 'scroll', this._onWindowScroll);\n this._removeTransitionHook = addTransitionHook(function () {\n _requestAnimationFrame2.default.cancel(_this._saveWindowPositionHandle);\n\n _this._saveWindowPositionHandle = null;\n Object.keys(_this._scrollElements).forEach(function (key) {\n var scrollElement = _this._scrollElements[key];\n\n _requestAnimationFrame2.default.cancel(scrollElement.savePositionHandle);\n\n scrollElement.savePositionHandle = null; // It's fine to save element scroll positions here, though; the browser\n // won't modify them.\n\n _this._saveElementPosition(key);\n });\n });\n }\n\n ScrollBehavior.prototype.registerElement = function registerElement(key, element, shouldUpdateScroll, context) {\n var _this2 = this;\n\n !!this._scrollElements[key] ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'ScrollBehavior: There is already an element registered for `%s`.', key) : (0, _invariant2.default)(false) : void 0;\n\n var saveElementPosition = function saveElementPosition() {\n _this2._saveElementPosition(key);\n };\n\n var scrollElement = {\n element: element,\n shouldUpdateScroll: shouldUpdateScroll,\n savePositionHandle: null,\n onScroll: function onScroll() {\n if (!scrollElement.savePositionHandle) {\n scrollElement.savePositionHandle = (0, _requestAnimationFrame2.default)(saveElementPosition);\n }\n }\n };\n this._scrollElements[key] = scrollElement;\n (0, _on2.default)(element, 'scroll', scrollElement.onScroll);\n\n this._updateElementScroll(key, null, context);\n };\n\n ScrollBehavior.prototype.unregisterElement = function unregisterElement(key) {\n !this._scrollElements[key] ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'ScrollBehavior: There is no element registered for `%s`.', key) : (0, _invariant2.default)(false) : void 0;\n var _scrollElements$key = this._scrollElements[key],\n element = _scrollElements$key.element,\n onScroll = _scrollElements$key.onScroll,\n savePositionHandle = _scrollElements$key.savePositionHandle;\n (0, _off2.default)(element, 'scroll', onScroll);\n\n _requestAnimationFrame2.default.cancel(savePositionHandle);\n\n delete this._scrollElements[key];\n };\n\n ScrollBehavior.prototype.updateScroll = function updateScroll(prevContext, context) {\n var _this3 = this;\n\n this._updateWindowScroll(prevContext, context);\n\n Object.keys(this._scrollElements).forEach(function (key) {\n _this3._updateElementScroll(key, prevContext, context);\n });\n };\n\n ScrollBehavior.prototype.stop = function stop() {\n /* istanbul ignore if: not supported by any browsers on Travis */\n if (this._oldScrollRestoration) {\n try {\n window.history.scrollRestoration = this._oldScrollRestoration;\n } catch (e) {\n /* silence */\n }\n }\n\n (0, _off2.default)(window, 'scroll', this._onWindowScroll);\n\n this._cancelCheckWindowScroll();\n\n this._removeTransitionHook();\n };\n\n ScrollBehavior.prototype._cancelCheckWindowScroll = function _cancelCheckWindowScroll() {\n _requestAnimationFrame2.default.cancel(this._checkWindowScrollHandle);\n\n this._checkWindowScrollHandle = null;\n };\n\n ScrollBehavior.prototype._saveElementPosition = function _saveElementPosition(key) {\n var scrollElement = this._scrollElements[key];\n scrollElement.savePositionHandle = null;\n\n this._savePosition(key, scrollElement.element);\n };\n\n ScrollBehavior.prototype._savePosition = function _savePosition(key, element) {\n this._stateStorage.save(this._getCurrentLocation(), key, [(0, _scrollLeft2.default)(element), (0, _scrollTop2.default)(element)]);\n };\n\n ScrollBehavior.prototype._updateWindowScroll = function _updateWindowScroll(prevContext, context) {\n // Whatever we were doing before isn't relevant any more.\n this._cancelCheckWindowScroll();\n\n this._windowScrollTarget = this._getScrollTarget(null, this._shouldUpdateScroll, prevContext, context); // Updating the window scroll position is really flaky. Just trying to\n // scroll it isn't enough. Instead, try to scroll a few times until it\n // works.\n\n this._numWindowScrollAttempts = 0;\n\n this._checkWindowScrollPosition();\n };\n\n ScrollBehavior.prototype._updateElementScroll = function _updateElementScroll(key, prevContext, context) {\n var _scrollElements$key2 = this._scrollElements[key],\n element = _scrollElements$key2.element,\n shouldUpdateScroll = _scrollElements$key2.shouldUpdateScroll;\n\n var scrollTarget = this._getScrollTarget(key, shouldUpdateScroll, prevContext, context);\n\n if (!scrollTarget) {\n return;\n } // Unlike with the window, there shouldn't be any flakiness to deal with\n // here.\n\n\n this.scrollToTarget(element, scrollTarget);\n };\n\n ScrollBehavior.prototype._getDefaultScrollTarget = function _getDefaultScrollTarget(location) {\n var hash = location.hash;\n\n if (hash && hash !== '#') {\n return hash.charAt(0) === '#' ? hash.slice(1) : hash;\n }\n\n return [0, 0];\n };\n\n ScrollBehavior.prototype._getScrollTarget = function _getScrollTarget(key, shouldUpdateScroll, prevContext, context) {\n var scrollTarget = shouldUpdateScroll ? shouldUpdateScroll.call(this, prevContext, context) : true;\n\n if (!scrollTarget || Array.isArray(scrollTarget) || typeof scrollTarget === 'string') {\n return scrollTarget;\n }\n\n var location = this._getCurrentLocation();\n\n return this._getSavedScrollTarget(key, location) || this._getDefaultScrollTarget(location);\n };\n\n ScrollBehavior.prototype._getSavedScrollTarget = function _getSavedScrollTarget(key, location) {\n if (location.action === 'PUSH') {\n return null;\n }\n\n return this._stateStorage.read(location, key);\n };\n\n ScrollBehavior.prototype.scrollToTarget = function scrollToTarget(element, target) {\n if (typeof target === 'string') {\n var targetElement = document.getElementById(target) || document.getElementsByName(target)[0];\n\n if (targetElement) {\n targetElement.scrollIntoView();\n return;\n } // Fallback to scrolling to top when target fragment doesn't exist.\n\n\n target = [0, 0]; // eslint-disable-line no-param-reassign\n }\n\n var _target = target,\n left = _target[0],\n top = _target[1];\n (0, _scrollLeft2.default)(element, left);\n (0, _scrollTop2.default)(element, top);\n };\n\n return ScrollBehavior;\n}();\n\nexports.default = ScrollBehavior;\nmodule.exports = exports['default'];","// Written in this round about way for babel-transform-imports\nimport Route from \"react-router/es/Route\";\nexport default Route;","/**\n * lodash 3.0.3 (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n/** Used for built-in method references. */\n\nvar objectProto = Object.prototype;\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar objectToString = objectProto.toString;\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n\nfunction isBoolean(value) {\n return value === true || value === false || isObjectLike(value) && objectToString.call(value) == boolTag;\n}\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n\n\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isBoolean;","/**\n * lodash 3.0.2 (Custom Build) \n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class ColumnHeader extends React.PureComponent {\n\n static propTypes = {\n icon: PropTypes.string,\n type: PropTypes.string,\n active: PropTypes.bool,\n onClick: PropTypes.func,\n columnHeaderId: PropTypes.string,\n };\n\n handleClick = () => {\n this.props.onClick();\n }\n\n render () {\n const { icon, type, active, columnHeaderId } = this.props;\n let iconElement = '';\n\n if (icon) {\n iconElement = ;\n }\n\n return (\n
\n \n
\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport unicodeMapping from 'flavours/glitch/util/emoji/emoji_unicode_mapping_light';\n\nconst assetHost = process.env.CDN_HOST || '';\n\nexport default class AutosuggestEmoji extends React.PureComponent {\n\n static propTypes = {\n emoji: PropTypes.object.isRequired,\n };\n\n render () {\n const { emoji } = this.props;\n let url;\n\n if (emoji.custom) {\n url = emoji.imageUrl;\n } else {\n const mapping = unicodeMapping[emoji.native] || unicodeMapping[emoji.native.replace(/\\uFE0F$/, '')];\n\n if (!mapping) {\n return null;\n }\n\n url = `${assetHost}/emoji/${mapping.filename}.svg`;\n }\n\n return (\n
\n \n\n {emoji.colons}\n
\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Icon from 'mastodon/components/icon';\n\nexport default class ColumnHeader extends React.PureComponent {\n\n static propTypes = {\n icon: PropTypes.string,\n type: PropTypes.string,\n active: PropTypes.bool,\n onClick: PropTypes.func,\n columnHeaderId: PropTypes.string,\n };\n\n handleClick = () => {\n this.props.onClick();\n }\n\n render () {\n const { icon, type, active, columnHeaderId } = this.props;\n let iconElement = '';\n\n if (icon) {\n iconElement = ;\n }\n\n return (\n
\n \n
\n );\n }\n\n}\n","/**\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'use strict';\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 = function warning() {};\n\nif (process.env.NODE_ENV !== 'production') {\n warning = function warning(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.length < 10 || /^[s\\W]*$/.test(format)) {\n throw new Error('The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format);\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\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}\n\nmodule.exports = warning;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inDOM = _interopRequireDefault(require(\"./inDOM\"));\n\nvar vendors = ['', 'webkit', 'moz', 'o', 'ms'];\nvar cancel = 'clearTimeout';\nvar raf = fallback;\nvar compatRaf;\n\nvar getKey = function getKey(vendor, k) {\n return vendor + (!vendor ? k : k[0].toUpperCase() + k.substr(1)) + 'AnimationFrame';\n};\n\nif (_inDOM.default) {\n vendors.some(function (vendor) {\n var rafKey = getKey(vendor, 'request');\n\n if (rafKey in window) {\n cancel = getKey(vendor, 'cancel');\n return raf = function raf(cb) {\n return window[rafKey](cb);\n };\n }\n });\n}\n/* https://github.com/component/raf */\n\n\nvar prev = new Date().getTime();\n\nfunction fallback(fn) {\n var curr = new Date().getTime(),\n ms = Math.max(0, 16 - (curr - prev)),\n req = setTimeout(fn, ms);\n prev = curr;\n return req;\n}\n\ncompatRaf = function compatRaf(cb) {\n return raf(cb);\n};\n\ncompatRaf.cancel = function (id) {\n window[cancel] && typeof window[cancel] === 'function' && window[cancel](id);\n};\n\nvar _default = compatRaf;\nexports.default = _default;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.isMobileSafari = isMobileSafari;\n\nfunction isMobileSafari() {\n return /iPad|iPhone|iPod/.test(window.navigator.platform) && /^((?!CriOS).)*Safari/.test(window.navigator.userAgent);\n}","module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};","/**\n * ISC License\n *\n * Copyright (c) 2018, Aleck Greenham\n *\n * Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\nimport PropTypes from \"prop-types\";\nimport React, { Component, PureComponent } from \"react\";\nimport isEqual from \"lodash.isequal\";\nimport ReactDOM from \"react-dom\";\nimport isBool from \"lodash.isboolean\";\nimport isObject from \"lodash.isobject\";\n\nvar classCallCheck = function classCallCheck(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n},\n createClass = function () {\n function e(e, t) {\n for (var o = 0; o < t.length; o++) {\n var n = t[o];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n return function (t, o, n) {\n return o && e(t.prototype, o), n && e(t, n), t;\n };\n}(),\n _extends = Object.assign || function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var o = arguments[t];\n\n for (var n in o) {\n Object.prototype.hasOwnProperty.call(o, n) && (e[n] = o[n]);\n }\n }\n\n return e;\n},\n inherits = function inherits(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function, not \" + typeof t);\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);\n},\n objectWithoutProperties = function objectWithoutProperties(e, t) {\n var o = {};\n\n for (var n in e) {\n t.indexOf(n) >= 0 || Object.prototype.hasOwnProperty.call(e, n) && (o[n] = e[n]);\n }\n\n return o;\n},\n possibleConstructorReturn = function possibleConstructorReturn(e, t) {\n if (!e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return !t || \"object\" != typeof t && \"function\" != typeof t ? e : t;\n},\n FocusTrap = function (e) {\n function t() {\n return classCallCheck(this, t), possibleConstructorReturn(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));\n }\n\n return inherits(t, Component), createClass(t, [{\n key: \"render\",\n value: function value() {\n var e = this.props,\n t = e.component,\n o = e.children,\n n = objectWithoutProperties(e, [\"component\", \"children\"]);\n return React.createElement(t, _extends({\n tabIndex: \"-1\"\n }, n), o);\n }\n }]), t;\n}();\n\nfunction sequencesFromKeyMap(e, t) {\n var o = e[t];\n return o ? Array.isArray(o) ? o : [o] : [t];\n}\n\nfunction hasChanged(e, t) {\n return !isEqual(e, t);\n}\n\nFocusTrap.defaultProps = {\n component: \"div\"\n};\n\nvar HotKeys = function (e) {\n function t(e, o) {\n classCallCheck(this, t);\n var n = possibleConstructorReturn(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, o));\n return n.onFocus = n.onFocus.bind(n), n.onBlur = n.onBlur.bind(n), n;\n }\n\n return inherits(t, Component), createClass(t, [{\n key: \"getChildContext\",\n value: function value() {\n return {\n hotKeyParent: this,\n hotKeyMap: this.__hotKeyMap__\n };\n }\n }, {\n key: \"componentWillMount\",\n value: function value() {\n this.updateMap();\n }\n }, {\n key: \"updateMap\",\n value: function value() {\n var e = this.buildMap();\n return !isEqual(e, this.__hotKeyMap__) && (this.__hotKeyMap__ = e, !0);\n }\n }, {\n key: \"buildMap\",\n value: function value() {\n var e = this.context.hotKeyMap || {},\n t = this.props.keyMap || {};\n return _extends({}, e, t);\n }\n }, {\n key: \"getMap\",\n value: function value() {\n return this.__hotKeyMap__;\n }\n }, {\n key: \"componentDidMount\",\n value: function value() {\n var e = require(\"mousetrap\");\n\n this.__mousetrap__ = new e(this.props.attach || ReactDOM.findDOMNode(this)), this.updateHotKeys(!0);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function value(e) {\n this.updateHotKeys(!1, e);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function value() {\n this.context.hotKeyParent && this.context.hotKeyParent.childHandledSequence(null), this.__mousetrap__ && this.__mousetrap__.reset();\n }\n }, {\n key: \"updateHotKeys\",\n value: function value() {\n var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0],\n t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n o = this.props.handlers,\n n = void 0 === o ? {} : o,\n r = t.handlers,\n s = void 0 === r ? n : r,\n a = this.updateMap();\n (e || a || hasChanged(n, s)) && (this.context.hotKeyParent && this.context.hotKeyParent.childHandledSequence(null), this.syncHandlersToMousetrap());\n }\n }, {\n key: \"syncHandlersToMousetrap\",\n value: function value() {\n var e = this,\n t = this.props.handlers,\n o = void 0 === t ? {} : t,\n n = this.getMap(),\n r = [],\n s = this.__mousetrap__;\n Object.keys(o).forEach(function (t) {\n var s = o[t];\n sequencesFromKeyMap(n, t).forEach(function (t) {\n var o = void 0;\n isObject(t) && (o = t.action, t = t.sequence), r.push({\n callback: function callback(t, o) {\n if ((isBool(e.props.focused) ? e.props.focused : e.__isFocused__) && o !== e.__lastChildSequence__) return e.context.hotKeyParent && e.context.hotKeyParent.childHandledSequence(o), s(t, o);\n },\n action: o,\n sequence: t\n });\n });\n }), s.reset(), r.forEach(function (e) {\n var t = e.sequence,\n o = e.callback,\n n = e.action;\n return s.bind(t, o, n);\n });\n }\n }, {\n key: \"childHandledSequence\",\n value: function value() {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;\n this.__lastChildSequence__ = e, this.context.hotKeyParent && this.context.hotKeyParent.childHandledSequence(e);\n }\n }, {\n key: \"render\",\n value: function value() {\n var e = this.props,\n t = (e.keyMap, e.handlers, e.focused, e.attach, e.children),\n o = objectWithoutProperties(e, [\"keyMap\", \"handlers\", \"focused\", \"attach\", \"children\"]);\n return React.createElement(FocusTrap, _extends({}, o, {\n onFocus: this.onFocus,\n onBlur: this.onBlur\n }), t);\n }\n }, {\n key: \"onFocus\",\n value: function value() {\n var e;\n (this.__isFocused__ = !0, this.props.onFocus) && (e = this.props).onFocus.apply(e, arguments);\n }\n }, {\n key: \"onBlur\",\n value: function value() {\n var e;\n (this.__isFocused__ = !1, this.props.onBlur) && (e = this.props).onBlur.apply(e, arguments);\n this.context.hotKeyParent && this.context.hotKeyParent.childHandledSequence(null);\n }\n }]), t;\n}();\n\nHotKeys.childContextTypes = {\n hotKeyParent: PropTypes.any,\n hotKeyMap: PropTypes.object\n}, HotKeys.contextTypes = {\n hotKeyParent: PropTypes.any,\n hotKeyMap: PropTypes.object\n};\n\nvar withHotKeys = function withHotKeys(e) {\n return function (t) {\n return function (o) {\n function n(e) {\n classCallCheck(this, n);\n var t = possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, e));\n return t._setRef = t._setRef.bind(t), t.state = {\n handlers: {}\n }, t;\n }\n\n return inherits(n, PureComponent), createClass(n, [{\n key: \"componentDidMount\",\n value: function value() {\n this.setState({\n handlers: this._ref.hotKeyHandlers\n });\n }\n }, {\n key: \"_setRef\",\n value: function value(e) {\n this._ref = e;\n }\n }, {\n key: \"render\",\n value: function value() {\n var o = this.state.handlers;\n return React.createElement(HotKeys, {\n component: \"document-fragment\",\n keyMap: e,\n handlers: o\n }, React.createElement(t, _extends({\n ref: this._setRef\n }, this.props)));\n }\n }]), n;\n }();\n };\n};\n\nfunction HotKeyMapMixin() {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};\n return {\n contextTypes: {\n hotKeyMap: PropTypes.object\n },\n childContextTypes: {\n hotKeyMap: PropTypes.object\n },\n getChildContext: function getChildContext() {\n return {\n hotKeyMap: this.__hotKeyMap__\n };\n },\n componentWillMount: function componentWillMount() {\n this.updateMap();\n },\n updateMap: function updateMap() {\n var e = this.buildMap();\n return !isEqual(e, this.__hotKeyMap__) && (this.__hotKeyMap__ = e, !0);\n },\n buildMap: function buildMap() {\n var t = this.context.hotKeyMap || {},\n o = this.props.keyMap || {};\n return _extends({}, t, e, o);\n },\n getMap: function getMap() {\n return this.__hotKeyMap__;\n }\n };\n}\n\nexport { HotKeys, withHotKeys, FocusTrap, HotKeyMapMixin };","/*global define:false */\n\n/**\n * Copyright 2012-2017 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Mousetrap is a simple keyboard shortcut library for Javascript with\n * no external dependencies\n *\n * @version 1.6.2\n * @url craig.is/killing/mice\n */\n(function (window, document, undefined) {\n // Check if mousetrap is used inside browser, if not, return\n if (!window) {\n return;\n }\n /**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\n\n\n var _MAP = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 224: 'meta'\n };\n /**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\n\n var _KEYCODE_MAP = {\n 106: '*',\n 107: '+',\n 109: '-',\n 110: '.',\n 111: '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: '\\''\n };\n /**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\n\n var _SHIFT_MAP = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\\\"': '\\'',\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n };\n /**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\n\n var _SPECIAL_ALIASES = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'plus': '+',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n };\n /**\n * variable to store the flipped version of _MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\n\n var _REVERSE_MAP;\n /**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\n\n\n for (var i = 1; i < 20; ++i) {\n _MAP[111 + i] = 'f' + i;\n }\n /**\n * loop through to map numbers on the numeric keypad\n */\n\n\n for (i = 0; i <= 9; ++i) {\n // This needs to use a string cause otherwise since 0 is falsey\n // mousetrap will never fire for numpad 0 pressed as part of a keydown\n // event.\n //\n // @see https://github.com/ccampbell/mousetrap/pull/258\n _MAP[i + 96] = i.toString();\n }\n /**\n * cross browser add event method\n *\n * @param {Element|HTMLDocument} object\n * @param {string} type\n * @param {Function} callback\n * @returns void\n */\n\n\n function _addEvent(object, type, callback) {\n if (object.addEventListener) {\n object.addEventListener(type, callback, false);\n return;\n }\n\n object.attachEvent('on' + type, callback);\n }\n /**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\n\n\n function _characterFromEvent(e) {\n // for keypress events we should return the character as is\n if (e.type == 'keypress') {\n var character = String.fromCharCode(e.which); // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n\n if (!e.shiftKey) {\n character = character.toLowerCase();\n }\n\n return character;\n } // for non keypress events the special maps are needed\n\n\n if (_MAP[e.which]) {\n return _MAP[e.which];\n }\n\n if (_KEYCODE_MAP[e.which]) {\n return _KEYCODE_MAP[e.which];\n } // if it is not in the special map\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n\n\n return String.fromCharCode(e.which).toLowerCase();\n }\n /**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\n\n\n function _modifiersMatch(modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',');\n }\n /**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\n\n\n function _eventModifiers(e) {\n var modifiers = [];\n\n if (e.shiftKey) {\n modifiers.push('shift');\n }\n\n if (e.altKey) {\n modifiers.push('alt');\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl');\n }\n\n if (e.metaKey) {\n modifiers.push('meta');\n }\n\n return modifiers;\n }\n /**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\n\n\n function _preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n return;\n }\n\n e.returnValue = false;\n }\n /**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\n\n\n function _stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n return;\n }\n\n e.cancelBubble = true;\n }\n /**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\n\n\n function _isModifier(key) {\n return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';\n }\n /**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\n\n\n function _getReverseMap() {\n if (!_REVERSE_MAP) {\n _REVERSE_MAP = {};\n\n for (var key in _MAP) {\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue;\n }\n\n if (_MAP.hasOwnProperty(key)) {\n _REVERSE_MAP[_MAP[key]] = key;\n }\n }\n }\n\n return _REVERSE_MAP;\n }\n /**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\n\n\n function _pickBestAction(key, modifiers, action) {\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = _getReverseMap()[key] ? 'keydown' : 'keypress';\n } // modifier keys don't work as expected with keypress,\n // switch to keydown\n\n\n if (action == 'keypress' && modifiers.length) {\n action = 'keydown';\n }\n\n return action;\n }\n /**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\n\n\n function _keysFromString(combination) {\n if (combination === '+') {\n return ['+'];\n }\n\n combination = combination.replace(/\\+{2}/g, '+plus');\n return combination.split('+');\n }\n /**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\n\n\n function _getKeyInfo(combination, action) {\n var keys;\n var key;\n var i;\n var modifiers = []; // take the keys from this pattern and figure out what the actual\n // pattern is all about\n\n keys = _keysFromString(combination);\n\n for (i = 0; i < keys.length; ++i) {\n key = keys[i]; // normalize key names\n\n if (_SPECIAL_ALIASES[key]) {\n key = _SPECIAL_ALIASES[key];\n } // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n\n\n if (action && action != 'keypress' && _SHIFT_MAP[key]) {\n key = _SHIFT_MAP[key];\n modifiers.push('shift');\n } // if this key is a modifier then add it to the list of modifiers\n\n\n if (_isModifier(key)) {\n modifiers.push(key);\n }\n } // depending on what the key combination is\n // we will try to pick the best event for it\n\n\n action = _pickBestAction(key, modifiers, action);\n return {\n key: key,\n modifiers: modifiers,\n action: action\n };\n }\n\n function _belongsTo(element, ancestor) {\n if (element === null || element === document) {\n return false;\n }\n\n if (element === ancestor) {\n return true;\n }\n\n return _belongsTo(element.parentNode, ancestor);\n }\n\n function Mousetrap(targetElement) {\n var self = this;\n targetElement = targetElement || document;\n\n if (!(self instanceof Mousetrap)) {\n return new Mousetrap(targetElement);\n }\n /**\n * element to attach key events to\n *\n * @type {Element}\n */\n\n\n self.target = targetElement;\n /**\n * a list of all the callbacks setup via Mousetrap.bind()\n *\n * @type {Object}\n */\n\n self._callbacks = {};\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n\n self._directMap = {};\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n\n var _sequenceLevels = {};\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n\n var _resetTimer;\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n\n\n var _ignoreNextKeyup = false;\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n\n var _ignoreNextKeypress = false;\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n\n var _nextExpectedAction = false;\n /**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\n\n function _resetSequences(doNotReset) {\n doNotReset = doNotReset || {};\n var activeSequences = false,\n key;\n\n for (key in _sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true;\n continue;\n }\n\n _sequenceLevels[key] = 0;\n }\n\n if (!activeSequences) {\n _nextExpectedAction = false;\n }\n }\n /**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\n\n\n function _getMatches(character, modifiers, e, sequenceName, combination, level) {\n var i;\n var callback;\n var matches = [];\n var action = e.type; // if there are no events related to this keycode\n\n if (!self._callbacks[character]) {\n return [];\n } // if a modifier key is coming up on its own we should allow it\n\n\n if (action == 'keyup' && _isModifier(character)) {\n modifiers = [character];\n } // loop through all callbacks for the key that was pressed\n // and see if any of them match\n\n\n for (i = 0; i < self._callbacks[character].length; ++i) {\n callback = self._callbacks[character][i]; // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n\n if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {\n continue;\n } // if the action we are looking for doesn't match the action we got\n // then we should keep going\n\n\n if (action != callback.action) {\n continue;\n } // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n\n\n if (action == 'keypress' && !e.metaKey && !e.ctrlKey || _modifiersMatch(modifiers, callback.modifiers)) {\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo == combination;\n var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;\n\n if (deleteCombo || deleteSequence) {\n self._callbacks[character].splice(i, 1);\n }\n\n matches.push(callback);\n }\n }\n\n return matches;\n }\n /**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\n\n\n function _fireCallback(callback, e, combo, sequence) {\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return;\n }\n\n if (callback(e, combo) === false) {\n _preventDefault(e);\n\n _stopPropagation(e);\n }\n }\n /**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\n\n\n self._handleKey = function (character, modifiers, e) {\n var callbacks = _getMatches(character, modifiers, e);\n\n var i;\n var doNotReset = {};\n var maxLevel = 0;\n var processedSequenceCallback = false; // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n\n for (i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].seq) {\n maxLevel = Math.max(maxLevel, callbacks[i].level);\n }\n } // loop through matching callbacks for this key event\n\n\n for (i = 0; i < callbacks.length; ++i) {\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[i].seq) {\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the _resetSequences call\n if (callbacks[i].level != maxLevel) {\n continue;\n }\n\n processedSequenceCallback = true; // keep a list of which sequences were matches for later\n\n doNotReset[callbacks[i].seq] = 1;\n\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);\n\n continue;\n } // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n\n\n if (!processedSequenceCallback) {\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo);\n }\n } // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the _nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n\n\n var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;\n\n if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {\n _resetSequences(doNotReset);\n }\n\n _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';\n };\n /**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\n\n\n function _handleKeyEvent(e) {\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode;\n }\n\n var character = _characterFromEvent(e); // no character found then stop\n\n\n if (!character) {\n return;\n } // need to use === for the character check because the character can be 0\n\n\n if (e.type == 'keyup' && _ignoreNextKeyup === character) {\n _ignoreNextKeyup = false;\n return;\n }\n\n self.handleKey(character, _eventModifiers(e), e);\n }\n /**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\n\n\n function _resetSequenceTimer() {\n clearTimeout(_resetTimer);\n _resetTimer = setTimeout(_resetSequences, 1000);\n }\n /**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\n\n\n function _bindSequence(combo, keys, callback, action) {\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n _sequenceLevels[combo] = 0;\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n\n function _increaseSequence(nextAction) {\n return function () {\n _nextExpectedAction = nextAction;\n ++_sequenceLevels[combo];\n\n _resetSequenceTimer();\n };\n }\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n\n\n function _callbackAndReset(e) {\n _fireCallback(callback, e, combo); // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n\n\n if (action !== 'keyup') {\n _ignoreNextKeyup = _characterFromEvent(e);\n } // weird race condition if a sequence ends with the key\n // another sequence begins with\n\n\n setTimeout(_resetSequences, 10);\n } // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n\n\n for (var i = 0; i < keys.length; ++i) {\n var isFinal = i + 1 === keys.length;\n var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);\n\n _bindSingle(keys[i], wrappedCallback, action, combo, i);\n }\n }\n /**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\n\n\n function _bindSingle(combination, callback, action, sequenceName, level) {\n // store a direct mapped reference for use with Mousetrap.trigger\n self._directMap[combination + ':' + action] = callback; // make sure multiple spaces in a row become a single space\n\n combination = combination.replace(/\\s+/g, ' ');\n var sequence = combination.split(' ');\n var info; // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n\n if (sequence.length > 1) {\n _bindSequence(combination, sequence, callback, action);\n\n return;\n }\n\n info = _getKeyInfo(combination, action); // make sure to initialize array if this is the first time\n // a callback is added for this key\n\n self._callbacks[info.key] = self._callbacks[info.key] || []; // remove an existing match if there is one\n\n _getMatches(info.key, info.modifiers, {\n type: info.action\n }, sequenceName, combination, level); // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n\n\n self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n });\n }\n /**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\n\n\n self._bindMultiple = function (combinations, callback, action) {\n for (var i = 0; i < combinations.length; ++i) {\n _bindSingle(combinations[i], callback, action);\n }\n }; // start!\n\n\n _addEvent(targetElement, 'keypress', _handleKeyEvent);\n\n _addEvent(targetElement, 'keydown', _handleKeyEvent);\n\n _addEvent(targetElement, 'keyup', _handleKeyEvent);\n }\n /**\n * binds an event to mousetrap\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - 'keypress', 'keydown', or 'keyup'\n * @returns void\n */\n\n\n Mousetrap.prototype.bind = function (keys, callback, action) {\n var self = this;\n keys = keys instanceof Array ? keys : [keys];\n\n self._bindMultiple.call(self, keys, callback, action);\n\n return self;\n };\n /**\n * unbinds an event to mousetrap\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * _directMap dict.\n *\n * TODO: actually remove this from the _callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\n\n\n Mousetrap.prototype.unbind = function (keys, action) {\n var self = this;\n return self.bind.call(self, keys, function () {}, action);\n };\n /**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\n\n\n Mousetrap.prototype.trigger = function (keys, action) {\n var self = this;\n\n if (self._directMap[keys + ':' + action]) {\n self._directMap[keys + ':' + action]({}, keys);\n }\n\n return self;\n };\n /**\n * resets the library back to its initial state. this is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\n\n\n Mousetrap.prototype.reset = function () {\n var self = this;\n self._callbacks = {};\n self._directMap = {};\n return self;\n };\n /**\n * should we stop this event before firing off callbacks\n *\n * @param {Event} e\n * @param {Element} element\n * @return {boolean}\n */\n\n\n Mousetrap.prototype.stopCallback = function (e, element) {\n var self = this; // if the element has the class \"mousetrap\" then no need to stop\n\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n if (_belongsTo(element, self.target)) {\n return false;\n } // stop for input, select, and textarea\n\n\n return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;\n };\n /**\n * exposes _handleKey publicly so it can be overwritten by extensions\n */\n\n\n Mousetrap.prototype.handleKey = function () {\n var self = this;\n return self._handleKey.apply(self, arguments);\n };\n /**\n * allow custom key mappings\n */\n\n\n Mousetrap.addKeycodes = function (object) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n _MAP[key] = object[key];\n }\n }\n\n _REVERSE_MAP = null;\n };\n /**\n * Init the global mousetrap functions\n *\n * This method is needed to allow the global mousetrap functions to work\n * now that mousetrap is a constructor function.\n */\n\n\n Mousetrap.init = function () {\n var documentMousetrap = Mousetrap(document);\n\n for (var method in documentMousetrap) {\n if (method.charAt(0) !== '_') {\n Mousetrap[method] = function (method) {\n return function () {\n return documentMousetrap[method].apply(documentMousetrap, arguments);\n };\n }(method);\n }\n }\n };\n\n Mousetrap.init(); // expose mousetrap to the global object\n\n window.Mousetrap = Mousetrap; // expose as a common js module\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Mousetrap;\n } // expose mousetrap as an AMD module\n\n\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return Mousetrap;\n });\n }\n})(typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);","// Copyright (c) 2012 Mathieu Turcotte\n// Licensed under the MIT license.\nvar Backoff = require('./lib/backoff');\n\nvar ExponentialBackoffStrategy = require('./lib/strategy/exponential');\n\nvar FibonacciBackoffStrategy = require('./lib/strategy/fibonacci');\n\nvar FunctionCall = require('./lib/function_call.js');\n\nmodule.exports.Backoff = Backoff;\nmodule.exports.FunctionCall = FunctionCall;\nmodule.exports.FibonacciStrategy = FibonacciBackoffStrategy;\nmodule.exports.ExponentialStrategy = ExponentialBackoffStrategy; // Constructs a Fibonacci backoff.\n\nmodule.exports.fibonacci = function (options) {\n return new Backoff(new FibonacciBackoffStrategy(options));\n}; // Constructs an exponential backoff.\n\n\nmodule.exports.exponential = function (options) {\n return new Backoff(new ExponentialBackoffStrategy(options));\n}; // Constructs a FunctionCall for the given function and arguments.\n\n\nmodule.exports.call = function (fn, vargs, callback) {\n var args = Array.prototype.slice.call(arguments);\n fn = args[0];\n vargs = args.slice(1, args.length - 1);\n callback = args[args.length - 1];\n return new FunctionCall(fn, vargs, callback);\n};","/*\n * Copyright (c) 2012 Mathieu Turcotte\n * Licensed under the MIT license.\n */\nvar util = require('util');\n\nvar errors = module.exports = require('./errors');\n\nfunction failCheck(ExceptionConstructor, callee, messageFormat, formatArgs) {\n messageFormat = messageFormat || '';\n var message = util.format.apply(this, [messageFormat].concat(formatArgs));\n var error = new ExceptionConstructor(message);\n Error.captureStackTrace(error, callee);\n throw error;\n}\n\nfunction failArgumentCheck(callee, message, formatArgs) {\n failCheck(errors.IllegalArgumentError, callee, message, formatArgs);\n}\n\nfunction failStateCheck(callee, message, formatArgs) {\n failCheck(errors.IllegalStateError, callee, message, formatArgs);\n}\n\nmodule.exports.checkArgument = function (value, message) {\n if (!value) {\n failArgumentCheck(arguments.callee, message, Array.prototype.slice.call(arguments, 2));\n }\n};\n\nmodule.exports.checkState = function (value, message) {\n if (!value) {\n failStateCheck(arguments.callee, message, Array.prototype.slice.call(arguments, 2));\n }\n};\n\nmodule.exports.checkIsDef = function (value, message) {\n if (value !== undefined) {\n return value;\n }\n\n failArgumentCheck(arguments.callee, message || 'Expected value to be defined but was undefined.', Array.prototype.slice.call(arguments, 2));\n};\n\nmodule.exports.checkIsDefAndNotNull = function (value, message) {\n // Note that undefined == null.\n if (value != null) {\n return value;\n }\n\n failArgumentCheck(arguments.callee, message || 'Expected value to be defined and not null but got \"' + typeOf(value) + '\".', Array.prototype.slice.call(arguments, 2));\n}; // Fixed version of the typeOf operator which returns 'null' for null values\n// and 'array' for arrays.\n\n\nfunction typeOf(value) {\n var s = typeof value;\n\n if (s == 'object') {\n if (!value) {\n return 'null';\n } else if (value instanceof Array) {\n return 'array';\n }\n }\n\n return s;\n}\n\nfunction typeCheck(expect) {\n return function (value, message) {\n var type = typeOf(value);\n\n if (type == expect) {\n return value;\n }\n\n failArgumentCheck(arguments.callee, message || 'Expected \"' + expect + '\" but got \"' + type + '\".', Array.prototype.slice.call(arguments, 2));\n };\n}\n\nmodule.exports.checkIsString = typeCheck('string');\nmodule.exports.checkIsArray = typeCheck('array');\nmodule.exports.checkIsNumber = typeCheck('number');\nmodule.exports.checkIsBoolean = typeCheck('boolean');\nmodule.exports.checkIsFunction = typeCheck('function');\nmodule.exports.checkIsObject = typeCheck('object');","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function';\n};","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n\n var TempCtor = function TempCtor() {};\n\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n };\n}","/*\n * Copyright (c) 2012 Mathieu Turcotte\n * Licensed under the MIT license.\n */\nvar util = require('util');\n\nfunction IllegalArgumentError(message) {\n Error.call(this, message);\n this.message = message;\n}\n\nutil.inherits(IllegalArgumentError, Error);\nIllegalArgumentError.prototype.name = 'IllegalArgumentError';\n\nfunction IllegalStateError(message) {\n Error.call(this, message);\n this.message = message;\n}\n\nutil.inherits(IllegalStateError, Error);\nIllegalStateError.prototype.name = 'IllegalStateError';\nmodule.exports.IllegalStateError = IllegalStateError;\nmodule.exports.IllegalArgumentError = IllegalArgumentError;","// Copyright (c) 2012 Mathieu Turcotte\n// Licensed under the MIT license.\nvar util = require('util');\n\nvar precond = require('precond');\n\nvar BackoffStrategy = require('./strategy'); // Exponential backoff strategy.\n\n\nfunction ExponentialBackoffStrategy(options) {\n BackoffStrategy.call(this, options);\n this.backoffDelay_ = 0;\n this.nextBackoffDelay_ = this.getInitialDelay();\n this.factor_ = ExponentialBackoffStrategy.DEFAULT_FACTOR;\n\n if (options && options.factor !== undefined) {\n precond.checkArgument(options.factor > 1, 'Exponential factor should be greater than 1 but got %s.', options.factor);\n this.factor_ = options.factor;\n }\n}\n\nutil.inherits(ExponentialBackoffStrategy, BackoffStrategy); // Default multiplication factor used to compute the next backoff delay from\n// the current one. The value can be overridden by passing a custom factor as\n// part of the options.\n\nExponentialBackoffStrategy.DEFAULT_FACTOR = 2;\n\nExponentialBackoffStrategy.prototype.next_ = function () {\n this.backoffDelay_ = Math.min(this.nextBackoffDelay_, this.getMaxDelay());\n this.nextBackoffDelay_ = this.backoffDelay_ * this.factor_;\n return this.backoffDelay_;\n};\n\nExponentialBackoffStrategy.prototype.reset_ = function () {\n this.backoffDelay_ = 0;\n this.nextBackoffDelay_ = this.getInitialDelay();\n};\n\nmodule.exports = ExponentialBackoffStrategy;","// Copyright (c) 2012 Mathieu Turcotte\n// Licensed under the MIT license.\nvar events = require('events');\n\nvar precond = require('precond');\n\nvar util = require('util');\n\nvar Backoff = require('./backoff');\n\nvar FibonacciBackoffStrategy = require('./strategy/fibonacci'); // Wraps a function to be called in a backoff loop.\n\n\nfunction FunctionCall(fn, args, callback) {\n events.EventEmitter.call(this);\n precond.checkIsFunction(fn, 'Expected fn to be a function.');\n precond.checkIsArray(args, 'Expected args to be an array.');\n precond.checkIsFunction(callback, 'Expected callback to be a function.');\n this.function_ = fn;\n this.arguments_ = args;\n this.callback_ = callback;\n this.lastResult_ = [];\n this.numRetries_ = 0;\n this.backoff_ = null;\n this.strategy_ = null;\n this.failAfter_ = -1;\n this.retryPredicate_ = FunctionCall.DEFAULT_RETRY_PREDICATE_;\n this.state_ = FunctionCall.State_.PENDING;\n}\n\nutil.inherits(FunctionCall, events.EventEmitter); // States in which the call can be.\n\nFunctionCall.State_ = {\n // Call isn't started yet.\n PENDING: 0,\n // Call is in progress.\n RUNNING: 1,\n // Call completed successfully which means that either the wrapped function\n // returned successfully or the maximal number of backoffs was reached.\n COMPLETED: 2,\n // The call was aborted.\n ABORTED: 3\n}; // The default retry predicate which considers any error as retriable.\n\nFunctionCall.DEFAULT_RETRY_PREDICATE_ = function (err) {\n return true;\n}; // Checks whether the call is pending.\n\n\nFunctionCall.prototype.isPending = function () {\n return this.state_ == FunctionCall.State_.PENDING;\n}; // Checks whether the call is in progress.\n\n\nFunctionCall.prototype.isRunning = function () {\n return this.state_ == FunctionCall.State_.RUNNING;\n}; // Checks whether the call is completed.\n\n\nFunctionCall.prototype.isCompleted = function () {\n return this.state_ == FunctionCall.State_.COMPLETED;\n}; // Checks whether the call is aborted.\n\n\nFunctionCall.prototype.isAborted = function () {\n return this.state_ == FunctionCall.State_.ABORTED;\n}; // Sets the backoff strategy to use. Can only be called before the call is\n// started otherwise an exception will be thrown.\n\n\nFunctionCall.prototype.setStrategy = function (strategy) {\n precond.checkState(this.isPending(), 'FunctionCall in progress.');\n this.strategy_ = strategy;\n return this; // Return this for chaining.\n}; // Sets the predicate which will be used to determine whether the errors\n// returned from the wrapped function should be retried or not, e.g. a\n// network error would be retriable while a type error would stop the\n// function call.\n\n\nFunctionCall.prototype.retryIf = function (retryPredicate) {\n precond.checkState(this.isPending(), 'FunctionCall in progress.');\n this.retryPredicate_ = retryPredicate;\n return this;\n}; // Returns all intermediary results returned by the wrapped function since\n// the initial call.\n\n\nFunctionCall.prototype.getLastResult = function () {\n return this.lastResult_.concat();\n}; // Returns the number of times the wrapped function call was retried.\n\n\nFunctionCall.prototype.getNumRetries = function () {\n return this.numRetries_;\n}; // Sets the backoff limit.\n\n\nFunctionCall.prototype.failAfter = function (maxNumberOfRetry) {\n precond.checkState(this.isPending(), 'FunctionCall in progress.');\n this.failAfter_ = maxNumberOfRetry;\n return this; // Return this for chaining.\n}; // Aborts the call.\n\n\nFunctionCall.prototype.abort = function () {\n if (this.isCompleted() || this.isAborted()) {\n return;\n }\n\n if (this.isRunning()) {\n this.backoff_.reset();\n }\n\n this.state_ = FunctionCall.State_.ABORTED;\n this.lastResult_ = [new Error('Backoff aborted.')];\n this.emit('abort');\n this.doCallback_();\n}; // Initiates the call to the wrapped function. Accepts an optional factory\n// function used to create the backoff instance; used when testing.\n\n\nFunctionCall.prototype.start = function (backoffFactory) {\n precond.checkState(!this.isAborted(), 'FunctionCall is aborted.');\n precond.checkState(this.isPending(), 'FunctionCall already started.');\n var strategy = this.strategy_ || new FibonacciBackoffStrategy();\n this.backoff_ = backoffFactory ? backoffFactory(strategy) : new Backoff(strategy);\n this.backoff_.on('ready', this.doCall_.bind(this, true\n /* isRetry */\n ));\n this.backoff_.on('fail', this.doCallback_.bind(this));\n this.backoff_.on('backoff', this.handleBackoff_.bind(this));\n\n if (this.failAfter_ > 0) {\n this.backoff_.failAfter(this.failAfter_);\n }\n\n this.state_ = FunctionCall.State_.RUNNING;\n this.doCall_(false\n /* isRetry */\n );\n}; // Calls the wrapped function.\n\n\nFunctionCall.prototype.doCall_ = function (isRetry) {\n if (isRetry) {\n this.numRetries_++;\n }\n\n var eventArgs = ['call'].concat(this.arguments_);\n events.EventEmitter.prototype.emit.apply(this, eventArgs);\n var callback = this.handleFunctionCallback_.bind(this);\n this.function_.apply(null, this.arguments_.concat(callback));\n}; // Calls the wrapped function's callback with the last result returned by the\n// wrapped function.\n\n\nFunctionCall.prototype.doCallback_ = function () {\n this.callback_.apply(null, this.lastResult_);\n}; // Handles wrapped function's completion. This method acts as a replacement\n// for the original callback function.\n\n\nFunctionCall.prototype.handleFunctionCallback_ = function () {\n if (this.isAborted()) {\n return;\n }\n\n var args = Array.prototype.slice.call(arguments);\n this.lastResult_ = args; // Save last callback arguments.\n\n events.EventEmitter.prototype.emit.apply(this, ['callback'].concat(args));\n var err = args[0];\n\n if (err && this.retryPredicate_(err)) {\n this.backoff_.backoff(err);\n } else {\n this.state_ = FunctionCall.State_.COMPLETED;\n this.doCallback_();\n }\n}; // Handles the backoff event by reemitting it.\n\n\nFunctionCall.prototype.handleBackoff_ = function (number, delay, err) {\n this.emit('backoff', number, delay, err);\n};\n\nmodule.exports = FunctionCall;","// Package imports.\nimport detectPassiveEvents from 'detect-passive-events';\n\n// This will either be a passive lister options object (if passive\n// events are supported), or `false`.\nexport const withPassive = detectPassiveEvents.hasSupport ? { passive: true } : false;\n\n// Focuses the root element.\nexport function focusRoot () {\n let e;\n if (document && (e = document.querySelector('.ui')) && (e = e.parentElement)) {\n e.focus();\n }\n}\n","var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n}\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport Route from \"./Route\";\n/**\n * A public higher-order component to access the imperative API\n */\n\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return React.createElement(Route, {\n children: function children(routeComponentProps) {\n return React.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n return hoistStatics(C, Component);\n};\n\nexport default withRouter;","// Written in this round about way for babel-transform-imports\nimport withRouter from \"react-router/es/withRouter\";\nexport default withRouter;","import React from 'react';\nimport ColumnHeader from './column_header';\nimport PropTypes from 'prop-types';\nimport { debounce } from 'lodash';\nimport { scrollTop } from 'flavours/glitch/util/scroll';\nimport { isMobile } from 'flavours/glitch/util/is_mobile';\n\nexport default class Column extends React.PureComponent {\n\n static propTypes = {\n heading: PropTypes.string,\n icon: PropTypes.string,\n children: PropTypes.node,\n active: PropTypes.bool,\n hideHeadingOnMobile: PropTypes.bool,\n name: PropTypes.string,\n };\n\n handleHeaderClick = () => {\n const scrollable = this.node.querySelector('.scrollable');\n\n if (!scrollable) {\n return;\n }\n\n this._interruptScrollAnimation = scrollTop(scrollable);\n }\n\n scrollTop () {\n const scrollable = this.node.querySelector('.scrollable');\n\n if (!scrollable) {\n return;\n }\n\n this._interruptScrollAnimation = scrollTop(scrollable);\n }\n\n\n handleScroll = debounce(() => {\n if (typeof this._interruptScrollAnimation !== 'undefined') {\n this._interruptScrollAnimation();\n }\n }, 200)\n\n setRef = (c) => {\n this.node = c;\n }\n\n render () {\n const { heading, icon, children, active, hideHeadingOnMobile, name } = this.props;\n\n const showHeading = heading && (!hideHeadingOnMobile || (hideHeadingOnMobile && !isMobile(window.innerWidth)));\n\n const columnHeaderId = showHeading && heading.replace(/ /g, '-');\n const header = showHeading && (\n \n );\n return (\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 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';\nimport PollContainer from 'flavours/glitch/containers/poll_container';\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 onBookmark: 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 cacheMediaWidth: PropTypes.func,\n cachedMediaWidth: PropTypes.number,\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 this.didShowCard = !this.props.muted && !this.props.hidden && this.props.status && this.props.status.get('card') && this.props.settings.get('inline_preview_cards');\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 const doShowCard = !this.props.muted && !this.props.hidden && this.props.status && this.props.status.get('card') && this.props.settings.get('inline_preview_cards');\n if (this.state.autoCollapsed || (doShowCard && !this.didShowCard)) {\n if (doShowCard) this.didShowCard = true;\n if (this.state.autoCollapsed) 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 componentWillUnmount() {\n if (this.node && this.props.getScrollPosition) {\n const position = this.props.getScrollPosition();\n if (position !== null && this.node.offsetTop < position.top) {\n requestAnimationFrame(() => { this.props.updateScrollBottom(position.height - position.top); });\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 {\n let state = {...router.history.location.state};\n state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;\n router.history.push(destination, state);\n }\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 let state = {...this.context.router.history.location.state};\n state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;\n this.context.router.history.push(`/accounts/${id}`, state);\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 handleHotkeyBookmark = e => {\n this.props.onBookmark(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 let state = {...this.context.router.history.location.state};\n state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;\n this.context.router.history.push(`/statuses/${this.props.status.get('id')}`, state);\n }\n\n handleHotkeyOpenProfile = () => {\n let state = {...this.context.router.history.location.state};\n state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;\n this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`, state);\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 handleHotkeyCollapse = e => {\n if (!this.props.settings.getIn(['collapsed', 'enabled']))\n return;\n\n this.setCollapsed(!this.state.isCollapsed);\n }\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 (status.get('poll')) {\n media = ;\n mediaIcon = 'tasks';\n } else 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 bookmark: this.handleHotkeyBookmark,\n toggleCollapse: this.handleHotkeyCollapse,\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}\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 };","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 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;","import { StyleSheet } from '@emotion/sheet';\nimport Stylis from '@emotion/stylis';\nimport '@emotion/weak-memoize'; // 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\n\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};\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 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;","/* 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;","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};\nexport default unitlessKeys;","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;","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\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;\n\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 };","var isBrowser = \"object\" !== 'undefined';\n\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}\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 current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles };","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;","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport DropdownMenuContainer from '../../../containers/dropdown_menu_container';\nimport { defineMessages, injectIntl } from 'react-intl';\n\nconst messages = defineMessages({\n edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' },\n pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned toots' },\n preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },\n follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },\n favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' },\n lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },\n blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },\n domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },\n mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },\n filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' },\n});\n\nexport default @injectIntl\nclass ActionBar extends React.PureComponent {\n\n static propTypes = {\n account: ImmutablePropTypes.map.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n render () {\n const { intl } = this.props;\n\n let menu = [];\n\n menu.push({ text: intl.formatMessage(messages.preferences), href: '/user-settings' });\n menu.push({ text: intl.formatMessage(messages.pins), to: '/pinned' });\n menu.push(null);\n menu.push({ text: intl.formatMessage(messages.follow_requests), to: '/follow_requests' });\n menu.push({ text: intl.formatMessage(messages.favourites), to: '/favourites' });\n menu.push({ text: intl.formatMessage(messages.lists), to: '/lists' });\n menu.push(null);\n menu.push({ text: intl.formatMessage(messages.mutes), to: '/mutes' });\n menu.push({ text: intl.formatMessage(messages.blocks), to: '/blocks' });\n menu.push({ text: intl.formatMessage(messages.domain_blocks), to: '/domain_blocks' });\n menu.push({ text: intl.formatMessage(messages.filters), href: '/filters' });\n\n return (\n
\n
\n \n
\n
\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ActionBar from './action_bar';\nimport Avatar from '../../../components/avatar';\nimport Permalink from '../../../components/permalink';\nimport IconButton from '../../../components/icon_button';\nimport { FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\nexport default class NavigationBar extends ImmutablePureComponent {\n\n static propTypes = {\n account: ImmutablePropTypes.map.isRequired,\n onClose: PropTypes.func,\n };\n\n render () {\n return (\n