\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 ImmutablePropTypes from 'react-immutable-proptypes';\nimport IconButton from './icon_button';\nimport Overlay from 'react-overlays/lib/Overlay';\nimport Motion from '../features/ui/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport detectPassiveEvents from 'detect-passive-events';\n\nconst listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;\nlet id = 0;\n\nclass DropdownMenu extends React.PureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    items: PropTypes.array.isRequired,\n    onClose: PropTypes.func.isRequired,\n    style: PropTypes.object,\n    placement: PropTypes.string,\n    arrowOffsetLeft: PropTypes.string,\n    arrowOffsetTop: PropTypes.string,\n    openedViaKeyboard: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    style: {},\n    placement: 'bottom',\n  };\n\n  state = {\n    mounted: false,\n  };\n\n  handleDocumentClick = e => {\n    if (this.node && !this.node.contains(e.target)) {\n      this.props.onClose();\n    }\n  }\n\n  componentDidMount () {\n    document.addEventListener('click', this.handleDocumentClick, false);\n    document.addEventListener('keydown', this.handleKeyDown, false);\n    document.addEventListener('touchend', this.handleDocumentClick, listenerOptions);\n    if (this.focusedItem && this.props.openedViaKeyboard) {\n      this.focusedItem.focus();\n    }\n    this.setState({ mounted: true });\n  }\n\n  componentWillUnmount () {\n    document.removeEventListener('click', this.handleDocumentClick, false);\n    document.removeEventListener('keydown', this.handleKeyDown, false);\n    document.removeEventListener('touchend', this.handleDocumentClick, listenerOptions);\n  }\n\n  setRef = c => {\n    this.node = c;\n  }\n\n  setFocusRef = c => {\n    this.focusedItem = c;\n  }\n\n  handleKeyDown = e => {\n    const items = Array.from(this.node.getElementsByTagName('a'));\n    const index = items.indexOf(document.activeElement);\n    let element;\n\n    switch(e.key) {\n    case 'ArrowDown':\n      element = items[index+1];\n      if (element) {\n        element.focus();\n      }\n      break;\n    case 'ArrowUp':\n      element = items[index-1];\n      if (element) {\n        element.focus();\n      }\n      break;\n    case 'Tab':\n      if (e.shiftKey) {\n        element = items[index-1] || items[items.length-1];\n      } else {\n        element = items[index+1] || items[0];\n      }\n      if (element) {\n        element.focus();\n        e.preventDefault();\n        e.stopPropagation();\n      }\n      break;\n    case 'Home':\n      element = items[0];\n      if (element) {\n        element.focus();\n      }\n      break;\n    case 'End':\n      element = items[items.length-1];\n      if (element) {\n        element.focus();\n      }\n      break;\n    case 'Escape':\n      this.props.onClose();\n      break;\n    }\n  }\n\n  handleItemKeyPress = e => {\n    if (e.key === 'Enter' || e.key === ' ') {\n      this.handleClick(e);\n    }\n  }\n\n  handleClick = e => {\n    const i = Number(e.currentTarget.getAttribute('data-index'));\n    const { action, to } = this.props.items[i];\n\n    this.props.onClose();\n\n    if (typeof action === 'function') {\n      e.preventDefault();\n      action(e);\n    } else if (to) {\n      e.preventDefault();\n      this.context.router.history.push(to);\n    }\n  }\n\n  renderItem (option, i) {\n    if (option === null) {\n      return \n        \n          {text}\n         \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              {items.map((option, i) => this.renderItem(option, i))}\n             \n          
 \n    );\n  }\n\n}\n\nexport default class Dropdown extends React.PureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    icon: PropTypes.string.isRequired,\n    items: PropTypes.array.isRequired,\n    size: PropTypes.number.isRequired,\n    title: PropTypes.string,\n    disabled: PropTypes.bool,\n    status: ImmutablePropTypes.map,\n    isUserTouching: PropTypes.func,\n    isModalOpen: PropTypes.bool.isRequired,\n    onOpen: PropTypes.func.isRequired,\n    onClose: PropTypes.func.isRequired,\n    dropdownPlacement: PropTypes.string,\n    openDropdownId: PropTypes.number,\n    openedViaKeyboard: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    title: 'Menu',\n  };\n\n  state = {\n    id: id++,\n  };\n\n  handleClick = ({ target, type }) => {\n    if (this.state.id === this.props.openDropdownId) {\n      this.handleClose();\n    } else {\n      const { top } = target.getBoundingClientRect();\n      const placement = top * 2 < innerHeight ? 'bottom' : 'top';\n      this.props.onOpen(this.state.id, this.handleItemClick, placement, type !== 'click');\n    }\n  }\n\n  handleClose = () => {\n    if (this.activeElement) {\n      this.activeElement.focus();\n      this.activeElement = null;\n    }\n    this.props.onClose(this.state.id);\n  }\n\n  handleMouseDown = () => {\n    if (!this.state.open) {\n      this.activeElement = document.activeElement;\n    }\n  }\n\n  handleButtonKeyDown = (e) => {\n    switch(e.key) {\n    case ' ':\n    case 'Enter':\n      this.handleMouseDown();\n      break;\n    }\n  }\n\n  handleKeyPress = (e) => {\n    switch(e.key) {\n    case ' ':\n    case 'Enter':\n      this.handleClick(e);\n      e.stopPropagation();\n      e.preventDefault();\n      break;\n    }\n  }\n\n  handleItemClick = e => {\n    const i = Number(e.currentTarget.getAttribute('data-index'));\n    const { action, to } = this.props.items[i];\n\n    this.handleClose();\n\n    if (typeof action === 'function') {\n      e.preventDefault();\n      action();\n    } else if (to) {\n      e.preventDefault();\n      this.context.router.history.push(to);\n    }\n  }\n\n  setTargetRef = c => {\n    this.target = c;\n  }\n\n  findTarget = () => {\n    return this.target;\n  }\n\n  componentWillUnmount = () => {\n    if (this.state.id === this.props.openDropdownId) {\n      this.handleClose();\n    }\n  }\n\n  render () {\n    const { icon, items, size, title, disabled, dropdownPlacement, openDropdownId, openedViaKeyboard } = this.props;\n    const open = this.state.id === openDropdownId;\n\n    return (\n      \n        \n           \n      
\n    );\n  }\n\n}\n","import { openDropdownMenu, closeDropdownMenu } from '../actions/dropdown_menu';\nimport { openModal, closeModal } from '../actions/modal';\nimport { connect } from 'react-redux';\nimport DropdownMenu from '../components/dropdown_menu';\nimport { isUserTouching } from '../is_mobile';\n\nconst mapStateToProps = state => ({\n  isModalOpen: state.get('modal').modalType === 'ACTIONS',\n  dropdownPlacement: state.getIn(['dropdown_menu', 'placement']),\n  openDropdownId: state.getIn(['dropdown_menu', 'openId']),\n  openedViaKeyboard: state.getIn(['dropdown_menu', 'keyboard']),\n});\n\nconst mapDispatchToProps = (dispatch, { status, items }) => ({\n  onOpen(id, onItemClick, dropdownPlacement, keyboard) {\n    dispatch(isUserTouching() ? openModal('ACTIONS', {\n      status,\n      actions: items,\n      onClick: onItemClick,\n    }) : openDropdownMenu(id, dropdownPlacement, keyboard));\n  },\n  onClose(id) {\n    dispatch(closeModal('ACTIONS'));\n    dispatch(closeDropdownMenu(id));\n  },\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(DropdownMenu);\n","import Rails from 'rails-ujs';\n\nexport const logOut = () => {\n  const form = document.createElement('form');\n\n  const methodInput = document.createElement('input');\n  methodInput.setAttribute('name', '_method');\n  methodInput.setAttribute('value', 'delete');\n  methodInput.setAttribute('type', 'hidden');\n  form.appendChild(methodInput);\n\n  const csrfToken = Rails.csrfToken();\n  const csrfParam = Rails.csrfParam();\n\n  if (csrfParam && csrfToken) {\n    const csrfInput = document.createElement('input');\n    csrfInput.setAttribute('name', csrfParam);\n    csrfInput.setAttribute('value', csrfToken);\n    csrfInput.setAttribute('type', 'hidden');\n    form.appendChild(csrfInput);\n  }\n\n  const submitButton = document.createElement('input');\n  submitButton.setAttribute('type', 'submit');\n  form.appendChild(submitButton);\n\n  form.method = 'post';\n  form.action = '/auth/sign_out';\n  form.style.display = 'none';\n\n  document.body.appendChild(form);\n  submitButton.click();\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Icon from 'flavours/glitch/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          {iconElement}\n          {type}\n         \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          {iconElement}\n          {type}\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;","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        {header}\n        {children}\n      
\n    );\n  }\n\n}\n","import React from 'react';\nimport ColumnHeader from './column_header';\nimport PropTypes from 'prop-types';\nimport { debounce } from 'lodash';\nimport { scrollTop } from '../../../scroll';\nimport { isMobile } from '../../../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  };\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 } = 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        {header}\n        {children}\n      
\n    );\n  }\n\n}\n","/**\n * Buttons widget for controlling the notification clearing mode.\n * In idle state, the cleaning mode button is shown. When the mode is active,\n * a Confirm and Abort buttons are shown in its place.\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';\nimport Icon from 'flavours/glitch/components/icon';\n\nconst messages = defineMessages({\n  btnAll : { id: 'notification_purge.btn_all', defaultMessage: 'Select\\nall' },\n  btnNone : { id: 'notification_purge.btn_none', defaultMessage: 'Select\\nnone' },\n  btnInvert : { id: 'notification_purge.btn_invert', defaultMessage: 'Invert\\nselection' },\n  btnApply : { id: 'notification_purge.btn_apply', defaultMessage: 'Clear\\nselected' },\n});\n\nexport default @injectIntl\nclass NotificationPurgeButtons extends ImmutablePureComponent {\n\n  static propTypes = {\n    onDeleteMarked : PropTypes.func.isRequired,\n    onMarkAll : PropTypes.func.isRequired,\n    onMarkNone : PropTypes.func.isRequired,\n    onInvert : PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n    markNewForDelete: PropTypes.bool,\n  };\n\n  render () {\n    const { intl, markNewForDelete } = this.props;\n\n    //className='active'\n    return (\n      \n        \n          ∀  \n\n        \n          ∅  \n\n        \n          ¬  \n\n        \n           \n      
\n    );\n  }\n\n}\n","//  Package imports.\nimport { connect } from 'react-redux';\nimport { defineMessages, injectIntl } from 'react-intl';\n\n//  Our imports.\nimport NotificationPurgeButtons from 'flavours/glitch/components/notification_purge_buttons';\nimport {\n  deleteMarkedNotifications,\n  enterNotificationClearingMode,\n  markAllNotifications,\n} from 'flavours/glitch/actions/notifications';\nimport { openModal } from 'flavours/glitch/actions/modal';\n\nconst messages = defineMessages({\n  clearMessage: { id: 'notifications.marked_clear_confirmation', defaultMessage: 'Are you sure you want to permanently clear all selected notifications?' },\n  clearConfirm: { id: 'notifications.marked_clear', defaultMessage: 'Clear selected notifications' },\n});\n\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n  onEnterCleaningMode(yes) {\n    dispatch(enterNotificationClearingMode(yes));\n  },\n\n  onDeleteMarked() {\n    dispatch(openModal('CONFIRM', {\n      message: intl.formatMessage(messages.clearMessage),\n      confirm: intl.formatMessage(messages.clearConfirm),\n      onConfirm: () => dispatch(deleteMarkedNotifications()),\n    }));\n  },\n\n  onMarkAll() {\n    dispatch(markAllNotifications(true));\n  },\n\n  onMarkNone() {\n    dispatch(markAllNotifications(false));\n  },\n\n  onInvert() {\n    dispatch(markAllNotifications(null));\n  },\n});\n\nconst mapStateToProps = state => ({\n  markNewForDelete: state.getIn(['notifications', 'markNewForDelete']),\n});\n\nexport default injectIntl(connect(mapStateToProps, mapDispatchToProps)(NotificationPurgeButtons));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { defineMessages, FormattedMessage, injectIntl } from 'react-intl';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Icon from 'flavours/glitch/components/icon';\n\nimport NotificationPurgeButtonsContainer from 'flavours/glitch/containers/notification_purge_buttons_container';\n\nconst messages = defineMessages({\n  show: { id: 'column_header.show_settings', defaultMessage: 'Show settings' },\n  hide: { id: 'column_header.hide_settings', defaultMessage: 'Hide settings' },\n  moveLeft: { id: 'column_header.moveLeft_settings', defaultMessage: 'Move column to the left' },\n  moveRight: { id: 'column_header.moveRight_settings', defaultMessage: 'Move column to the right' },\n  enterNotifCleaning : { id: 'notification_purge.start', defaultMessage: 'Enter notification cleaning mode' },\n});\n\nexport default @injectIntl\nclass ColumnHeader extends React.PureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    intl: PropTypes.object.isRequired,\n    title: PropTypes.node,\n    icon: PropTypes.string,\n    active: PropTypes.bool,\n    localSettings : ImmutablePropTypes.map,\n    multiColumn: PropTypes.bool,\n    extraButton: PropTypes.node,\n    showBackButton: PropTypes.bool,\n    notifCleaning: PropTypes.bool, // true only for the notification column\n    notifCleaningActive: PropTypes.bool,\n    onEnterCleaningMode: PropTypes.func,\n    children: PropTypes.node,\n    pinned: PropTypes.bool,\n    onPin: PropTypes.func,\n    onMove: PropTypes.func,\n    onClick: PropTypes.func,\n    intl: PropTypes.object.isRequired,\n  };\n\n  state = {\n    collapsed: true,\n    animating: false,\n    animatingNCD: false,\n  };\n\n  historyBack = (skip) => {\n    // if history is exhausted, or we would leave mastodon, just go to root.\n    if (window.history.state) {\n      const state = this.context.router.history.location.state;\n      if (skip && state && state.mastodonBackSteps) {\n        this.context.router.history.go(-state.mastodonBackSteps);\n      } else {\n        this.context.router.history.goBack();\n      }\n    } else {\n      this.context.router.history.push('/');\n    }\n  }\n\n  handleToggleClick = (e) => {\n    e.stopPropagation();\n    this.setState({ collapsed: !this.state.collapsed, animating: true });\n  }\n\n  handleTitleClick = () => {\n    this.props.onClick();\n  }\n\n  handleMoveLeft = () => {\n    this.props.onMove(-1);\n  }\n\n  handleMoveRight = () => {\n    this.props.onMove(1);\n  }\n\n  handleBackClick = (event) => {\n    this.historyBack(event.shiftKey);\n  }\n\n  handleTransitionEnd = () => {\n    this.setState({ animating: false });\n  }\n\n  handleTransitionEndNCD = () => {\n    this.setState({ animatingNCD: false });\n  }\n\n  handlePin = () => {\n    if (!this.props.pinned) {\n      this.historyBack();\n    }\n    this.props.onPin();\n  }\n\n  onEnterCleaningMode = () => {\n    this.setState({ animatingNCD: true });\n    this.props.onEnterCleaningMode(!this.props.notifCleaningActive);\n  }\n\n  render () {\n    const { intl, icon, active, children, pinned, multiColumn, extraButton, showBackButton, intl: { formatMessage }, notifCleaning, notifCleaningActive } = this.props;\n    const { collapsed, animating, animatingNCD } = this.state;\n\n    let title = this.props.title;\n\n    const wrapperClassName = classNames('column-header__wrapper', {\n      'active': active,\n    });\n\n    const buttonClassName = classNames('column-header', {\n      'active': active,\n    });\n\n    const collapsibleClassName = classNames('column-header__collapsible', {\n      'collapsed': collapsed,\n      'animating': animating,\n    });\n\n    const collapsibleButtonClassName = classNames('column-header__button', {\n      'active': !collapsed,\n    });\n\n    const notifCleaningButtonClassName = classNames('column-header__button', {\n      'active': notifCleaningActive,\n    });\n\n    const notifCleaningDrawerClassName = classNames('ncd column-header__collapsible', {\n      'collapsed': !notifCleaningActive,\n      'animating': animatingNCD,\n    });\n\n    let extraContent, pinButton, moveButtons, backButton, collapseButton;\n\n    //*glitch\n    const msgEnterNotifCleaning = intl.formatMessage(messages.enterNotifCleaning);\n\n    if (children) {\n      extraContent = (\n        \n          {children}\n        
\n      );\n    }\n\n    if (multiColumn && pinned) {\n      pinButton = \n          
\n      );\n    } else if (multiColumn) {\n      pinButton = \n           \n      );\n    }\n\n    const collapsedContent = [\n      extraContent,\n    ];\n\n    if (multiColumn) {\n      collapsedContent.push(moveButtons);\n      collapsedContent.push(pinButton);\n    }\n\n    if (children || multiColumn) {\n      collapseButton = \n        
\n          {hasTitle && (\n            \n               \n          )}\n\n          {!hasTitle && backButton}\n\n           \n            {hasTitle && backButton}\n            {extraButton}\n            { notifCleaning ? (\n              \n                 \n            ) : null}\n            {collapseButton}\n          
\n        \n\n        { notifCleaning ? (\n          
\n            
\n              {(notifCleaningActive || animatingNCD) ? (
\n          
\n        ) : null}\n\n        
\n          
\n            {(!collapsed || animating) && collapsedContent}\n          
\n        
\n      
\n          {children}\n        
\n      );\n    }\n\n    if (multiColumn && pinned) {\n      pinButton = \n          
\n      );\n    } else if (multiColumn && this.props.onPin) {\n      pinButton = \n           \n      );\n    }\n\n    const collapsedContent = [\n      extraContent,\n    ];\n\n    if (multiColumn) {\n      collapsedContent.push(moveButtons);\n      collapsedContent.push(pinButton);\n    }\n\n    if (children || (multiColumn && this.props.onPin)) {\n      collapseButton = \n        
\n          {hasTitle && (\n            \n               \n          )}\n\n          {!hasTitle && backButton}\n\n           \n            {hasTitle && backButton}\n            {extraButton}\n            {collapseButton}\n          
\n        \n\n        
\n          
\n            {(!collapsed || animating) && collapsedContent}\n          
\n        
\n      
\n         \n    );\n\n    if (multiColumn) {\n      return component;\n    } else {\n      // The portal container and the component may be rendered to the DOM in\n      // the same React render pass, so the container might not be available at\n      // the time `render()` is called.\n      const container = document.getElementById('tabs-bar__portal');\n      if (container === null) {\n        // The container wasn't available, force a re-render so that the\n        // component can eventually be inserted in the container and not scroll\n        // with the rest of the area.\n        this.forceUpdate();\n        return component;\n      } else {\n        return createPortal(component, container);\n      }\n    }\n  }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport detectPassiveEvents from 'detect-passive-events';\nimport { scrollTop } from 'flavours/glitch/util/scroll';\n\nexport default class Column extends React.PureComponent {\n\n  static propTypes = {\n    children: PropTypes.node,\n    extraClasses: PropTypes.string,\n    name: PropTypes.string,\n    label: PropTypes.string,\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  handleWheel = () => {\n    if (typeof this._interruptScrollAnimation !== 'function') {\n      return;\n    }\n\n    this._interruptScrollAnimation();\n  }\n\n  setRef = c => {\n    this.node = c;\n  }\n\n  componentDidMount () {\n    this.node.addEventListener('wheel', this.handleWheel,  detectPassiveEvents.hasSupport ? { passive: true } : false);\n  }\n\n  componentWillUnmount () {\n    this.node.removeEventListener('wheel', this.handleWheel);\n  }\n\n  render () {\n    const { children, extraClasses, name, label } = this.props;\n\n    return (\n      \n        {children}\n      
\n    );\n  }\n\n}\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport Icon from 'flavours/glitch/components/icon';\n\nexport default class ColumnBackButtonSlim extends React.PureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  handleClick = (event) => {\n    // if history is exhausted, or we would leave mastodon, just go to root.\n    if (window.history.state) {\n      const state = this.context.router.history.location.state;\n      if (event.shiftKey && state && state.mastodonBackSteps) {\n        this.context.router.history.go(-state.mastodonBackSteps);\n      } else {\n        this.context.router.history.goBack();\n      }\n    } else {\n      this.context.router.history.push('/');\n    }\n  }\n\n  render () {\n    return (\n      \n    );\n  }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport detectPassiveEvents from 'detect-passive-events';\nimport { scrollTop } from '../scroll';\n\nexport default class Column extends React.PureComponent {\n\n  static propTypes = {\n    children: PropTypes.node,\n    label: PropTypes.string,\n    bindToDocument: PropTypes.bool,\n  };\n\n  scrollTop () {\n    const scrollable = this.props.bindToDocument ? document.scrollingElement : this.node.querySelector('.scrollable');\n\n    if (!scrollable) {\n      return;\n    }\n\n    this._interruptScrollAnimation = scrollTop(scrollable);\n  }\n\n  handleWheel = () => {\n    if (typeof this._interruptScrollAnimation !== 'function') {\n      return;\n    }\n\n    this._interruptScrollAnimation();\n  }\n\n  setRef = c => {\n    this.node = c;\n  }\n\n  componentDidMount () {\n    if (this.props.bindToDocument) {\n      document.addEventListener('wheel', this.handleWheel,  detectPassiveEvents.hasSupport ? { passive: true } : false);\n    } else {\n      this.node.addEventListener('wheel', this.handleWheel,  detectPassiveEvents.hasSupport ? { passive: true } : false);\n    }\n  }\n\n  componentWillUnmount () {\n    if (this.props.bindToDocument) {\n      document.removeEventListener('wheel', this.handleWheel);\n    } else {\n      this.node.removeEventListener('wheel', this.handleWheel);\n    }\n  }\n\n  render () {\n    const { label, children } = this.props;\n\n    return (\n      \n        {children}\n      
\n    );\n  }\n\n}\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport ColumnBackButton from './column_back_button';\nimport Icon from 'mastodon/components/icon';\n\nexport default class ColumnBackButtonSlim extends ColumnBackButton {\n\n  render () {\n    return (\n      \n    );\n  }\n\n}\n","import WebSocketClient from 'websocket.js';\n\nconst randomIntUpTo = max => Math.floor(Math.random() * Math.floor(max));\n\nexport function connectStream(path, pollingRefresh = null, callbacks = () => ({ onConnect() {}, onDisconnect() {}, onReceive() {} })) {\n  return (dispatch, getState) => {\n    const streamingAPIBaseURL = getState().getIn(['meta', 'streaming_api_base_url']);\n    const accessToken = getState().getIn(['meta', 'access_token']);\n    const { onConnect, onDisconnect, onReceive } = callbacks(dispatch, getState);\n\n    let polling = null;\n\n    const setupPolling = () => {\n      pollingRefresh(dispatch, () => {\n        polling = setTimeout(() => setupPolling(), 20000 + randomIntUpTo(20000));\n      });\n    };\n\n    const clearPolling = () => {\n      if (polling) {\n        clearTimeout(polling);\n        polling = null;\n      }\n    };\n\n    const subscription = getStream(streamingAPIBaseURL, accessToken, path, {\n      connected () {\n        if (pollingRefresh) {\n          clearPolling();\n        }\n\n        onConnect();\n      },\n\n      disconnected () {\n        if (pollingRefresh) {\n          polling = setTimeout(() => setupPolling(), randomIntUpTo(40000));\n        }\n\n        onDisconnect();\n      },\n\n      received (data) {\n        onReceive(data);\n      },\n\n      reconnected () {\n        if (pollingRefresh) {\n          clearPolling();\n          pollingRefresh(dispatch);\n        }\n\n        onConnect();\n      },\n\n    });\n\n    const disconnect = () => {\n      if (subscription) {\n        subscription.close();\n      }\n\n      clearPolling();\n    };\n\n    return disconnect;\n  };\n}\n\n\nexport default function getStream(streamingAPIBaseURL, accessToken, stream, { connected, received, disconnected, reconnected }) {\n  const params = [ `stream=${stream}` ];\n\n  const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?${params.join('&')}`, accessToken);\n\n  ws.onopen      = connected;\n  ws.onmessage   = e => {\n    if (e.data !== '')\n      received(JSON.parse(e.data));\n  };\n  ws.onclose     = disconnected;\n  ws.onreconnect = reconnected;\n\n  return ws;\n};\n","import { connectStream } from 'flavours/glitch/util/stream';\nimport {\n  updateTimeline,\n  deleteFromTimelines,\n  expandHomeTimeline,\n  connectTimeline,\n  disconnectTimeline,\n} from './timelines';\nimport { updateNotifications, expandNotifications } from './notifications';\nimport { updateConversations } from './conversations';\nimport { fetchFilters } from './filters';\nimport { getLocale } from 'mastodon/locales';\n\nconst { messages } = getLocale();\n\nexport function connectTimelineStream (timelineId, path, pollingRefresh = null, accept = null) {\n\n  return connectStream (path, pollingRefresh, (dispatch, getState) => {\n    const locale = getState().getIn(['meta', 'locale']);\n\n    return {\n      onConnect() {\n        dispatch(connectTimeline(timelineId));\n      },\n\n      onDisconnect() {\n        dispatch(disconnectTimeline(timelineId));\n      },\n\n      onReceive (data) {\n        switch(data.event) {\n        case 'update':\n          dispatch(updateTimeline(timelineId, JSON.parse(data.payload), accept));\n          break;\n        case 'delete':\n          dispatch(deleteFromTimelines(data.payload));\n          break;\n        case 'notification':\n          dispatch(updateNotifications(JSON.parse(data.payload), messages, locale));\n          break;\n        case 'conversation':\n          dispatch(updateConversations(JSON.parse(data.payload)));\n          break;\n        case 'filters_changed':\n          dispatch(fetchFilters());\n          break;\n        }\n      },\n    };\n  });\n}\n\nconst refreshHomeTimelineAndNotification = (dispatch, done) => {\n  dispatch(expandHomeTimeline({}, () => dispatch(expandNotifications({}, done))));\n};\n\nexport const connectUserStream      = () => connectTimelineStream('home', 'user', refreshHomeTimelineAndNotification);\nexport const connectCommunityStream = ({ onlyMedia } = {}) => connectTimelineStream(`community${onlyMedia ? ':media' : ''}`, `public:local${onlyMedia ? ':media' : ''}`);\nexport const connectPublicStream    = ({ onlyMedia } = {}) => connectTimelineStream(`public${onlyMedia ? ':media' : ''}`, `public${onlyMedia ? ':media' : ''}`);\nexport const connectHashtagStream   = (id, tag, accept) => connectTimelineStream(`hashtag:${id}`, `hashtag&tag=${tag}`, null, accept);\nexport const connectDirectStream    = () => connectTimelineStream('direct', 'direct');\nexport const connectListStream      = id => connectTimelineStream(`list:${id}`, `list&list=${id}`);\n","import WebSocketClient from 'websocket.js';\n\nconst randomIntUpTo = max => Math.floor(Math.random() * Math.floor(max));\n\nexport function connectStream(path, pollingRefresh = null, callbacks = () => ({ onConnect() {}, onDisconnect() {}, onReceive() {} })) {\n  return (dispatch, getState) => {\n    const streamingAPIBaseURL = getState().getIn(['meta', 'streaming_api_base_url']);\n    const accessToken = getState().getIn(['meta', 'access_token']);\n    const { onConnect, onDisconnect, onReceive } = callbacks(dispatch, getState);\n\n    let polling = null;\n\n    const setupPolling = () => {\n      pollingRefresh(dispatch, () => {\n        polling = setTimeout(() => setupPolling(), 20000 + randomIntUpTo(20000));\n      });\n    };\n\n    const clearPolling = () => {\n      if (polling) {\n        clearTimeout(polling);\n        polling = null;\n      }\n    };\n\n    const subscription = getStream(streamingAPIBaseURL, accessToken, path, {\n      connected () {\n        if (pollingRefresh) {\n          clearPolling();\n        }\n\n        onConnect();\n      },\n\n      disconnected () {\n        if (pollingRefresh) {\n          polling = setTimeout(() => setupPolling(), randomIntUpTo(40000));\n        }\n\n        onDisconnect();\n      },\n\n      received (data) {\n        onReceive(data);\n      },\n\n      reconnected () {\n        if (pollingRefresh) {\n          clearPolling();\n          pollingRefresh(dispatch);\n        }\n\n        onConnect();\n      },\n\n    });\n\n    const disconnect = () => {\n      if (subscription) {\n        subscription.close();\n      }\n\n      clearPolling();\n    };\n\n    return disconnect;\n  };\n}\n\n\nexport default function getStream(streamingAPIBaseURL, accessToken, stream, { connected, received, disconnected, reconnected }) {\n  const params = [ `stream=${stream}` ];\n\n  const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?${params.join('&')}`, accessToken);\n\n  ws.onopen      = connected;\n  ws.onmessage   = e => {\n    if (e.data !== '')\n      received(JSON.parse(e.data));\n  };\n  ws.onclose     = disconnected;\n  ws.onreconnect = reconnected;\n\n  return ws;\n};\n","import { connectStream } from '../stream';\nimport {\n  updateTimeline,\n  deleteFromTimelines,\n  expandHomeTimeline,\n  connectTimeline,\n  disconnectTimeline,\n} from './timelines';\nimport { updateNotifications, expandNotifications } from './notifications';\nimport { updateConversations } from './conversations';\nimport { fetchFilters } from './filters';\nimport { getLocale } from '../locales';\n\nconst { messages } = getLocale();\n\nexport function connectTimelineStream (timelineId, path, pollingRefresh = null, accept = null) {\n\n  return connectStream (path, pollingRefresh, (dispatch, getState) => {\n    const locale = getState().getIn(['meta', 'locale']);\n\n    return {\n      onConnect() {\n        dispatch(connectTimeline(timelineId));\n      },\n\n      onDisconnect() {\n        dispatch(disconnectTimeline(timelineId));\n      },\n\n      onReceive (data) {\n        switch(data.event) {\n        case 'update':\n          dispatch(updateTimeline(timelineId, JSON.parse(data.payload), accept));\n          break;\n        case 'delete':\n          dispatch(deleteFromTimelines(data.payload));\n          break;\n        case 'notification':\n          dispatch(updateNotifications(JSON.parse(data.payload), messages, locale));\n          break;\n        case 'conversation':\n          dispatch(updateConversations(JSON.parse(data.payload)));\n          break;\n        case 'filters_changed':\n          dispatch(fetchFilters());\n          break;\n        }\n      },\n    };\n  });\n}\n\nconst refreshHomeTimelineAndNotification = (dispatch, done) => {\n  dispatch(expandHomeTimeline({}, () => dispatch(expandNotifications({}, done))));\n};\n\nexport const connectUserStream      = () => connectTimelineStream('home', 'user', refreshHomeTimelineAndNotification);\nexport const connectCommunityStream = ({ onlyMedia } = {}) => connectTimelineStream(`community${onlyMedia ? ':media' : ''}`, `public:local${onlyMedia ? ':media' : ''}`);\nexport const connectPublicStream    = ({ onlyMedia } = {}) => connectTimelineStream(`public${onlyMedia ? ':media' : ''}`, `public${onlyMedia ? ':media' : ''}`);\nexport const connectHashtagStream   = (id, tag, accept) => connectTimelineStream(`hashtag:${id}`, `hashtag&tag=${tag}`, null, accept);\nexport const connectDirectStream    = () => connectTimelineStream('direct', 'direct');\nexport const connectListStream      = id => connectTimelineStream(`list:${id}`, `list&list=${id}`);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport IconButton from './icon_button';\nimport Overlay from 'react-overlays/lib/Overlay';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport detectPassiveEvents from 'detect-passive-events';\n\nconst listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;\nlet id = 0;\n\nclass DropdownMenu extends React.PureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    items: PropTypes.array.isRequired,\n    onClose: PropTypes.func.isRequired,\n    style: PropTypes.object,\n    placement: PropTypes.string,\n    arrowOffsetLeft: PropTypes.string,\n    arrowOffsetTop: PropTypes.string,\n    openedViaKeyboard: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    style: {},\n    placement: 'bottom',\n  };\n\n  state = {\n    mounted: false,\n  };\n\n  handleDocumentClick = e => {\n    if (this.node && !this.node.contains(e.target)) {\n      this.props.onClose();\n    }\n  }\n\n  componentDidMount () {\n    document.addEventListener('click', this.handleDocumentClick, false);\n    document.addEventListener('keydown', this.handleKeyDown, false);\n    document.addEventListener('touchend', this.handleDocumentClick, listenerOptions);\n    if (this.focusedItem && this.props.openedViaKeyboard) {\n      this.focusedItem.focus();\n    }\n    this.setState({ mounted: true });\n  }\n\n  componentWillUnmount () {\n    document.removeEventListener('click', this.handleDocumentClick, false);\n    document.removeEventListener('keydown', this.handleKeyDown, false);\n    document.removeEventListener('touchend', this.handleDocumentClick, listenerOptions);\n  }\n\n  setRef = c => {\n    this.node = c;\n  }\n\n  setFocusRef = c => {\n    this.focusedItem = c;\n  }\n\n  handleKeyDown = e => {\n    const items = Array.from(this.node.getElementsByTagName('a'));\n    const index = items.indexOf(document.activeElement);\n    let element;\n\n    switch(e.key) {\n    case 'ArrowDown':\n      element = items[index+1];\n      if (element) {\n        element.focus();\n      }\n      break;\n    case 'ArrowUp':\n      element = items[index-1];\n      if (element) {\n        element.focus();\n      }\n      break;\n    case 'Tab':\n      if (e.shiftKey) {\n        element = items[index-1] || items[items.length-1];\n      } else {\n        element = items[index+1] || items[0];\n      }\n      if (element) {\n        element.focus();\n        e.preventDefault();\n        e.stopPropagation();\n      }\n      break;\n    case 'Home':\n      element = items[0];\n      if (element) {\n        element.focus();\n      }\n      break;\n    case 'End':\n      element = items[items.length-1];\n      if (element) {\n        element.focus();\n      }\n      break;\n    case 'Escape':\n      this.props.onClose();\n      break;\n    }\n  }\n\n  handleItemKeyPress = e => {\n    if (e.key === 'Enter' || e.key === ' ') {\n      this.handleClick(e);\n    }\n  }\n\n  handleClick = e => {\n    const i = Number(e.currentTarget.getAttribute('data-index'));\n    const { action, to } = this.props.items[i];\n\n    this.props.onClose();\n\n    if (typeof action === 'function') {\n      e.preventDefault();\n      action();\n    } else if (to) {\n      e.preventDefault();\n      this.context.router.history.push(to);\n    }\n  }\n\n  renderItem (option, i) {\n    if (option === null) {\n      return \n        \n          {text}\n         \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              {items.map((option, i) => this.renderItem(option, i))}\n             \n          
 \n    );\n  }\n\n}\n\nexport default class Dropdown extends React.PureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    icon: PropTypes.string.isRequired,\n    items: PropTypes.array.isRequired,\n    size: PropTypes.number.isRequired,\n    ariaLabel: PropTypes.string,\n    disabled: PropTypes.bool,\n    status: ImmutablePropTypes.map,\n    isUserTouching: PropTypes.func,\n    isModalOpen: PropTypes.bool.isRequired,\n    onOpen: PropTypes.func.isRequired,\n    onClose: PropTypes.func.isRequired,\n    dropdownPlacement: PropTypes.string,\n    openDropdownId: PropTypes.number,\n    openedViaKeyboard: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    ariaLabel: 'Menu',\n  };\n\n  state = {\n    id: id++,\n  };\n\n  handleClick = ({ target, type }) => {\n    if (this.state.id === this.props.openDropdownId) {\n      this.handleClose();\n    } else {\n      const { top } = target.getBoundingClientRect();\n      const placement = top * 2 < innerHeight ? 'bottom' : 'top';\n      this.props.onOpen(this.state.id, this.handleItemClick, placement, type !== 'click');\n    }\n  }\n\n  handleClose = () => {\n    if (this.activeElement) {\n      this.activeElement.focus();\n      this.activeElement = null;\n    }\n    this.props.onClose(this.state.id);\n  }\n\n  handleMouseDown = () => {\n    if (!this.state.open) {\n      this.activeElement = document.activeElement;\n    }\n  }\n\n  handleButtonKeyDown = (e) => {\n    switch(e.key) {\n    case ' ':\n    case 'Enter':\n      this.handleMouseDown();\n      break;\n    }\n  }\n\n  handleKeyPress = (e) => {\n    switch(e.key) {\n    case ' ':\n    case 'Enter':\n      this.handleClick(e);\n      e.stopPropagation();\n      e.preventDefault();\n      break;\n    }\n  }\n\n  handleItemClick = (i, e) => {\n    const { action, to } = this.props.items[i];\n\n    this.handleClose();\n\n    if (typeof action === 'function') {\n      e.preventDefault();\n      action();\n    } else if (to) {\n      e.preventDefault();\n      this.context.router.history.push(to);\n    }\n  }\n\n  setTargetRef = c => {\n    this.target = c;\n  }\n\n  findTarget = () => {\n    return this.target;\n  }\n\n  componentWillUnmount = () => {\n    if (this.state.id === this.props.openDropdownId) {\n      this.handleClose();\n    }\n  }\n\n  render () {\n    const { icon, items, size, ariaLabel, disabled, dropdownPlacement, openDropdownId, openedViaKeyboard } = this.props;\n    const open = this.state.id === openDropdownId;\n\n    return (\n      \n        \n           \n      
\n    );\n  }\n\n}\n","import { openDropdownMenu, closeDropdownMenu } from 'flavours/glitch/actions/dropdown_menu';\nimport { openModal, closeModal } from 'flavours/glitch/actions/modal';\nimport { connect } from 'react-redux';\nimport DropdownMenu from 'flavours/glitch/components/dropdown_menu';\nimport { isUserTouching } from 'flavours/glitch/util/is_mobile';\n\nconst mapStateToProps = state => ({\n  isModalOpen: state.get('modal').modalType === 'ACTIONS',\n  dropdownPlacement: state.getIn(['dropdown_menu', 'placement']),\n  openDropdownId: state.getIn(['dropdown_menu', 'openId']),\n  openedViaKeyboard: state.getIn(['dropdown_menu', 'keyboard']),\n});\n\nconst mapDispatchToProps = (dispatch, { status, items }) => ({\n  onOpen(id, onItemClick, dropdownPlacement, keyboard) {\n    dispatch(isUserTouching() ? openModal('ACTIONS', {\n      status,\n      actions: items.map(\n        (item, i) => item ? {\n          ...item,\n          name: `${item.text}-${i}`,\n          onClick: item.action ? ((e) => { return onItemClick(i, e) }) : null,\n        } : null\n      ),\n    }) : openDropdownMenu(id, dropdownPlacement, keyboard));\n  },\n  onClose(id) {\n    dispatch(closeModal('ACTIONS'));\n    dispatch(closeDropdownMenu(id));\n  },\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(DropdownMenu);\n","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Avatar from 'flavours/glitch/components/avatar';\nimport Permalink from 'flavours/glitch/components/permalink';\nimport { FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { profileLink } from 'flavours/glitch/util/backend_links';\n\nexport default class NavigationBar extends ImmutablePureComponent {\n\n  static propTypes = {\n    account: ImmutablePropTypes.map.isRequired,\n  };\n\n  render () {\n    return (\n      \n        
\n          {this.props.account.get('acct')} \n           \n\n        
\n          
\n            @{this.props.account.get('acct')} \n           \n\n          { profileLink !== undefined && (\n            
\n          )}\n        
\n      
\n    
\n      
\n        #{hashtag.get('name')} \n       \n\n      
{shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']) * 1 + hashtag.getIn(['history', 1, 'accounts']) * 1)} }} />\n     \n\n    
\n      {shortNumberFormat(hashtag.getIn(['history', 0, 'uses']) * 1 + hashtag.getIn(['history', 1, 'uses']) * 1)}\n    
\n\n    
\n       day.get('uses')).toArray()}>\n         \n    
\n  
\n    
\n      
\n        #{hashtag.get('name')} \n       \n\n      
{shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']) * 1 + hashtag.getIn(['history', 1, 'accounts']) * 1)} }} />\n     \n\n    
\n      {shortNumberFormat(hashtag.getIn(['history', 0, 'uses']) * 1 + hashtag.getIn(['history', 1, 'uses']) * 1)}\n    
\n\n    
\n       day.get('uses')).toArray()}>\n         \n    
\n  
\n        
\n          {({ opacity, scaleX, scaleY }) => (\n            \n              
\n\n              
\n                #example  @username@domain  URL  URL   \n\n              {extraInformation}\n            
 \n      
\n        
\n          {intl.formatMessage(messages.placeholder)} \n           \n\n        
\n          
\n\n        
\n           \n      
 this.props.onAccountClick(account.get('id'), e)}\n        title={`@${account.get('acct')}`}\n        key={account.get('id')}\n      >\n        
\n       \n    );\n  }\n\n  render() {\n    const { accounts, size } = this.props;\n\n    return (\n      \n        {accounts.take(4).map((account, i) => this.renderItem(account, Math.min(accounts.size, 4), i))}\n\n        {accounts.size > 4 && (\n          \n            +{accounts.size - 4}\n           \n        )}\n      
\n    );\n  }\n\n}\n","export function autoUnfoldCW (settings, status) {\n  if (!settings.getIn(['content_warnings', 'auto_unfold'])) {\n    return false;\n  }\n\n  const rawRegex = settings.getIn(['content_warnings', 'filter']);\n\n  if (!rawRegex) {\n    return true;\n  }\n\n  let regex      = null;\n\n  try {\n    regex = rawRegex && new RegExp(rawRegex.trim(), 'i');\n  } catch (e) {\n    // Bad regex, don't affect filters\n  }\n\n  if (!(status && regex)) {\n    return undefined;\n  }\n  return !regex.test(status.get('spoiler_text'));\n}\n","// Wrapper to call requestIdleCallback() to schedule low-priority work.\n// See https://developer.mozilla.org/en-US/docs/Web/API/Background_Tasks_API\n// for a good breakdown of the concepts behind this.\n\nimport Queue from 'tiny-queue';\n\nconst taskQueue = new Queue();\nlet runningRequestIdleCallback = false;\n\nfunction runTasks(deadline) {\n  while (taskQueue.length && deadline.timeRemaining() > 0) {\n    taskQueue.shift()();\n  }\n  if (taskQueue.length) {\n    requestIdleCallback(runTasks);\n  } else {\n    runningRequestIdleCallback = false;\n  }\n}\n\nfunction scheduleIdleTask(task) {\n  taskQueue.push(task);\n  if (!runningRequestIdleCallback) {\n    runningRequestIdleCallback = true;\n    requestIdleCallback(runTasks);\n  }\n}\n\nexport default scheduleIdleTask;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { autoPlayGif } from '../initial_state';\n\nexport default class AvatarOverlay extends React.PureComponent {\n\n  static propTypes = {\n    account: ImmutablePropTypes.map.isRequired,\n    friend: ImmutablePropTypes.map.isRequired,\n    animate: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    animate: autoPlayGif,\n  };\n\n  render() {\n    const { account, friend, animate } = this.props;\n\n    const baseStyle = {\n      backgroundImage: `url(${account.get(animate ? 'avatar' : 'avatar_static')})`,\n    };\n\n    const overlayStyle = {\n      backgroundImage: `url(${friend.get(animate ? 'avatar' : 'avatar_static')})`,\n    };\n\n    return (\n      \n    );\n  }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { autoPlayGif } from '../initial_state';\n\nexport default class AvatarComposite extends React.PureComponent {\n\n  static propTypes = {\n    accounts: ImmutablePropTypes.list.isRequired,\n    animate: PropTypes.bool,\n    size: PropTypes.number.isRequired,\n  };\n\n  static defaultProps = {\n    animate: autoPlayGif,\n  };\n\n  renderItem (account, size, index) {\n    const { animate } = this.props;\n\n    let width  = 50;\n    let height = 100;\n    let top    = 'auto';\n    let left   = 'auto';\n    let bottom = 'auto';\n    let right  = 'auto';\n\n    if (size === 1) {\n      width = 100;\n    }\n\n    if (size === 4 || (size === 3 && index > 0)) {\n      height = 50;\n    }\n\n    if (size === 2) {\n      if (index === 0) {\n        right = '1px';\n      } else {\n        left = '1px';\n      }\n    } else if (size === 3) {\n      if (index === 0) {\n        right = '1px';\n      } else if (index > 0) {\n        left = '1px';\n      }\n\n      if (index === 1) {\n        bottom = '1px';\n      } else if (index > 1) {\n        top = '1px';\n      }\n    } else if (size === 4) {\n      if (index === 0 || index === 2) {\n        right = '1px';\n      }\n\n      if (index === 1 || index === 3) {\n        left = '1px';\n      }\n\n      if (index < 2) {\n        bottom = '1px';\n      } else {\n        top = '1px';\n      }\n    }\n\n    const style = {\n      left: left,\n      top: top,\n      right: right,\n      bottom: bottom,\n      width: `${width}%`,\n      height: `${height}%`,\n      backgroundSize: 'cover',\n      backgroundImage: `url(${account.get(animate ? 'avatar' : 'avatar_static')})`,\n    };\n\n    return (\n      
\n    );\n  }\n\n  render() {\n    const { accounts, size } = this.props;\n\n    return (\n      \n        {accounts.take(4).map((account, i) => this.renderItem(account, Math.min(accounts.size, 4), i))}\n\n        {accounts.size > 4 && (\n          \n            +{accounts.size - 4}\n           \n        )}\n      
\n    );\n  }\n\n}\n","/**\n * Notification overlay\n */\n\n\n//  Package imports.\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport Icon from 'flavours/glitch/components/icon';\n\nconst messages = defineMessages({\n  markForDeletion: { id: 'notification.markForDeletion', defaultMessage: 'Mark for deletion' },\n});\n\nexport default @injectIntl\nclass NotificationOverlay extends ImmutablePureComponent {\n\n  static propTypes = {\n    notification    : ImmutablePropTypes.map.isRequired,\n    onMarkForDelete : PropTypes.func.isRequired,\n    show            : PropTypes.bool.isRequired,\n    intl            : PropTypes.object.isRequired,\n  };\n\n  onToggleMark = () => {\n    const mark = !this.props.notification.get('markedForDelete');\n    const id = this.props.notification.get('id');\n    this.props.onMarkForDelete(id, mark);\n  }\n\n  render () {\n    const { notification, show, intl } = this.props;\n\n    const active = notification.get('markedForDelete');\n    const label = intl.formatMessage(messages.markForDeletion);\n\n    return show ? (\n      \n        
\n          
\n            {active ? (
\n        
\n      
\n        
\n          {({ opacity, scaleX, scaleY }) => (\n            \n              
\n\n              
\n                #example  @username@domain  URL  URL   \n\n              {extraInformation}\n            
 \n      
\n        
\n          {intl.formatMessage(messages.placeholder)} \n           \n\n        
\n          
\n\n        
\n           \n      
\n        
\n          {this.props.account.get('acct')} \n           \n\n        
\n          
\n            @{this.props.account.get('acct')} \n           \n        
\n\n        
\n      
\n         \n    );\n    switch (type) {\n    case 'featured':\n      return (\n        \n          \n            {statusAvatar}\n           \n\n          \n             \n        
\n      );\n    }\n  }\n\n}\n","//  Package imports.\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, injectIntl } from 'react-intl';\n\n//  Mastodon imports.\nimport IconButton from './icon_button';\nimport VisibilityIcon from './status_visibility_icon';\nimport Icon from 'flavours/glitch/components/icon';\n\n//  Messages for use with internationalization stuff.\nconst messages = defineMessages({\n  collapse: { id: 'status.collapse', defaultMessage: 'Collapse' },\n  uncollapse: { id: 'status.uncollapse', defaultMessage: 'Uncollapse' },\n  inReplyTo: { id: 'status.in_reply_to', defaultMessage: 'This toot is a reply' },\n  previewCard: { id: 'status.has_preview_card', defaultMessage: 'Features an attached preview card' },\n  pictures: { id: 'status.has_pictures', defaultMessage: 'Features attached pictures' },\n  poll: { id: 'status.is_poll', defaultMessage: 'This toot is a poll' },\n  video: { id: 'status.has_video', defaultMessage: 'Features attached videos' },\n  audio: { id: 'status.has_audio', defaultMessage: 'Features attached audio files' },\n  localOnly: { id: 'status.local_only', defaultMessage: 'Only visible from your instance' },\n});\n\nexport default @injectIntl\nclass StatusIcons extends React.PureComponent {\n\n  static propTypes = {\n    status: ImmutablePropTypes.map.isRequired,\n    mediaIcon: PropTypes.string,\n    collapsible: PropTypes.bool,\n    collapsed: PropTypes.bool,\n    directMessage: PropTypes.bool,\n    setCollapsed: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  //  Handles clicks on collapsed button\n  handleCollapsedClick = (e) => {\n    const { collapsed, setCollapsed } = this.props;\n    if (e.button === 0) {\n      setCollapsed(!collapsed);\n      e.preventDefault();\n    }\n  }\n\n  mediaIconTitleText () {\n    const { intl, mediaIcon } = this.props;\n\n    switch (mediaIcon) {\n      case 'link':\n        return intl.formatMessage(messages.previewCard);\n      case 'picture-o':\n        return intl.formatMessage(messages.pictures);\n      case 'tasks':\n        return intl.formatMessage(messages.poll);\n      case 'video-camera':\n        return intl.formatMessage(messages.video);\n      case 'music':\n        return intl.formatMessage(messages.audio);\n    }\n  }\n\n  //  Rendering.\n  render () {\n    const {\n      status,\n      mediaIcon,\n      collapsible,\n      collapsed,\n      directMessage,\n      intl,\n    } = this.props;\n\n    return (\n      \n        {status.get('in_reply_to_id', null) !== null ? (\n          \n        ) : null}\n        {status.get('local_only') &&\n          
\n    );\n  }\n\n}\n","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport IconButton from './icon_button';\nimport DropdownMenuContainer from 'flavours/glitch/containers/dropdown_menu_container';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { me, isStaff, deleteOthersNotice } from 'flavours/glitch/util/initial_state';\nimport RelativeTimestamp from './relative_timestamp';\nimport { accountAdminLink, statusAdminLink } from 'flavours/glitch/util/backend_links';\n\nconst messages = defineMessages({\n  delete: { id: 'status.delete', defaultMessage: 'Delete' },\n  redraft: { id: 'status.redraft', defaultMessage: 'Delete & re-draft' },\n  direct: { id: 'status.direct', defaultMessage: 'Direct message @{name}' },\n  mention: { id: 'status.mention', defaultMessage: 'Mention @{name}' },\n  mute: { id: 'account.mute', defaultMessage: 'Mute @{name}' },\n  block: { id: 'account.block', defaultMessage: 'Block @{name}' },\n  reply: { id: 'status.reply', defaultMessage: 'Reply' },\n  share: { id: 'status.share', defaultMessage: 'Share' },\n  more: { id: 'status.more', defaultMessage: 'More' },\n  replyAll: { id: 'status.replyAll', defaultMessage: 'Reply to thread' },\n  reblog: { id: 'status.reblog', defaultMessage: 'Boost' },\n  reblog_private: { id: 'status.reblog_private', defaultMessage: 'Boost to original audience' },\n  cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' },\n  favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },\n  bookmark: { id: 'status.bookmark', defaultMessage: 'Bookmark' },\n  open: { id: 'status.open', defaultMessage: 'Expand this status' },\n  report: { id: 'status.report', defaultMessage: 'Report @{name}' },\n  muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' },\n  unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },\n  pin: { id: 'status.pin', defaultMessage: 'Pin on profile' },\n  unpin: { id: 'status.unpin', defaultMessage: 'Unpin from profile' },\n  embed: { id: 'status.embed', defaultMessage: 'Embed' },\n  admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },\n  admin_status: { id: 'status.admin_status', defaultMessage: 'Open this status in the moderation interface' },\n  copy: { id: 'status.copy', defaultMessage: 'Copy link to status' },\n  hide: { id: 'status.hide', defaultMessage: 'Hide toot' },\n});\n\nconst obfuscatedCount = count => {\n  if (count < 0) {\n    return 0;\n  } else if (count <= 1) {\n    return count;\n  } else {\n    return '1+';\n  }\n};\n\nexport default @injectIntl\nclass StatusActionBar extends ImmutablePureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    status: ImmutablePropTypes.map.isRequired,\n    onReply: PropTypes.func,\n    onFavourite: PropTypes.func,\n    onReblog: PropTypes.func,\n    onDelete: PropTypes.func,\n    onDirect: PropTypes.func,\n    onMention: PropTypes.func,\n    onMute: PropTypes.func,\n    onBlock: PropTypes.func,\n    onReport: PropTypes.func,\n    onEmbed: PropTypes.func,\n    onMuteConversation: PropTypes.func,\n    onPin: PropTypes.func,\n    onBookmark: PropTypes.func,\n    onFilter: PropTypes.func,\n    withDismiss: PropTypes.bool,\n    showReplyCount: PropTypes.bool,\n    directMessage: PropTypes.bool,\n    intl: PropTypes.object.isRequired,\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    'showReplyCount',\n    'withDismiss',\n  ]\n\n  handleReplyClick = () => {\n    if (me) {\n      this.props.onReply(this.props.status, this.context.router.history);\n    } else {\n      this._openInteractionDialog('reply');\n    }\n  }\n\n  handleShareClick = () => {\n    navigator.share({\n      text: this.props.status.get('search_index'),\n      url: this.props.status.get('url'),\n    });\n  }\n\n  handleFavouriteClick = (e) => {\n    if (me) {\n      this.props.onFavourite(this.props.status, e);\n    } else {\n      this._openInteractionDialog('favourite');\n    }\n  }\n\n  handleBookmarkClick = (e) => {\n    this.props.onBookmark(this.props.status, e);\n  }\n\n  handleReblogClick = e => {\n    if (me) {\n      this.props.onReblog(this.props.status, e);\n    } else {\n      this._openInteractionDialog('reblog');\n    }\n  }\n\n  _openInteractionDialog = type => {\n    window.open(`/interact/${this.props.status.get('id')}?type=${type}`, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');\n   }\n\n  handleDeleteClick = () => {\n    this.props.onDelete(this.props.status, this.context.router.history);\n  }\n\n  handleRedraftClick = () => {\n    this.props.onDelete(this.props.status, this.context.router.history, true);\n  }\n\n  handlePinClick = () => {\n    this.props.onPin(this.props.status);\n  }\n\n  handleMentionClick = () => {\n    this.props.onMention(this.props.status.get('account'), this.context.router.history);\n  }\n\n  handleDirectClick = () => {\n    this.props.onDirect(this.props.status.get('account'), this.context.router.history);\n  }\n\n  handleMuteClick = () => {\n    this.props.onMute(this.props.status.get('account'));\n  }\n\n  handleBlockClick = () => {\n    this.props.onBlock(this.props.status);\n  }\n\n  handleOpen = () => {\n    let state = {...this.context.router.history.location.state};\n    if (state.mastodonModalOpen) {\n      this.context.router.history.replace(`/statuses/${this.props.status.get('id')}`, { mastodonBackSteps: (state.mastodonBackSteps || 0) + 1 });\n    } else {\n      state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;\n      this.context.router.history.push(`/statuses/${this.props.status.get('id')}`, state);\n    }\n  }\n\n  handleEmbed = () => {\n    this.props.onEmbed(this.props.status);\n  }\n\n  handleReport = () => {\n    this.props.onReport(this.props.status);\n  }\n\n  handleConversationMuteClick = () => {\n    this.props.onMuteConversation(this.props.status);\n  }\n\n  handleCopy = () => {\n    const url      = this.props.status.get('url');\n    const textarea = document.createElement('textarea');\n\n    textarea.textContent    = url;\n    textarea.style.position = 'fixed';\n\n    document.body.appendChild(textarea);\n\n    try {\n      textarea.select();\n      document.execCommand('copy');\n    } catch (e) {\n\n    } finally {\n      document.body.removeChild(textarea);\n    }\n  }\n\n  handleFilterClick = () => {\n    this.props.onFilter();\n  }\n\n  render () {\n    const { status, intl, withDismiss, showReplyCount, directMessage } = this.props;\n\n    const mutingConversation = status.get('muted');\n    const anonymousAccess    = !me;\n    const publicStatus       = ['public', 'unlisted'].includes(status.get('visibility'));\n    const reblogDisabled     = status.get('visibility') === 'direct' || (status.get('visibility') === 'private' && me !== status.getIn(['account', 'id']));\n    const reblogMessage      = status.get('visibility') === 'private' ? messages.reblog_private : messages.reblog;\n\n    let menu = [];\n    let reblogIcon = 'retweet';\n    let replyIcon;\n    let replyTitle;\n\n    menu.push({ text: intl.formatMessage(messages.open), action: this.handleOpen });\n\n    if (publicStatus) {\n      menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });\n      menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });\n    }\n\n    menu.push(null);\n\n    if (status.getIn(['account', 'id']) === me || withDismiss) {\n      menu.push({ text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMuteClick });\n      menu.push(null);\n    }\n\n    if (status.getIn(['account', 'id']) === me) {\n      if (publicStatus) {\n        menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick });\n      }\n\n      menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick });\n    } else {\n      menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick });\n      menu.push({ text: intl.formatMessage(messages.direct, { name: status.getIn(['account', 'username']) }), action: this.handleDirectClick });\n      menu.push(null);\n      menu.push({ text: intl.formatMessage(messages.mute, { name: status.getIn(['account', 'username']) }), action: this.handleMuteClick });\n      menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick });\n      menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport });\n\n      if (isStaff && (accountAdminLink || statusAdminLink)) {\n        menu.push(null);\n        if (accountAdminLink !== undefined) {\n          menu.push({\n            text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }),\n            href: accountAdminLink(status.getIn(['account', 'id'])),\n          });\n        }\n        if (statusAdminLink !== undefined) {\n          menu.push({\n            text: intl.formatMessage(messages.admin_status),\n            href: statusAdminLink(status.getIn(['account', 'id']), status.get('id')),\n          });\n        }\n      }\n      if ( deleteOthersNotice ) {\n        menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick });\n      }\n    }\n\n    if (status.get('in_reply_to_id', null) === null) {\n      replyIcon = 'reply';\n      replyTitle = intl.formatMessage(messages.reply);\n    } else {\n      replyIcon = 'reply-all';\n      replyTitle = intl.formatMessage(messages.replyAll);\n    }\n\n    const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && (\n      \n          {replyButton}\n          {obfuscatedCount(status.get('replies_count'))} \n        
\n      );\n    }\n\n    return (\n      \n        {replyButton}\n        {!directMessage && [\n          
,\n          
,\n          shareButton,\n          
,\n          filterButton,\n          
\n            
,\n        ]}\n\n        
\n      
;\n  }\n\n  renderLoadingVideoPlayer () {\n    return 
;\n  }\n\n  renderLoadingAudioPlayer () {\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      otherAccounts,\n      settings,\n      collapsed,\n      muted,\n      prepend,\n      intersectionObserverWrapper,\n      onOpenVideo,\n      onOpenMedia,\n      notification,\n      hidden,\n      unread,\n      featured,\n      ...other\n    } = this.props;\n    const { isExpanded, isCollapsed, forceFilter } = 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    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      toggleSensitive: this.handleHotkeyToggleSensitive,\n    };\n\n    if (hidden) {\n      return (\n        \n          \n            {status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}\n            {' '}\n            {status.get('content')}\n          
\n         \n      );\n    }\n\n    const filtered = (status.get('filtered') || status.getIn(['reblog', 'filtered'])) && settings.get('filtering_behavior') !== 'content_warning';\n    if (forceFilter === undefined ? filtered : forceFilter) {\n      const minHandlers = this.props.muted ? {} : {\n        moveUp: this.handleHotkeyMoveUp,\n        moveDown: this.handleHotkeyMoveDown,\n      };\n\n      return (\n        \n          \n            \n                 \n            )}\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            {Component => (\n               \n        );\n        mediaIcon = 'music';\n      } else if (attachments.getIn([0, 'type']) === 'video') {\n        const attachment = status.getIn(['media_attachments', 0]);\n\n        media = (\n          \n            {Component => ( \n        );\n        mediaIcon = 'video-camera';\n      } else {  //  Media type is 'image' or 'gifv'\n        media = (\n          \n            {Component => (\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          \n            \n              {prepend && account ? (\n                 \n             \n          
\n       \n    );\n  }\n\n}\n","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport IconButton from './icon_button';\nimport DropdownMenuContainer from '../containers/dropdown_menu_container';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { me, deleteOthersNotice, isStaff } from '../initial_state';\n\nconst messages = defineMessages({\n  delete: { id: 'status.delete', defaultMessage: 'Delete' },\n  redraft: { id: 'status.redraft', defaultMessage: 'Delete & re-draft' },\n  direct: { id: 'status.direct', defaultMessage: 'Direct message @{name}' },\n  mention: { id: 'status.mention', defaultMessage: 'Mention @{name}' },\n  mute: { id: 'account.mute', defaultMessage: 'Mute @{name}' },\n  block: { id: 'account.block', defaultMessage: 'Block @{name}' },\n  reply: { id: 'status.reply', defaultMessage: 'Reply' },\n  share: { id: 'status.share', defaultMessage: 'Share' },\n  more: { id: 'status.more', defaultMessage: 'More' },\n  replyAll: { id: 'status.replyAll', defaultMessage: 'Reply to thread' },\n  reblog: { id: 'status.reblog', defaultMessage: 'Boost' },\n  reblog_private: { id: 'status.reblog_private', defaultMessage: 'Boost to original audience' },\n  cancel_reblog_private: { id: 'status.cancel_reblog_private', defaultMessage: 'Unboost' },\n  cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' },\n  favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },\n  open: { id: 'status.open', defaultMessage: 'Expand this status' },\n  report: { id: 'status.report', defaultMessage: 'Report @{name}' },\n  muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' },\n  unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },\n  pin: { id: 'status.pin', defaultMessage: 'Pin on profile' },\n  unpin: { id: 'status.unpin', defaultMessage: 'Unpin from profile' },\n  embed: { id: 'status.embed', defaultMessage: 'Embed' },\n  admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },\n  admin_status: { id: 'status.admin_status', defaultMessage: 'Open this status in the moderation interface' },\n  copy: { id: 'status.copy', defaultMessage: 'Copy link to status' },\n});\n\nconst obfuscatedCount = count => {\n  if (count < 0) {\n    return 0;\n  } else if (count <= 1) {\n    return count;\n  } else {\n    return '1+';\n  }\n};\n\nexport default @injectIntl\nclass StatusActionBar extends ImmutablePureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    status: ImmutablePropTypes.map.isRequired,\n    onReply: PropTypes.func,\n    onFavourite: PropTypes.func,\n    onReblog: PropTypes.func,\n    onDelete: PropTypes.func,\n    onDirect: PropTypes.func,\n    onMention: PropTypes.func,\n    onMute: PropTypes.func,\n    onBlock: PropTypes.func,\n    onReport: PropTypes.func,\n    onEmbed: PropTypes.func,\n    onMuteConversation: PropTypes.func,\n    onPin: PropTypes.func,\n    withDismiss: PropTypes.bool,\n    intl: PropTypes.object.isRequired,\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    'withDismiss',\n  ]\n\n  handleReplyClick = () => {\n    if (me) {\n      this.props.onReply(this.props.status, this.context.router.history);\n    } else {\n      this._openInteractionDialog('reply');\n    }\n  }\n\n  handleShareClick = () => {\n    navigator.share({\n      text: this.props.status.get('search_index'),\n      url: this.props.status.get('url'),\n    }).catch((e) => {\n      if (e.name !== 'AbortError') console.error(e);\n    });\n  }\n\n  handleFavouriteClick = () => {\n    if (me) {\n      this.props.onFavourite(this.props.status);\n    } else {\n      this._openInteractionDialog('favourite');\n    }\n  }\n\n  handleReblogClick = e => {\n    if (me) {\n      this.props.onReblog(this.props.status, e);\n    } else {\n      this._openInteractionDialog('reblog');\n    }\n  }\n\n  _openInteractionDialog = type => {\n    window.open(`/interact/${this.props.status.get('id')}?type=${type}`, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');\n  }\n\n  handleDeleteClick = () => {\n    this.props.onDelete(this.props.status, this.context.router.history);\n  }\n\n  handleRedraftClick = () => {\n    this.props.onDelete(this.props.status, this.context.router.history, true);\n  }\n\n  handlePinClick = () => {\n    this.props.onPin(this.props.status);\n  }\n\n  handleMentionClick = () => {\n    this.props.onMention(this.props.status.get('account'), this.context.router.history);\n  }\n\n  handleDirectClick = () => {\n    this.props.onDirect(this.props.status.get('account'), this.context.router.history);\n  }\n\n  handleMuteClick = () => {\n    this.props.onMute(this.props.status.get('account'));\n  }\n\n  handleBlockClick = () => {\n    this.props.onBlock(this.props.status);\n  }\n\n  handleOpen = () => {\n    this.context.router.history.push(`/statuses/${this.props.status.get('id')}`);\n  }\n\n  handleEmbed = () => {\n    this.props.onEmbed(this.props.status);\n  }\n\n  handleReport = () => {\n    this.props.onReport(this.props.status);\n  }\n\n  handleConversationMuteClick = () => {\n    this.props.onMuteConversation(this.props.status);\n  }\n\n  handleCopy = () => {\n    const url      = this.props.status.get('url');\n    const textarea = document.createElement('textarea');\n\n    textarea.textContent    = url;\n    textarea.style.position = 'fixed';\n\n    document.body.appendChild(textarea);\n\n    try {\n      textarea.select();\n      document.execCommand('copy');\n    } catch (e) {\n\n    } finally {\n      document.body.removeChild(textarea);\n    }\n  }\n\n  render () {\n    const { status, intl, withDismiss } = this.props;\n\n    const mutingConversation = status.get('muted');\n    const anonymousAccess    = !me;\n    const publicStatus       = ['public', 'unlisted'].includes(status.get('visibility'));\n\n    let menu = [];\n    let reblogIcon = 'retweet';\n    let replyIcon;\n    let replyTitle;\n\n    menu.push({ text: intl.formatMessage(messages.open), action: this.handleOpen });\n\n    if (publicStatus) {\n      menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });\n      menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });\n    }\n\n    menu.push(null);\n\n    if (status.getIn(['account', 'id']) === me || withDismiss) {\n      menu.push({ text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMuteClick });\n      menu.push(null);\n    }\n\n    if (status.getIn(['account', 'id']) === me) {\n      if (publicStatus) {\n        menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick });\n      } else {\n        if (status.get('visibility') === 'private') {\n          menu.push({ text: intl.formatMessage(status.get('reblogged') ? messages.cancel_reblog_private : messages.reblog_private), action: this.handleReblogClick });\n        }\n      }\n\n      menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick });\n    } else {\n      menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick });\n      menu.push({ text: intl.formatMessage(messages.direct, { name: status.getIn(['account', 'username']) }), action: this.handleDirectClick });\n      menu.push(null);\n      menu.push({ text: intl.formatMessage(messages.mute, { name: status.getIn(['account', 'username']) }), action: this.handleMuteClick });\n      menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick });\n      menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport });\n\n      if (isStaff) {\n        menu.push(null);\n        menu.push({ text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }), href: `/admin/accounts/${status.getIn(['account', 'id'])}` });\n        menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses/${status.get('id')}` });\n      }\n      if ( deleteOthersNotice ) {\n        menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick });\n      }\n    }\n\n    if (status.get('visibility') === 'direct') {\n      reblogIcon = 'envelope';\n    } else if (status.get('visibility') === 'private') {\n      reblogIcon = 'lock';\n    }\n\n    if (status.get('in_reply_to_id', null) === null) {\n      replyIcon = 'reply';\n      replyTitle = intl.formatMessage(messages.reply);\n    } else {\n      replyIcon = 'reply-all';\n      replyTitle = intl.formatMessage(messages.replyAll);\n    }\n\n    const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && (\n      \n        
{obfuscatedCount(status.get('replies_count'))} 
\n        
\n        
\n        {shareButton}\n\n        
\n          
\n      
;\n  }\n\n  renderLoadingVideoPlayer () {\n    return 
;\n  }\n\n  renderLoadingAudioPlayer () {\n    return 
;\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._properStatus(), this.context.router.history);\n  }\n\n  handleHotkeyFavourite = () => {\n    this.props.onFavourite(this._properStatus());\n  }\n\n  handleHotkeyBoost = e => {\n    this.props.onReblog(this._properStatus(), e);\n  }\n\n  handleHotkeyMention = e => {\n    e.preventDefault();\n    this.props.onMention(this._properStatus().get('account'), this.context.router.history);\n  }\n\n  handleHotkeyOpen = () => {\n    this.context.router.history.push(`/statuses/${this._properStatus().get('id')}`);\n  }\n\n  handleHotkeyOpenProfile = () => {\n    this.context.router.history.push(`/accounts/${this._properStatus().getIn(['account', 'id'])}`);\n  }\n\n  handleHotkeyMoveUp = e => {\n    this.props.onMoveUp(this.props.status.get('id'), e.target.getAttribute('data-featured'));\n  }\n\n  handleHotkeyMoveDown = e => {\n    this.props.onMoveDown(this.props.status.get('id'), e.target.getAttribute('data-featured'));\n  }\n\n  handleHotkeyToggleHidden = () => {\n    this.props.onToggleHidden(this._properStatus());\n  }\n\n  handleHotkeyToggleSensitive = () => {\n    this.handleToggleMediaVisibility();\n  }\n\n  _properStatus () {\n    const { status } = this.props;\n\n    if (status.get('reblog', null) !== null && typeof status.get('reblog') === 'object') {\n      return status.get('reblog');\n    } else {\n      return status;\n    }\n  }\n\n  handleRef = c => {\n    this.node = c;\n  }\n\n  render () {\n    let media = null;\n    let statusAvatar, prepend, rebloggedByText;\n\n    const { intl, hidden, featured, otherAccounts, unread, showThread } = this.props;\n\n    let { status, account, ...other } = this.props;\n\n    if (status === null) {\n      return null;\n    }\n\n    const handlers = this.props.muted ? {} : {\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      toggleHidden: this.handleHotkeyToggleHidden,\n      toggleSensitive: this.handleHotkeyToggleSensitive,\n    };\n\n    if (hidden) {\n      return (\n        \n          \n            {status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}\n            {status.get('content')}\n          
\n         \n      );\n    }\n\n    if (status.get('filtered') || status.getIn(['reblog', 'filtered'])) {\n      const minHandlers = this.props.muted ? {} : {\n        moveUp: this.handleHotkeyMoveUp,\n        moveDown: this.handleHotkeyMoveDown,\n      };\n\n      return (\n        \n          \n            
\n         \n      );\n    }\n\n    if (featured) {\n      prepend = (\n        \n      );\n    } else if (status.get('reblog', null) !== null && typeof status.get('reblog') === 'object') {\n      const display_name_html = { __html: status.getIn(['account', 'display_name_html']) };\n\n      prepend = (\n        \n      );\n\n      rebloggedByText = intl.formatMessage({ id: 'status.reblogged_by', defaultMessage: '{name} boosted' }, { name: status.getIn(['account', 'acct']) });\n\n      account = status.get('account');\n      status  = status.get('reblog');\n    }\n\n    if (status.get('media_attachments').size > 0) {\n      if (this.props.muted) {\n        media = (\n          \n            {Component => (\n               \n        );\n      } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {\n        const attachment = status.getIn(['media_attachments', 0]);\n\n        media = (\n          \n            {Component => (\n               \n        );\n      } else {\n        media = (\n          \n            {Component => (\n               \n        );\n      }\n    } else if (status.get('spoiler_text').length === 0 && status.get('card')) {\n      media = (\n        \n        \n          {prepend}\n\n          
\n            
\n            
\n\n            
\n\n            {media}\n\n            {showThread && status.get('in_reply_to_id') && status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) && (\n              
\n                 \n            )}\n\n            
\n          
\n        
 \n    );\n  }\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\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n  return typeof obj;\n} : function (obj) {\n  return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\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 Route from \"./Route\";\nimport Link from \"./Link\";\n/**\n * A \n          {children && React.cloneElement(children, { hidden: !isIntersecting && (isHidden || !!cachedHeight) })}\n       \n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport IntersectionObserverArticle from 'flavours/glitch/components/intersection_observer_article';\nimport { setHeight } from 'flavours/glitch/actions/height_cache';\n\nconst makeMapStateToProps = (state, props) => ({\n  cachedHeight: state.getIn(['height_cache', props.saveHeightKey, props.id]),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n\n  onHeightChange (key, id, height) {\n    dispatch(setHeight(key, id, height));\n  },\n\n});\n\nexport default connect(makeMapStateToProps, mapDispatchToProps)(IntersectionObserverArticle);\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nexport default class LoadPending extends React.PureComponent {\n\n  static propTypes = {\n    onClick: PropTypes.func,\n    count: PropTypes.number,\n  }\n\n  render() {\n    const { count } = this.props;\n\n    return (\n      \n         \n    );\n  }\n\n}\n","// Wrapper for IntersectionObserver in order to make working with it\n// a bit easier. We also follow this performance advice:\n// \"If you need to observe multiple elements, it is both possible and\n// advised to observe multiple elements using the same IntersectionObserver\n// instance by calling observe() multiple times.\"\n// https://developers.google.com/web/updates/2016/04/intersectionobserver\n\nclass IntersectionObserverWrapper {\n\n  callbacks = {};\n  observerBacklog = [];\n  observer = null;\n\n  connect (options) {\n    const onIntersection = (entries) => {\n      entries.forEach(entry => {\n        const id = entry.target.getAttribute('data-id');\n        if (this.callbacks[id]) {\n          this.callbacks[id](entry);\n        }\n      });\n    };\n\n    this.observer = new IntersectionObserver(onIntersection, options);\n    this.observerBacklog.forEach(([ id, node, callback ]) => {\n      this.observe(id, node, callback);\n    });\n    this.observerBacklog = null;\n  }\n\n  observe (id, node, callback) {\n    if (!this.observer) {\n      this.observerBacklog.push([ id, node, callback ]);\n    } else {\n      this.callbacks[id] = callback;\n      this.observer.observe(node);\n    }\n  }\n\n  unobserve (id, node) {\n    if (this.observer) {\n      delete this.callbacks[id];\n      this.observer.unobserve(node);\n    }\n  }\n\n  disconnect () {\n    if (this.observer) {\n      this.callbacks = {};\n      this.observer.disconnect();\n      this.observer = null;\n    }\n  }\n\n}\n\nexport default IntersectionObserverWrapper;\n","import React, { PureComponent } from 'react';\nimport { ScrollContainer } from 'react-router-scroll-4';\nimport PropTypes from 'prop-types';\nimport IntersectionObserverArticleContainer from 'flavours/glitch/containers/intersection_observer_article_container';\nimport LoadMore from './load_more';\nimport LoadPending from './load_pending';\nimport IntersectionObserverWrapper from 'flavours/glitch/util/intersection_observer_wrapper';\nimport { throttle } from 'lodash';\nimport { List as ImmutableList } from 'immutable';\nimport classNames from 'classnames';\nimport { attachFullscreenListener, detachFullscreenListener, isFullscreen } from 'flavours/glitch/util/fullscreen';\nimport LoadingIndicator from './loading_indicator';\n\nconst MOUSE_IDLE_DELAY = 300;\n\nexport default class ScrollableList extends PureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    scrollKey: PropTypes.string.isRequired,\n    onLoadMore: PropTypes.func,\n    onLoadPending: PropTypes.func,\n    onScrollToTop: PropTypes.func,\n    onScroll: PropTypes.func,\n    trackScroll: PropTypes.bool,\n    shouldUpdateScroll: PropTypes.func,\n    isLoading: PropTypes.bool,\n    showLoading: PropTypes.bool,\n    hasMore: PropTypes.bool,\n    numPending: PropTypes.number,\n    prepend: PropTypes.node,\n    alwaysPrepend: PropTypes.bool,\n    emptyMessage: PropTypes.node,\n    children: PropTypes.node,\n  };\n\n  static defaultProps = {\n    trackScroll: true,\n  };\n\n  state = {\n    fullscreen: null,\n    cachedMediaWidth: 300,\n  };\n\n  intersectionObserverWrapper = new IntersectionObserverWrapper();\n\n  handleScroll = throttle(() => {\n    if (this.node) {\n      const { scrollTop, scrollHeight, clientHeight } = this.node;\n      const offset = scrollHeight - scrollTop - clientHeight;\n\n      if (400 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {\n        this.props.onLoadMore();\n      }\n\n      if (scrollTop < 100 && this.props.onScrollToTop) {\n        this.props.onScrollToTop();\n      } else if (this.props.onScroll) {\n        this.props.onScroll();\n      }\n\n      if (!this.lastScrollWasSynthetic) {\n        // If the last scroll wasn't caused by setScrollTop(), assume it was\n        // intentional and cancel any pending scroll reset on mouse idle\n        this.scrollToTopOnMouseIdle = false;\n      }\n      this.lastScrollWasSynthetic = false;\n    }\n  }, 150, {\n    trailing: true,\n  });\n\n  mouseIdleTimer = null;\n  mouseMovedRecently = false;\n  lastScrollWasSynthetic = false;\n  scrollToTopOnMouseIdle = false;\n\n  setScrollTop = newScrollTop => {\n    if (this.node.scrollTop !== newScrollTop) {\n      this.lastScrollWasSynthetic = true;\n      this.node.scrollTop = newScrollTop;\n    }\n  };\n\n  clearMouseIdleTimer = () => {\n    if (this.mouseIdleTimer === null) {\n      return;\n    }\n    clearTimeout(this.mouseIdleTimer);\n    this.mouseIdleTimer = null;\n  };\n\n  handleMouseMove = throttle(() => {\n    // As long as the mouse keeps moving, clear and restart the idle timer.\n    this.clearMouseIdleTimer();\n    this.mouseIdleTimer =\n      setTimeout(this.handleMouseIdle, MOUSE_IDLE_DELAY);\n\n    if (!this.mouseMovedRecently && this.node.scrollTop === 0) {\n      // Only set if we just started moving and are scrolled to the top.\n      this.scrollToTopOnMouseIdle = true;\n    }\n    // Save setting this flag for last, so we can do the comparison above.\n    this.mouseMovedRecently = true;\n  }, MOUSE_IDLE_DELAY / 2);\n\n  handleWheel = throttle(() => {\n    this.scrollToTopOnMouseIdle = false;\n  }, 150, {\n    trailing: true,\n  });\n\n  handleMouseIdle = () => {\n    if (this.scrollToTopOnMouseIdle) {\n      this.setScrollTop(0);\n    }\n    this.mouseMovedRecently = false;\n    this.scrollToTopOnMouseIdle = false;\n  }\n\n  componentDidMount () {\n    this.attachScrollListener();\n    this.attachIntersectionObserver();\n    attachFullscreenListener(this.onFullScreenChange);\n\n    // Handle initial scroll posiiton\n    this.handleScroll();\n  }\n\n  getScrollPosition = () => {\n    if (this.node && (this.node.scrollTop > 0 || this.mouseMovedRecently)) {\n      return {height: this.node.scrollHeight, top: this.node.scrollTop};\n    } else {\n      return null;\n    }\n  }\n\n  updateScrollBottom = (snapshot) => {\n    const newScrollTop = this.node.scrollHeight - snapshot;\n\n    this.setScrollTop(newScrollTop);\n  }\n\n  cacheMediaWidth = (width) => {\n    if (width && this.state.cachedMediaWidth != width) this.setState({ cachedMediaWidth: width });\n  }\n\n  getSnapshotBeforeUpdate (prevProps, prevState) {\n    const someItemInserted = React.Children.count(prevProps.children) > 0 &&\n      React.Children.count(prevProps.children) < React.Children.count(this.props.children) &&\n      this.getFirstChildKey(prevProps) !== this.getFirstChildKey(this.props);\n    const pendingChanged = (prevProps.numPending > 0) !== (this.props.numPending > 0);\n\n    if (pendingChanged || someItemInserted && (this.node.scrollTop > 0 || this.mouseMovedRecently)) {\n      return this.node.scrollHeight - this.node.scrollTop;\n    } else {\n      return null;\n    }\n  }\n\n  componentDidUpdate (prevProps, prevState, snapshot) {\n    // Reset the scroll position when a new child comes in in order not to\n    // jerk the scrollbar around if you're already scrolled down the page.\n    if (snapshot !== null) this.updateScrollBottom(snapshot);\n  }\n\n  componentWillUnmount () {\n    this.clearMouseIdleTimer();\n    this.detachScrollListener();\n    this.detachIntersectionObserver();\n    detachFullscreenListener(this.onFullScreenChange);\n  }\n\n  onFullScreenChange = () => {\n    this.setState({ fullscreen: isFullscreen() });\n  }\n\n  attachIntersectionObserver () {\n    this.intersectionObserverWrapper.connect({\n      root: this.node,\n      rootMargin: '300% 0px',\n    });\n  }\n\n  detachIntersectionObserver () {\n    this.intersectionObserverWrapper.disconnect();\n  }\n\n  attachScrollListener () {\n    this.node.addEventListener('scroll', this.handleScroll);\n    this.node.addEventListener('wheel', this.handleWheel);\n  }\n\n  detachScrollListener () {\n    this.node.removeEventListener('scroll', this.handleScroll);\n    this.node.removeEventListener('wheel', this.handleWheel);\n  }\n\n  getFirstChildKey (props) {\n    const { children } = props;\n    let firstChild     = children;\n\n    if (children instanceof ImmutableList) {\n      firstChild = children.get(0);\n    } else if (Array.isArray(children)) {\n      firstChild = children[0];\n    }\n\n    return firstChild && firstChild.key;\n  }\n\n  setRef = (c) => {\n    this.node = c;\n  }\n\n  handleLoadMore = e => {\n    e.preventDefault();\n    this.props.onLoadMore();\n  }\n\n  defaultShouldUpdateScroll = (prevRouterProps, { location }) => {\n    if ((((prevRouterProps || {}).location || {}).state || {}).mastodonModalOpen) return false;\n    return !(location.state && location.state.mastodonModalOpen);\n  }\n\n  handleLoadPending = e => {\n    e.preventDefault();\n    this.props.onLoadPending();\n    // Prevent the weird scroll-jumping behavior, as we explicitly don't want to\n    // scroll to top, and we know the scroll height is going to change\n    this.scrollToTopOnMouseIdle = false;\n    this.lastScrollWasSynthetic = false;\n    this.clearMouseIdleTimer();\n    this.mouseIdleTimer = setTimeout(this.handleMouseIdle, MOUSE_IDLE_DELAY);\n    this.mouseMovedRecently = true;\n  }\n\n  render () {\n    const { children, scrollKey, trackScroll, shouldUpdateScroll, showLoading, isLoading, hasMore, numPending, prepend, alwaysPrepend, emptyMessage, onLoadMore } = this.props;\n    const { fullscreen } = this.state;\n    const childrenCount = React.Children.count(children);\n\n    const loadMore     = (hasMore && onLoadMore) ? \n          
\n            {prepend}\n          
\n\n          
\n            
\n        
\n          
\n            {prepend}\n\n            {loadPending}\n\n            {React.Children.map(this.props.children, (child, index) => (\n              \n                {React.cloneElement(child, {\n                  getScrollPosition: this.getScrollPosition,\n                  updateScrollBottom: this.updateScrollBottom,\n                  cachedMediaWidth: this.state.cachedMediaWidth,\n                  cacheMediaWidth: this.cacheMediaWidth,\n                })}\n               \n            ))}\n\n            {loadMore}\n          
\n        
\n          {alwaysPrepend && prepend}\n\n          
\n            {emptyMessage}\n          
\n        
\n          {scrollableArea}\n         \n      );\n    } else {\n      return scrollableArea;\n    }\n  }\n\n}\n","\n// Get the bounding client rect from an IntersectionObserver entry.\n// This is to work around a bug in Chrome: https://crbug.com/737228\n\nlet hasBoundingRectBug;\n\nfunction getRectFromEntry(entry) {\n  if (typeof hasBoundingRectBug !== 'boolean') {\n    const boundingRect = entry.target.getBoundingClientRect();\n    const observerRect = entry.boundingClientRect;\n    hasBoundingRectBug = boundingRect.height !== observerRect.height ||\n      boundingRect.top !== observerRect.top ||\n      boundingRect.width !== observerRect.width ||\n      boundingRect.bottom !== observerRect.bottom ||\n      boundingRect.left !== observerRect.left ||\n      boundingRect.right !== observerRect.right;\n  }\n  return hasBoundingRectBug ? entry.target.getBoundingClientRect() : entry.boundingClientRect;\n}\n\nexport default getRectFromEntry;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport scheduleIdleTask from '../features/ui/util/schedule_idle_task';\nimport getRectFromEntry from '../features/ui/util/get_rect_from_entry';\nimport { is } from 'immutable';\n\n// Diff these props in the \"rendered\" state\nconst updateOnPropsForRendered = ['id', 'index', 'listLength'];\n// Diff these props in the \"unrendered\" state\nconst updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight'];\n\nexport default class IntersectionObserverArticle extends React.Component {\n\n  static propTypes = {\n    intersectionObserverWrapper: PropTypes.object.isRequired,\n    id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n    index: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n    listLength: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n    saveHeightKey: PropTypes.string,\n    cachedHeight: PropTypes.number,\n    onHeightChange: PropTypes.func,\n    children: PropTypes.node,\n  };\n\n  state = {\n    isHidden: false, // set to true in requestIdleCallback to trigger un-render\n  }\n\n  shouldComponentUpdate (nextProps, nextState) {\n    const isUnrendered = !this.state.isIntersecting && (this.state.isHidden || this.props.cachedHeight);\n    const willBeUnrendered = !nextState.isIntersecting && (nextState.isHidden || nextProps.cachedHeight);\n    if (!!isUnrendered !== !!willBeUnrendered) {\n      // If we're going from rendered to unrendered (or vice versa) then update\n      return true;\n    }\n    // Otherwise, diff based on props\n    const propsToDiff = isUnrendered ? updateOnPropsForUnrendered : updateOnPropsForRendered;\n    return !propsToDiff.every(prop => is(nextProps[prop], this.props[prop]));\n  }\n\n  componentDidMount () {\n    const { intersectionObserverWrapper, id } = this.props;\n\n    intersectionObserverWrapper.observe(\n      id,\n      this.node,\n      this.handleIntersection\n    );\n\n    this.componentMounted = true;\n  }\n\n  componentWillUnmount () {\n    const { intersectionObserverWrapper, id } = this.props;\n    intersectionObserverWrapper.unobserve(id, this.node);\n\n    this.componentMounted = false;\n  }\n\n  handleIntersection = (entry) => {\n    this.entry = entry;\n\n    scheduleIdleTask(this.calculateHeight);\n    this.setState(this.updateStateAfterIntersection);\n  }\n\n  updateStateAfterIntersection = (prevState) => {\n    if (prevState.isIntersecting !== false && !this.entry.isIntersecting) {\n      scheduleIdleTask(this.hideIfNotIntersecting);\n    }\n    return {\n      isIntersecting: this.entry.isIntersecting,\n      isHidden: false,\n    };\n  }\n\n  calculateHeight = () => {\n    const { onHeightChange, saveHeightKey, id } = this.props;\n    // save the height of the fully-rendered element (this is expensive\n    // on Chrome, where we need to fall back to getBoundingClientRect)\n    this.height = getRectFromEntry(this.entry).height;\n\n    if (onHeightChange && saveHeightKey) {\n      onHeightChange(saveHeightKey, id, this.height);\n    }\n  }\n\n  hideIfNotIntersecting = () => {\n    if (!this.componentMounted) {\n      return;\n    }\n\n    // When the browser gets a chance, test if we're still not intersecting,\n    // and if so, set our isHidden to true to trigger an unrender. The point of\n    // this is to save DOM nodes and avoid using up too much memory.\n    // See: https://github.com/tootsuite/mastodon/issues/2900\n    this.setState((prevState) => ({ isHidden: !prevState.isIntersecting }));\n  }\n\n  handleRef = (node) => {\n    this.node = node;\n  }\n\n  render () {\n    const { children, id, index, listLength, cachedHeight } = this.props;\n    const { isIntersecting, isHidden } = this.state;\n\n    if (!isIntersecting && (isHidden || cachedHeight)) {\n      return (\n        \n          {children && React.cloneElement(children, { hidden: true })}\n         \n      );\n    }\n\n    return (\n      \n        {children && React.cloneElement(children, { hidden: false })}\n       \n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport IntersectionObserverArticle from '../components/intersection_observer_article';\nimport { setHeight } from '../actions/height_cache';\n\nconst makeMapStateToProps = (state, props) => ({\n  cachedHeight: state.getIn(['height_cache', props.saveHeightKey, props.id]),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n\n  onHeightChange (key, id, height) {\n    dispatch(setHeight(key, id, height));\n  },\n\n});\n\nexport default connect(makeMapStateToProps, mapDispatchToProps)(IntersectionObserverArticle);\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nexport default class LoadPending extends React.PureComponent {\n\n  static propTypes = {\n    onClick: PropTypes.func,\n    count: PropTypes.number,\n  }\n\n  render() {\n    const { count } = this.props;\n\n    return (\n      \n         \n    );\n  }\n\n}\n","// Wrapper for IntersectionObserver in order to make working with it\n// a bit easier. We also follow this performance advice:\n// \"If you need to observe multiple elements, it is both possible and\n// advised to observe multiple elements using the same IntersectionObserver\n// instance by calling observe() multiple times.\"\n// https://developers.google.com/web/updates/2016/04/intersectionobserver\n\nclass IntersectionObserverWrapper {\n\n  callbacks = {};\n  observerBacklog = [];\n  observer = null;\n\n  connect (options) {\n    const onIntersection = (entries) => {\n      entries.forEach(entry => {\n        const id = entry.target.getAttribute('data-id');\n        if (this.callbacks[id]) {\n          this.callbacks[id](entry);\n        }\n      });\n    };\n\n    this.observer = new IntersectionObserver(onIntersection, options);\n    this.observerBacklog.forEach(([ id, node, callback ]) => {\n      this.observe(id, node, callback);\n    });\n    this.observerBacklog = null;\n  }\n\n  observe (id, node, callback) {\n    if (!this.observer) {\n      this.observerBacklog.push([ id, node, callback ]);\n    } else {\n      this.callbacks[id] = callback;\n      this.observer.observe(node);\n    }\n  }\n\n  unobserve (id, node) {\n    if (this.observer) {\n      delete this.callbacks[id];\n      this.observer.unobserve(node);\n    }\n  }\n\n  disconnect () {\n    if (this.observer) {\n      this.callbacks = {};\n      this.observer.disconnect();\n      this.observer = null;\n    }\n  }\n\n}\n\nexport default IntersectionObserverWrapper;\n","import React, { PureComponent } from 'react';\nimport { ScrollContainer } from 'react-router-scroll-4';\nimport PropTypes from 'prop-types';\nimport IntersectionObserverArticleContainer from '../containers/intersection_observer_article_container';\nimport LoadMore from './load_more';\nimport LoadPending from './load_pending';\nimport IntersectionObserverWrapper from '../features/ui/util/intersection_observer_wrapper';\nimport { throttle } from 'lodash';\nimport { List as ImmutableList } from 'immutable';\nimport classNames from 'classnames';\nimport { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../features/ui/util/fullscreen';\nimport LoadingIndicator from './loading_indicator';\n\nconst MOUSE_IDLE_DELAY = 300;\n\nexport default class ScrollableList extends PureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    scrollKey: PropTypes.string.isRequired,\n    onLoadMore: PropTypes.func,\n    onLoadPending: PropTypes.func,\n    onScrollToTop: PropTypes.func,\n    onScroll: PropTypes.func,\n    trackScroll: PropTypes.bool,\n    shouldUpdateScroll: PropTypes.func,\n    isLoading: PropTypes.bool,\n    showLoading: PropTypes.bool,\n    hasMore: PropTypes.bool,\n    numPending: PropTypes.number,\n    prepend: PropTypes.node,\n    alwaysPrepend: PropTypes.bool,\n    emptyMessage: PropTypes.node,\n    children: PropTypes.node,\n    bindToDocument: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    trackScroll: true,\n  };\n\n  state = {\n    fullscreen: null,\n    cachedMediaWidth: 250, // Default media/card width using default Mastodon theme\n  };\n\n  intersectionObserverWrapper = new IntersectionObserverWrapper();\n\n  handleScroll = throttle(() => {\n    if (this.node) {\n      const scrollTop = this.getScrollTop();\n      const scrollHeight = this.getScrollHeight();\n      const clientHeight = this.getClientHeight();\n      const offset = scrollHeight - scrollTop - clientHeight;\n\n      if (400 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {\n        this.props.onLoadMore();\n      }\n\n      if (scrollTop < 100 && this.props.onScrollToTop) {\n        this.props.onScrollToTop();\n      } else if (this.props.onScroll) {\n        this.props.onScroll();\n      }\n\n      if (!this.lastScrollWasSynthetic) {\n        // If the last scroll wasn't caused by setScrollTop(), assume it was\n        // intentional and cancel any pending scroll reset on mouse idle\n        this.scrollToTopOnMouseIdle = false;\n      }\n      this.lastScrollWasSynthetic = false;\n    }\n  }, 150, {\n    trailing: true,\n  });\n\n  mouseIdleTimer = null;\n  mouseMovedRecently = false;\n  lastScrollWasSynthetic = false;\n  scrollToTopOnMouseIdle = false;\n\n  setScrollTop = newScrollTop => {\n    if (this.getScrollTop() !== newScrollTop) {\n      this.lastScrollWasSynthetic = true;\n\n      if (this.props.bindToDocument) {\n        document.scrollingElement.scrollTop = newScrollTop;\n      } else {\n        this.node.scrollTop = newScrollTop;\n      }\n    }\n  };\n\n  clearMouseIdleTimer = () => {\n    if (this.mouseIdleTimer === null) {\n      return;\n    }\n\n    clearTimeout(this.mouseIdleTimer);\n    this.mouseIdleTimer = null;\n  };\n\n  handleMouseMove = throttle(() => {\n    // As long as the mouse keeps moving, clear and restart the idle timer.\n    this.clearMouseIdleTimer();\n    this.mouseIdleTimer = setTimeout(this.handleMouseIdle, MOUSE_IDLE_DELAY);\n\n    if (!this.mouseMovedRecently && this.getScrollTop() === 0) {\n      // Only set if we just started moving and are scrolled to the top.\n      this.scrollToTopOnMouseIdle = true;\n    }\n\n    // Save setting this flag for last, so we can do the comparison above.\n    this.mouseMovedRecently = true;\n  }, MOUSE_IDLE_DELAY / 2);\n\n  handleWheel = throttle(() => {\n    this.scrollToTopOnMouseIdle = false;\n  }, 150, {\n    trailing: true,\n  });\n\n  handleMouseIdle = () => {\n    if (this.scrollToTopOnMouseIdle) {\n      this.setScrollTop(0);\n    }\n\n    this.mouseMovedRecently = false;\n    this.scrollToTopOnMouseIdle = false;\n  }\n\n  componentDidMount () {\n    this.attachScrollListener();\n    this.attachIntersectionObserver();\n\n    attachFullscreenListener(this.onFullScreenChange);\n\n    // Handle initial scroll posiiton\n    this.handleScroll();\n  }\n\n  getScrollPosition = () => {\n    if (this.node && (this.getScrollTop() > 0 || this.mouseMovedRecently)) {\n      return { height: this.getScrollHeight(), top: this.getScrollTop() };\n    } else {\n      return null;\n    }\n  }\n\n  getScrollTop = () => {\n    return this.props.bindToDocument ? document.scrollingElement.scrollTop : this.node.scrollTop;\n  }\n\n  getScrollHeight = () => {\n    return this.props.bindToDocument ? document.scrollingElement.scrollHeight : this.node.scrollHeight;\n  }\n\n  getClientHeight = () => {\n    return this.props.bindToDocument ? document.scrollingElement.clientHeight : this.node.clientHeight;\n  }\n\n  updateScrollBottom = (snapshot) => {\n    const newScrollTop = this.getScrollHeight() - snapshot;\n\n    this.setScrollTop(newScrollTop);\n  }\n\n  getSnapshotBeforeUpdate (prevProps) {\n    const someItemInserted = React.Children.count(prevProps.children) > 0 &&\n      React.Children.count(prevProps.children) < React.Children.count(this.props.children) &&\n      this.getFirstChildKey(prevProps) !== this.getFirstChildKey(this.props);\n    const pendingChanged = (prevProps.numPending > 0) !== (this.props.numPending > 0);\n\n    if (pendingChanged || someItemInserted && (this.getScrollTop() > 0 || this.mouseMovedRecently)) {\n      return this.getScrollHeight() - this.getScrollTop();\n    } else {\n      return null;\n    }\n  }\n\n  componentDidUpdate (prevProps, prevState, snapshot) {\n    // Reset the scroll position when a new child comes in in order not to\n    // jerk the scrollbar around if you're already scrolled down the page.\n    if (snapshot !== null) {\n      this.setScrollTop(this.getScrollHeight() - snapshot);\n    }\n  }\n\n  cacheMediaWidth = (width) => {\n    if (width && this.state.cachedMediaWidth !== width) {\n      this.setState({ cachedMediaWidth: width });\n    }\n  }\n\n  componentWillUnmount () {\n    this.clearMouseIdleTimer();\n    this.detachScrollListener();\n    this.detachIntersectionObserver();\n\n    detachFullscreenListener(this.onFullScreenChange);\n  }\n\n  onFullScreenChange = () => {\n    this.setState({ fullscreen: isFullscreen() });\n  }\n\n  attachIntersectionObserver () {\n    this.intersectionObserverWrapper.connect({\n      root: this.node,\n      rootMargin: '300% 0px',\n    });\n  }\n\n  detachIntersectionObserver () {\n    this.intersectionObserverWrapper.disconnect();\n  }\n\n  attachScrollListener () {\n    if (this.props.bindToDocument) {\n      document.addEventListener('scroll', this.handleScroll);\n      document.addEventListener('wheel', this.handleWheel);\n    } else {\n      this.node.addEventListener('scroll', this.handleScroll);\n      this.node.addEventListener('wheel', this.handleWheel);\n    }\n  }\n\n  detachScrollListener () {\n    if (this.props.bindToDocument) {\n      document.removeEventListener('scroll', this.handleScroll);\n      document.removeEventListener('wheel', this.handleWheel);\n    } else {\n      this.node.removeEventListener('scroll', this.handleScroll);\n      this.node.removeEventListener('wheel', this.handleWheel);\n    }\n  }\n\n  getFirstChildKey (props) {\n    const { children } = props;\n    let firstChild     = children;\n\n    if (children instanceof ImmutableList) {\n      firstChild = children.get(0);\n    } else if (Array.isArray(children)) {\n      firstChild = children[0];\n    }\n\n    return firstChild && firstChild.key;\n  }\n\n  setRef = (c) => {\n    this.node = c;\n  }\n\n  handleLoadMore = e => {\n    e.preventDefault();\n    this.props.onLoadMore();\n  }\n\n  handleLoadPending = e => {\n    e.preventDefault();\n    this.props.onLoadPending();\n    // Prevent the weird scroll-jumping behavior, as we explicitly don't want to\n    // scroll to top, and we know the scroll height is going to change\n    this.scrollToTopOnMouseIdle = false;\n    this.lastScrollWasSynthetic = false;\n    this.clearMouseIdleTimer();\n    this.mouseIdleTimer = setTimeout(this.handleMouseIdle, MOUSE_IDLE_DELAY);\n    this.mouseMovedRecently = true;\n  }\n\n  render () {\n    const { children, scrollKey, trackScroll, shouldUpdateScroll, showLoading, isLoading, hasMore, numPending, prepend, alwaysPrepend, emptyMessage, onLoadMore } = this.props;\n    const { fullscreen } = this.state;\n    const childrenCount = React.Children.count(children);\n\n    const loadMore     = (hasMore && onLoadMore) ? \n          
\n            {prepend}\n          
\n\n          
\n            
\n        
\n          
\n            {prepend}\n\n            {loadPending}\n\n            {React.Children.map(this.props.children, (child, index) => (\n              \n                {React.cloneElement(child, {\n                  getScrollPosition: this.getScrollPosition,\n                  updateScrollBottom: this.updateScrollBottom,\n                  cachedMediaWidth: this.state.cachedMediaWidth,\n                  cacheMediaWidth: this.cacheMediaWidth,\n                })}\n               \n            ))}\n\n            {loadMore}\n          
\n        
\n          {alwaysPrepend && prepend}\n\n          
\n            {emptyMessage}\n          
\n        
\n          {scrollableArea}\n         \n      );\n    } else {\n      return scrollableArea;\n    }\n  }\n\n}\n","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};","import React, { Fragment } from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport Avatar from './avatar';\nimport DisplayName from './display_name';\nimport Permalink from './permalink';\nimport IconButton from './icon_button';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { me } from '../initial_state';\n\nconst messages = defineMessages({\n  follow: { id: 'account.follow', defaultMessage: 'Follow' },\n  unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },\n  requested: { id: 'account.requested', defaultMessage: 'Awaiting approval' },\n  unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' },\n  unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' },\n  mute_notifications: { id: 'account.mute_notifications', defaultMessage: 'Mute notifications from @{name}' },\n  unmute_notifications: { id: 'account.unmute_notifications', defaultMessage: 'Unmute notifications from @{name}' },\n});\n\nexport default @injectIntl\nclass Account extends ImmutablePureComponent {\n\n  static propTypes = {\n    account: ImmutablePropTypes.map.isRequired,\n    onFollow: PropTypes.func.isRequired,\n    onBlock: PropTypes.func.isRequired,\n    onMute: PropTypes.func.isRequired,\n    onMuteNotifications: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n    hidden: PropTypes.bool,\n    actionIcon: PropTypes.string,\n    actionTitle: PropTypes.string,\n    onActionClick: PropTypes.func,\n  };\n\n  handleFollow = () => {\n    this.props.onFollow(this.props.account);\n  }\n\n  handleBlock = () => {\n    this.props.onBlock(this.props.account);\n  }\n\n  handleMute = () => {\n    this.props.onMute(this.props.account);\n  }\n\n  handleMuteNotifications = () => {\n    this.props.onMuteNotifications(this.props.account, true);\n  }\n\n  handleUnmuteNotifications = () => {\n    this.props.onMuteNotifications(this.props.account, false);\n  }\n\n  handleAction = () => {\n    this.props.onActionClick(this.props.account);\n  }\n\n  render () {\n    const { account, intl, hidden, onActionClick, actionIcon, actionTitle } = this.props;\n\n    if (!account) {\n      return 
;\n    }\n\n    if (hidden) {\n      return (\n        \n          {account.get('display_name')}\n          {account.get('username')}\n         \n      );\n    }\n\n    let buttons;\n\n    if (onActionClick && actionIcon) {\n      buttons = \n             \n        );\n      } else if (!account.get('moved') || following) {\n        buttons = \n        
\n          
\n            \n             \n\n          
\n            {buttons}\n          
\n        
\n      
@{account.get('acct')} }} />,\n          confirm: intl.formatMessage(messages.unfollowConfirm),\n          onConfirm: () => dispatch(unfollowAccount(account.get('id'))),\n        }));\n      } else {\n        dispatch(unfollowAccount(account.get('id')));\n      }\n    } else {\n      dispatch(followAccount(account.get('id')));\n    }\n  },\n\n  onBlock (account) {\n    if (account.getIn(['relationship', 'blocking'])) {\n      dispatch(unblockAccount(account.get('id')));\n    } else {\n      dispatch(blockAccount(account.get('id')));\n    }\n  },\n\n  onMute (account) {\n    if (account.getIn(['relationship', 'muting'])) {\n      dispatch(unmuteAccount(account.get('id')));\n    } else {\n      dispatch(initMuteModal(account));\n    }\n  },\n\n\n  onMuteNotifications (account, notifications) {\n    dispatch(muteAccount(account.get('id'), notifications));\n  },\n});\n\nexport default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Account));\n","var core = module.exports = {\n  version: '2.6.1'\n};\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef","var store = require('./_shared')('wks');\n\nvar uid = require('./_uid');\n\nvar Symbol = require('./_global').Symbol;\n\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n  return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nconst MissingIndicator = () => (\n  \n);\n\nexport default MissingIndicator;\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nconst MissingIndicator = () => (\n  \n);\n\nexport default MissingIndicator;\n","import _extends from '../../polyfills/extends';\nimport React from 'react';\nimport data from '../../../data/all.json';\nimport NimbleEmoji from './nimble-emoji';\nimport { EmojiPropTypes, EmojiDefaultProps } from '../../utils/shared-props';\n\nvar Emoji = function Emoji(props) {\n  for (var k in Emoji.defaultProps) {\n    if (props[k] == undefined && Emoji.defaultProps[k] != undefined) {\n      props[k] = Emoji.defaultProps[k];\n    }\n  }\n\n  return NimbleEmoji(_extends({}, props));\n};\n\nEmoji.propTypes = EmojiPropTypes;\nEmoji.defaultProps = _extends({}, EmojiDefaultProps, {\n  data: data\n});\nexport default Emoji;","import { connect } from 'react-redux';\nimport StatusList from 'flavours/glitch/components/status_list';\nimport { scrollTopTimeline, loadPending } from 'flavours/glitch/actions/timelines';\nimport { Map as ImmutableMap, List as ImmutableList } from 'immutable';\nimport { createSelector } from 'reselect';\nimport { debounce } from 'lodash';\nimport { me } from 'flavours/glitch/util/initial_state';\n\nconst getRegex = createSelector([\n  (state, { type }) => state.getIn(['settings', type, 'regex', 'body']),\n], (rawRegex) => {\n  let regex = null;\n\n  try {\n    regex = rawRegex && new RegExp(rawRegex.trim(), 'i');\n  } catch (e) {\n    // Bad regex, don't affect filters\n  }\n  return regex;\n});\n\nconst makeGetStatusIds = () => createSelector([\n  (state, { type }) => state.getIn(['settings', type], ImmutableMap()),\n  (state, { type }) => state.getIn(['timelines', type, 'items'], ImmutableList()),\n  (state)           => state.get('statuses'),\n  getRegex,\n], (columnSettings, statusIds, statuses, regex) => {\n  const rawRegex = columnSettings.getIn(['regex', 'body'], '').trim();\n\n  return statusIds.filter(id => {\n    if (id === null) return true;\n\n    const statusForId = statuses.get(id);\n    let showStatus    = true;\n\n    if (columnSettings.getIn(['shows', 'reblog']) === false) {\n      showStatus = showStatus && statusForId.get('reblog') === null;\n    }\n\n    if (columnSettings.getIn(['shows', 'reply']) === false) {\n      showStatus = showStatus && (statusForId.get('in_reply_to_id') === null || statusForId.get('in_reply_to_account_id') === me);\n    }\n\n    if (columnSettings.getIn(['shows', 'direct']) === false) {\n      showStatus = showStatus && statusForId.get('visibility') !== 'direct';\n    }\n\n    if (showStatus && regex && statusForId.get('account') !== me) {\n      const searchIndex = statusForId.get('reblog') ? statuses.getIn([statusForId.get('reblog'), 'search_index']) : statusForId.get('search_index');\n      showStatus = !regex.test(searchIndex);\n    }\n\n    return showStatus;\n  });\n});\n\nconst makeMapStateToProps = () => {\n  const getStatusIds = makeGetStatusIds();\n\n  const mapStateToProps = (state, { timelineId }) => ({\n    statusIds: getStatusIds(state, { type: timelineId }),\n    isLoading: state.getIn(['timelines', timelineId, 'isLoading'], true),\n    isPartial: state.getIn(['timelines', timelineId, 'isPartial'], false),\n    hasMore:   state.getIn(['timelines', timelineId, 'hasMore']),\n    numPending: state.getIn(['timelines', timelineId, 'pendingItems'], ImmutableList()).size,\n  });\n\n  return mapStateToProps;\n};\n\nconst mapDispatchToProps = (dispatch, { timelineId }) => ({\n\n  onScrollToTop: debounce(() => {\n    dispatch(scrollTopTimeline(timelineId, true));\n  }, 100),\n\n  onScroll: debounce(() => {\n    dispatch(scrollTopTimeline(timelineId, false));\n  }, 100),\n\n  onLoadPending: () => dispatch(loadPending(timelineId)),\n\n});\n\nexport default connect(makeMapStateToProps, mapDispatchToProps)(StatusList);\n","var _Object = Object;\nexport default _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};","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func\n: Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef","import { debounce } from 'lodash';\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport StatusContainer from 'flavours/glitch/containers/status_container';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport LoadGap from './load_gap';\nimport ScrollableList from './scrollable_list';\nimport { FormattedMessage } from 'react-intl';\n\nexport default class StatusList extends ImmutablePureComponent {\n\n  static propTypes = {\n    scrollKey: PropTypes.string.isRequired,\n    statusIds: ImmutablePropTypes.list.isRequired,\n    featuredStatusIds: ImmutablePropTypes.list,\n    onLoadMore: PropTypes.func,\n    onScrollToTop: PropTypes.func,\n    onScroll: PropTypes.func,\n    trackScroll: PropTypes.bool,\n    shouldUpdateScroll: PropTypes.func,\n    isLoading: PropTypes.bool,\n    isPartial: PropTypes.bool,\n    hasMore: PropTypes.bool,\n    prepend: PropTypes.node,\n    alwaysPrepend: PropTypes.bool,\n    emptyMessage: PropTypes.node,\n    timelineId: PropTypes.string.isRequired,\n  };\n\n  static defaultProps = {\n    trackScroll: true,\n  };\n\n  getFeaturedStatusCount = () => {\n    return this.props.featuredStatusIds ? this.props.featuredStatusIds.size : 0;\n  }\n\n  getCurrentStatusIndex = (id, featured) => {\n    if (featured) {\n      return this.props.featuredStatusIds.indexOf(id);\n    } else {\n      return this.props.statusIds.indexOf(id) + this.getFeaturedStatusCount();\n    }\n  }\n\n  handleMoveUp = (id, featured) => {\n    const elementIndex = this.getCurrentStatusIndex(id, featured) - 1;\n    this._selectChild(elementIndex, true);\n  }\n\n  handleMoveDown = (id, featured) => {\n    const elementIndex = this.getCurrentStatusIndex(id, featured) + 1;\n    this._selectChild(elementIndex, false);\n  }\n\n  handleLoadOlder = debounce(() => {\n    this.props.onLoadMore(this.props.statusIds.size > 0 ? this.props.statusIds.last() : undefined);\n  }, 300, { leading: true })\n\n  _selectChild (index, align_top) {\n    const container = this.node.node;\n    const element = container.querySelector(`article:nth-of-type(${index + 1}) .focusable`);\n\n    if (element) {\n      if (align_top && container.scrollTop > element.offsetTop) {\n        element.scrollIntoView(true);\n      } else if (!align_top && container.scrollTop + container.clientHeight < element.offsetTop + element.offsetHeight) {\n        element.scrollIntoView(false);\n      }\n      element.focus();\n    }\n  }\n\n  setRef = c => {\n    this.node = c;\n  }\n\n  render () {\n    const { statusIds, featuredStatusIds, onLoadMore, timelineId, ...other }  = this.props;\n    const { isLoading, isPartial } = other;\n\n    if (isPartial) {\n      return (\n        \n      );\n    }\n\n    let scrollableContent = (isLoading || statusIds.size > 0) ? (\n      statusIds.map((statusId, index) => statusId === null ? (\n         0 ? statusIds.get(index - 1) : null}\n          onClick={onLoadMore}\n        />\n      ) : (\n        \n        {scrollableContent}\n       \n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport StatusList from '../../../components/status_list';\nimport { scrollTopTimeline, loadPending } from '../../../actions/timelines';\nimport { Map as ImmutableMap, List as ImmutableList } from 'immutable';\nimport { createSelector } from 'reselect';\nimport { debounce } from 'lodash';\nimport { me } from '../../../initial_state';\n\nconst makeGetStatusIds = () => createSelector([\n  (state, { type }) => state.getIn(['settings', type], ImmutableMap()),\n  (state, { type }) => state.getIn(['timelines', type, 'items'], ImmutableList()),\n  (state)           => state.get('statuses'),\n], (columnSettings, statusIds, statuses) => {\n  return statusIds.filter(id => {\n    if (id === null) return true;\n\n    const statusForId = statuses.get(id);\n    let showStatus    = true;\n\n    if (columnSettings.getIn(['shows', 'reblog']) === false) {\n      showStatus = showStatus && statusForId.get('reblog') === null;\n    }\n\n    if (columnSettings.getIn(['shows', 'reply']) === false) {\n      showStatus = showStatus && (statusForId.get('in_reply_to_id') === null || statusForId.get('in_reply_to_account_id') === me);\n    }\n\n    return showStatus;\n  });\n});\n\nconst makeMapStateToProps = () => {\n  const getStatusIds = makeGetStatusIds();\n\n  const mapStateToProps = (state, { timelineId }) => ({\n    statusIds: getStatusIds(state, { type: timelineId }),\n    isLoading: state.getIn(['timelines', timelineId, 'isLoading'], true),\n    isPartial: state.getIn(['timelines', timelineId, 'isPartial'], false),\n    hasMore:   state.getIn(['timelines', timelineId, 'hasMore']),\n    numPending: state.getIn(['timelines', timelineId, 'pendingItems'], ImmutableList()).size,\n  });\n\n  return mapStateToProps;\n};\n\nconst mapDispatchToProps = (dispatch, { timelineId }) => ({\n\n  onScrollToTop: debounce(() => {\n    dispatch(scrollTopTimeline(timelineId, true));\n  }, 100),\n\n  onScroll: debounce(() => {\n    dispatch(scrollTopTimeline(timelineId, false));\n  }, 100),\n\n  onLoadPending: () => dispatch(loadPending(timelineId)),\n\n});\n\nexport default connect(makeMapStateToProps, mapDispatchToProps)(StatusList);\n","var _String = String;\nexport default _String.fromCodePoint || function stringFromCodePoint() {\n  var MAX_SIZE = 0x4000;\n  var codeUnits = [];\n  var highSurrogate;\n  var lowSurrogate;\n  var index = -1;\n  var length = arguments.length;\n\n  if (!length) {\n    return '';\n  }\n\n  var result = '';\n\n  while (++index < length) {\n    var codePoint = Number(arguments[index]);\n\n    if (!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n    codePoint < 0 || // not a valid Unicode code point\n    codePoint > 0x10ffff || // not a valid Unicode code point\n    Math.floor(codePoint) != codePoint // not an integer\n    ) {\n        throw RangeError('Invalid code point: ' + codePoint);\n      }\n\n    if (codePoint <= 0xffff) {\n      // BMP code point\n      codeUnits.push(codePoint);\n    } else {\n      // Astral code point; split in surrogate halves\n      // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n      codePoint -= 0x10000;\n      highSurrogate = (codePoint >> 10) + 0xd800;\n      lowSurrogate = codePoint % 0x400 + 0xdc00;\n      codeUnits.push(highSurrogate, lowSurrogate);\n    }\n\n    if (index + 1 === length || codeUnits.length > MAX_SIZE) {\n      result += String.fromCharCode.apply(null, codeUnits);\n      codeUnits.length = 0;\n    }\n  }\n\n  return result;\n};","import _Object$keys from 'babel-runtime/core-js/object/keys';\nimport { buildSearch } from './data';\nimport stringFromCodePoint from '../polyfills/stringFromCodePoint';\nvar _JSON = JSON;\nvar COLONS_REGEX = /^(?:\\:([^\\:]+)\\:)(?:\\:skin-tone-(\\d)\\:)?$/;\nvar SKINS = ['1F3FA', '1F3FB', '1F3FC', '1F3FD', '1F3FE', '1F3FF'];\n\nfunction unifiedToNative(unified) {\n  var unicodes = unified.split('-'),\n      codePoints = unicodes.map(function (u) {\n    return '0x' + u;\n  });\n  return stringFromCodePoint.apply(null, codePoints);\n}\n\nfunction sanitize(emoji) {\n  var name = emoji.name;\n  var short_names = emoji.short_names;\n  var skin_tone = emoji.skin_tone;\n  var skin_variations = emoji.skin_variations;\n  var emoticons = emoji.emoticons;\n  var unified = emoji.unified;\n  var custom = emoji.custom;\n  var customCategory = emoji.customCategory;\n  var imageUrl = emoji.imageUrl;\n  var id = emoji.id || short_names[0];\n  var colons = ':' + id + ':';\n\n  if (custom) {\n    return {\n      id: id,\n      name: name,\n      colons: colons,\n      emoticons: emoticons,\n      custom: custom,\n      customCategory: customCategory,\n      imageUrl: imageUrl\n    };\n  }\n\n  if (skin_tone) {\n    colons += ':skin-tone-' + skin_tone + ':';\n  }\n\n  return {\n    id: id,\n    name: name,\n    colons: colons,\n    emoticons: emoticons,\n    unified: unified.toLowerCase(),\n    skin: skin_tone || (skin_variations ? 1 : null),\n    native: unifiedToNative(unified)\n  };\n}\n\nfunction getSanitizedData() {\n  return sanitize(getData.apply(undefined, arguments));\n}\n\nfunction getData(emoji, skin, set, data) {\n  var emojiData = {};\n\n  if (typeof emoji == 'string') {\n    var matches = emoji.match(COLONS_REGEX);\n\n    if (matches) {\n      emoji = matches[1];\n\n      if (matches[2]) {\n        skin = parseInt(matches[2], 10);\n      }\n    }\n\n    if (data.aliases.hasOwnProperty(emoji)) {\n      emoji = data.aliases[emoji];\n    }\n\n    if (data.emojis.hasOwnProperty(emoji)) {\n      emojiData = data.emojis[emoji];\n    } else {\n      return null;\n    }\n  } else if (emoji.id) {\n    if (data.aliases.hasOwnProperty(emoji.id)) {\n      emoji.id = data.aliases[emoji.id];\n    }\n\n    if (data.emojis.hasOwnProperty(emoji.id)) {\n      emojiData = data.emojis[emoji.id];\n      skin || (skin = emoji.skin);\n    }\n  }\n\n  if (!_Object$keys(emojiData).length) {\n    emojiData = emoji;\n    emojiData.custom = true;\n\n    if (!emojiData.search) {\n      emojiData.search = buildSearch(emoji);\n    }\n  }\n\n  emojiData.emoticons || (emojiData.emoticons = []);\n  emojiData.variations || (emojiData.variations = []);\n\n  if (emojiData.skin_variations && skin > 1 && set) {\n    emojiData = JSON.parse(_JSON.stringify(emojiData));\n    var skinKey = SKINS[skin - 1],\n        variationData = emojiData.skin_variations[skinKey];\n\n    if (!variationData.variations && emojiData.variations) {\n      delete emojiData.variations;\n    }\n\n    if (variationData['has_img_' + set] == undefined || variationData['has_img_' + set]) {\n      emojiData.skin_tone = skin;\n\n      for (var k in variationData) {\n        var v = variationData[k];\n        emojiData[k] = v;\n      }\n    }\n  }\n\n  if (emojiData.variations && emojiData.variations.length) {\n    emojiData = JSON.parse(_JSON.stringify(emojiData));\n    emojiData.unified = emojiData.variations.shift();\n  }\n\n  return emojiData;\n}\n\nfunction uniq(arr) {\n  return arr.reduce(function (acc, item) {\n    if (acc.indexOf(item) === -1) {\n      acc.push(item);\n    }\n\n    return acc;\n  }, []);\n}\n\nfunction intersect(a, b) {\n  var uniqA = uniq(a);\n  var uniqB = uniq(b);\n  return uniqA.filter(function (item) {\n    return uniqB.indexOf(item) >= 0;\n  });\n}\n\nfunction deepMerge(a, b) {\n  var o = {};\n\n  for (var key in a) {\n    var originalValue = a[key],\n        value = originalValue;\n\n    if (b.hasOwnProperty(key)) {\n      value = b[key];\n    }\n\n    if (typeof value === 'object') {\n      value = deepMerge(originalValue, value);\n    }\n\n    o[key] = value;\n  }\n\n  return o;\n} // https://github.com/sonicdoe/measure-scrollbar\n\n\nfunction measureScrollbar() {\n  if (typeof document == 'undefined') return 0;\n  var div = document.createElement('div');\n  div.style.width = '100px';\n  div.style.height = '100px';\n  div.style.overflow = 'scroll';\n  div.style.position = 'absolute';\n  div.style.top = '-9999px';\n  document.body.appendChild(div);\n  var scrollbarWidth = div.offsetWidth - div.clientWidth;\n  document.body.removeChild(div);\n  return scrollbarWidth;\n}\n\nexport { getData, getSanitizedData, uniq, intersect, deepMerge, unifiedToNative, measureScrollbar };","var global = require('./_global');\n\nvar core = require('./_core');\n\nvar ctx = require('./_ctx');\n\nvar hide = require('./_hide');\n\nvar has = require('./_has');\n\nvar PROTOTYPE = 'prototype';\n\nvar $export = function $export(type, name, source) {\n  var IS_FORCED = type & $export.F;\n  var IS_GLOBAL = type & $export.G;\n  var IS_STATIC = type & $export.S;\n  var IS_PROTO = type & $export.P;\n  var IS_BIND = type & $export.B;\n  var IS_WRAP = type & $export.W;\n  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n  var expProto = exports[PROTOTYPE];\n  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n  var key, own, out;\n  if (IS_GLOBAL) source = name;\n\n  for (key in source) {\n    // contains in native\n    own = !IS_FORCED && target && target[key] !== undefined;\n    if (own && has(exports, key)) continue; // export native or passed\n\n    out = own ? target[key] : source[key]; // prevent global pollution for namespaces\n\n    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context\n    : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library\n    : IS_WRAP && target[key] == out ? function (C) {\n      var F = function F(a, b, c) {\n        if (this instanceof C) {\n          switch (arguments.length) {\n            case 0:\n              return new C();\n\n            case 1:\n              return new C(a);\n\n            case 2:\n              return new C(a, b);\n          }\n\n          return new C(a, b, c);\n        }\n\n        return C.apply(this, arguments);\n      };\n\n      F[PROTOTYPE] = C[PROTOTYPE];\n      return F; // make static versions for prototype methods\n    }(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n\n    if (IS_PROTO) {\n      (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n\n      if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n    }\n  }\n}; // type bitmap\n\n\n$export.F = 1; // forced\n\n$export.G = 2; // global\n\n$export.S = 4; // static\n\n$export.P = 8; // proto\n\n$export.B = 16; // bind\n\n$export.W = 32; // wrap\n\n$export.U = 64; // safe\n\n$export.R = 128; // real proto method for `library`\n\nmodule.exports = $export;","var dP = require('./_object-dp');\n\nvar createDesc = require('./_property-desc');\n\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n  return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n  object[key] = value;\n  return object;\n};","var anObject = require('./_an-object');\n\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\n\nvar toPrimitive = require('./_to-primitive');\n\nvar dP = Object.defineProperty;\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPrimitive(P, true);\n  anObject(Attributes);\n  if (IE8_DOM_DEFINE) try {\n    return dP(O, P, Attributes);\n  } catch (e) {\n    /* empty */\n  }\n  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n  if ('value' in Attributes) O[P] = Attributes.value;\n  return O;\n};","var isObject = require('./_is-object');\n\nmodule.exports = function (it) {\n  if (!isObject(it)) throw TypeError(it + ' is not an object!');\n  return it;\n};","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n  return Object.defineProperty({}, 'a', {\n    get: function get() {\n      return 7;\n    }\n  }).a != 7;\n});","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n  return hasOwnProperty.call(it, key);\n};","var mapping = {\n  name: 'a',\n  unified: 'b',\n  non_qualified: 'c',\n  has_img_apple: 'd',\n  has_img_google: 'e',\n  has_img_twitter: 'f',\n  has_img_emojione: 'g',\n  has_img_facebook: 'h',\n  has_img_messenger: 'i',\n  keywords: 'j',\n  sheet: 'k',\n  emoticons: 'l',\n  text: 'm',\n  short_names: 'n',\n  added_in: 'o'\n};\n\nvar buildSearch = function buildSearch(emoji) {\n  var search = [];\n\n  var addToSearch = function addToSearch(strings, split) {\n    if (!strings) {\n      return;\n    }\n\n    ;\n    (Array.isArray(strings) ? strings : [strings]).forEach(function (string) {\n      ;\n      (split ? string.split(/[-|_|\\s]+/) : [string]).forEach(function (s) {\n        s = s.toLowerCase();\n\n        if (search.indexOf(s) == -1) {\n          search.push(s);\n        }\n      });\n    });\n  };\n\n  addToSearch(emoji.short_names, true);\n  addToSearch(emoji.name, true);\n  addToSearch(emoji.keywords, false);\n  addToSearch(emoji.emoticons, false);\n  return search.join(',');\n};\n\nvar compress = function compress(emoji) {\n  emoji.short_names = emoji.short_names.filter(function (short_name) {\n    return short_name !== emoji.short_name;\n  });\n  delete emoji.short_name;\n  emoji.sheet = [emoji.sheet_x, emoji.sheet_y];\n  delete emoji.sheet_x;\n  delete emoji.sheet_y;\n  emoji.added_in = parseInt(emoji.added_in);\n\n  if (emoji.added_in === 6) {\n    delete emoji.added_in;\n  }\n\n  for (var key in mapping) {\n    emoji[mapping[key]] = emoji[key];\n    delete emoji[key];\n  }\n\n  for (var _key in emoji) {\n    var value = emoji[_key];\n\n    if (Array.isArray(value) && !value.length) {\n      delete emoji[_key];\n    } else if (typeof value === 'string' && !value.length) {\n      delete emoji[_key];\n    } else if (value === null) {\n      delete emoji[_key];\n    }\n  }\n};\n\nvar uncompress = function uncompress(data) {\n  data.compressed = false;\n\n  for (var id in data.emojis) {\n    var emoji = data.emojis[id];\n\n    for (var key in mapping) {\n      emoji[key] = emoji[mapping[key]];\n      delete emoji[mapping[key]];\n    }\n\n    if (!emoji.short_names) emoji.short_names = [];\n    emoji.short_names.unshift(id);\n    emoji.sheet_x = emoji.sheet[0];\n    emoji.sheet_y = emoji.sheet[1];\n    delete emoji.sheet;\n    if (!emoji.text) emoji.text = '';\n    if (!emoji.added_in) emoji.added_in = 6;\n    emoji.added_in = emoji.added_in.toFixed(1);\n    emoji.search = buildSearch(emoji);\n  }\n};\n\nmodule.exports = {\n  buildSearch: buildSearch,\n  compress: compress,\n  uncompress: uncompress\n};","import PropTypes from 'prop-types';\nvar EmojiPropTypes = {\n  data: PropTypes.object.isRequired,\n  onOver: PropTypes.func,\n  onLeave: PropTypes.func,\n  onClick: PropTypes.func,\n  fallback: PropTypes.func,\n  backgroundImageFn: PropTypes.func,\n  native: PropTypes.bool,\n  forceSize: PropTypes.bool,\n  tooltip: PropTypes.bool,\n  skin: PropTypes.oneOf([1, 2, 3, 4, 5, 6]),\n  sheetSize: PropTypes.oneOf([16, 20, 32, 64]),\n  set: PropTypes.oneOf(['apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook']),\n  size: PropTypes.number.isRequired,\n  emoji: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nvar EmojiDefaultProps = {\n  skin: 1,\n  set: 'apple',\n  sheetSize: 64,\n  native: false,\n  forceSize: false,\n  tooltip: false,\n  backgroundImageFn: function backgroundImageFn(set, sheetSize) {\n    return 'https://unpkg.com/emoji-datasource-' + set + '@' + '4.0.4' + '/img/' + set + '/sheets-256/' + sheetSize + '.png';\n  },\n  onOver: function onOver() {},\n  onLeave: function onLeave() {},\n  onClick: function onClick() {}\n};\nvar PickerPropTypes = {\n  onClick: PropTypes.func,\n  onSelect: PropTypes.func,\n  onSkinChange: PropTypes.func,\n  perLine: PropTypes.number,\n  emojiSize: PropTypes.number,\n  i18n: PropTypes.object,\n  style: PropTypes.object,\n  title: PropTypes.string,\n  emoji: PropTypes.string,\n  color: PropTypes.string,\n  set: EmojiPropTypes.set,\n  skin: EmojiPropTypes.skin,\n  native: PropTypes.bool,\n  backgroundImageFn: EmojiPropTypes.backgroundImageFn,\n  sheetSize: EmojiPropTypes.sheetSize,\n  emojisToShowFilter: PropTypes.func,\n  showPreview: PropTypes.bool,\n  showSkinTones: PropTypes.bool,\n  emojiTooltip: EmojiPropTypes.tooltip,\n  include: PropTypes.arrayOf(PropTypes.string),\n  exclude: PropTypes.arrayOf(PropTypes.string),\n  recent: PropTypes.arrayOf(PropTypes.string),\n  autoFocus: PropTypes.bool,\n  custom: PropTypes.arrayOf(PropTypes.shape({\n    name: PropTypes.string.isRequired,\n    short_names: PropTypes.arrayOf(PropTypes.string).isRequired,\n    emoticons: PropTypes.arrayOf(PropTypes.string),\n    keywords: PropTypes.arrayOf(PropTypes.string),\n    imageUrl: PropTypes.string.isRequired\n  }))\n};\nvar PickerDefaultProps = {\n  onClick: function onClick() {},\n  onSelect: function onSelect() {},\n  onSkinChange: function onSkinChange() {},\n  emojiSize: 24,\n  perLine: 9,\n  i18n: {},\n  style: {},\n  title: 'Emoji Mart™',\n  emoji: 'department_store',\n  color: '#ae65c5',\n  set: EmojiDefaultProps.set,\n  skin: null,\n  defaultSkin: EmojiDefaultProps.skin,\n  native: EmojiDefaultProps.native,\n  sheetSize: EmojiDefaultProps.sheetSize,\n  backgroundImageFn: EmojiDefaultProps.backgroundImageFn,\n  emojisToShowFilter: null,\n  showPreview: true,\n  showSkinTones: true,\n  emojiTooltip: EmojiDefaultProps.tooltip,\n  autoFocus: false,\n  custom: []\n};\nexport { EmojiPropTypes, EmojiDefaultProps, PickerPropTypes, PickerDefaultProps };","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\n\nexport default class LoadMore extends React.PureComponent {\n\n  static propTypes = {\n    onClick: PropTypes.func,\n    disabled: PropTypes.bool,\n    visible: PropTypes.bool,\n  }\n\n  static defaultProps = {\n    visible: true,\n  }\n\n  render() {\n    const { disabled, visible } = this.props;\n\n    return (\n      \n         \n    );\n  }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ColumnHeader from '../../../components/column_header';\nimport { injectIntl, defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n  profile: { id: 'column_header.profile', defaultMessage: 'Profile' },\n});\n\nexport default @injectIntl\nclass ProfileColumnHeader extends React.PureComponent {\n\n  static propTypes = {\n    onClick: PropTypes.func,\n    intl: PropTypes.object.isRequired,\n  };\n\n  render() {\n    const { onClick, intl } = this.props;\n\n    return (\n      \n         \n    );\n  }\n\n}\n","import { debounce } from 'lodash';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport StatusContainer from '../containers/status_container';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport LoadGap from './load_gap';\nimport ScrollableList from './scrollable_list';\n\nexport default class StatusList extends ImmutablePureComponent {\n\n  static propTypes = {\n    scrollKey: PropTypes.string.isRequired,\n    statusIds: ImmutablePropTypes.list.isRequired,\n    featuredStatusIds: ImmutablePropTypes.list,\n    onLoadMore: PropTypes.func,\n    onScrollToTop: PropTypes.func,\n    onScroll: PropTypes.func,\n    trackScroll: PropTypes.bool,\n    shouldUpdateScroll: PropTypes.func,\n    isLoading: PropTypes.bool,\n    isPartial: PropTypes.bool,\n    hasMore: PropTypes.bool,\n    prepend: PropTypes.node,\n    emptyMessage: PropTypes.node,\n    alwaysPrepend: PropTypes.bool,\n    timelineId: PropTypes.string,\n  };\n\n  static defaultProps = {\n    trackScroll: true,\n  };\n\n  getFeaturedStatusCount = () => {\n    return this.props.featuredStatusIds ? this.props.featuredStatusIds.size : 0;\n  }\n\n  getCurrentStatusIndex = (id, featured) => {\n    if (featured) {\n      return this.props.featuredStatusIds.indexOf(id);\n    } else {\n      return this.props.statusIds.indexOf(id) + this.getFeaturedStatusCount();\n    }\n  }\n\n  handleMoveUp = (id, featured) => {\n    const elementIndex = this.getCurrentStatusIndex(id, featured) - 1;\n    this._selectChild(elementIndex, true);\n  }\n\n  handleMoveDown = (id, featured) => {\n    const elementIndex = this.getCurrentStatusIndex(id, featured) + 1;\n    this._selectChild(elementIndex, false);\n  }\n\n  handleLoadOlder = debounce(() => {\n    this.props.onLoadMore(this.props.statusIds.size > 0 ? this.props.statusIds.last() : undefined);\n  }, 300, { leading: true })\n\n  _selectChild (index, align_top) {\n    const container = this.node.node;\n    const element = container.querySelector(`article:nth-of-type(${index + 1}) .focusable`);\n\n    if (element) {\n      if (align_top && container.scrollTop > element.offsetTop) {\n        element.scrollIntoView(true);\n      } else if (!align_top && container.scrollTop + container.clientHeight < element.offsetTop + element.offsetHeight) {\n        element.scrollIntoView(false);\n      }\n      element.focus();\n    }\n  }\n\n  setRef = c => {\n    this.node = c;\n  }\n\n  render () {\n    const { statusIds, featuredStatusIds, shouldUpdateScroll, onLoadMore, timelineId, ...other }  = this.props;\n    const { isLoading, isPartial } = other;\n\n    if (isPartial) {\n      return (\n        \n      );\n    }\n\n    let scrollableContent = (isLoading || statusIds.size > 0) ? (\n      statusIds.map((statusId, index) => statusId === null ? (\n         0 ? statusIds.get(index - 1) : null}\n          onClick={onLoadMore}\n        />\n      ) : (\n        \n        {scrollableContent}\n       \n    );\n  }\n\n}\n","var _Object = Object;\nexport default _Object.getPrototypeOf || function (O) {\n  O = Object(O);\n\n  if (typeof O.constructor === 'function' && O instanceof O.constructor) {\n    return O.constructor.prototype;\n  }\n\n  return O instanceof Object ? Object.prototype : null;\n};","var _Object = Object;\nexport default (function createClass() {\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\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})();","export default function possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === 'object' || typeof call === 'function') ? call : self;\n}","var _Object = Object;\nexport default function inherits(subClass, superClass) {\n  if (typeof superClass !== 'function' && superClass !== null) {\n    throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n  }\n\n  subClass.prototype = _Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n\n  if (superClass) {\n    _Object.setPrototypeOf ? _Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n  }\n}","var NAMESPACE = 'emoji-mart';\nvar _JSON = JSON;\nvar isLocalStorageSupported = typeof window !== 'undefined' && 'localStorage' in window;\nvar getter = void 0;\nvar setter = void 0;\n\nfunction setHandlers(handlers) {\n  handlers || (handlers = {});\n  getter = handlers.getter;\n  setter = handlers.setter;\n}\n\nfunction setNamespace(namespace) {\n  NAMESPACE = namespace;\n}\n\nfunction update(state) {\n  for (var key in state) {\n    var value = state[key];\n    set(key, value);\n  }\n}\n\nfunction set(key, value) {\n  if (setter) {\n    setter(key, value);\n  } else {\n    if (!isLocalStorageSupported) return;\n\n    try {\n      window.localStorage[NAMESPACE + '.' + key] = _JSON.stringify(value);\n    } catch (e) {}\n  }\n}\n\nfunction get(key) {\n  if (getter) {\n    return getter(key);\n  } else {\n    if (!isLocalStorageSupported) return;\n\n    try {\n      var value = window.localStorage[NAMESPACE + '.' + key];\n    } catch (e) {\n      return;\n    }\n\n    if (value) {\n      return JSON.parse(value);\n    }\n  }\n}\n\nexport default {\n  update: update,\n  set: set,\n  get: get,\n  setNamespace: setNamespace,\n  setHandlers: setHandlers\n};","import store from './store';\nvar DEFAULTS = ['+1', 'grinning', 'kissing_heart', 'heart_eyes', 'laughing', 'stuck_out_tongue_winking_eye', 'sweat_smile', 'joy', 'scream', 'disappointed', 'unamused', 'weary', 'sob', 'sunglasses', 'heart', 'poop'];\nvar frequently = void 0,\n    initialized = void 0;\nvar defaults = {};\n\nfunction init() {\n  initialized = true;\n  frequently = store.get('frequently');\n}\n\nfunction add(emoji) {\n  if (!initialized) init();\n  var id = emoji.id;\n  frequently || (frequently = defaults);\n  frequently[id] || (frequently[id] = 0);\n  frequently[id] += 1;\n  store.set('last', id);\n  store.set('frequently', frequently);\n}\n\nfunction get(perLine) {\n  if (!initialized) init();\n\n  if (!frequently) {\n    defaults = {};\n    var result = [];\n\n    for (var i = 0; i < perLine; i++) {\n      defaults[DEFAULTS[i]] = perLine - i;\n      result.push(DEFAULTS[i]);\n    }\n\n    return result;\n  }\n\n  var quantity = perLine * 4;\n  var frequentlyKeys = [];\n\n  for (var key in frequently) {\n    if (frequently.hasOwnProperty(key)) {\n      frequentlyKeys.push(key);\n    }\n  }\n\n  var sorted = frequentlyKeys.sort(function (a, b) {\n    return frequently[a] - frequently[b];\n  }).reverse();\n  var sliced = sorted.slice(0, quantity);\n  var last = store.get('last');\n\n  if (last && sliced.indexOf(last) == -1) {\n    sliced.pop();\n    sliced.push(last);\n  }\n\n  return sliced;\n}\n\nexport default {\n  add: add,\n  get: get\n};","var SVGs = {\n  activity: \"\\n       ' + SVGs[id] + '\\n       ';\n        this.SVGs[id] = svg;\n        return svg;\n      }\n    }\n  }, {\n    key: 'handleClick',\n    value: function handleClick(e) {\n      var index = e.currentTarget.getAttribute('data-index');\n      var _props = this.props;\n      var categories = _props.categories;\n      var onAnchorClick = _props.onAnchorClick;\n      onAnchorClick(categories[index], index);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props2 = this.props;\n      var categories = _props2.categories;\n      var onAnchorClick = _props2.onAnchorClick;\n      var color = _props2.color;\n      var i18n = _props2.i18n;\n      var selected = this.state.selected;\n      return React.createElement('div', {\n        className: 'emoji-mart-anchors'\n      }, categories.map(function (category, i) {\n        var id = category.id;\n        var name = category.name;\n        var anchor = category.anchor;\n        var isSelected = name == selected;\n\n        if (anchor === false) {\n          return null;\n        }\n\n        var iconId = id.startsWith('custom-') ? 'custom' : id;\n        return React.createElement('span', {\n          key: id,\n          title: i18n.categories[id],\n          'data-index': i,\n          onClick: _this2.handleClick,\n          className: 'emoji-mart-anchor ' + (isSelected ? 'emoji-mart-anchor-selected' : ''),\n          style: {\n            color: isSelected ? color : null\n          }\n        }, React.createElement('div', {\n          dangerouslySetInnerHTML: {\n            __html: _this2.getSVG(iconId)\n          }\n        }), React.createElement('span', {\n          className: 'emoji-mart-anchor-bar',\n          style: {\n            backgroundColor: color\n          }\n        }));\n      }));\n    }\n  }]);\n\n  return Anchors;\n}(React.PureComponent);\n\nexport default Anchors;\nAnchors.defaultProps = {\n  categories: [],\n  onAnchorClick: function onAnchorClick() {}\n};","import _extends from '../polyfills/extends';\nimport _Object$getPrototypeOf from '../polyfills/objectGetPrototypeOf';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from '../polyfills/createClass';\nimport _possibleConstructorReturn from '../polyfills/possibleConstructorReturn';\nimport _inherits from '../polyfills/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport frequently from '../utils/frequently';\nimport { getData } from '../utils';\nimport { NimbleEmoji } from '.';\n\nvar Category = function (_React$Component) {\n  _inherits(Category, _React$Component);\n\n  function Category(props) {\n    _classCallCheck(this, Category);\n\n    var _this = _possibleConstructorReturn(this, (Category.__proto__ || _Object$getPrototypeOf(Category)).call(this, props));\n\n    _this.data = props.data;\n    _this.setContainerRef = _this.setContainerRef.bind(_this);\n    _this.setLabelRef = _this.setLabelRef.bind(_this);\n    return _this;\n  }\n\n  _createClass(Category, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      this.parent = this.container.parentNode;\n      this.margin = 0;\n      this.minMargin = 0;\n      this.memoizeSize();\n    }\n  }, {\n    key: 'shouldComponentUpdate',\n    value: function shouldComponentUpdate(nextProps, nextState) {\n      var _props = this.props;\n      var name = _props.name;\n      var perLine = _props.perLine;\n      var native = _props.native;\n      var hasStickyPosition = _props.hasStickyPosition;\n      var emojis = _props.emojis;\n      var emojiProps = _props.emojiProps;\n      var skin = emojiProps.skin;\n      var size = emojiProps.size;\n      var set = emojiProps.set;\n      var nextPerLine = nextProps.perLine;\n      var nextNative = nextProps.native;\n      var nextHasStickyPosition = nextProps.hasStickyPosition;\n      var nextEmojis = nextProps.emojis;\n      var nextEmojiProps = nextProps.emojiProps;\n      var nextSkin = nextEmojiProps.skin;\n      var nextSize = nextEmojiProps.size;\n      var nextSet = nextEmojiProps.set;\n      var shouldUpdate = false;\n\n      if (name == 'Recent' && perLine != nextPerLine) {\n        shouldUpdate = true;\n      }\n\n      if (name == 'Search') {\n        shouldUpdate = !(emojis == nextEmojis);\n      }\n\n      if (skin != nextSkin || size != nextSize || native != nextNative || set != nextSet || hasStickyPosition != nextHasStickyPosition) {\n        shouldUpdate = true;\n      }\n\n      return shouldUpdate;\n    }\n  }, {\n    key: 'memoizeSize',\n    value: function memoizeSize() {\n      var _container$getBoundin = this.container.getBoundingClientRect();\n\n      var top = _container$getBoundin.top;\n      var height = _container$getBoundin.height;\n\n      var _parent$getBoundingCl = this.parent.getBoundingClientRect();\n\n      var parentTop = _parent$getBoundingCl.top;\n\n      var _label$getBoundingCli = this.label.getBoundingClientRect();\n\n      var labelHeight = _label$getBoundingCli.height;\n      this.top = top - parentTop + this.parent.scrollTop;\n\n      if (height == 0) {\n        this.maxMargin = 0;\n      } else {\n        this.maxMargin = height - labelHeight;\n      }\n    }\n  }, {\n    key: 'handleScroll',\n    value: function handleScroll(scrollTop) {\n      var margin = scrollTop - this.top;\n      margin = margin < this.minMargin ? this.minMargin : margin;\n      margin = margin > this.maxMargin ? this.maxMargin : margin;\n      if (margin == this.margin) return;\n\n      if (!this.props.hasStickyPosition) {\n        this.label.style.top = margin + 'px';\n      }\n\n      this.margin = margin;\n      return true;\n    }\n  }, {\n    key: 'getEmojis',\n    value: function getEmojis() {\n      var _this2 = this;\n\n      var _props2 = this.props;\n      var name = _props2.name;\n      var emojis = _props2.emojis;\n      var recent = _props2.recent;\n      var perLine = _props2.perLine;\n\n      if (name == 'Recent') {\n        var custom = this.props.custom;\n        var frequentlyUsed = recent || frequently.get(perLine);\n\n        if (frequentlyUsed.length) {\n          emojis = frequentlyUsed.map(function (id) {\n            var emoji = custom.filter(function (e) {\n              return e.id === id;\n            })[0];\n\n            if (emoji) {\n              return emoji;\n            }\n\n            return id;\n          }).filter(function (id) {\n            return !!getData(id, null, null, _this2.data);\n          });\n        }\n\n        if (emojis.length === 0 && frequentlyUsed.length > 0) {\n          return null;\n        }\n      }\n\n      if (emojis) {\n        emojis = emojis.slice(0);\n      }\n\n      return emojis;\n    }\n  }, {\n    key: 'updateDisplay',\n    value: function updateDisplay(display) {\n      var emojis = this.getEmojis();\n\n      if (!emojis) {\n        return;\n      }\n\n      this.container.style.display = display;\n    }\n  }, {\n    key: 'setContainerRef',\n    value: function setContainerRef(c) {\n      this.container = c;\n    }\n  }, {\n    key: 'setLabelRef',\n    value: function setLabelRef(c) {\n      this.label = c;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this3 = this;\n\n      var _props3 = this.props;\n      var id = _props3.id;\n      var name = _props3.name;\n      var hasStickyPosition = _props3.hasStickyPosition;\n      var emojiProps = _props3.emojiProps;\n      var i18n = _props3.i18n;\n      var emojis = this.getEmojis();\n      var labelStyles = {};\n      var labelSpanStyles = {};\n      var containerStyles = {};\n\n      if (!emojis) {\n        containerStyles = {\n          display: 'none'\n        };\n      }\n\n      if (!hasStickyPosition) {\n        labelStyles = {\n          height: 28\n        };\n        labelSpanStyles = {\n          position: 'absolute'\n        };\n      }\n\n      var label = i18n.categories[id] || name;\n      return React.createElement('div', {\n        ref: this.setContainerRef,\n        className: 'emoji-mart-category ' + (emojis && !emojis.length ? 'emoji-mart-no-results' : ''),\n        style: containerStyles\n      }, React.createElement('div', {\n        style: labelStyles,\n        'data-name': name,\n        className: 'emoji-mart-category-label'\n      }, React.createElement('span', {\n        style: labelSpanStyles,\n        ref: this.setLabelRef\n      }, label)), emojis && emojis.map(function (emoji) {\n        return NimbleEmoji(_extends({\n          emoji: emoji,\n          data: _this3.data\n        }, emojiProps));\n      }), emojis && !emojis.length && React.createElement('div', null, React.createElement('div', null, NimbleEmoji(_extends({\n        data: this.data\n      }, emojiProps, {\n        size: 38,\n        emoji: 'sleuth_or_spy',\n        onOver: null,\n        onLeave: null,\n        onClick: null\n      }))), React.createElement('div', {\n        className: 'emoji-mart-no-results-label'\n      }, i18n.notfound)));\n    }\n  }]);\n\n  return Category;\n}(React.Component);\n\nexport default Category;\nCategory.defaultProps = {\n  emojis: [],\n  hasStickyPosition: true\n};","import _extends from '../polyfills/extends';\nimport _Object$getPrototypeOf from '../polyfills/objectGetPrototypeOf';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from '../polyfills/createClass';\nimport _possibleConstructorReturn from '../polyfills/possibleConstructorReturn';\nimport _inherits from '../polyfills/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { getData } from '../utils';\nimport { NimbleEmoji, Skins } from '.';\n\nvar Preview = function (_React$PureComponent) {\n  _inherits(Preview, _React$PureComponent);\n\n  function Preview(props) {\n    _classCallCheck(this, Preview);\n\n    var _this = _possibleConstructorReturn(this, (Preview.__proto__ || _Object$getPrototypeOf(Preview)).call(this, props));\n\n    _this.data = props.data;\n    _this.state = {\n      emoji: null\n    };\n    return _this;\n  }\n\n  _createClass(Preview, [{\n    key: 'render',\n    value: function render() {\n      var emoji = this.state.emoji;\n      var _props = this.props;\n      var emojiProps = _props.emojiProps;\n      var skinsProps = _props.skinsProps;\n      var showSkinTones = _props.showSkinTones;\n      var title = _props.title;\n      var idleEmoji = _props.emoji;\n\n      if (emoji) {\n        var emojiData = getData(emoji, null, null, this.data);\n        var _emojiData$emoticons = emojiData.emoticons;\n        var emoticons = _emojiData$emoticons === undefined ? [] : _emojiData$emoticons;\n        var knownEmoticons = [];\n        var listedEmoticons = [];\n        emoticons.forEach(function (emoticon) {\n          if (knownEmoticons.indexOf(emoticon.toLowerCase()) >= 0) {\n            return;\n          }\n\n          knownEmoticons.push(emoticon.toLowerCase());\n          listedEmoticons.push(emoticon);\n        });\n        return React.createElement('div', {\n          className: 'emoji-mart-preview'\n        }, React.createElement('div', {\n          className: 'emoji-mart-preview-emoji'\n        }, NimbleEmoji(_extends({\n          key: emoji.id,\n          emoji: emoji,\n          data: this.data\n        }, emojiProps))), React.createElement('div', {\n          className: 'emoji-mart-preview-data'\n        }, React.createElement('div', {\n          className: 'emoji-mart-preview-name'\n        }, emoji.name), React.createElement('div', {\n          className: 'emoji-mart-preview-shortnames'\n        }, emojiData.short_names.map(function (short_name) {\n          return React.createElement('span', {\n            key: short_name,\n            className: 'emoji-mart-preview-shortname'\n          }, ':', short_name, ':');\n        })), React.createElement('div', {\n          className: 'emoji-mart-preview-emoticons'\n        }, listedEmoticons.map(function (emoticon) {\n          return React.createElement('span', {\n            key: emoticon,\n            className: 'emoji-mart-preview-emoticon'\n          }, emoticon);\n        }))));\n      } else {\n        return React.createElement('div', {\n          className: 'emoji-mart-preview'\n        }, React.createElement('div', {\n          className: 'emoji-mart-preview-emoji'\n        }, idleEmoji && idleEmoji.length && NimbleEmoji(_extends({\n          emoji: idleEmoji,\n          data: this.data\n        }, emojiProps))), React.createElement('div', {\n          className: 'emoji-mart-preview-data'\n        }, React.createElement('span', {\n          className: 'emoji-mart-title-label'\n        }, title)), showSkinTones && React.createElement('div', {\n          className: 'emoji-mart-preview-skins'\n        }, React.createElement(Skins, skinsProps)));\n      }\n    }\n  }]);\n\n  return Preview;\n}(React.PureComponent);\n\nexport default Preview;\nPreview.defaultProps = {\n  showSkinTones: true,\n  onChange: function onChange() {}\n};","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from '../../polyfills/createClass';\nimport { getData, getSanitizedData, intersect } from '..';\nimport { uncompress } from '../data';\n\nvar NimbleEmojiIndex = function () {\n  function NimbleEmojiIndex(data) {\n    _classCallCheck(this, NimbleEmojiIndex);\n\n    if (data.compressed) {\n      uncompress(data);\n    }\n\n    this.data = data || {};\n    this.originalPool = {};\n    this.index = {};\n    this.emojis = {};\n    this.emoticons = {};\n    this.customEmojisList = [];\n    this.buildIndex();\n  }\n\n  _createClass(NimbleEmojiIndex, [{\n    key: 'buildIndex',\n    value: function buildIndex() {\n      var _this = this;\n\n      var _loop = function _loop(emoji) {\n        var emojiData = _this.data.emojis[emoji];\n        var short_names = emojiData.short_names;\n        var emoticons = emojiData.emoticons;\n        var id = short_names[0];\n\n        if (emoticons) {\n          emoticons.forEach(function (emoticon) {\n            if (_this.emoticons[emoticon]) {\n              return;\n            }\n\n            _this.emoticons[emoticon] = id;\n          });\n        }\n\n        _this.emojis[id] = getSanitizedData(id, null, null, _this.data);\n        _this.originalPool[id] = emojiData;\n      };\n\n      for (var emoji in this.data.emojis) {\n        _loop(emoji);\n      }\n    }\n  }, {\n    key: 'clearCustomEmojis',\n    value: function clearCustomEmojis(pool) {\n      var _this2 = this;\n\n      this.customEmojisList.forEach(function (emoji) {\n        var emojiId = emoji.id || emoji.short_names[0];\n        delete pool[emojiId];\n        delete _this2.emojis[emojiId];\n      });\n    }\n  }, {\n    key: 'addCustomToPool',\n    value: function addCustomToPool(custom, pool) {\n      var _this3 = this;\n\n      if (this.customEmojisList.length) this.clearCustomEmojis(pool);\n      custom.forEach(function (emoji) {\n        var emojiId = emoji.id || emoji.short_names[0];\n\n        if (emojiId && !pool[emojiId]) {\n          pool[emojiId] = getData(emoji, null, null, _this3.data);\n          _this3.emojis[emojiId] = getSanitizedData(emoji, null, null, _this3.data);\n        }\n      });\n      this.customEmojisList = custom;\n      this.index = {};\n    }\n  }, {\n    key: 'search',\n    value: function search(value) {\n      var _this4 = this;\n\n      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n      var emojisToShowFilter = _ref.emojisToShowFilter;\n      var maxResults = _ref.maxResults;\n      var include = _ref.include;\n      var exclude = _ref.exclude;\n      var _ref$custom = _ref.custom;\n      var custom = _ref$custom === undefined ? [] : _ref$custom;\n      if (this.customEmojisList != custom) this.addCustomToPool(custom, this.originalPool);\n      maxResults || (maxResults = 75);\n      include || (include = []);\n      exclude || (exclude = []);\n      var results = null,\n          pool = this.originalPool;\n\n      if (value.length) {\n        if (value == '-' || value == '-1') {\n          return [this.emojis['-1']];\n        }\n\n        var values = value.toLowerCase().split(/[\\s|,|\\-|_]+/),\n            allResults = [];\n\n        if (values.length > 2) {\n          values = [values[0], values[1]];\n        }\n\n        if (include.length || exclude.length) {\n          pool = {};\n          this.data.categories.forEach(function (category) {\n            var isIncluded = include && include.length ? include.indexOf(category.id) > -1 : true;\n            var isExcluded = exclude && exclude.length ? exclude.indexOf(category.id) > -1 : false;\n\n            if (!isIncluded || isExcluded) {\n              return;\n            }\n\n            category.emojis.forEach(function (emojiId) {\n              return pool[emojiId] = _this4.data.emojis[emojiId];\n            });\n          });\n\n          if (custom.length) {\n            var customIsIncluded = include && include.length ? include.indexOf('custom') > -1 : true;\n            var customIsExcluded = exclude && exclude.length ? exclude.indexOf('custom') > -1 : false;\n\n            if (customIsIncluded && !customIsExcluded) {\n              this.addCustomToPool(custom, pool);\n            }\n          }\n        }\n\n        allResults = values.map(function (value) {\n          var aPool = pool,\n              aIndex = _this4.index,\n              length = 0;\n\n          for (var charIndex = 0; charIndex < value.length; charIndex++) {\n            var char = value[charIndex];\n            length++;\n            aIndex[char] || (aIndex[char] = {});\n            aIndex = aIndex[char];\n\n            if (!aIndex.results) {\n              (function () {\n                var scores = {};\n                aIndex.results = [];\n                aIndex.pool = {};\n\n                for (var _id in aPool) {\n                  var emoji = aPool[_id];\n                  var search = emoji.search;\n                  var sub = value.substr(0, length);\n                  var subIndex = search.indexOf(sub);\n\n                  if (subIndex != -1) {\n                    var score = subIndex + 1;\n                    if (sub == _id) score = 0;\n                    aIndex.results.push(_this4.emojis[_id]);\n                    aIndex.pool[_id] = emoji;\n                    scores[_id] = score;\n                  }\n                }\n\n                aIndex.results.sort(function (a, b) {\n                  var aScore = scores[a.id],\n                      bScore = scores[b.id];\n                  return aScore - bScore;\n                });\n              })();\n            }\n\n            aPool = aIndex.pool;\n          }\n\n          return aIndex.results;\n        }).filter(function (a) {\n          return a;\n        });\n\n        if (allResults.length > 1) {\n          results = intersect.apply(null, allResults);\n        } else if (allResults.length) {\n          results = allResults[0];\n        } else {\n          results = [];\n        }\n      }\n\n      if (results) {\n        if (emojisToShowFilter) {\n          results = results.filter(function (result) {\n            return emojisToShowFilter(pool[result.id]);\n          });\n        }\n\n        if (results && results.length > maxResults) {\n          results = results.slice(0, maxResults);\n        }\n      }\n\n      return results;\n    }\n  }]);\n\n  return NimbleEmojiIndex;\n}();\n\nexport default NimbleEmojiIndex;","import _Object$getPrototypeOf from '../polyfills/objectGetPrototypeOf';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from '../polyfills/createClass';\nimport _possibleConstructorReturn from '../polyfills/possibleConstructorReturn';\nimport _inherits from '../polyfills/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport NimbleEmojiIndex from '../utils/emoji-index/nimble-emoji-index';\n\nvar Search = function (_React$PureComponent) {\n  _inherits(Search, _React$PureComponent);\n\n  function Search(props) {\n    _classCallCheck(this, Search);\n\n    var _this = _possibleConstructorReturn(this, (Search.__proto__ || _Object$getPrototypeOf(Search)).call(this, props));\n\n    _this.data = props.data;\n    _this.emojiIndex = new NimbleEmojiIndex(_this.data);\n    _this.setRef = _this.setRef.bind(_this);\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(Search, [{\n    key: 'handleChange',\n    value: function handleChange() {\n      var value = this.input.value;\n      this.props.onSearch(this.emojiIndex.search(value, {\n        emojisToShowFilter: this.props.emojisToShowFilter,\n        maxResults: this.props.maxResults,\n        include: this.props.include,\n        exclude: this.props.exclude,\n        custom: this.props.custom\n      }));\n    }\n  }, {\n    key: 'setRef',\n    value: function setRef(c) {\n      this.input = c;\n    }\n  }, {\n    key: 'clear',\n    value: function clear() {\n      this.input.value = '';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props;\n      var i18n = _props.i18n;\n      var autoFocus = _props.autoFocus;\n      return React.createElement('div', {\n        className: 'emoji-mart-search'\n      }, React.createElement('input', {\n        ref: this.setRef,\n        type: 'text',\n        onChange: this.handleChange,\n        placeholder: i18n.search,\n        autoFocus: autoFocus\n      }));\n    }\n  }]);\n\n  return Search;\n}(React.PureComponent);\n\nexport default Search;\nSearch.defaultProps = {\n  onSearch: function onSearch() {},\n  maxResults: 75,\n  emojisToShowFilter: null,\n  autoFocus: false\n};","import _Object$getPrototypeOf from '../polyfills/objectGetPrototypeOf';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from '../polyfills/createClass';\nimport _possibleConstructorReturn from '../polyfills/possibleConstructorReturn';\nimport _inherits from '../polyfills/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nvar Skins = function (_React$PureComponent) {\n  _inherits(Skins, _React$PureComponent);\n\n  function Skins(props) {\n    _classCallCheck(this, Skins);\n\n    var _this = _possibleConstructorReturn(this, (Skins.__proto__ || _Object$getPrototypeOf(Skins)).call(this, props));\n\n    _this.state = {\n      opened: false\n    };\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(Skins, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      var skin = parseInt(e.currentTarget.getAttribute('data-skin'));\n      var onChange = this.props.onChange;\n\n      if (!this.state.opened) {\n        this.setState({\n          opened: true\n        });\n      } else {\n        this.setState({\n          opened: false\n        });\n\n        if (skin != this.props.skin) {\n          onChange(skin);\n        }\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var skin = this.props.skin;\n      var opened = this.state.opened;\n      var skinToneNodes = [];\n\n      for (var i = 0; i < 6; i++) {\n        var skinTone = i + 1;\n        var selected = skinTone == skin;\n        skinToneNodes.push(React.createElement('span', {\n          key: 'skin-tone-' + skinTone,\n          className: 'emoji-mart-skin-swatch ' + (selected ? 'emoji-mart-skin-swatch-selected' : '')\n        }, React.createElement('span', {\n          onClick: this.handleClick,\n          'data-skin': skinTone,\n          className: 'emoji-mart-skin emoji-mart-skin-tone-' + skinTone\n        })));\n      }\n\n      return React.createElement('div', null, React.createElement('div', {\n        className: 'emoji-mart-skin-swatches ' + (opened ? 'emoji-mart-skin-swatches-opened' : '')\n      }, skinToneNodes));\n    }\n  }]);\n\n  return Skins;\n}(React.PureComponent);\n\nexport default Skins;\nSkins.defaultProps = {\n  onChange: function onChange() {}\n};","import _Object$values from 'babel-runtime/core-js/object/values';\nimport _toConsumableArray from 'babel-runtime/helpers/toConsumableArray';\nimport _extends from '../../polyfills/extends';\nimport _Object$getPrototypeOf from '../../polyfills/objectGetPrototypeOf';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from '../../polyfills/createClass';\nimport _possibleConstructorReturn from '../../polyfills/possibleConstructorReturn';\nimport _inherits from '../../polyfills/inherits';\nimport '../../vendor/raf-polyfill';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport store from '../../utils/store';\nimport frequently from '../../utils/frequently';\nimport { deepMerge, measureScrollbar } from '../../utils';\nimport { uncompress } from '../../utils/data';\nimport { PickerPropTypes, PickerDefaultProps } from '../../utils/shared-props';\nimport { Anchors, Category, Preview, Search } from '..';\nvar I18N = {\n  search: 'Search',\n  notfound: 'No Emoji Found',\n  categories: {\n    search: 'Search Results',\n    recent: 'Frequently Used',\n    people: 'Smileys & People',\n    nature: 'Animals & Nature',\n    foods: 'Food & Drink',\n    activity: 'Activity',\n    places: 'Travel & Places',\n    objects: 'Objects',\n    symbols: 'Symbols',\n    flags: 'Flags',\n    custom: 'Custom'\n  }\n};\n\nvar NimblePicker = function (_React$PureComponent) {\n  _inherits(NimblePicker, _React$PureComponent);\n\n  function NimblePicker(props) {\n    _classCallCheck(this, NimblePicker);\n\n    var _this = _possibleConstructorReturn(this, (NimblePicker.__proto__ || _Object$getPrototypeOf(NimblePicker)).call(this, props));\n\n    _this.CUSTOM = [];\n    _this.RECENT_CATEGORY = {\n      id: 'recent',\n      name: 'Recent',\n      emojis: null\n    };\n    _this.SEARCH_CATEGORY = {\n      id: 'search',\n      name: 'Search',\n      emojis: null,\n      anchor: false\n    };\n\n    if (props.data.compressed) {\n      uncompress(props.data);\n    }\n\n    _this.data = props.data;\n    _this.i18n = deepMerge(I18N, props.i18n);\n    _this.state = {\n      skin: props.skin || store.get('skin') || props.defaultSkin,\n      firstRender: true\n    };\n    _this.categories = [];\n    var allCategories = [].concat(_this.data.categories);\n\n    if (props.custom.length > 0) {\n      var customCategories = {};\n      var customCategoriesCreated = 0;\n      props.custom.forEach(function (emoji) {\n        if (!customCategories[emoji.customCategory]) {\n          customCategories[emoji.customCategory] = {\n            id: emoji.customCategory ? 'custom-' + emoji.customCategory : 'custom',\n            name: emoji.customCategory || 'Custom',\n            emojis: [],\n            anchor: customCategoriesCreated === 0\n          };\n          customCategoriesCreated++;\n        }\n\n        var category = customCategories[emoji.customCategory];\n\n        var customEmoji = _extends({}, emoji, {\n          // `
) : null;\n    const acct            = account.get('acct').indexOf('@') === -1 && domain ? `${account.get('acct')}@${domain}` : account.get('acct');\n\n    return (\n      \n        
\n          
\n            {info}\n          
\n\n          
\n        
\n\n        
\n          
\n            
\n               \n\n            
\n\n            
\n              {actionBtn}\n\n              
\n          
\n\n          
\n            
\n              @{acct} {lockedIcon} \n             \n          \n\n          
\n            
\n              { (fields.size > 0 || identity_proofs.size > 0) && (\n                
\n                  {identity_proofs.map((proof, i) => (\n                    
\n                      \n                        \n                            \n                     \n                  ))}\n                  {fields.map((pair, i) => (\n                    
\n                      \n                        {pair.get('verified_at') &&  \n                     \n                  ))}\n                
\n              )}\n\n              {account.get('note').length > 0 && account.get('note') !== '
' && 
}\n            
\n         
\n       
\n     
\n        {extraInfo}\n\n        
\n          
\n            \n               \n\n            \n               \n\n            \n              { account.get('followers_count') < 0 ? '-' :  \n             \n          
\n        
\n      
\n        {account.get('moved') && 
}\n\n        
\n\n        
\n\n        {!hideTabs && (\n          
\n            
\n        )}\n      
@{account.get('acct')} }} />,\n          confirm: intl.formatMessage(messages.unfollowConfirm),\n          onConfirm: () => dispatch(unfollowAccount(account.get('id'))),\n        }));\n      } else {\n        dispatch(unfollowAccount(account.get('id')));\n      }\n    } else {\n      dispatch(followAccount(account.get('id')));\n    }\n  },\n\n  onBlock (account) {\n    if (account.getIn(['relationship', 'blocking'])) {\n      dispatch(unblockAccount(account.get('id')));\n    } else {\n      dispatch(initBlockModal(account));\n    }\n  },\n\n  onMention (account, router) {\n    dispatch(mentionCompose(account, router));\n  },\n\n  onDirect (account, router) {\n    dispatch(directCompose(account, router));\n  },\n\n  onDirect (account, router) {\n    dispatch(directCompose(account, router));\n  },\n\n  onReblogToggle (account) {\n    if (account.getIn(['relationship', 'showing_reblogs'])) {\n      dispatch(followAccount(account.get('id'), false));\n    } else {\n      dispatch(followAccount(account.get('id'), true));\n    }\n  },\n\n  onEndorseToggle (account) {\n    if (account.getIn(['relationship', 'endorsed'])) {\n      dispatch(unpinAccount(account.get('id')));\n    } else {\n      dispatch(pinAccount(account.get('id')));\n    }\n  },\n\n  onReport (account) {\n    dispatch(initReport(account));\n  },\n\n  onMute (account) {\n    if (account.getIn(['relationship', 'muting'])) {\n      dispatch(unmuteAccount(account.get('id')));\n    } else {\n      dispatch(initMuteModal(account));\n    }\n  },\n\n  onBlockDomain (domain) {\n    dispatch(openModal('CONFIRM', {\n      message: {domain} }} />,\n      confirm: intl.formatMessage(messages.blockDomainConfirm),\n      onConfirm: () => dispatch(blockDomain(domain)),\n    }));\n  },\n\n  onUnblockDomain (domain) {\n    dispatch(unblockDomain(domain));\n  },\n\n  onAddToList(account){\n    dispatch(openModal('LIST_ADDER', {\n      accountId: account.get('id'),\n    }));\n  },\n\n});\n\nexport default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Header));\n","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport Button from 'mastodon/components/button';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { autoPlayGif, me, isStaff } from 'mastodon/initial_state';\nimport classNames from 'classnames';\nimport Icon from 'mastodon/components/icon';\nimport Avatar from 'mastodon/components/avatar';\nimport { shortNumberFormat } from 'mastodon/utils/numbers';\nimport { NavLink } from 'react-router-dom';\nimport DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container';\n\nconst messages = defineMessages({\n  unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },\n  follow: { id: 'account.follow', defaultMessage: 'Follow' },\n  cancel_follow_request: { id: 'account.cancel_follow_request', defaultMessage: 'Cancel follow request' },\n  requested: { id: 'account.requested', defaultMessage: 'Awaiting approval. Click to cancel follow request' },\n  unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' },\n  edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' },\n  linkVerifiedOn: { id: 'account.link_verified_on', defaultMessage: 'Ownership of this link was checked on {date}' },\n  account_locked: { id: 'account.locked_info', defaultMessage: 'This account privacy status is set to locked. The owner manually reviews who can follow them.' },\n  mention: { id: 'account.mention', defaultMessage: 'Mention @{name}' },\n  direct: { id: 'account.direct', defaultMessage: 'Direct message @{name}' },\n  unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' },\n  block: { id: 'account.block', defaultMessage: 'Block @{name}' },\n  mute: { id: 'account.mute', defaultMessage: 'Mute @{name}' },\n  report: { id: 'account.report', defaultMessage: 'Report @{name}' },\n  share: { id: 'account.share', defaultMessage: 'Share @{name}\\'s profile' },\n  media: { id: 'account.media', defaultMessage: 'Media' },\n  blockDomain: { id: 'account.block_domain', defaultMessage: 'Hide everything from {domain}' },\n  unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unhide {domain}' },\n  hideReblogs: { id: 'account.hide_reblogs', defaultMessage: 'Hide boosts from @{name}' },\n  showReblogs: { id: 'account.show_reblogs', defaultMessage: 'Show boosts from @{name}' },\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  endorse: { id: 'account.endorse', defaultMessage: 'Feature on profile' },\n  unendorse: { id: 'account.unendorse', defaultMessage: 'Don\\'t feature on profile' },\n  add_or_remove_from_list: { id: 'account.add_or_remove_from_list', defaultMessage: 'Add or Remove from lists' },\n  admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },\n});\n\nconst dateFormatOptions = {\n  month: 'short',\n  day: 'numeric',\n  year: 'numeric',\n  hour12: false,\n  hour: '2-digit',\n  minute: '2-digit',\n};\n\nexport default @injectIntl\nclass Header extends ImmutablePureComponent {\n\n  static propTypes = {\n    account: ImmutablePropTypes.map,\n    identity_props: ImmutablePropTypes.list,\n    onFollow: PropTypes.func.isRequired,\n    onBlock: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n    domain: PropTypes.string.isRequired,\n  };\n\n  openEditProfile = () => {\n    window.open('/settings/profile', '_blank');\n  }\n\n  isStatusesPageActive = (match, location) => {\n    if (!match) {\n      return false;\n    }\n\n    return !location.pathname.match(/\\/(followers|following)\\/?$/);\n  }\n\n  _updateEmojis () {\n    const node = this.node;\n\n    if (!node || autoPlayGif) {\n      return;\n    }\n\n    const emojis = node.querySelectorAll('.custom-emoji');\n\n    for (var i = 0; i < emojis.length; i++) {\n      let emoji = emojis[i];\n      if (emoji.classList.contains('status-emoji')) {\n        continue;\n      }\n      emoji.classList.add('status-emoji');\n\n      emoji.addEventListener('mouseenter', this.handleEmojiMouseEnter, false);\n      emoji.addEventListener('mouseleave', this.handleEmojiMouseLeave, false);\n    }\n  }\n\n  componentDidMount () {\n    this._updateEmojis();\n  }\n\n  componentDidUpdate () {\n    this._updateEmojis();\n  }\n\n  handleEmojiMouseEnter = ({ target }) => {\n    target.src = target.getAttribute('data-original');\n  }\n\n  handleEmojiMouseLeave = ({ target }) => {\n    target.src = target.getAttribute('data-static');\n  }\n\n  setRef = (c) => {\n    this.node = c;\n  }\n\n  render () {\n    const { account, intl, domain, identity_proofs } = this.props;\n\n    if (!account) {\n      return null;\n    }\n\n    let info        = [];\n    let actionBtn   = '';\n    let lockedIcon  = '';\n    let menu        = [];\n\n    if (me !== account.get('id') && account.getIn(['relationship', 'followed_by'])) {\n      info.push(
) : null;\n    const acct            = account.get('acct').indexOf('@') === -1 && domain ? `${account.get('acct')}@${domain}` : account.get('acct');\n\n    return (\n      \n        
\n          
\n            {info}\n          
\n\n          
\n        
\n\n        
\n          
\n            
\n               \n\n            
\n\n            
\n              {actionBtn}\n\n              
\n          
\n\n          
\n            
\n              @{acct} {lockedIcon} \n             \n          \n\n          
\n            
\n              { (fields.size > 0 || identity_proofs.size > 0) && (\n                
\n                  {identity_proofs.map((proof, i) => (\n                    
\n                      \n                        \n                            \n                     \n                  ))}\n                  {fields.map((pair, i) => (\n                    
\n                      \n                        {pair.get('verified_at') &&  \n                     \n                  ))}\n                
\n              )}\n\n              {account.get('note').length > 0 && account.get('note') !== '
' && 
}\n            
\n\n            
\n              \n                {shortNumberFormat(account.get('statuses_count'))}   \n\n              \n                {shortNumberFormat(account.get('following_count'))}   \n\n              \n                {shortNumberFormat(account.get('followers_count'))}   \n            
\n          
\n        
\n      
\n        {account.get('moved') && 
}\n\n        
\n\n        {!hideTabs && (\n          
\n            
\n        )}\n      
@{account.get('acct')} }} />,\n          confirm: intl.formatMessage(messages.unfollowConfirm),\n          onConfirm: () => dispatch(unfollowAccount(account.get('id'))),\n        }));\n      } else {\n        dispatch(unfollowAccount(account.get('id')));\n      }\n    } else {\n      dispatch(followAccount(account.get('id')));\n    }\n  },\n\n  onBlock (account) {\n    if (account.getIn(['relationship', 'blocking'])) {\n      dispatch(unblockAccount(account.get('id')));\n    } else {\n      dispatch(initBlockModal(account));\n    }\n  },\n\n  onMention (account, router) {\n    dispatch(mentionCompose(account, router));\n  },\n\n  onDirect (account, router) {\n    dispatch(directCompose(account, router));\n  },\n\n  onReblogToggle (account) {\n    if (account.getIn(['relationship', 'showing_reblogs'])) {\n      dispatch(followAccount(account.get('id'), false));\n    } else {\n      dispatch(followAccount(account.get('id'), true));\n    }\n  },\n\n  onEndorseToggle (account) {\n    if (account.getIn(['relationship', 'endorsed'])) {\n      dispatch(unpinAccount(account.get('id')));\n    } else {\n      dispatch(pinAccount(account.get('id')));\n    }\n  },\n\n  onReport (account) {\n    dispatch(initReport(account));\n  },\n\n  onMute (account) {\n    if (account.getIn(['relationship', 'muting'])) {\n      dispatch(unmuteAccount(account.get('id')));\n    } else {\n      dispatch(initMuteModal(account));\n    }\n  },\n\n  onBlockDomain (domain) {\n    dispatch(openModal('CONFIRM', {\n      message: {domain} }} />,\n      confirm: intl.formatMessage(messages.blockDomainConfirm),\n      onConfirm: () => dispatch(blockDomain(domain)),\n    }));\n  },\n\n  onUnblockDomain (domain) {\n    dispatch(unblockDomain(domain));\n  },\n\n  onAddToList(account){\n    dispatch(openModal('LIST_ADDER', {\n      accountId: account.get('id'),\n    }));\n  },\n\n});\n\nexport default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Header));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\n\nexport default\nclass Spoilers extends React.PureComponent {\n  static propTypes = {\n    spoilerText: PropTypes.string,\n    children: PropTypes.node,\n  };\n\n  state = {\n    hidden: true,\n  }\n\n  handleSpoilerClick = () => {\n    this.setState({ hidden: !this.state.hidden });\n  }\n\n  render () {\n    const { spoilerText, children } = this.props;\n    const { hidden } = this.state;\n\n      const toggleText = hidden ?\n        \n        {spoilerText}\n        {' '}\n        \n          {toggleText}\n         \n      
,\n      \n        {children}\n      
\n    ]);\n  }\n}\n\n","import { connect } from 'react-redux';\nimport Status from 'flavours/glitch/components/status';\nimport { List as ImmutableList } from 'immutable';\nimport { makeGetStatus, regexFromFilters, toServerSideType } from 'flavours/glitch/selectors';\nimport {\n  replyCompose,\n  mentionCompose,\n  directCompose,\n} from 'flavours/glitch/actions/compose';\nimport {\n  reblog,\n  favourite,\n  bookmark,\n  unreblog,\n  unfavourite,\n  unbookmark,\n  pin,\n  unpin,\n} from 'flavours/glitch/actions/interactions';\nimport { muteStatus, unmuteStatus, deleteStatus } from 'flavours/glitch/actions/statuses';\nimport { initMuteModal } from 'flavours/glitch/actions/mutes';\nimport { initBlockModal } from 'flavours/glitch/actions/blocks';\nimport { initReport } from 'flavours/glitch/actions/reports';\nimport { openModal } from 'flavours/glitch/actions/modal';\nimport { changeLocalSetting } from 'flavours/glitch/actions/local_settings';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { boostModal, favouriteModal, deleteModal } from 'flavours/glitch/util/initial_state';\nimport { filterEditLink } from 'flavours/glitch/util/backend_links';\nimport { showAlertForError } from '../actions/alerts';\nimport AccountContainer from 'flavours/glitch/containers/account_container';\nimport Spoilers from '../components/spoilers';\nimport Icon from 'flavours/glitch/components/icon';\n\nconst messages = defineMessages({\n  deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },\n  deleteMessage: { id: 'confirmations.delete.message', defaultMessage: 'Are you sure you want to delete this status?' },\n  redraftConfirm: { id: 'confirmations.redraft.confirm', defaultMessage: 'Delete & redraft' },\n  redraftMessage: { id: 'confirmations.redraft.message', defaultMessage: 'Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.' },\n  replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },\n  replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },\n  unfilterConfirm: { id: 'confirmations.unfilter.confirm', defaultMessage: 'Show' },\n  author: { id: 'confirmations.unfilter.author', defaultMessage: 'Author' },\n  matchingFilters: { id: 'confirmations.unfilter.filters', defaultMessage: 'Matching {count, plural, one {filter} other {filters}}' },\n  editFilter: { id: 'confirmations.unfilter.edit_filter', defaultMessage: 'Edit filter' },\n});\n\nconst makeMapStateToProps = () => {\n  const getStatus = makeGetStatus();\n\n  const mapStateToProps = (state, props) => {\n\n    let status = getStatus(state, props);\n    let reblogStatus = status ? status.get('reblog', null) : null;\n    let account = undefined;\n    let prepend = undefined;\n\n    if (props.featured) {\n      account = status.get('account');\n      prepend = 'featured';\n    } else if (reblogStatus !== null && typeof reblogStatus === 'object') {\n      account = status.get('account');\n      status = reblogStatus;\n      prepend = 'reblogged_by';\n    }\n\n    return {\n      containerId : props.containerId || props.id,  //  Should match reblogStatus's id for reblogs\n      status      : status,\n      account     : account || props.account,\n      settings    : state.get('local_settings'),\n      prepend     : prepend || props.prepend,\n    };\n  };\n\n  return mapStateToProps;\n};\n\nconst mapDispatchToProps = (dispatch, { intl, contextType }) => ({\n\n  onReply (status, router) {\n    dispatch((_, getState) => {\n      let state = getState();\n\n      if (state.getIn(['local_settings', 'confirm_before_clearing_draft']) && state.getIn(['compose', 'text']).trim().length !== 0) {\n        dispatch(openModal('CONFIRM', {\n          message: intl.formatMessage(messages.replyMessage),\n          confirm: intl.formatMessage(messages.replyConfirm),\n          onDoNotAsk: () => dispatch(changeLocalSetting(['confirm_before_clearing_draft'], false)),\n          onConfirm: () => dispatch(replyCompose(status, router)),\n        }));\n      } else {\n        dispatch(replyCompose(status, router));\n      }\n    });\n  },\n\n  onModalReblog (status) {\n    if (status.get('reblogged')) {\n      dispatch(unreblog(status));\n    } else {\n      dispatch(reblog(status));\n    }\n  },\n\n  onReblog (status, e) {\n    dispatch((_, getState) => {\n      let state = getState();\n      if (state.getIn(['local_settings', 'confirm_boost_missing_media_description']) && status.get('media_attachments').some(item => !item.get('description')) && !status.get('reblogged')) {\n        dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog, missingMediaDescription: true }));\n      } else if (e.shiftKey || !boostModal) {\n        this.onModalReblog(status);\n      } else {\n        dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog }));\n      }\n    });\n  },\n\n  onBookmark (status) {\n    if (status.get('bookmarked')) {\n      dispatch(unbookmark(status));\n    } else {\n      dispatch(bookmark(status));\n    }\n  },\n\n  onModalFavourite (status) {\n    dispatch(favourite(status));\n  },\n\n  onFavourite (status, e) {\n    if (status.get('favourited')) {\n      dispatch(unfavourite(status));\n    } else {\n      if (e.shiftKey || !favouriteModal) {\n        this.onModalFavourite(status);\n      } else {\n        dispatch(openModal('FAVOURITE', { status, onFavourite: this.onModalFavourite }));\n      }\n    }\n  },\n\n  onPin (status) {\n    if (status.get('pinned')) {\n      dispatch(unpin(status));\n    } else {\n      dispatch(pin(status));\n    }\n  },\n\n  onEmbed (status) {\n    dispatch(openModal('EMBED', {\n      url: status.get('url'),\n      onError: error => dispatch(showAlertForError(error)),\n    }));\n  },\n\n  onDelete (status, history, withRedraft = false) {\n    if (!deleteModal) {\n      dispatch(deleteStatus(status.get('id'), history, withRedraft));\n    } else {\n      dispatch(openModal('CONFIRM', {\n        message: intl.formatMessage(withRedraft ? messages.redraftMessage : messages.deleteMessage),\n        confirm: intl.formatMessage(withRedraft ? messages.redraftConfirm : messages.deleteConfirm),\n        onConfirm: () => dispatch(deleteStatus(status.get('id'), history, withRedraft)),\n      }));\n    }\n  },\n\n  onDirect (account, router) {\n    dispatch(directCompose(account, router));\n  },\n\n  onMention (account, router) {\n    dispatch(mentionCompose(account, router));\n  },\n\n  onOpenMedia (media, index) {\n    dispatch(openModal('MEDIA', { media, index }));\n  },\n\n  onOpenVideo (media, time) {\n    dispatch(openModal('VIDEO', { media, time }));\n  },\n\n  onBlock (status) {\n    const account = status.get('account');\n    dispatch(initBlockModal(account));\n  },\n\n  onUnfilter (status, onConfirm) {\n    dispatch((_, getState) => {\n      let state = getState();\n      const serverSideType = toServerSideType(contextType);\n      const enabledFilters = state.get('filters', ImmutableList()).filter(filter => filter.get('context').includes(serverSideType) && (filter.get('expires_at') === null || Date.parse(filter.get('expires_at')) > (new Date()))).toArray();\n      const searchIndex = status.get('search_index');\n      const matchingFilters = enabledFilters.filter(filter => regexFromFilters([filter]).test(searchIndex));\n      dispatch(openModal('CONFIRM', {\n        message: [\n          \n            
\n               \n            
\n              \n                {matchingFilters.map(filter => (\n                  \n                    {filter.get('phrase')}\n                    {!!filterEditLink && ' '}\n                    {!!filterEditLink && (\n                      \n                         \n                    )}\n                   \n                ))}\n               \n             \n          
' + (children || '') + ' ';\n  } else {\n    return React.createElement('span', {\n      key: props.emoji.id || props.emoji,\n      onClick: function onClick(e) {\n        return _handleClick(e, props);\n      },\n      onMouseEnter: function onMouseEnter(e) {\n        return _handleOver(e, props);\n      },\n      onMouseLeave: function onMouseLeave(e) {\n        return _handleLeave(e, props);\n      },\n      title: title,\n      className: className\n    }, React.createElement('span', {\n      style: style\n    }, children));\n  }\n};\n\nNimbleEmoji.defaultProps = EmojiDefaultProps;\nexport default NimbleEmoji;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Toggle from 'react-toggle';\n\nexport default class SettingToggle extends React.PureComponent {\n\n  static propTypes = {\n    prefix: PropTypes.string,\n    settings: ImmutablePropTypes.map.isRequired,\n    settingPath: PropTypes.array.isRequired,\n    label: PropTypes.node.isRequired,\n    meta: PropTypes.node,\n    onChange: PropTypes.func.isRequired,\n    defaultValue: PropTypes.bool,\n  }\n\n  onChange = ({ target }) => {\n    this.props.onChange(this.props.settingPath, target.checked);\n  }\n\n  render () {\n    const { prefix, settings, settingPath, label, meta, defaultValue } = this.props;\n    const id = ['setting-toggle', prefix, ...settingPath].filter(Boolean).join('-');\n\n    return (\n      \n        {label} \n        {meta && {meta} }\n      
\n    );\n  }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\n\nexport default class SettingText extends React.PureComponent {\n\n  static propTypes = {\n    settings: ImmutablePropTypes.map.isRequired,\n    settingPath: PropTypes.array.isRequired,\n    label: PropTypes.string.isRequired,\n    onChange: PropTypes.func.isRequired,\n  };\n\n  handleChange = (e) => {\n    this.props.onChange(this.props.settingPath, e.target.value);\n  }\n\n  render () {\n    const { settings, settingPath, label } = this.props;\n\n    return (\n      \n        {label} \n         \n    );\n  }\n\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getMenuPlacement = getMenuPlacement;\nexports.MenuPortal = exports.menuPortalCSS = exports.LoadingMessage = exports.NoOptionsMessage = exports.loadingMessageCSS = exports.noOptionsMessageCSS = exports.MenuList = exports.menuListCSS = exports.default = exports.MenuPlacer = exports.menuCSS = void 0;\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _emotion = require(\"emotion\");\n\nvar _reactDom = require(\"react-dom\");\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    default: obj\n  };\n}\n\nfunction _interopRequireWildcard(obj) {\n  if (obj && obj.__esModule) {\n    return obj;\n  } else {\n    var newObj = {};\n\n    if (obj != null) {\n      for (var key in obj) {\n        if (Object.prototype.hasOwnProperty.call(obj, key)) {\n          var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};\n\n          if (desc.get || desc.set) {\n            Object.defineProperty(newObj, key, desc);\n          } else {\n            newObj[key] = obj[key];\n          }\n        }\n      }\n    }\n\n    newObj.default = obj;\n    return newObj;\n  }\n}\n\nfunction _typeof(obj) {\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nfunction _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}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    var ownKeys = Object.keys(source);\n\n    if (typeof Object.getOwnPropertySymbols === 'function') {\n      ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n      }));\n    }\n\n    ownKeys.forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    });\n  }\n\n  return target;\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\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nfunction _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}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction getMenuPlacement(_ref) {\n  var maxHeight = _ref.maxHeight,\n      menuEl = _ref.menuEl,\n      minHeight = _ref.minHeight,\n      placement = _ref.placement,\n      shouldScroll = _ref.shouldScroll,\n      isFixedPosition = _ref.isFixedPosition,\n      theme = _ref.theme;\n  var spacing = theme.spacing;\n  var scrollParent = (0, _utils.getScrollParent)(menuEl);\n  var defaultState = {\n    placement: 'bottom',\n    maxHeight: maxHeight\n  }; // something went wrong, return default state\n\n  if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when\n  // the menu is rendered\n\n  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),\n      scrollHeight = _scrollParent$getBoun.height;\n\n  var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),\n      menuBottom = _menuEl$getBoundingCl.bottom,\n      menuHeight = _menuEl$getBoundingCl.height,\n      menuTop = _menuEl$getBoundingCl.top;\n\n  var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(),\n      containerTop = _menuEl$offsetParent$.top;\n\n  var viewHeight = window.innerHeight;\n  var scrollTop = (0, _utils.getScrollTop)(scrollParent);\n  var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);\n  var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);\n  var viewSpaceAbove = containerTop - marginTop;\n  var viewSpaceBelow = viewHeight - menuTop;\n  var scrollSpaceAbove = viewSpaceAbove + scrollTop;\n  var scrollSpaceBelow = scrollHeight - scrollTop - menuTop;\n  var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom;\n  var scrollUp = scrollTop + menuTop - marginTop;\n  var scrollDuration = 160;\n\n  switch (placement) {\n    case 'auto':\n    case 'bottom':\n      // 1: the menu will fit, do nothing\n      if (viewSpaceBelow >= menuHeight) {\n        return {\n          placement: 'bottom',\n          maxHeight: maxHeight\n        };\n      } // 2: the menu will fit, if scrolled\n\n\n      if (scrollSpaceBelow >= menuHeight && !isFixedPosition) {\n        if (shouldScroll) {\n          (0, _utils.animatedScrollTo)(scrollParent, scrollDown, scrollDuration);\n        }\n\n        return {\n          placement: 'bottom',\n          maxHeight: maxHeight\n        };\n      } // 3: the menu will fit, if constrained\n\n\n      if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) {\n        if (shouldScroll) {\n          (0, _utils.animatedScrollTo)(scrollParent, scrollDown, scrollDuration);\n        } // we want to provide as much of the menu as possible to the user,\n        // so give them whatever is available below rather than the minHeight.\n\n\n        var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom;\n        return {\n          placement: 'bottom',\n          maxHeight: constrainedHeight\n        };\n      } // 4. Forked beviour when there isn't enough space below\n      // AUTO: flip the menu, render above\n\n\n      if (placement === 'auto' || isFixedPosition) {\n        // may need to be constrained after flipping\n        var _constrainedHeight = maxHeight;\n        var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove;\n\n        if (spaceAbove >= minHeight) {\n          _constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight);\n        }\n\n        return {\n          placement: 'top',\n          maxHeight: _constrainedHeight\n        };\n      } // BOTTOM: allow browser to increase scrollable area and immediately set scroll\n\n\n      if (placement === 'bottom') {\n        (0, _utils.scrollTo)(scrollParent, scrollDown);\n        return {\n          placement: 'bottom',\n          maxHeight: maxHeight\n        };\n      }\n\n      break;\n\n    case 'top':\n      // 1: the menu will fit, do nothing\n      if (viewSpaceAbove >= menuHeight) {\n        return {\n          placement: 'top',\n          maxHeight: maxHeight\n        };\n      } // 2: the menu will fit, if scrolled\n\n\n      if (scrollSpaceAbove >= menuHeight && !isFixedPosition) {\n        if (shouldScroll) {\n          (0, _utils.animatedScrollTo)(scrollParent, scrollUp, scrollDuration);\n        }\n\n        return {\n          placement: 'top',\n          maxHeight: maxHeight\n        };\n      } // 3: the menu will fit, if constrained\n\n\n      if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n        var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user,\n        // so give them whatever is available below rather than the minHeight.\n\n        if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {\n          _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop;\n        }\n\n        if (shouldScroll) {\n          (0, _utils.animatedScrollTo)(scrollParent, scrollUp, scrollDuration);\n        }\n\n        return {\n          placement: 'top',\n          maxHeight: _constrainedHeight2\n        };\n      } // 4. not enough space, the browser WILL NOT increase scrollable area when\n      // absolutely positioned element rendered above the viewport (only below).\n      // Flip the menu, render below\n\n\n      return {\n        placement: 'bottom',\n        maxHeight: maxHeight\n      };\n\n    default:\n      throw new Error(\"Invalid placement provided \\\"\".concat(placement, \"\\\".\"));\n  } // fulfil contract with flow: implicit return value of undefined\n\n\n  return defaultState;\n} // Menu Component\n// ------------------------------\n\n\nfunction alignToControl(placement) {\n  var placementToCSSProp = {\n    bottom: 'top',\n    top: 'bottom'\n  };\n  return placement ? placementToCSSProp[placement] : 'bottom';\n}\n\nvar coercePlacement = function coercePlacement(p) {\n  return p === 'auto' ? 'bottom' : p;\n};\n\nvar menuCSS = function menuCSS(_ref2) {\n  var _ref3;\n\n  var placement = _ref2.placement,\n      _ref2$theme = _ref2.theme,\n      borderRadius = _ref2$theme.borderRadius,\n      spacing = _ref2$theme.spacing,\n      colors = _ref2$theme.colors;\n  return _ref3 = {\n    label: 'menu'\n  }, _defineProperty(_ref3, alignToControl(placement), '100%'), _defineProperty(_ref3, \"backgroundColor\", colors.neutral0), _defineProperty(_ref3, \"borderRadius\", borderRadius), _defineProperty(_ref3, \"boxShadow\", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty(_ref3, \"marginBottom\", spacing.menuGutter), _defineProperty(_ref3, \"marginTop\", spacing.menuGutter), _defineProperty(_ref3, \"position\", 'absolute'), _defineProperty(_ref3, \"width\", '100%'), _defineProperty(_ref3, \"zIndex\", 1), _ref3;\n}; // NOTE: internal only\n\n\nexports.menuCSS = menuCSS;\n\nvar MenuPlacer =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(MenuPlacer, _Component);\n\n  function MenuPlacer() {\n    var _getPrototypeOf2;\n\n    var _this;\n\n    _classCallCheck(this, MenuPlacer);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(MenuPlacer)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {\n      maxHeight: _this.props.maxMenuHeight,\n      placement: null\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getPlacement\", function (ref) {\n      var _this$props = _this.props,\n          minMenuHeight = _this$props.minMenuHeight,\n          maxMenuHeight = _this$props.maxMenuHeight,\n          menuPlacement = _this$props.menuPlacement,\n          menuPosition = _this$props.menuPosition,\n          menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView,\n          theme = _this$props.theme;\n      var getPortalPlacement = _this.context.getPortalPlacement;\n      if (!ref) return; // DO NOT scroll if position is fixed\n\n      var isFixedPosition = menuPosition === 'fixed';\n      var shouldScroll = menuShouldScrollIntoView && !isFixedPosition;\n      var state = getMenuPlacement({\n        maxHeight: maxMenuHeight,\n        menuEl: ref,\n        minHeight: minMenuHeight,\n        placement: menuPlacement,\n        shouldScroll: shouldScroll,\n        isFixedPosition: isFixedPosition,\n        theme: theme\n      });\n      if (getPortalPlacement) getPortalPlacement(state);\n\n      _this.setState(state);\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getUpdatedProps\", function () {\n      var menuPlacement = _this.props.menuPlacement;\n      var placement = _this.state.placement || coercePlacement(menuPlacement);\n      return _objectSpread({}, _this.props, {\n        placement: placement,\n        maxHeight: _this.state.maxHeight\n      });\n    });\n\n    return _this;\n  }\n\n  _createClass(MenuPlacer, [{\n    key: \"render\",\n    value: function render() {\n      var children = this.props.children;\n      return children({\n        ref: this.getPlacement,\n        placerProps: this.getUpdatedProps()\n      });\n    }\n  }]);\n\n  return MenuPlacer;\n}(_react.Component);\n\nexports.MenuPlacer = MenuPlacer;\n\n_defineProperty(MenuPlacer, \"contextTypes\", {\n  getPortalPlacement: _propTypes.default.func\n});\n\nvar Menu = function Menu(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerRef = props.innerRef,\n      innerProps = props.innerProps;\n  var cn = cx(\n  /*#__PURE__*/\n  (0, _emotion.css)(getStyles('menu', props)), {\n    menu: true\n  }, className);\n  return _react.default.createElement(\"div\", _extends({\n    className: cn\n  }, innerProps, {\n    ref: innerRef\n  }), children);\n};\n\nvar _default = Menu; // ==============================\n// Menu List\n// ==============================\n\nexports.default = _default;\n\nvar menuListCSS = function menuListCSS(_ref4) {\n  var maxHeight = _ref4.maxHeight,\n      baseUnit = _ref4.theme.spacing.baseUnit;\n  return {\n    maxHeight: maxHeight,\n    overflowY: 'auto',\n    paddingBottom: baseUnit,\n    paddingTop: baseUnit,\n    position: 'relative',\n    // required for offset[Height, Top] > keyboard scroll\n    WebkitOverflowScrolling: 'touch'\n  };\n};\n\nexports.menuListCSS = menuListCSS;\n\nvar MenuList = function MenuList(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      isMulti = props.isMulti,\n      innerRef = props.innerRef;\n  return _react.default.createElement(\"div\", {\n    className: cx(\n    /*#__PURE__*/\n    (0, _emotion.css)(getStyles('menuList', props)), {\n      'menu-list': true,\n      'menu-list--is-multi': isMulti\n    }, className),\n    ref: innerRef\n  }, children);\n}; // ==============================\n// Menu Notices\n// ==============================\n\n\nexports.MenuList = MenuList;\n\nvar noticeCSS = function noticeCSS(_ref5) {\n  var _ref5$theme = _ref5.theme,\n      baseUnit = _ref5$theme.spacing.baseUnit,\n      colors = _ref5$theme.colors;\n  return {\n    color: colors.neutral40,\n    padding: \"\".concat(baseUnit * 2, \"px \").concat(baseUnit * 3, \"px\"),\n    textAlign: 'center'\n  };\n};\n\nvar noOptionsMessageCSS = noticeCSS;\nexports.noOptionsMessageCSS = noOptionsMessageCSS;\nvar loadingMessageCSS = noticeCSS;\nexports.loadingMessageCSS = loadingMessageCSS;\n\nvar NoOptionsMessage = function NoOptionsMessage(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return _react.default.createElement(\"div\", _extends({\n    className: cx(\n    /*#__PURE__*/\n    (0, _emotion.css)(getStyles('noOptionsMessage', props)), {\n      'menu-notice': true,\n      'menu-notice--no-options': true\n    }, className)\n  }, innerProps), children);\n};\n\nexports.NoOptionsMessage = NoOptionsMessage;\nNoOptionsMessage.defaultProps = {\n  children: 'No options'\n};\n\nvar LoadingMessage = function LoadingMessage(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return _react.default.createElement(\"div\", _extends({\n    className: cx(\n    /*#__PURE__*/\n    (0, _emotion.css)(getStyles('loadingMessage', props)), {\n      'menu-notice': true,\n      'menu-notice--loading': true\n    }, className)\n  }, innerProps), children);\n};\n\nexports.LoadingMessage = LoadingMessage;\nLoadingMessage.defaultProps = {\n  children: 'Loading...'\n}; // ==============================\n// Menu Portal\n// ==============================\n\nvar menuPortalCSS = function menuPortalCSS(_ref6) {\n  var rect = _ref6.rect,\n      offset = _ref6.offset,\n      position = _ref6.position;\n  return {\n    left: rect.left,\n    position: position,\n    top: offset,\n    width: rect.width,\n    zIndex: 1\n  };\n};\n\nexports.menuPortalCSS = menuPortalCSS;\n\nvar MenuPortal =\n/*#__PURE__*/\nfunction (_Component2) {\n  _inherits(MenuPortal, _Component2);\n\n  function MenuPortal() {\n    var _getPrototypeOf3;\n\n    var _this2;\n\n    _classCallCheck(this, MenuPortal);\n\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    _this2 = _possibleConstructorReturn(this, (_getPrototypeOf3 = _getPrototypeOf(MenuPortal)).call.apply(_getPrototypeOf3, [this].concat(args)));\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), \"state\", {\n      placement: null\n    });\n\n    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), \"getPortalPlacement\", function (_ref7) {\n      var placement = _ref7.placement;\n      var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed\n\n      if (placement !== initialPlacement) {\n        _this2.setState({\n          placement: placement\n        });\n      }\n    });\n\n    return _this2;\n  }\n\n  _createClass(MenuPortal, [{\n    key: \"getChildContext\",\n    value: function getChildContext() {\n      return {\n        getPortalPlacement: this.getPortalPlacement\n      };\n    } // callback for occassions where the menu must \"flip\"\n\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this$props2 = this.props,\n          appendTo = _this$props2.appendTo,\n          children = _this$props2.children,\n          controlElement = _this$props2.controlElement,\n          menuPlacement = _this$props2.menuPlacement,\n          position = _this$props2.menuPosition,\n          getStyles = _this$props2.getStyles;\n      var isFixed = position === 'fixed'; // bail early if required elements aren't present\n\n      if (!appendTo && !isFixed || !controlElement) {\n        return null;\n      }\n\n      var placement = this.state.placement || coercePlacement(menuPlacement);\n      var rect = (0, _utils.getBoundingClientObj)(controlElement);\n      var scrollDistance = isFixed ? 0 : window.pageYOffset;\n      var offset = rect[placement] + scrollDistance;\n      var state = {\n        offset: offset,\n        position: position,\n        rect: rect\n      }; // same wrapper element whether fixed or portalled\n\n      var menuWrapper = _react.default.createElement(\"div\", {\n        className:\n        /*#__PURE__*/\n\n        /*#__PURE__*/\n        (0, _emotion.css)(getStyles('menuPortal', state))\n      }, children);\n\n      return appendTo ? (0, _reactDom.createPortal)(menuWrapper, appendTo) : menuWrapper;\n    }\n  }]);\n\n  return MenuPortal;\n}(_react.Component);\n\nexports.MenuPortal = MenuPortal;\n\n_defineProperty(MenuPortal, \"childContextTypes\", {\n  getPortalPlacement: _propTypes.default.func\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.classNames = classNames;\nexports.handleInputChange = handleInputChange;\nexports.isDocumentElement = isDocumentElement;\nexports.normalizedHeight = normalizedHeight;\nexports.getScrollTop = getScrollTop;\nexports.scrollTo = scrollTo;\nexports.getScrollParent = getScrollParent;\nexports.animatedScrollTo = animatedScrollTo;\nexports.scrollIntoView = scrollIntoView;\nexports.getBoundingClientObj = getBoundingClientObj;\nexports.toKey = toKey;\nexports.isTouchCapable = isTouchCapable;\nexports.isMobileDevice = isMobileDevice;\nexports.cleanValue = exports.emptyString = exports.noop = void 0;\n\nvar _raf = _interopRequireDefault(require(\"raf\"));\n\nfunction _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    default: obj\n  };\n}\n\nfunction _typeof(obj) {\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n} // ==============================\n// NO OP\n// ==============================\n\n\nvar noop = function noop() {};\n\nexports.noop = noop;\n\nvar emptyString = function emptyString() {\n  return '';\n}; // ==============================\n// Class Name Prefixer\n// ==============================\n\n/**\n String representation of component state for styling with class names.\n\n Expects an array of strings OR a string/object pair:\n - className(['comp', 'comp-arg', 'comp-arg-2'])\n   @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2'\n - className('comp', { some: true, state: false })\n   @returns 'react-select__comp react-select__comp--some'\n*/\n\n\nexports.emptyString = emptyString;\n\nfunction applyPrefixToName(prefix, name) {\n  if (!name) {\n    return prefix;\n  } else if (name[0] === '-') {\n    return prefix + name;\n  } else {\n    return prefix + '__' + name;\n  }\n}\n\nfunction classNames(prefix, cssKey, state, className) {\n  var arr = [cssKey, className];\n\n  if (state && prefix) {\n    for (var key in state) {\n      if (state.hasOwnProperty(key) && state[key]) {\n        arr.push(\"\".concat(applyPrefixToName(prefix, key)));\n      }\n    }\n  }\n\n  return arr.filter(function (i) {\n    return i;\n  }).map(function (i) {\n    return String(i).trim();\n  }).join(' ');\n} // ==============================\n// Clean Value\n// ==============================\n\n\nvar cleanValue = function cleanValue(value) {\n  if (Array.isArray(value)) return value.filter(Boolean);\n  if (_typeof(value) === 'object' && value !== null) return [value];\n  return [];\n}; // ==============================\n// Handle Input Change\n// ==============================\n\n\nexports.cleanValue = cleanValue;\n\nfunction handleInputChange(inputValue, actionMeta, onInputChange) {\n  if (onInputChange) {\n    var newValue = onInputChange(inputValue, actionMeta);\n    if (typeof newValue === 'string') return newValue;\n  }\n\n  return inputValue;\n} // ==============================\n// Scroll Helpers\n// ==============================\n\n\nfunction isDocumentElement(el) {\n  return [document.documentElement, document.body, window].indexOf(el) > -1;\n} // Normalized Scroll Top\n// ------------------------------\n\n\nfunction normalizedHeight(el) {\n  if (isDocumentElement(el)) {\n    return window.innerHeight;\n  }\n\n  return el.clientHeight;\n} // Normalized scrollTo & scrollTop\n// ------------------------------\n\n\nfunction getScrollTop(el) {\n  if (isDocumentElement(el)) {\n    return window.pageYOffset;\n  }\n\n  return el.scrollTop;\n}\n\nfunction scrollTo(el, top) {\n  // with a scroll distance, we perform scroll on the element\n  if (isDocumentElement(el)) {\n    window.scrollTo(0, top);\n    return;\n  }\n\n  el.scrollTop = top;\n} // Get Scroll Parent\n// ------------------------------\n\n\nfunction getScrollParent(element) {\n  var style = getComputedStyle(element);\n  var excludeStaticParent = style.position === 'absolute';\n  var overflowRx = /(auto|scroll)/;\n  var docEl = document.documentElement; // suck it, flow...\n\n  if (style.position === 'fixed') return docEl;\n\n  for (var parent = element; parent = parent.parentElement;) {\n    style = getComputedStyle(parent);\n\n    if (excludeStaticParent && style.position === 'static') {\n      continue;\n    }\n\n    if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) {\n      return parent;\n    }\n  }\n\n  return docEl;\n} // Animated Scroll To\n// ------------------------------\n\n/**\n  @param t: time (elapsed)\n  @param b: initial value\n  @param c: amount of change\n  @param d: duration\n*/\n\n\nfunction easeOutCubic(t, b, c, d) {\n  return c * ((t = t / d - 1) * t * t + 1) + b;\n}\n\nfunction animatedScrollTo(element, to) {\n  var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;\n  var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;\n  var start = getScrollTop(element);\n  var change = to - start;\n  var increment = 10;\n  var currentTime = 0;\n\n  function animateScroll() {\n    currentTime += increment;\n    var val = easeOutCubic(currentTime, start, change, duration);\n    scrollTo(element, val);\n\n    if (currentTime < duration) {\n      (0, _raf.default)(animateScroll);\n    } else {\n      callback(element);\n    }\n  }\n\n  animateScroll();\n} // Scroll Into View\n// ------------------------------\n\n\nfunction scrollIntoView(menuEl, focusedEl) {\n  var menuRect = menuEl.getBoundingClientRect();\n  var focusedRect = focusedEl.getBoundingClientRect();\n  var overScroll = focusedEl.offsetHeight / 3;\n\n  if (focusedRect.bottom + overScroll > menuRect.bottom) {\n    scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight));\n  } else if (focusedRect.top - overScroll < menuRect.top) {\n    scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0));\n  }\n} // ==============================\n// Get bounding client object\n// ==============================\n// cannot get keys using array notation with DOMRect\n\n\nfunction getBoundingClientObj(element) {\n  var rect = element.getBoundingClientRect();\n  return {\n    bottom: rect.bottom,\n    height: rect.height,\n    left: rect.left,\n    right: rect.right,\n    top: rect.top,\n    width: rect.width\n  };\n} // ==============================\n// String to Key (kebabify)\n// ==============================\n\n\nfunction toKey(str) {\n  return str.replace(/\\W/g, '-');\n} // ==============================\n// Touch Capability Detector\n// ==============================\n\n\nfunction isTouchCapable() {\n  try {\n    document.createEvent('TouchEvent');\n    return true;\n  } catch (e) {\n    return false;\n  }\n} // ==============================\n// Mobile Device Detector\n// ==============================\n\n\nfunction isMobileDevice() {\n  try {\n    return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n  } catch (e) {\n    return false;\n  }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar _react = require(\"react\");\n\nvar _reactDom = require(\"react-dom\");\n\nfunction _typeof(obj) {\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\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\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return _assertThisInitialized(self);\n}\n\nfunction _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}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nvar NodeResolver =\n/*#__PURE__*/\nfunction (_Component) {\n  _inherits(NodeResolver, _Component);\n\n  function NodeResolver() {\n    _classCallCheck(this, NodeResolver);\n\n    return _possibleConstructorReturn(this, _getPrototypeOf(NodeResolver).apply(this, arguments));\n  }\n\n  _createClass(NodeResolver, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      this.props.innerRef((0, _reactDom.findDOMNode)(this));\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      this.props.innerRef(null);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return this.props.children;\n    }\n  }]);\n\n  return NodeResolver;\n}(_react.Component);\n\nexports.default = NodeResolver;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.LoadingIndicator = exports.loadingIndicatorCSS = exports.IndicatorSeparator = exports.indicatorSeparatorCSS = exports.ClearIndicator = exports.clearIndicatorCSS = exports.DropdownIndicator = exports.dropdownIndicatorCSS = exports.DownChevron = exports.CrossIcon = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _emotion = require(\"emotion\");\n\nfunction _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    default: obj\n  };\n}\n\nfunction _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}\n\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n\n  var key, i;\n\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}\n\nfunction _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} // ==============================\n// Dropdown & Clear Icons\n// ==============================\n\n\nvar Svg = function Svg(_ref) {\n  var size = _ref.size,\n      props = _objectWithoutProperties(_ref, [\"size\"]);\n\n  return _react.default.createElement(\"svg\", _extends({\n    height: size,\n    width: size,\n    viewBox: \"0 0 20 20\",\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className:\n    /*#__PURE__*/\n\n    /*#__PURE__*/\n    (0, _emotion.css)({\n      display: 'inline-block',\n      fill: 'currentColor',\n      lineHeight: 1,\n      stroke: 'currentColor',\n      strokeWidth: 0\n    })\n  }, props));\n};\n\nvar CrossIcon = function CrossIcon(props) {\n  return _react.default.createElement(Svg, _extends({\n    size: 20\n  }, props), _react.default.createElement(\"path\", {\n    d: \"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z\"\n  }));\n};\n\nexports.CrossIcon = CrossIcon;\n\nvar DownChevron = function DownChevron(props) {\n  return _react.default.createElement(Svg, _extends({\n    size: 20\n  }, props), _react.default.createElement(\"path\", {\n    d: \"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z\"\n  }));\n}; // ==============================\n// Dropdown & Clear Buttons\n// ==============================\n\n\nexports.DownChevron = DownChevron;\n\nvar baseCSS = function baseCSS(_ref2) {\n  var isFocused = _ref2.isFocused,\n      _ref2$theme = _ref2.theme,\n      baseUnit = _ref2$theme.spacing.baseUnit,\n      colors = _ref2$theme.colors;\n  return {\n    label: 'indicatorContainer',\n    color: isFocused ? colors.neutral60 : colors.neutral20,\n    display: 'flex',\n    padding: baseUnit * 2,\n    transition: 'color 150ms',\n    ':hover': {\n      color: isFocused ? colors.neutral80 : colors.neutral40\n    }\n  };\n};\n\nvar dropdownIndicatorCSS = baseCSS;\nexports.dropdownIndicatorCSS = dropdownIndicatorCSS;\n\nvar DropdownIndicator = function DropdownIndicator(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return _react.default.createElement(\"div\", _extends({}, innerProps, {\n    className: cx(\n    /*#__PURE__*/\n    (0, _emotion.css)(getStyles('dropdownIndicator', props)), {\n      'indicator': true,\n      'dropdown-indicator': true\n    }, className)\n  }), children || _react.default.createElement(DownChevron, null));\n};\n\nexports.DropdownIndicator = DropdownIndicator;\nvar clearIndicatorCSS = baseCSS;\nexports.clearIndicatorCSS = clearIndicatorCSS;\n\nvar ClearIndicator = function ClearIndicator(props) {\n  var children = props.children,\n      className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return _react.default.createElement(\"div\", _extends({}, innerProps, {\n    className: cx(\n    /*#__PURE__*/\n    (0, _emotion.css)(getStyles('clearIndicator', props)), {\n      'indicator': true,\n      'clear-indicator': true\n    }, className)\n  }), children || _react.default.createElement(CrossIcon, null));\n}; // ==============================\n// Separator\n// ==============================\n\n\nexports.ClearIndicator = ClearIndicator;\n\nvar indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3) {\n  var isDisabled = _ref3.isDisabled,\n      _ref3$theme = _ref3.theme,\n      baseUnit = _ref3$theme.spacing.baseUnit,\n      colors = _ref3$theme.colors;\n  return {\n    label: 'indicatorSeparator',\n    alignSelf: 'stretch',\n    backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,\n    marginBottom: baseUnit * 2,\n    marginTop: baseUnit * 2,\n    width: 1\n  };\n};\n\nexports.indicatorSeparatorCSS = indicatorSeparatorCSS;\n\nvar IndicatorSeparator = function IndicatorSeparator(props) {\n  var className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps;\n  return _react.default.createElement(\"span\", _extends({}, innerProps, {\n    className: cx(\n    /*#__PURE__*/\n    (0, _emotion.css)(getStyles('indicatorSeparator', props)), {\n      'indicator-separator': true\n    }, className)\n  }));\n}; // ==============================\n// Loading\n// ==============================\n\n\nexports.IndicatorSeparator = IndicatorSeparator;\nvar keyframesName = 'react-select-loading-indicator';\nvar keyframesInjected = false;\n\nvar loadingIndicatorCSS = function loadingIndicatorCSS(_ref4) {\n  var isFocused = _ref4.isFocused,\n      size = _ref4.size,\n      _ref4$theme = _ref4.theme,\n      colors = _ref4$theme.colors,\n      baseUnit = _ref4$theme.spacing.baseUnit;\n  return {\n    label: 'loadingIndicator',\n    color: isFocused ? colors.neutral60 : colors.neutral20,\n    display: 'flex',\n    padding: baseUnit * 2,\n    transition: 'color 150ms',\n    alignSelf: 'center',\n    fontSize: size,\n    lineHeight: 1,\n    marginRight: size,\n    textAlign: 'center',\n    verticalAlign: 'middle'\n  };\n};\n\nexports.loadingIndicatorCSS = loadingIndicatorCSS;\n\nvar LoadingDot = function LoadingDot(_ref5) {\n  var color = _ref5.color,\n      delay = _ref5.delay,\n      offset = _ref5.offset;\n  return _react.default.createElement(\"span\", {\n    className:\n    /*#__PURE__*/\n\n    /*#__PURE__*/\n    (0, _emotion.css)({\n      animationDuration: '1s',\n      animationDelay: \"\".concat(delay, \"ms\"),\n      animationIterationCount: 'infinite',\n      animationName: keyframesName,\n      animationTimingFunction: 'ease-in-out',\n      backgroundColor: color,\n      borderRadius: '1em',\n      display: 'inline-block',\n      marginLeft: offset ? '1em' : null,\n      height: '1em',\n      verticalAlign: 'top',\n      width: '1em'\n    })\n  });\n};\n\nvar LoadingIndicator = function LoadingIndicator(props) {\n  var className = props.className,\n      cx = props.cx,\n      getStyles = props.getStyles,\n      innerProps = props.innerProps,\n      isFocused = props.isFocused,\n      isRtl = props.isRtl,\n      colors = props.theme.colors;\n  var color = isFocused ? colors.neutral80 : colors.neutral20;\n\n  if (!keyframesInjected) {\n    // eslint-disable-next-line no-unused-expressions\n    (0, _emotion.injectGlobal)(\"@keyframes \", keyframesName, \"{0%,80%,100%{opacity:0;}40%{opacity:1;}};\");\n    keyframesInjected = true;\n  }\n\n  return _react.default.createElement(\"div\", _extends({}, innerProps, {\n    className: cx(\n    /*#__PURE__*/\n    (0, _emotion.css)(getStyles('loadingIndicator', props)), {\n      'indicator': true,\n      'loading-indicator': true\n    }, className)\n  }), _react.default.createElement(LoadingDot, {\n    color: color,\n    delay: 0,\n    offset: isRtl\n  }), _react.default.createElement(LoadingDot, {\n    color: color,\n    delay: 160,\n    offset: true\n  }), _react.default.createElement(LoadingDot, {\n    color: color,\n    delay: 320,\n    offset: !isRtl\n  }));\n};\n\nexports.LoadingIndicator = LoadingIndicator;\nLoadingIndicator.defaultProps = {\n  size: 4\n};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\nimport Icon from 'flavours/glitch/components/icon';\n\nconst ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {\n  const badgeElement = typeof badge !== 'undefined' ? {badge}  : null;\n\n  if (href) {\n    return (\n      \n         \n    );\n  } else if (to) {\n    return (\n      \n         \n    );\n  }\n};\n\nColumnLink.propTypes = {\n  icon: PropTypes.string.isRequired,\n  text: PropTypes.string.isRequired,\n  to: PropTypes.string,\n  onClick: PropTypes.func,\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 PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Toggle from 'react-toggle';\n\nexport default class SettingToggle extends React.PureComponent {\n\n  static propTypes = {\n    prefix: PropTypes.string,\n    settings: ImmutablePropTypes.map.isRequired,\n    settingPath: PropTypes.array.isRequired,\n    label: PropTypes.node.isRequired,\n    onChange: PropTypes.func.isRequired,\n    defaultValue: PropTypes.bool,\n  }\n\n  onChange = ({ target }) => {\n    this.props.onChange(this.props.settingPath, target.checked);\n  }\n\n  render () {\n    const { prefix, settings, settingPath, label, defaultValue } = this.props;\n    const id = ['setting-toggle', prefix, ...settingPath].filter(Boolean).join('-');\n\n    return (\n      \n        {label} \n      
\n    );\n  }\n\n}\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\n\nmodule.exports = function (fn, that, length) {\n  aFunction(fn);\n  if (that === undefined) return fn;\n\n  switch (length) {\n    case 1:\n      return function (a) {\n        return fn.call(that, a);\n      };\n\n    case 2:\n      return function (a, b) {\n        return fn.call(that, a, b);\n      };\n\n    case 3:\n      return function (a, b, c) {\n        return fn.call(that, a, b, c);\n      };\n  }\n\n  return function ()\n  /* ...args */\n  {\n    return fn.apply(that, arguments);\n  };\n};","var isObject = require('./_is-object');\n\nvar document = require('./_global').document; // typeof document.createElement is 'object' in old IE\n\n\nvar is = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n  return is ? document.createElement(it) : {};\n};","var toString = {}.toString;\n\nmodule.exports = function (it) {\n  return toString.call(it).slice(8, -1);\n};","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\n\nvar min = Math.min;\n\nmodule.exports = function (it) {\n  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};","var core = require('./_core');\n\nvar global = require('./_global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n(module.exports = function (key, value) {\n  return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n  version: core.version,\n  mode: require('./_library') ? 'pure' : 'global',\n  copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});","module.exports = true;","var id = 0;\nvar px = Math.random();\n\nmodule.exports = function (key) {\n  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};","// IE 8- don't enum bug keys\nmodule.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');","var def = require('./_object-dp').f;\n\nvar has = require('./_has');\n\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, {\n    configurable: true,\n    value: tag\n  });\n};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport Icon from 'flavours/glitch/components/icon';\n\nconst messages = defineMessages({\n  load_more: { id: 'status.load_more', defaultMessage: 'Load more' },\n});\n\nexport default @injectIntl\nclass LoadGap extends React.PureComponent {\n\n  static propTypes = {\n    disabled: PropTypes.bool,\n    maxId: PropTypes.string,\n    onClick: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  handleClick = () => {\n    this.props.onClick(this.props.maxId);\n  }\n\n  render () {\n    const { disabled, intl } = this.props;\n\n    return (\n      \n         \n    );\n  }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport SettingText from 'flavours/glitch/components/setting_text';\nimport SettingToggle from 'flavours/glitch/features/notifications/components/setting_toggle';\n\nconst messages = defineMessages({\n  filter_regex: { id: 'home.column_settings.filter_regex', defaultMessage: 'Filter out by regular expressions' },\n  settings: { id: 'home.settings', defaultMessage: 'Column settings' },\n});\n\nexport default @injectIntl\nclass ColumnSettings extends React.PureComponent {\n\n  static propTypes = {\n    settings: ImmutablePropTypes.map.isRequired,\n    onChange: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n    columnId: PropTypes.string,\n  };\n\n  render () {\n    const { settings, onChange, intl } = this.props;\n\n    return (\n      \n        
\n          
\n\n        
\n\n        
\n          
\n      
\n        
\n          {intl.formatMessage(messages.search)} \n\n           \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 { injectIntl, FormattedMessage } from 'react-intl';\nimport SettingToggle from '../../notifications/components/setting_toggle';\n\nexport default @injectIntl\nclass ColumnSettings extends React.PureComponent {\n\n  static propTypes = {\n    settings: ImmutablePropTypes.map.isRequired,\n    onChange: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n    columnId: PropTypes.string,\n  };\n\n  render () {\n    const { settings, onChange } = this.props;\n\n    return (\n      \n    );\n  }\n\n}\n","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    );\n  } else {\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","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { FormattedMessage, defineMessages, injectIntl } from 'react-intl';\nimport AccountContainer from 'flavours/glitch/containers/account_container';\nimport StatusContainer from 'flavours/glitch/containers/status_container';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Hashtag from 'flavours/glitch/components/hashtag';\nimport Icon from 'flavours/glitch/components/icon';\nimport { searchEnabled } from 'flavours/glitch/util/initial_state';\nimport LoadMore from 'flavours/glitch/components/load_more';\n\nconst messages = defineMessages({\n  dismissSuggestion: { id: 'suggestions.dismiss', defaultMessage: 'Dismiss suggestion' },\n});\n\nexport default @injectIntl\nclass SearchResults extends ImmutablePureComponent {\n\n  static propTypes = {\n    results: ImmutablePropTypes.map.isRequired,\n    suggestions: ImmutablePropTypes.list.isRequired,\n    fetchSuggestions: PropTypes.func.isRequired,\n    expandSearch: PropTypes.func.isRequired,\n    dismissSuggestion: PropTypes.func.isRequired,\n    searchTerm: PropTypes.string,\n    intl: PropTypes.object.isRequired,\n  };\n\n  componentDidMount () {\n    if (this.props.searchTerm === '') {\n      this.props.fetchSuggestions();\n    }\n  }\n\n  handleLoadMoreAccounts = () => this.props.expandSearch('accounts');\n\n  handleLoadMoreStatuses = () => this.props.expandSearch('statuses');\n\n  handleLoadMoreHashtags = () => this.props.expandSearch('hashtags');\n\n  render () {\n    const { intl, results, suggestions, dismissSuggestion, searchTerm } = this.props;\n\n    if (results.isEmpty() && !suggestions.isEmpty()) {\n      return (\n        \n          
\n            
\n              
\n\n            {suggestions && suggestions.map(accountId => (\n              
\n            ))}\n          
\n        
\n           \n      );\n    }\n\n    if (results.get('statuses') && results.get('statuses').size > 0) {\n      count   += results.get('statuses').size;\n      statuses = (\n        \n          )}\n\n          {results.get('statuses').size >= 5 &&   \n      );\n    }\n\n    if (results.get('hashtags') && results.get('hashtags').size > 0) {\n      count += results.get('hashtags').size;\n      hashtags = (\n        \n           \n      );\n    }\n\n    //  The result.\n    return (\n      \n        \n\n        {accounts}\n        {statuses}\n        {hashtags}\n      
\n    );\n  };\n}\n","import { connect } from 'react-redux';\nimport SearchResults from '../components/search_results';\nimport { fetchSuggestions, dismissSuggestion } from 'flavours/glitch/actions/suggestions';\nimport { expandSearch } from 'flavours/glitch/actions/search';\n\nconst mapStateToProps = state => ({\n  results: state.getIn(['search', 'results']),\n  suggestions: state.getIn(['suggestions', 'items']),\n  searchTerm: state.getIn(['search', 'searchTerm']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n  fetchSuggestions: () => dispatch(fetchSuggestions()),\n  expandSearch: type => dispatch(expandSearch(type)),\n  dismissSuggestion: account => dispatch(dismissSuggestion(account.get('id'))),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SearchResults);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { FormattedMessage, defineMessages, injectIntl } from 'react-intl';\nimport AccountContainer from '../../../containers/account_container';\nimport StatusContainer from '../../../containers/status_container';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Hashtag from '../../../components/hashtag';\nimport Icon from 'mastodon/components/icon';\nimport { searchEnabled } from '../../../initial_state';\nimport LoadMore from 'mastodon/components/load_more';\n\nconst messages = defineMessages({\n  dismissSuggestion: { id: 'suggestions.dismiss', defaultMessage: 'Dismiss suggestion' },\n});\n\nexport default @injectIntl\nclass SearchResults extends ImmutablePureComponent {\n\n  static propTypes = {\n    results: ImmutablePropTypes.map.isRequired,\n    suggestions: ImmutablePropTypes.list.isRequired,\n    fetchSuggestions: PropTypes.func.isRequired,\n    expandSearch: PropTypes.func.isRequired,\n    dismissSuggestion: PropTypes.func.isRequired,\n    searchTerm: PropTypes.string,\n    intl: PropTypes.object.isRequired,\n  };\n\n  componentDidMount () {\n    if (this.props.searchTerm === '') {\n      this.props.fetchSuggestions();\n    }\n  }\n\n  handleLoadMoreAccounts = () => this.props.expandSearch('accounts');\n\n  handleLoadMoreStatuses = () => this.props.expandSearch('statuses');\n\n  handleLoadMoreHashtags = () => this.props.expandSearch('hashtags');\n\n  render () {\n    const { intl, results, suggestions, dismissSuggestion, searchTerm } = this.props;\n\n    if (results.isEmpty() && !suggestions.isEmpty()) {\n      return (\n        \n          
\n            
\n              
\n\n            {suggestions && suggestions.map(accountId => (\n              
\n            ))}\n          
\n        
\n          
\n\n          {results.get('accounts').map(accountId => 
)}\n\n          {results.get('accounts').size >= 5 && 
}\n        
\n          
\n          
\n        
\n          
\n\n        {accounts}\n        {statuses}\n        {hashtags}\n