diff --git a/packages/cp-frontend/package.json b/packages/cp-frontend/package.json index 57acbdf1..0d2c9364 100644 --- a/packages/cp-frontend/package.json +++ b/packages/cp-frontend/package.json @@ -36,6 +36,7 @@ "react-styled-flexboxgrid": "^1.1.2", "redux": "^3.6.0", "redux-actions": "^2.0.3", + "redux-batched-actions": "^0.2.0", "redux-form": "^6.7.0", "remcalc": "^1.0.5", "reselect": "^3.0.1", diff --git a/packages/cp-frontend/src/components/services/index.js b/packages/cp-frontend/src/components/services/index.js index b68cb6a3..f71b0664 100644 --- a/packages/cp-frontend/src/components/services/index.js +++ b/packages/cp-frontend/src/components/services/index.js @@ -1,3 +1,3 @@ export { default as EmptyServices } from './empty'; export { default as ServiceListItem } from './list-item'; -export { default as ServicesTooltip } from './tooltip'; +export { default as ServicesQuickActions } from './quick-actions'; diff --git a/packages/cp-frontend/src/components/services/list-item.js b/packages/cp-frontend/src/components/services/list-item.js index 5ca86582..a68db966 100644 --- a/packages/cp-frontend/src/components/services/list-item.js +++ b/packages/cp-frontend/src/components/services/list-item.js @@ -21,6 +21,12 @@ import { // InstancesMultipleIcon } from 'joyent-ui-toolkit'; +import { ServicesQuickActions } from '@components/services'; + +const StyledCardHeader = styled(CardHeader)` + position: relative; +`; + const TitleInnerContainer = styled.div` display: flex; flex-direction: row; @@ -29,7 +35,9 @@ const TitleInnerContainer = styled.div` `; const ServiceListItem = ({ - // OnQuickActions=() => {}, + showQuickActions, + onQuickActionsClick = () => {}, + onQuickActionsBlur = () => {}, deploymentGroup = '', service = {} }) => { @@ -61,13 +69,17 @@ const ServiceListItem = ({ const subtitle = {service.instances} instances; - const onOptionsClick = evt => { - // OnQuickActions(evt, service.uuid); + const handleCardOptionsClick = evt => { + onQuickActionsClick({ service }); + }; + + const handleQuickActionsBlur = evt => { + onQuickActionsBlur({ show: false }); }; const header = isChild ? null - : + : {title} @@ -82,8 +94,14 @@ const ServiceListItem = ({ /> */} - - ; + + + ; const view = children ? @@ -117,7 +135,9 @@ const ServiceListItem = ({ }; ServiceListItem.propTypes = { - // OnQuickActions: PropTypes.func, + showQuickActions: PropTypes.bool, + onQuickActionsClick: PropTypes.func, + onQuickActionsBlur: PropTypes.func, deploymentGroup: PropTypes.string, service: PropTypes.object.isRequired // Define better }; diff --git a/packages/cp-frontend/src/components/services/quick-actions.js b/packages/cp-frontend/src/components/services/quick-actions.js new file mode 100644 index 00000000..236ab9cb --- /dev/null +++ b/packages/cp-frontend/src/components/services/quick-actions.js @@ -0,0 +1,37 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Tooltip, TooltipButton, TooltipDivider } from 'joyent-ui-toolkit'; + +const ServicesQuickActions = ({ show, position, service, onBlur }) => { + if (!show) { + return null; + } + + const p = Object.keys(position).reduce((p, key) => { + if (typeof position[key] === 'number') { + p[key] = `${position[key]}px`; + } else { + p[key] = position[key]; + } + return p; + }, {}); + + return ( + + {}}>Scale + Restart + Stop + + Delete + + ); +}; + +ServicesQuickActions.propTypes = { + service: PropTypes.object, + position: PropTypes.object, + show: PropTypes.bool, + onBlur: PropTypes.func +}; + +export default ServicesQuickActions; diff --git a/packages/cp-frontend/src/components/services/tooltip.js b/packages/cp-frontend/src/components/services/tooltip.js deleted file mode 100644 index c6eac3e6..00000000 --- a/packages/cp-frontend/src/components/services/tooltip.js +++ /dev/null @@ -1,41 +0,0 @@ -// Import React from 'react'; -import PropTypes from 'prop-types'; - -// Import Tooltip, { TooltipButton, TooltipDivider } from 'joyent-ui-toolkit'; - -const ServicesTooltip = ({ show, position, data, ...rest }) => { - if (!show) { - return null; - } - - return null; - - // Return ( - // - //
  • - // Scale - //
  • - //
  • - // Start - //
  • - //
  • - // Restart - //
  • - // - //
  • - // Stop - //
  • - //
  • - // Delete - //
  • - //
    - // ); -}; - -ServicesTooltip.propTypes = { - data: PropTypes.object, - position: PropTypes.object, - show: PropTypes.bool -}; - -export default ServicesTooltip; diff --git a/packages/cp-frontend/src/containers/services/list.js b/packages/cp-frontend/src/containers/services/list.js index 62c3bb70..8323ad85 100644 --- a/packages/cp-frontend/src/containers/services/list.js +++ b/packages/cp-frontend/src/containers/services/list.js @@ -1,11 +1,11 @@ import React, { Component } from 'react'; import { compose, graphql } from 'react-apollo'; -// Import { connect } from 'react-redux'; +import { connect } from 'react-redux'; import styled from 'styled-components'; -// Import { Link } from 'react-router-dom'; import ServicesQuery from '@graphql/Services.gql'; import { processServices } from '@root/state/selectors'; +import { toggleServicesQuickActions } from '@root/state/actions'; import { LayoutContainer } from '@components/layout'; import { Loader, ErrorMessage } from '@components/messaging'; @@ -17,7 +17,14 @@ const StyledContainer = styled.div` class ServiceList extends Component { render() { - const { deploymentGroup, services, loading, error } = this.props; + const { + deploymentGroup, + services, + loading, + error, + servicesQuickActions, + toggleServicesQuickActions + } = this.props; if (loading) { return ( @@ -33,13 +40,25 @@ class ServiceList extends Component { ); } + const handleQuickActionsClick = o => { + toggleServicesQuickActions(o); + }; + + const handleQuickActionsBlur = o => { + toggleServicesQuickActions(o); + }; + const serviceList = services.map(service => ( )); @@ -57,6 +76,16 @@ class ServiceList extends Component { } } +const mapStateToProps = (state, ownProps) => ({ + servicesQuickActions: state.ui.services.quickActions +}); + +const mapDispatchToProps = dispatch => ({ + toggleServicesQuickActions: data => dispatch(toggleServicesQuickActions(data)) +}); + +const UiConnect = connect(mapStateToProps, mapDispatchToProps); + const ServicesGql = graphql(ServicesQuery, { options(props) { return { @@ -75,6 +104,6 @@ const ServicesGql = graphql(ServicesQuery, { }) }); -const ServiceListWithData = compose(ServicesGql)(ServiceList); +const ServiceListWithData = compose(ServicesGql, UiConnect)(ServiceList); export default ServiceListWithData; diff --git a/packages/cp-frontend/src/containers/services/topology.js b/packages/cp-frontend/src/containers/services/topology.js index 56d0b444..6ead108f 100644 --- a/packages/cp-frontend/src/containers/services/topology.js +++ b/packages/cp-frontend/src/containers/services/topology.js @@ -1,31 +1,38 @@ import React from 'react'; import { compose, graphql } from 'react-apollo'; -// Import { connect } from 'react-redux'; +import { connect } from 'react-redux'; import styled from 'styled-components'; import ServicesQuery from '@graphql/ServicesTopology.gql'; import unitcalc from 'unitcalc'; import { processServices } from '@root/state/selectors'; +import { toggleServicesQuickActions } from '@root/state/actions'; import { LayoutContainer } from '@components/layout'; import { Loader, ErrorMessage } from '@components/messaging'; -// Import { ServicesTooltip } from '@components/services'; +import { ServicesQuickActions } from '@components/services'; import { Topology } from 'joyent-ui-toolkit'; -/* Import ServicesTooltip from '@components/services/tooltip'; - -import { toggleTooltip } from '@state/actions'; */ const StyledBackground = styled.div` + padding: ${unitcalc(4)}; background-color: ${props => props.theme.whiteActive}; `; const StyledContainer = styled.div` position: relative; - padding: ${unitcalc(4)}; `; -const ServicesTopology = ({ push, services, datacenter, loading, error }) => { +const ServicesTopology = ({ + url, + push, + services, + datacenter, + loading, + error, + servicesQuickActions, + toggleServicesQuickActions +}) => { if (loading) { return ( @@ -40,15 +47,48 @@ const ServicesTopology = ({ push, services, datacenter, loading, error }) => { ); } + const handleQuickActionsClick = (evt, tooltipData) => { + toggleServicesQuickActions(tooltipData); + }; + + const handleTooltipBlur = evt => { + toggleServicesQuickActions({ show: false }); + }; + + const handleNodeTitleClick = (evt, { service }) => { + push(`${url.split('/').slice(0, 3).join('/')}/services/${service.slug}`); + }; + return ( - + + ); }; +const mapStateToProps = (state, ownProps) => ({ + servicesQuickActions: state.ui.services.quickActions, + url: ownProps.match.url, + push: ownProps.history.push +}); + +const mapDispatchToProps = dispatch => ({ + toggleServicesQuickActions: data => dispatch(toggleServicesQuickActions(data)) +}); + +const UiConnect = connect(mapStateToProps, mapDispatchToProps); + const ServicesGql = graphql(ServicesQuery, { options(props) { return { @@ -66,6 +106,8 @@ const ServicesGql = graphql(ServicesQuery, { }) }); -const ServicesTopologyWithData = compose(ServicesGql)(ServicesTopology); +const ServicesTopologyWithData = compose(ServicesGql, UiConnect)( + ServicesTopology +); export default ServicesTopologyWithData; diff --git a/packages/cp-frontend/src/state/actions.js b/packages/cp-frontend/src/state/actions.js index 10687a2d..165604e2 100644 --- a/packages/cp-frontend/src/state/actions.js +++ b/packages/cp-frontend/src/state/actions.js @@ -5,4 +5,6 @@ const APP = constantCase(process.env.APP_NAME); /** ***************************** UI ****************************** */ -export const addMemberToProject = createAction(`${APP}/PROJECT_ADD_MEMBER`); +export const toggleServicesQuickActions = createAction( + `${APP}/TOGGLE_SERVICES_QUICK_ACTIONS` +); diff --git a/packages/cp-frontend/src/state/reducers/index.js b/packages/cp-frontend/src/state/reducers/index.js index e69de29b..570fa5d0 100644 --- a/packages/cp-frontend/src/state/reducers/index.js +++ b/packages/cp-frontend/src/state/reducers/index.js @@ -0,0 +1 @@ +export { default as ui } from './ui'; diff --git a/packages/cp-frontend/src/state/reducers/ui.js b/packages/cp-frontend/src/state/reducers/ui.js new file mode 100644 index 00000000..17842def --- /dev/null +++ b/packages/cp-frontend/src/state/reducers/ui.js @@ -0,0 +1,36 @@ +import { handleActions } from 'redux-actions'; +import { toggleServicesQuickActions } from '@state/actions'; + +export default handleActions( + { + [toggleServicesQuickActions.toString()]: (state, action) => { + const { position, service, show } = action.payload; + + const s = show === undefined + ? !state.services.quickActions.service || + service.uuid !== state.services.quickActions.service.uuid + : show; + + const quickActions = s + ? { + show: s, + position, + service + } + : { + show: false + }; + + return { + ...state, + services: { + ...state.services, + quickActions + } + }; + + return state; + } + }, + {} +); diff --git a/packages/cp-frontend/src/state/state.js b/packages/cp-frontend/src/state/state.js index 96fa30a6..bafa499b 100644 --- a/packages/cp-frontend/src/state/state.js +++ b/packages/cp-frontend/src/state/state.js @@ -21,6 +21,11 @@ const state = { name: 'Instances' } ] + }, + services: { + quickActions: { + show: false + } } } }; diff --git a/packages/cp-frontend/src/state/store.js b/packages/cp-frontend/src/state/store.js index 505d5993..c31b84ed 100644 --- a/packages/cp-frontend/src/state/store.js +++ b/packages/cp-frontend/src/state/store.js @@ -1,6 +1,8 @@ import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; +import { enableBatching } from 'redux-batched-actions'; import { ApolloClient, createNetworkInterface } from 'react-apollo'; import state from './state'; +import { ui } from './reducers'; export const client = new ApolloClient({ dataIdFromObject: o => { @@ -22,12 +24,10 @@ export const client = new ApolloClient({ export const store = createStore( combineReducers({ - ui: s => { - return s ? s : state.ui; - }, + ui, apollo: client.reducer() }), - {}, // Initial state + state, // Initial state compose( applyMiddleware(client.middleware()), // If you are using the devToolsExtension, you can add it here also diff --git a/packages/ui-toolkit/src/index.js b/packages/ui-toolkit/src/index.js index e50e9999..362277a1 100644 --- a/packages/ui-toolkit/src/index.js +++ b/packages/ui-toolkit/src/index.js @@ -12,7 +12,8 @@ export { default as Small } from './text/small'; export { default as theme } from './theme'; export { default as typography, fonts } from './typography'; export { default as Topology } from './topology'; -export { default as Tooltip } from './tooltip'; + +export { Tooltip, TooltipButton, TooltipDivider } from './tooltip'; export { borderRadius, diff --git a/packages/ui-toolkit/src/modal/index.js b/packages/ui-toolkit/src/modal/index.js new file mode 100644 index 00000000..5abb6d05 --- /dev/null +++ b/packages/ui-toolkit/src/modal/index.js @@ -0,0 +1,14 @@ +import React, { Component } from 'react'; +import styled from 'styled-components'; + +class Modal extends Component { + render() { + return ( +
    +

    Modal

    +
    + ); + } +} + +export default Modal; diff --git a/packages/ui-toolkit/src/tooltip/index.js b/packages/ui-toolkit/src/tooltip/index.js index 51a302c5..75659891 100644 --- a/packages/ui-toolkit/src/tooltip/index.js +++ b/packages/ui-toolkit/src/tooltip/index.js @@ -1,79 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import styled from 'styled-components'; -import unitcalc from 'unitcalc'; -import remcalc from 'remcalc'; -import theme from '../theme'; -import { border, borderRadius, tooltipShadow } from '../boxes'; - -const StyledContainer = styled.div` - position: absolute; - top: ${props => props.top}; - left: ${props => props.left}; - bottom: ${props => props.bottoms}; - right: ${props => props.right}; -`; - -const StyledList = styled.ul` - position: relative; - display: inline-block; - top: ${remcalc(5)}; - left: -50%; - margin: 0; - padding: ${unitcalc(2)} 0; - list-style-type: none; - background-color: ${theme.white}; - border: ${border.unchecked}; - drop-shadow: ${tooltipShadow}; - border-radius: ${borderRadius}; - z-index: 1; - - &:after, &:before { - content: ""; - position: absolute; - bottom: 100%; - left: 50%; - height: 0; - width: 0; - border: solid transparent; - } - - &:after { - border-bottom-color: ${theme.white}; - border-width: ${remcalc(3)}; - margin-left: ${remcalc(-3)}; - } - - &:before { - border-bottom-color: ${theme.grey}; - border-width: ${remcalc(5)}; - margin-left: ${remcalc(-5)}; - } -`; - -/** - * @example ./usage.md - */ -const Tooltip = ({ - children, - top = 'auto', - left = 'auto', - bottom = 'auto', - right = 'auto' -}) => ( - - - {children} - - -); - -Tooltip.propTypes = { - children: PropTypes.node, - top: PropTypes.number, - left: PropTypes.number, - bottom: PropTypes.number, - right: PropTypes.number -}; - -export default Tooltip; +export { default as Tooltip } from './tooltip'; +export { default as TooltipButton } from './button'; +export { default as TooltipDivider } from './divider'; diff --git a/packages/ui-toolkit/src/tooltip/tooltip.js b/packages/ui-toolkit/src/tooltip/tooltip.js new file mode 100644 index 00000000..7fb6ebc0 --- /dev/null +++ b/packages/ui-toolkit/src/tooltip/tooltip.js @@ -0,0 +1,113 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import styled from 'styled-components'; +import unitcalc from 'unitcalc'; +import remcalc from 'remcalc'; +import theme from '../theme'; +import { border, borderRadius, tooltipShadow } from '../boxes'; + +const StyledContainer = styled.div` + position: absolute; + top: ${props => props.top}; + left: ${props => props.left}; + bottom: ${props => props.bottoms}; + right: ${props => props.right}; + + &:focus { + outline: none; + } +`; + +const StyledList = styled.ul` + position: relative; + display: inline-block; + top: ${remcalc(5)}; + left: -50%; + margin: 0; + padding: ${unitcalc(2)} 0; + list-style-type: none; + background-color: ${theme.white}; + border: ${border.unchecked}; + box-shadow: ${tooltipShadow}; + border-radius: ${borderRadius}; + z-index: 1; + + &:after, &:before { + content: ""; + position: absolute; + bottom: 100%; + left: 50%; + height: 0; + width: 0; + border: solid transparent; + } + + &:after { + border-bottom-color: ${theme.white}; + border-width: ${remcalc(3)}; + margin-left: ${remcalc(-3)}; + } + + &:before { + border-bottom-color: ${theme.grey}; + border-width: ${remcalc(5)}; + margin-left: ${remcalc(-5)}; + } +`; + +/** + * @example ./usage.md + */ +class Tooltip extends Component { + componentDidMount() { + this.windowClickHandler = this.handleWindowClick.bind(this); + this.windowClickCounter = 0; + window.addEventListener('click', this.windowClickHandler); + } + + componentWillReceiveProps(nextProps) { + this.windowClickCounter = 0; + } + + componentWillUnmount() { + window.removeEventListener('click', this.windowClickHandler); + } + + handleWindowClick(evt) { + if (this.windowClickCounter) { + if (this.props.onBlur) { + this.props.onBlur(); + } + } + this.windowClickCounter++; + } + + render() { + const { + children, + top = 'auto', + left = 'auto', + bottom = 'auto', + right = 'auto' + } = this.props; + + return ( + + + {children} + + + ); + } +} + +Tooltip.propTypes = { + children: PropTypes.node, + top: PropTypes.string, + left: PropTypes.string, + bottom: PropTypes.string, + right: PropTypes.string, + onBlur: PropTypes.func +}; + +export default Tooltip; diff --git a/packages/ui-toolkit/src/tooltip/usage.md b/packages/ui-toolkit/src/tooltip/usage.md index d1c1e704..254ec97a 100644 --- a/packages/ui-toolkit/src/tooltip/usage.md +++ b/packages/ui-toolkit/src/tooltip/usage.md @@ -1,14 +1,14 @@ ``` -const Tooltip = require('./index').default; +const Tooltip = require('./tooltip').default; const TooltipButton = require('./button').default; const TooltipDivider = require('./divider').default;
    - + Scale Restart - Stop + Delete
    diff --git a/packages/ui-toolkit/src/topology/index.js b/packages/ui-toolkit/src/topology/index.js index e309da77..ed20bf86 100644 --- a/packages/ui-toolkit/src/topology/index.js +++ b/packages/ui-toolkit/src/topology/index.js @@ -119,7 +119,7 @@ class Topology extends React.Component { } render() { - const { onQuickActions, services } = this.props; + const { onQuickActionsClick, onNodeTitleClick, services } = this.props; const { nodes, links } = this.state; @@ -197,17 +197,14 @@ class Topology extends React.Component { this.setDragInfo(false); }; - const onTitleClick = serviceUUID => - this.props.onNodeTitleClick(serviceUUID); - const renderedNode = (n, index) => ( ); @@ -288,7 +285,7 @@ class Topology extends React.Component { } Topology.propTypes = { - onQuickActions: PropTypes.func, + onQuickActionsClick: PropTypes.func, onNodeTitleClick: PropTypes.func, services: PropTypes.array }; diff --git a/packages/ui-toolkit/src/topology/node/button.js b/packages/ui-toolkit/src/topology/node/button.js index e03bfca8..78541592 100644 --- a/packages/ui-toolkit/src/topology/node/button.js +++ b/packages/ui-toolkit/src/topology/node/button.js @@ -27,6 +27,7 @@ const NodeButton = ({ connected, onButtonClick, index }) => { return ( + {buttonCircles} { role="button" tabIndex={100 + index} /> - {buttonCircles} ); }; diff --git a/packages/ui-toolkit/src/topology/node/index.js b/packages/ui-toolkit/src/topology/node/index.js index 386cd55d..6b7293f3 100644 --- a/packages/ui-toolkit/src/topology/node/index.js +++ b/packages/ui-toolkit/src/topology/node/index.js @@ -42,7 +42,7 @@ const GraphNode = ({ } const d = { - service: data.uuid, + service: data, position: { left: tooltipPosition.x, top: tooltipPosition.y @@ -52,7 +52,7 @@ const GraphNode = ({ onQuickActions(evt, d); }; - const onTitleClick = () => onNodeTitleClick(data.uuid); + const onTitleClick = evt => onNodeTitleClick(evt, { service: data }); const onStart = evt => { evt.preventDefault(); diff --git a/packages/ui-toolkit/src/topology/node/shapes.js b/packages/ui-toolkit/src/topology/node/shapes.js index 27b132da..40490e8c 100644 --- a/packages/ui-toolkit/src/topology/node/shapes.js +++ b/packages/ui-toolkit/src/topology/node/shapes.js @@ -77,6 +77,10 @@ export const GraphText = styled.text` export const GraphButtonRect = styled.rect` opacity: 0; cursor: pointer; + + &:focus { + outline: none; + } `; export const GraphButtonCircle = styled.circle` diff --git a/packages/ui-toolkit/styleguide.config.js b/packages/ui-toolkit/styleguide.config.js index ab760b02..1d6b10c0 100644 --- a/packages/ui-toolkit/styleguide.config.js +++ b/packages/ui-toolkit/styleguide.config.js @@ -63,7 +63,7 @@ module.exports = { 'src/list/ul.js', 'src/list/li.js', 'src/topology/index.js', - 'src/tooltip/index.js' + 'src/tooltip/tooltip.js' ] }, { diff --git a/packages/ui-toolkit/styleguide/build/0.8d987fcd.js b/packages/ui-toolkit/styleguide/build/0.8d987fcd.js index 2b6a1e78..6f5b709d 100644 --- a/packages/ui-toolkit/styleguide/build/0.8d987fcd.js +++ b/packages/ui-toolkit/styleguide/build/0.8d987fcd.js @@ -1 +1,10091 @@ -webpackJsonp([0],{1036:function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function classTest(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function removeChildren(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function removeChildrenAndAdd(e,t){return removeChildren(e).appendChild(t)}function elt(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function indexOf(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function spaceStr(e){for(;E.length<=e;)E.push(lst(E)+" ");return E[e]}function lst(e){return e[e.length-1]}function map(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||I.test(e))}function isWordChar(e,t){return t?!!(t.source.indexOf("\\w")>-1&&isWordCharBasic(e))||t.test(e):isWordCharBasic(e)}function isEmpty(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function isExtendingChar(e){return e.charCodeAt(0)>=768&&F.test(e)}function skipExtendingChars(e,t,n){for(;(n<0?t>0:t=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?Pos(n,getLine(e,n).text.length):clipToLen(t,getLine(e,t.line).text.length)}function clipToLen(e,t){var n=e.ch;return null==n||n>t?Pos(e.line,t):n<0?Pos(e.line,0):e}function clipPosArray(e,t){for(var n=[],r=0;r=t:o.to>t);(r||(r=[])).push(new MarkedSpan(a,o.from,l?null:o.to))}}return r}function markedSpansAfter(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var x=0;x0)){var u=[l,1],d=cmp(c.from,s.from),p=cmp(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}function detachMarkedSpans(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?cmp(c.to,n)>=0:cmp(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?cmp(c.from,r)<=0:cmp(c.from,r)<0)))return!0}}}function visualLine(e){for(var t;t=collapsedSpanAtStart(e);)e=t.find(-1,!0).line;return e}function visualLineEnd(e){for(var t;t=collapsedSpanAtEnd(e);)e=t.find(1,!0).line;return e}function visualLineContinued(e){for(var t,n;t=collapsedSpanAtEnd(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function visualLineNo(e,t){var n=getLine(e,t),r=visualLine(n);return n==r?t:lineNo(r)}function visualLineEndNo(e,t){if(t>e.lastLine())return t;var n,r=getLine(e,t);if(!lineIsHidden(e,r))return t;for(;n=collapsedSpanAtEnd(r);)r=n.find(1,!0).line;return lineNo(r)+1}function lineIsHidden(e,t){var n=z&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function iterateBidiSections(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function getBidiPartAt(e,t,n){var r;R=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:R=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:R=i)}return null!=r?r:R}function getOrder(e,t){var n=e.order;return null==n&&(n=e.order=V(e.text,t)),n}function moveCharLogically(e,t,n){var r=skipExtendingChars(e.text,t+n,n);return r<0||r>e.text.length?null:r}function moveLogically(e,t,n){var r=moveCharLogically(e,t.ch,n);return null==r?null:new Pos(t.line,r,n<0?"after":"before")}function endOfLine(e,t,n,r,i){if(e){var o=getOrder(n,t.doc.direction);if(o){var a,s=i<0?lst(o):o[0],l=i<0==(1==s.level),c=l?"after":"before";if(s.level>0){var u=prepareMeasureForLine(t,n);a=i<0?n.text.length-1:0;var d=measureCharPrepared(t,u,a).top;a=findFirst(function(e){return measureCharPrepared(t,u,e).top==d},i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=moveCharLogically(n,a,1))}else a=i<0?s.to:s.from;return new Pos(r,a,c)}}return new Pos(r,i<0?n.text.length:0,i<0?"before":"after")}function moveVisually(e,t,n,r){var i=getOrder(t,e.doc.direction);if(!i)return moveLogically(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=getBidiPartAt(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&p>=u.begin)){var f=d?"before":"after";return new Pos(n.line,p,f)}}var h=function(e,t,r){for(var o=function(e,t){return t?new Pos(n.line,l(e,1),"before"):new Pos(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==m||r>0&&m==t.text.length||!(g=h(r>0?0:i.length-1,r,c(m)))?null:g}function getHandlers(e,t){return e._handlers&&e._handlers[t]||j}function off(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=indexOf(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function signal(e,t){var n=getHandlers(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function eventMixin(e){e.prototype.on=function(e,t){G(this,e,t)},e.prototype.off=function(e,t){off(this,e,t)}}function e_preventDefault(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function e_stopPropagation(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function e_defaultPrevented(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function e_stop(e){e_preventDefault(e),e_stopPropagation(e)}function e_target(e){return e.target||e.srcElement}function e_button(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}function zeroWidthElement(e){if(null==O){var t=elt("span","​");removeChildrenAndAdd(e,elt("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(O=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=O?elt("span","​"):elt("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function hasBadBidiRects(e){if(null!=P)return P;var t=removeChildrenAndAdd(e,document.createTextNode("AخA")),n=w(t,0,1).getBoundingClientRect(),r=w(t,1,2).getBoundingClientRect();return removeChildren(e),!(!n||n.left==n.right)&&(P=r.right-n.right<3)}function hasBadZoomedRects(e){if(null!=q)return q;var t=removeChildrenAndAdd(e,elt("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return q=Math.abs(n.left-r.left)>1}function defineMode(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),X[e]=t}function defineMIME(e,t){Y[e]=t}function resolveMode(e){if("string"==typeof e&&Y.hasOwnProperty(e))e=Y[e];else if(e&&"string"==typeof e.name&&Y.hasOwnProperty(e.name)){var t=Y[e.name];"string"==typeof t&&(t={name:t}),e=createObj(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return resolveMode("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return resolveMode("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function getMode(e,t){t=resolveMode(t);var n=X[t.name];if(!n)return getMode(e,"text/plain");var r=n(e,t);if(Z.hasOwnProperty(t.name)){var i=Z[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function extendMode(e,t){copyObj(t,Z.hasOwnProperty(e)?Z[e]:Z[e]={})}function copyState(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function innerMode(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function startState(e,t,n){return!e.startState||e.startState(t,n)}function highlightLine(e,t,n,r){var i=[e.state.modeGen],o={};runMode(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=0;ae&&i.splice(a,1,e,i[a+1],o),a+=2,s=Math.min(e,o)}if(t)if(r.opaque)i.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;ne.options.maxHighlightLength?copyState(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function getStateBefore(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=findStartLine(e,t,n),a=o>r.first&&getLine(r,o-1).stateAfter;return a=a?copyState(r.mode,a):startState(r.mode),r.iter(o,t,function(n){processLine(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&ot.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function takeToken(e,t,n,r){var i,o=function(e){return{start:d.start,end:d.pos,string:d.current(),type:i||null,state:e?copyState(a.mode,u):u}},a=e.doc,s=a.mode;t=clipPos(a,t);var l,c=getLine(a,t.line),u=getStateBefore(e,t.line,n),d=new J(c.text,e.options.tabSize);for(r&&(l=[]);(r||d.pose.options.maxHighlightLength?(s=!1,a&&processLine(e,t,r,d.pos),d.pos=t.length,l=null):l=extractLineClasses(readToken(n,d,r,p),o),p){var f=p[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;ca;--s){if(s<=o.first)return o.first;var l=getLine(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var c=countColumn(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}function updateLine(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),detachMarkedSpans(e),attachMarkedSpans(e,n);var i=r?r(e):1;i!=e.height&&updateLineHeight(e,i)}function cleanUpLine(e){e.parent=null,detachMarkedSpans(e)}function interpretTokenStyle(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ne:te;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function buildLineContent(e,t){var n=eltP("span",null,null,l?"padding-right: .1px":null),r={pre:eltP("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(a||l)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,s=void 0;r.pos=0,r.addToken=buildToken,hasBadBidiRects(e.display.measure)&&(s=getOrder(o,e.doc.direction))&&(r.addToken=buildTokenBadBidi(r.addToken,s)),r.map=[];insertLineContent(o,r,getLineStyles(e,o,t!=e.display.externalMeasured&&lineNo(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=joinClasses(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=joinClasses(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(zeroWidthElement(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return signal(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=joinClasses(r.pre.className,r.textClass||"")),r}function defaultSpecialCharPlaceholder(e){var t=elt("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function buildToken(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?splitSpaces(t,e.trailingSpace):t,d=e.cm.state.specialChars,p=!1;if(d.test(t)){c=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var h=d.exec(t),g=h?h.index-f:t.length-f;if(g){var m=document.createTextNode(u.slice(f,f+g));a&&s<9?c.appendChild(elt("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!h)break;f+=g+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;v=c.appendChild(elt("span",spaceStr(b),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?(v=c.appendChild(elt("span","\r"==h[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",h[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(h[0]),v.setAttribute("cm-text",h[0]),a&&s<9?c.appendChild(elt("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||p||l){var x=n||"";r&&(x+=r),i&&(x+=i);var C=elt("span",[c],x,l);return o&&(C.title=o),e.content.appendChild(C)}e.content.appendChild(c)}}function splitSpaces(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&d.from<=c));p++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function buildCollapsedSpan(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function insertLineContent(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,p,f=i.length,h=0,g=1,m="",v=0;;){if(v==h){l=c=u=d=s="",p=null,v=1/0;for(var y=[],b=void 0,x=0;xh||w.collapsed&&C.to==h&&C.from==h)?(null!=C.to&&C.to!=h&&v>C.to&&(v=C.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&C.from==h&&(u+=" "+w.startStyle),w.endStyle&&C.to==v&&(b||(b=[])).push(w.endStyle,C.to),w.title&&!d&&(d=w.title),w.collapsed&&(!p||compareCollapsedMarkers(p.marker,w)<0)&&(p=C)):C.from>h&&v>C.from&&(v=C.from)}if(b)for(var S=0;S=f)break;for(var L=Math.min(f,v);;){if(m){var M=h+m.length;if(!p){var T=M>L?m.slice(0,L-h):m;t.addToken(t,T,a?a+l:l,u,h+T.length==v?c:"",d,s)}if(M>=L){m=m.slice(L-h),h=L;break}h=M,u=""}m=i.slice(o,o=n[g++]),a=interpretTokenStyle(n[g++],t.cm.options)}}else for(var O=1;O2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function mapFromLineView(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function updateExternalMeasurement(e,t){t=visualLine(t);var n=lineNo(t),r=e.display.externalMeasured=new LineView(e.doc,t,n);r.lineN=n;var i=r.built=buildLineContent(e,r);return r.text=i.pre,removeChildrenAndAdd(e.display.lineMeasure,i.pre),r}function measureChar(e,t,n,r){return measureCharPrepared(e,prepareMeasureForLine(e,t),n,r)}function findViewForLine(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=l-s,i=o-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function measureCharInner(e,t,n,r){var i,o=nodeAndOffsetInLineMap(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;c&&isExtendingChar(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u0&&(d=r="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+charWidth(e.display),top:h.top,bottom:h.bottom}:oe}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b=r.text.length?(s=r.text.length,l="before"):s<=0&&(s=0,l="after"),!a)return get("before"==l?s-1:s,"before"==l);var c=getBidiPartAt(a,s,l),u=R,d=getBidi(s,c,"before"==l);return null!=u&&(d.other=getBidi(s,u,"before"!=l)),d}function estimateCoords(e,t){var n=0;t=clipPos(e.doc,t),e.options.lineWrapping||(n=charWidth(e.display)*t.ch);var r=getLine(e.doc,t.line),i=heightAtLine(r)+paddingTop(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function PosWithInfo(e,t,n,r,i){var o=Pos(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function coordsChar(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return PosWithInfo(r.first,0,null,!0,-1);var i=lineAtHeight(r,n),o=r.first+r.size-1;if(i>o)return PosWithInfo(r.first+r.size-1,getLine(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=getLine(r,i);;){var s=coordsCharInner(e,a,i,t,n),l=collapsedSpanAtEnd(a),c=l&&l.find(0,!0);if(!l||!(s.ch>c.from.ch||s.ch==c.from.ch&&s.xRel>0))return s;i=lineNo(a=c.to.line)}}function wrappedLineExtent(e,t,n,r){var i=function(r){return intoCoordSystem(e,t,measureCharPrepared(e,n,r),"line")},o=t.text.length,a=findFirst(function(e){return i(e-1).bottom<=r},o,0);return o=findFirst(function(e){return i(e).top>r},a,o),{begin:a,end:o}}function wrappedLineExtentChar(e,t,n,r){return wrappedLineExtent(e,t,n,intoCoordSystem(e,t,measureCharPrepared(e,n,r),"line").top)}function coordsCharInner(e,t,n,r,i){i-=heightAtLine(t);var o,a=0,s=t.text.length,l=prepareMeasureForLine(e,t);if(getOrder(t,e.doc.direction)){if(e.options.lineWrapping){var c;c=wrappedLineExtent(e,t,l,i),a=c.begin,s=c.end}o=new Pos(n,a);var u,d,p=cursorCoords(e,o,"line",t,l).left,f=pMath.abs(u)){if(h<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=d}}else{var g=findFirst(function(n){var o=intoCoordSystem(e,t,measureCharPrepared(e,l,n),"line");return o.top>i?(s=Math.min(n,s),!0):!(o.bottom<=i)&&(o.left>r||!(o.rightm.right?1:0,o}function textHeight(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ee){ee=elt("pre");for(var t=0;t<49;++t)ee.appendChild(document.createTextNode("x")),ee.appendChild(elt("br"));ee.appendChild(document.createTextNode("x"))}removeChildrenAndAdd(e.measure,ee);var n=ee.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),removeChildren(e.measure),n||1}function charWidth(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=elt("span","xxxxxxxxxx"),n=elt("pre",[t]);removeChildrenAndAdd(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function getDimensions(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:compensateForHScroll(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function compensateForHScroll(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function estimateHeight(e){var t=textHeight(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/charWidth(e.display)-3);return function(i){if(lineIsHidden(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().line3&&(add(d,f.top,null,f.bottom),d=s,f.bottoma.bottom||c.bottom==a.bottom&&c.right>a.right)&&(a=c),d0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ensureFocus(e){e.state.focused||(e.display.input.focus(),onFocus(e))}function delayBlurEvent(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,onBlur(e))},100)}function onFocus(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(signal(e,"focus",e,t),e.state.focused=!0,addClass(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),restartBlink(e))}function onBlur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(signal(e,"blur",e,t),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function updateHeightsInViewport(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.001||u<-.001)&&(updateLineHeight(i.line,o),updateWidgetHeight(i.line),i.rest))for(var d=0;d=a&&(o=lineAtHeight(t,heightAtLine(getLine(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function alignHorizontally(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=compensateForHScroll(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=elt("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-paddingTop(e.display))+"px;\n height: "+(t.bottom-t.top+scrollGap(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function scrollPosIntoView(e,t,n,r){null==r&&(r=0);for(var i,o=0;o<5;o++){var a=!1,s=cursorCoords(e,t),l=n&&n!=t?cursorCoords(e,n):s;i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r};var c=calculateScrollPos(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(updateScrollTop(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(setScrollLeft(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function scrollIntoView(e,t){var n=calculateScrollPos(e,t);null!=n.scrollTop&&updateScrollTop(e,n.scrollTop),null!=n.scrollLeft&&setScrollLeft(e,n.scrollLeft)}function calculateScrollPos(e,t){var n=e.display,r=textHeight(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=displayHeight(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+paddingVert(n),l=t.tops-r;if(t.topi+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=displayWidth(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),f=t.right-t.left>p;return f&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+d-3&&(a.scrollLeft=t.right+(f?0:10)-p),a}function addToScrollTop(e,t){null!=t&&(resolveScrollToPos(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ensureCursorVisible(e){resolveScrollToPos(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Pos(t.line,t.ch-1):t,r=Pos(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin}}function scrollToCoords(e,t,n){null==t&&null==n||resolveScrollToPos(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function scrollToRange(e,t){resolveScrollToPos(e),e.curOp.scrollToPos=t}function resolveScrollToPos(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;scrollToCoordsRange(e,estimateCoords(e,t.from),estimateCoords(e,t.to),t.margin)}}function scrollToCoordsRange(e,t,n,r){var i=calculateScrollPos(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});scrollToCoords(e,i.scrollLeft,i.scrollTop)}function updateScrollTop(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||updateDisplaySimple(e,{top:t}),setScrollTop(e,t,!0),n&&updateDisplaySimple(e),startWorker(e,100))}function setScrollTop(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function setScrollLeft(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,alignHorizontally(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function measureForScrollbars(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+paddingVert(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+scrollGap(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function updateScrollbars(e,t){t||(t=measureForScrollbars(e));var n=e.display.barWidth,r=e.display.barHeight;updateScrollbarsInner(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&updateHeightsInViewport(e),updateScrollbarsInner(e,measureForScrollbars(e)),n=e.display.barWidth,r=e.display.barHeight}function updateScrollbarsInner(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function initScrollbars(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new le[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),G(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?setScrollLeft(e,t):updateScrollTop(e,t)},e),e.display.scrollbars.addClass&&addClass(e.display.wrapper,e.display.scrollbars.addClass)}function startOperation(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ce},pushOperation(e.curOp)}function endOperation(e){finishOperation(e.curOp,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ue(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function endOperation_W1(e){e.updatedDisplay=e.mustUpdate&&updateDisplayIfNeeded(e.cm,e.update)}function endOperation_R2(e){var t=e.cm,n=t.display;e.updatedDisplay&&updateHeightsInViewport(t),e.barMeasure=measureForScrollbars(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=measureChar(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+scrollGap(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-displayWidth(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function endOperation_W2(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)z&&visualLineNo(e.doc,t)i.viewFrom?resetView(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)resetView(e);else if(t<=i.viewFrom){var o=viewCuttingPoint(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):resetView(e)}else if(n>=i.viewTo){var a=viewCuttingPoint(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):resetView(e)}else{var s=viewCuttingPoint(e,t,t,-1),l=viewCuttingPoint(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(buildViewArray(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):resetView(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[findViewIndex(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==indexOf(a,n)&&a.push(n)}}}function resetView(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function viewCuttingPoint(e,t,n,r){var i,o=findViewIndex(e,t),a=e.display.view;if(!z||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;visualLineNo(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function adjustView(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=buildViewArray(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=buildViewArray(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,findViewIndex(e,n)))),r.viewTo=n}function countDirtyView(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=copyState(t.mode,getStateBefore(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength,l=highlightLine(e,o,s?copyState(t.mode,r):r,!0);o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!d&&pn)return startWorker(e,e.options.workDelay),!0}),i.length&&runInOp(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==countDirtyView(e))return!1;maybeUpdateLineNumberWidth(e)&&(resetView(e),t.dims=getDimensions(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),z&&(o=visualLineNo(e.doc,o),a=visualLineEndNo(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;adjustView(e,o,a),n.viewOffset=heightAtLine(getLine(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=countDirtyView(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=selectionSnapshot(e);return l>4&&(n.lineDiv.style.display="none"),patchDisplay(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,restoreSelection(c),removeChildren(n.cursorDiv),removeChildren(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,startWorker(e,400)),n.updateLineNumbers=null,!0}function postUpdateDisplay(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=displayWidth(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+paddingVert(e.display)-displayHeight(e),n.top)}),t.visible=visibleLines(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&updateDisplayIfNeeded(e,t);r=!1){updateHeightsInViewport(e);var i=measureForScrollbars(e);updateSelection(e),updateScrollbars(e,i),setDocumentHeight(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function updateDisplaySimple(e,t){var n=new ue(e,t);if(updateDisplayIfNeeded(e,n)){updateHeightsInViewport(e),postUpdateDisplay(e,n);var r=measureForScrollbars(e);updateSelection(e),updateScrollbars(e,r),setDocumentHeight(e,r),n.finish()}}function patchDisplay(e,t,n){function rm(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild,s=r.view,c=r.viewFrom,u=0;u-1&&(p=!1),updateLineForChanges(e,d,c,n)),p&&(removeChildren(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(lineNumberFor(e.options,c)))),a=d.node.nextSibling}else{var f=buildLineElement(e,d,c,n);o.insertBefore(f,a)}c+=d.size}for(;a;)a=rm(a)}function updateGutterSpace(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function setDocumentHeight(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+scrollGap(e)+"px"}function updateGutters(e){var t=e.display.gutters,n=e.options.gutters;removeChildren(t);for(var r=0;r-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function wheelEventDelta(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function wheelEventPixels(e){var t=wheelEventDelta(e);return t.x*=pe,t.y*=pe,t}function onScrollWheel(e,t){var r=wheelEventDelta(t),i=r.x,o=r.y,a=e.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var p=t.target,f=a.view;p!=s;p=p.parentNode)for(var h=0;h=0){var a=minPos(o.from(),i.from()),s=maxPos(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new he(l?s:a,l?a:s))}}return new fe(e,t)}function simpleSelection(e,t){return new fe([new he(e,t||e)],0)}function changeEnd(e){return e.text?Pos(e.from.line+e.text.length-1,lst(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function adjustForChange(e,t){if(cmp(e,t.from)<0)return e;if(cmp(e,t.to)<=0)return changeEnd(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=changeEnd(t).ch-t.to.ch),Pos(n,r)}function computeSelAfterChange(e,t){for(var n=[],r=0;r1&&e.remove(i.line+1,d-1),e.insert(i.line+1,h)}signalLater(e,"change",e,t)}function linkedDocs(e,t,n){function propagate(e,r,i){if(e.linked)for(var o=0;o1&&!e.done[e.done.length-2].ranges?(e.done.pop(),lst(e.done)):void 0}function addChangeToHistory(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=lastChangeEvent(i,i.lastOp==r)))a=lst(o.changes),0==cmp(t.from,t.to)&&0==cmp(t.from,a.to)?a.to=changeEnd(t):o.changes.push(historyChangeFromChange(e,t));else{var l=lst(i.done);for(l&&l.ranges||pushSelectionToHistory(e.sel,i.done),o={changes:[historyChangeFromChange(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||signal(e,"historyAdded")}function selectionEventCanBeMerged(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function addSelectionToHistory(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||selectionEventCanBeMerged(e,o,lst(i.done),t))?i.done[i.done.length-1]=t:pushSelectionToHistory(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&clearSelectionEvents(i.undone)}function pushSelectionToHistory(e,t){var n=lst(t);n&&n.ranges&&n.equals(e)||t.push(e)}function attachLocalSpans(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function removeClearedSpans(e){if(!e)return null;for(var t,n=0;n-1&&(lst(s)[d]=c[d],delete c[d])}}}return r}function extendRange(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=cmp(n,i)<0;o!=cmp(r,i)<0?(i=n,n=r):o!=cmp(n,r)<0&&(n=r)}return new he(i,n)}return new he(r||n,n)}function extendSelection(e,t,n,r){setSelection(e,new fe([extendRange(e,e.sel.primary(),t,n)],0),r)}function extendSelections(e,t,n){for(var r=[],i=0;i=t.ch:s.to>t.ch))){if(i&&(signal(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=movePos(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=cmp(c,n))&&(r<0?u<0:u>0))return skipAtomicInner(e,c,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(d=movePos(e,d,r,d.line==t.line?o:null)),d?skipAtomicInner(e,d,t,r,i):null}}return t}function skipAtomic(e,t,n,r,i){var o=r||1,a=skipAtomicInner(e,t,n,o,i)||!i&&skipAtomicInner(e,t,n,o,!0)||skipAtomicInner(e,t,n,-o,i)||!i&&skipAtomicInner(e,t,n,-o,!0);return a||(e.cantEdit=!0,Pos(e.first,0))}function movePos(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?clipPos(e,Pos(t.line-1)):null:n>0&&t.ch==(r||getLine(e,t.line)).text.length?t.line=0;--i)makeChangeInner(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else makeChangeInner(e,t)}}function makeChangeInner(e,t){if(1!=t.text.length||""!=t.text[0]||0!=cmp(t.from,t.to)){var n=computeSelAfterChange(e,t);addChangeToHistory(e,t,n,e.cm?e.cm.curOp.id:NaN),makeChangeSingleDoc(e,t,n,stretchSpansOverChange(e,t));var r=[];linkedDocs(e,function(e,n){n||-1!=indexOf(r,e.history)||(rebaseHist(e.history,t),r.push(e.history)),makeChangeSingleDoc(e,t,null,stretchSpansOverChange(e,t))})}}function makeChangeFromHistory(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--d){var p=function(n){var i=r.changes[n];if(i.origin=t,u&&!filterChange(e,i,!1))return a.length=0,{};c.push(historyChangeFromChange(e,i));var o=n?computeSelAfterChange(e,i):lst(a);makeChangeSingleDoc(e,i,o,mergeOldSpans(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:changeEnd(i)});var s=[];linkedDocs(e,function(e,t){t||-1!=indexOf(s,e.history)||(rebaseHist(e.history,i),s.push(e.history)),makeChangeSingleDoc(e,i,null,mergeOldSpans(e,i))})}(d);if(p)return p.v}}}}function shiftDoc(e,t){if(0!=t&&(e.first+=t,e.sel=new fe(map(e.sel.ranges,function(e){return new he(Pos(e.anchor.line+t,e.anchor.ch),Pos(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){regChange(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Pos(o,getLine(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=getBetween(e,t.from,t.to),n||(n=computeSelAfterChange(e,t)),e.cm?makeChangeSingleDocInEditor(e.cm,t,r):updateDoc(e,t,r),setSelectionNoUndo(e,n,D)}}function makeChangeSingleDocInEditor(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=lineNo(visualLine(getLine(r,o.line))),r.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&signalCursorActivity(e),updateDoc(r,t,n,estimateHeight(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(e){var t=lineLength(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,o.line),startWorker(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?regChange(e):o.line!=a.line||1!=t.text.length||isWholeLineUpdate(e.doc,t)?regChange(e,o.line,a.line+1,c):regLineChange(e,o.line,"text");var u=hasHandler(e,"changes"),d=hasHandler(e,"change");if(d||u){var p={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&signalLater(e,"change",e,p),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function replaceRange(e,t,n,r,i){if(r||(r=n),cmp(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),makeChange(e,{from:n,to:r,text:t,origin:i})}function rebaseHistSelSingle(e,t,n,r){n0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=eltP("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(conflictingCollapsedRange(e,t.line,t,n,o)||t.line!=n.line&&conflictingCollapsedRange(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");seeCollapsedSpans()}o.addToHistory&&addChangeToHistory(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&visualLine(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&updateLineHeight(e,0),addMarkedSpan(e,new MarkedSpan(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){lineIsHidden(e,t)&&updateLineHeight(t,0)}),o.clearOnEnter&&G(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(seeReadOnlySpans(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ye,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)regChange(c,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=n.line;u++)regLineChange(c,u,"text");o.atomic&&reCheckSelection(c.doc),signalLater(c,"markerAdded",c,o)}return o}function markTextShared(e,t,n,r,i){r=copyObj(r),r.shared=!1;var o=[markText(e,t,n,r,i)],a=o[0],s=r.widgetNode;return linkedDocs(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(markText(e,clipPos(e,t),clipPos(e,n),r,i));for(var l=0;l-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),setSelectionNoUndo(t.doc,simpleSelection(n,n)),u)for(var d=0;d=0;t--)replaceRange(e.doc,"",r[t].from,r[t].to,"+delete");ensureCursorVisible(e)})}function lineStart(e,t){var n=getLine(e.doc,t),r=visualLine(n);return r!=n&&(t=lineNo(r)),endOfLine(!0,e,r,t,1)}function lineEnd(e,t){var n=getLine(e.doc,t),r=visualLineEnd(n);return r!=n&&(t=lineNo(r)),endOfLine(!0,e,n,t,-1)}function lineStartSmart(e,t){var n=lineStart(e,t.line),r=getLine(e.doc,n.line),i=getOrder(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return Pos(n.line,a?0:o,n.sticky)}return n}function doHandleBinding(e,t,n){if("string"==typeof t&&!(t=De[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=A}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function lookupKeyForEditor(e,t,n){for(var r=0;ri-400&&0==cmp(Ae.pos,n)?r="triple":Ne&&Ne.time>i-400&&0==cmp(Ne.pos,n)?(r="double",Ae={time:i,pos:n}):(r="single",Ne={time:i,pos:n});var o,s=e.doc.sel,l=y?t.metaKey:t.ctrlKey;e.options.dragDrop&&_&&!e.isReadOnly()&&"single"==r&&(o=s.contains(n))>-1&&(cmp((o=s.ranges[o]).from(),n)<0||n.xRel>0)&&(cmp(o.to(),n)>0||n.xRel<0)?leftButtonStartDrag(e,t,n,l):leftButtonSelect(e,t,n,r,l)}function leftButtonStartDrag(e,t,n,r){var i=e.display,o=!1,c=operation(e,function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,off(document,"mouseup",c),off(document,"mousemove",u),off(i.scroller,"dragstart",d),off(i.scroller,"drop",c),o||(e_preventDefault(t),r||extendSelection(e.doc,n),l||a&&9==s?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=y?t.altKey:t.ctrlKey,i.scroller.dragDrop&&i.scroller.dragDrop(),G(document,"mouseup",c),G(document,"mousemove",u),G(i.scroller,"dragstart",d),G(i.scroller,"drop",c),delayBlurEvent(e),setTimeout(function(){return i.input.focus()},20)}function leftButtonSelect(e,t,n,r,i){function extendTo(t){if(0!=cmp(f,t))if(f=t,"rect"==r){for(var i=[],o=e.options.tabSize,u=countColumn(getLine(a,n.line).text,n.ch,o),d=countColumn(getLine(a,t.line).text,t.ch,o),p=Math.min(u,d),h=Math.max(u,d),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=getLine(a,g).text,y=findColumn(v,p,o);p==h?i.push(new he(Pos(g,y),Pos(g,y))):v.length>y&&i.push(new he(Pos(g,y),Pos(g,findColumn(v,h,o))))}i.length||i.push(new he(n,n)),setSelection(a,normalizeSelection(c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=s,x=b.anchor,C=t;if("single"!=r){var w;w="double"==r?e.findWordAt(t):new he(Pos(t.line,0),clipPos(a,Pos(t.line+1,0))),cmp(w.anchor,x)>0?(C=w.head,x=minPos(b.from(),w.anchor)):(C=w.anchor,x=maxPos(b.to(),w.head))}var S=c.ranges.slice(0);S[l]=new he(clipPos(a,x),C),setSelection(a,normalizeSelection(S,l),H)}}function extend(t){var n=++g,i=posFromMouse(e,t,!0,"rect"==r);if(i)if(0!=cmp(i,f)){e.curOp.focus=activeElt(),extendTo(i);var s=visibleLines(o,a);(i.line>=s.to||i.lineh.bottom?20:0;l&&setTimeout(operation(e,function(){g==n&&(o.scroller.scrollTop+=l,extend(t))}),50)}}function done(t){e.state.selectingText=!1,g=1/0,e_preventDefault(t),o.input.focus(),off(document,"mousemove",m),off(document,"mouseup",v),a.history.lastSelOrigin=null}var o=e.display,a=e.doc;e_preventDefault(t);var s,l,c=a.sel,u=c.ranges;if(i&&!t.shiftKey?(l=a.sel.contains(n),s=l>-1?u[l]:new he(n,n)):(s=a.sel.primary(),l=a.sel.primIndex),b?t.shiftKey&&t.metaKey:t.altKey)r="rect",i||(s=new he(n,n)),n=posFromMouse(e,t,!0,!0),l=-1;else if("double"==r){var d=e.findWordAt(n);s=e.display.shift||a.extend?extendRange(a,s,d.anchor,d.head):d}else if("triple"==r){var p=new he(Pos(n.line,0),clipPos(a,Pos(n.line+1,0)));s=e.display.shift||a.extend?extendRange(a,s,p.anchor,p.head):p}else s=extendRange(a,s,n);i?-1==l?(l=u.length,setSelection(a,normalizeSelection(u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"single"==r&&!t.shiftKey?(setSelection(a,normalizeSelection(u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=a.sel):replaceOneSelection(a,l,s,H):(l=0,setSelection(a,new fe([s],0),H),c=a.sel);var f=n,h=o.wrapper.getBoundingClientRect(),g=0,m=operation(e,function(e){e_button(e)?extend(e):done(e)}),v=operation(e,done);e.state.selectingText=v,G(document,"mousemove",m),G(document,"mouseup",v)}function gutterEvent(e,t,n,r){var i,o;try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&e_preventDefault(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!hasHandler(e,n))return e_defaultPrevented(t);o-=s.top-a.viewOffset;for(var l=0;l=i){return signal(e,n,e,lineAtHeight(e.doc,o),e.options.gutters[l],t),e_defaultPrevented(t)}}}function clickInGutter(e,t){return gutterEvent(e,t,"gutterClick",!0)}function onContextMenu(e,t){eventInWidget(e.display,t)||contextMenuInGutter(e,t)||signalDOMEvent(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function contextMenuInGutter(e,t){return!!hasHandler(e,"gutterContextMenu")&&gutterEvent(e,t,"gutterContextMenu",!1)}function themeChanged(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),clearCaches(e)}function guttersChanged(e){updateGutters(e),regChange(e),alignHorizontally(e)}function dragDropChanged(e,t,n){if(!t!=!(n&&n!=Ee)){var r=e.display.dragFunctions,i=t?G:off;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function wrappingChanged(e){e.options.lineWrapping?(addClass(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),findMaxLine(e)),estimateLineHeights(e),regChange(e),clearCaches(e),setTimeout(function(){return updateScrollbars(e)},100)}function CodeMirror$1(e,t){var n=this;if(!(this instanceof CodeMirror$1))return new CodeMirror$1(e,t);this.options=t=t?copyObj(t):{},copyObj(Ie,t,!1),setGuttersForLineNumbers(t);var r=t.value;"string"==typeof r&&(r=new we(r,t.mode,null,t.lineSeparator,t.direction)),this.doc=r;var i=new CodeMirror$1.inputStyles[t.inputStyle](this),o=this.display=new Display(e,r,i);o.wrapper.CodeMirror=this,updateGutters(this),themeChanged(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),initScrollbars(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new T,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),registerEventHandlers(this),ensureGlobalHandlers(),startOperation(this),this.curOp.forceUpdate=!0,attachDoc(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(bind(onFocus,this),20):onBlur(this);for(var c in Fe)Fe.hasOwnProperty(c)&&Fe[c](n,t[c],Ee);maybeUpdateLineNumberWidth(this),t.finishInit&&t.finishInit(this);for(var u=0;u400}var t=e.display;G(t.scroller,"mousedown",operation(e,onMouseDown)),a&&s<11?G(t.scroller,"dblclick",operation(e,function(t){if(!signalDOMEvent(e,t)){var n=posFromMouse(e,t);if(n&&!clickInGutter(e,t)&&!eventInWidget(e.display,t)){e_preventDefault(t);var r=e.findWordAt(n);extendSelection(e.doc,r.anchor,r.head)}}})):G(t.scroller,"dblclick",function(t){return signalDOMEvent(e,t)||e_preventDefault(t)}),k||G(t.scroller,"contextmenu",function(t){return onContextMenu(e,t)});var n,r={end:0};G(t.scroller,"touchstart",function(i){if(!signalDOMEvent(e,i)&&!isMouseLikeTouchEvent(i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),G(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),G(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!eventInWidget(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var i,o=e.coordsChar(t.activeTouch,"page");i=!r.prev||farAway(r,r.prev)?new he(o,o):!r.prev.prev||farAway(r,r.prev.prev)?e.findWordAt(o):new he(Pos(o.line,0),clipPos(e.doc,Pos(o.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),e_preventDefault(n)}finishTouch()}),G(t.scroller,"touchcancel",finishTouch),G(t.scroller,"scroll",function(){t.scroller.clientHeight&&(updateScrollTop(e,t.scroller.scrollTop),setScrollLeft(e,t.scroller.scrollLeft,!0),signal(e,"scroll",e))}),G(t.scroller,"mousewheel",function(t){return onScrollWheel(e,t)}),G(t.scroller,"DOMMouseScroll",function(t){return onScrollWheel(e,t)}),G(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){signalDOMEvent(e,t)||e_stop(t)},over:function(t){signalDOMEvent(e,t)||(onDragOver(e,t),e_stop(t))},start:function(t){return onDragStart(e,t)},drop:operation(e,onDrop),leave:function(t){signalDOMEvent(e,t)||clearDragCursor(e)}};var i=t.input.getField();G(i,"keyup",function(t){return onKeyUp.call(e,t)}),G(i,"keydown",operation(e,onKeyDown)),G(i,"keypress",operation(e,onKeyPress)),G(i,"focus",function(t){return onFocus(e,t)}),G(i,"blur",function(t){return onBlur(e,t)})}function indentLine(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=getStateBefore(e,t):n="prev");var a=e.options.tabSize,s=getLine(o,t),l=countColumn(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==A||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?countColumn(getLine(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",p=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)p+=a,d+="\t";if(p1)if(ze&&ze.text.join("\n")==t){if(r.ranges.length%ze.text.length==0){l=[];for(var c=0;c=0;d--){var p=r.ranges[d],f=p.from(),h=p.to();p.empty()&&(n&&n>0?f=Pos(f.line,f.ch-n):e.state.overwrite&&!a?h=Pos(h.line,Math.min(getLine(o,h.line).text.length,h.ch+lst(s).length)):ze&&ze.lineWise&&ze.text.join("\n")==t&&(f=h=Pos(f.line,0))),u=e.curOp.updateInput;var g={from:f,to:h,text:l?l[d%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};makeChange(e.doc,g),signalLater(e,"inputRead",e,g)}t&&!a&&triggerElectric(e,t),ensureCursorVisible(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function handlePaste(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||runInOp(t,function(){return applyTextInput(t,n,0,null,"paste")}),!0}function triggerElectric(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=indentLine(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(getLine(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=indentLine(e,i.head.line,"smart"));a&&signalLater(e,"electricInput",e,i.head.line)}}}function copyableRanges(e){for(var t=[],n=[],r=0;r=e.first+e.size)&&(t=new Pos(r,t.ch,t.sticky),s=getLine(e,r))}function moveOnce(r){var o;if(null==(o=i?moveVisually(e.cm,s,t,n):moveLogically(s,t,n))){if(r||!findNextLine())return!1;t=endOfLine(i,e.cm,s,t.line,n)}else t=o;return!0}var o=t,a=n,s=getLine(e,t.line);if("char"==r)moveOnce();else if("column"==r)moveOnce(!0);else if("word"==r||"group"==r)for(var l=null,c="group"==r,u=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(n<0)||moveOnce(!d);d=!1){var p=s.text.charAt(t.ch)||"\n",f=isWordChar(p,u)?"w":c&&"\n"==p?"n":!c||/\s/.test(p)?null:"p";if(!c||d||f||(f="s"),l&&l!=f){n<0&&(n=1,moveOnce(),t.sticky="after");break}if(f&&(l=f),n>0&&!moveOnce(!d))break}var h=skipAtomic(e,t,o,a,!0);return equalCursorPos(o,h)&&(h.hitSide=!0),h}function findPosV(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*textHeight(e.display),3);i=(n>0?t.bottom:t.top)+n*l}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(var c;c=coordsChar(e,a,i),c.outside;){if(n<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*n}return c}function posToDOM(e,t){var n=findViewForLine(e,t.line);if(!n||n.hidden)return null;var r=getLine(e.doc,t.line),i=mapFromLineView(n,r,t.line),o=getOrder(r,e.doc.direction),a="left";if(o){a=getBidiPartAt(o,t.ch)%2?"right":"left"}var s=nodeAndOffsetInLineMap(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function isInGutter(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function badPos(e,t){return t&&(e.bad=!0),e}function domTextBetween(e,t,n,r,i){function recognizeMarker(e){return function(t){return t.id==e}}function close(){a&&(o+=s,a=!1)}function addText(e){e&&(close(),o+=e)}function walk(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return void addText(n||t.textContent.replace(/\u200b/g,""));var o,l=t.getAttribute("cm-marker");if(l){var c=e.findMarks(Pos(r,0),Pos(i+1,0),recognizeMarker(+l));return void(c.length&&(o=c[0].find())&&addText(getBetween(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var u=/^(pre|div|p)$/i.test(t.nodeName);u&&close();for(var d=0;d=15&&(d=!1,l=!0);var w,S=y&&(c||d&&(null==C||C<12.11)),k=n||a&&s>=9,L=function(e,t){var n=e.className,r=classTest(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};w=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var M=function(e){e.select()};g?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(e){}});var T=function(){this.id=null};T.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var O,P,N=30,A={toString:function(){return"CodeMirror.Pass"}},D={scroll:!1},H={origin:"*mouse"},W={origin:"+move"},E=[""],I=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,F=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,B=!1,z=!1,R=null,V=function(){function charType(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}function BidiSpan(e,t,n){this.level=e,this.from=t,this.to=n}var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;return function(e,t){var s="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var l=e.length,c=[],u=0;u=this.string.length},J.prototype.sol=function(){return this.pos==this.lineStart},J.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},J.prototype.next=function(){if(this.post},J.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},J.prototype.skipToEnd=function(){this.pos=this.string.length},J.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},J.prototype.backUp=function(e){this.pos-=e},J.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},J.prototype.current=function(){return this.string.slice(this.start,this.pos)},J.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}};var Q=function(e,t,n){this.text=e,attachMarkedSpans(this,t),this.height=n?n(this):1};Q.prototype.lineNo=function(){return lineNo(this)},eventMixin(Q);var ee,te={},ne={},re=null,ie=null,oe={left:0,right:0,top:0,bottom:0},ae=function(e,t,n){this.cm=n;var r=this.vert=elt("div",[elt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=elt("div",[elt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),G(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),G(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ae.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},ae.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ae.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ae.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new T,this.disableVert=new T},ae.prototype.enableZeroWidthBar=function(e,t,n){function maybeDisable(){var r=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,maybeDisable)}e.style.pointerEvents="auto",t.set(1e3,maybeDisable)},ae.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var se=function(){};se.prototype.update=function(){return{bottom:0,right:0}},se.prototype.setScrollLeft=function(){},se.prototype.setScrollTop=function(){},se.prototype.clear=function(){};var le={native:ae,null:se},ce=0,ue=function(e,t,n){var r=e.display;this.viewport=t,this.visible=visibleLines(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=displayWidth(e),this.force=n,this.dims=getDimensions(e),this.events=[]};ue.prototype.signal=function(e,t){hasHandler(e,t)&&this.events.push(arguments)},ue.prototype.finish=function(){for(var e=this,t=0;t=0&&cmp(e,i.to())<=0)return r}return-1};var he=function(e,t){this.anchor=e,this.head=t};he.prototype.from=function(){return minPos(this.anchor,this.head)},he.prototype.to=function(){return maxPos(this.anchor,this.head)},he.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};var ge=function(e){var t=this;this.lines=e,this.parent=null;for(var n=0,r=0;r1||!(this.children[0]instanceof ge))){var l=[];this.collapse(l),this.children=[new ge(l)],this.children[0].parent=this}},me.prototype.collapse=function(e){for(var t=this,n=0;n50){for(var s=o.lines.length%25+25,l=s;l10);e.parent.maybeSpill()}},me.prototype.iterN=function(e,t,n){for(var r=this,i=0;it.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&®Change(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&reCheckSelection(t.doc)),t&&signalLater(t,"markerCleared",t,this,i,o),n&&endOperation(t),this.parent&&this.parent.clear()}},be.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r,i,o=0;o=0;c--)makeChange(r,i[c]);l?setSelectionReplaceHistory(this,l):this.cm&&ensureCursorVisible(this.cm)}),undo:docMethodOp(function(){makeChangeFromHistory(this,"undo")}),redo:docMethodOp(function(){makeChangeFromHistory(this,"redo")}),undoSelection:docMethodOp(function(){makeChangeFromHistory(this,"undo",!0)}),redoSelection:docMethodOp(function(){makeChangeFromHistory(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=clipPos(this,e),t=clipPos(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),clipPos(this,Pos(n,t))},indexFromPos:function(e){e=clipPos(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new Pos(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Pos(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=getLine(e.doc,i.line-1).text;a&&(i=new Pos(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),Pos(i.line-1,a.length-1),i,"+transpose"))}n.push(new he(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return runInOp(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r=t.display.viewTo||o.line=t.display.viewFrom&&posToDOM(t,i)||{node:l[0].measure.map[2],offset:0},u=o.linee.firstLine()&&(r=Pos(r.line-1,getLine(e.doc,r.line-1).length)),i.ch==getLine(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,a,s;r.line==t.viewFrom||0==(o=findViewIndex(e,r.line))?(a=lineNo(t.view[0].line),s=t.view[0].node):(a=lineNo(t.view[o].line),s=t.view[o-1].node.nextSibling);var l,c,u=findViewIndex(e,i.line);if(u==t.view.length-1?(l=t.viewTo-1,c=t.lineDiv.lastChild):(l=lineNo(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!s)return!1;for(var d=e.doc.splitLines(domTextBetween(e,s,c,a,l)),p=getBetween(e.doc,Pos(a,0),Pos(l,getLine(e.doc,l).text.length));d.length>1&&p.length>1;)if(lst(d)==lst(p))d.pop(),p.pop(),l--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),a++}for(var f=0,h=0,g=d[0],m=p[0],v=Math.min(g.length,m.length);fr.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)f--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var C=Pos(a,f),w=Pos(l,p.length?lst(p).length-h:0);return d.length>1||d[0]||cmp(C,w)?(replaceRange(e.doc,d,C,w,"+input"),!0):void 0},Re.prototype.ensurePolled=function(){this.forceCompositionEnd()},Re.prototype.reset=function(){this.forceCompositionEnd()},Re.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Re.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Re.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||runInOp(this.cm,function(){return regChange(e.cm)})},Re.prototype.setUneditable=function(e){e.contentEditable="false"},Re.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||operation(this.cm,applyTextInput)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Re.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Re.prototype.onContextMenu=function(){},Re.prototype.resetPosition=function(){},Re.prototype.needsContentAttribute=!0;var Ve=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new T,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};Ve.prototype.init=function(e){function prepareCopyCut(e){if(!signalDOMEvent(r,e)){if(r.somethingSelected())setLastCopied({lineWise:!1,text:r.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,o.value=ze.text.join("\n"),M(o));else{if(!r.options.lineWiseCopyCut)return;var t=copyableRanges(r);setLastCopied({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,D):(n.prevInput="",o.value=t.text.join("\n"),M(o))}"cut"==e.type&&(r.state.cutIncoming=!0)}}var t=this,n=this,r=this.cm,i=this.wrapper=hiddenTextarea(),o=this.textarea=i.firstChild;e.wrapper.insertBefore(i,e.wrapper.firstChild),g&&(o.style.width="0px"),G(o,"input",function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),G(o,"paste",function(e){signalDOMEvent(r,e)||handlePaste(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),G(o,"cut",prepareCopyCut),G(o,"copy",prepareCopyCut),G(e.scroller,"paste",function(t){eventInWidget(e,t)||signalDOMEvent(r,t)||(r.state.pasteIncoming=!0,n.focus())}),G(e.lineSpace,"selectstart",function(t){eventInWidget(e,t)||e_preventDefault(t)}),G(o,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),G(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ve.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=prepareSelection(e);if(e.options.moveInputWithCursor){var i=cursorCoords(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ve.prototype.showSelection=function(e){var t=this.cm,n=t.display;removeChildrenAndAdd(n.cursorDiv,e.cursors),removeChildrenAndAdd(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ve.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=$&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var l=t?"-":n||r.getSelection();this.textarea.value=l,r.state.focused&&M(this.textarea),a&&s>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},Ve.prototype.getField=function(){return this.textarea},Ve.prototype.supportsTouch=function(){return!1},Ve.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||activeElt()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ve.prototype.blur=function(){this.textarea.blur()},Ve.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ve.prototype.receivedFocus=function(){this.slowPoll()},Ve.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ve.prototype.fastPoll=function(){function p(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,p))}var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,p)},Ve.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||K(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ve.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ve.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ve.prototype.onContextMenu=function(e){function prepareSelectAllHack(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function rehide(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=u,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart){(!a||a&&s<9)&&prepareSelectAllHack();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?operation(n,selectAll)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}var t=this,n=t.cm,r=n.display,i=t.textarea,o=posFromMouse(n,e),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&operation(n,setSelection)(n.doc,simpleSelection(o),D);var u=i.style.cssText,p=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var f=t.wrapper.getBoundingClientRect();i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(l&&(h=window.scrollY),r.input.focus(),l&&window.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&prepareSelectAllHack(),k){e_stop(e);var g=function(){off(window,"mouseup",g),setTimeout(rehide,20)};G(window,"mouseup",g)}else setTimeout(rehide,50)}},Ve.prototype.readOnlyChanged=function(e){e||this.reset()},Ve.prototype.setUneditable=function(){},Ve.prototype.needsContentAttribute=!1,function defineOptions(e){function option(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ee&&i(e,t,n)}:i)}var t=e.optionHandlers;e.defineOption=option,e.Init=Ee,option("value","",function(e,t){return e.setValue(t)},!0),option("mode",null,function(e,t){e.doc.modeOption=t,loadMode(e)},!0),option("indentUnit",2,loadMode,!0),option("indentWithTabs",!1),option("smartIndent",!0),option("tabSize",4,function(e){resetModeState(e),clearCaches(e),regChange(e)},!0),option("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Pos(r,o))}r++});for(var i=n.length-1;i>=0;i--)replaceRange(e.doc,t,n[i],Pos(n[i].line,n[i].ch+t.length))}}),option("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ee&&e.refresh()}),option("specialCharPlaceholder",defaultSpecialCharPlaceholder,function(e){return e.refresh()},!0),option("electricChars",!0),option("inputStyle",v?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),option("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),option("rtlMoveVisually",!x),option("wholeLineUpdateBefore",!0),option("theme","default",function(e){themeChanged(e),guttersChanged(e)},!0),option("keyMap","default",function(e,t,n){var r=getKeyMap(t),i=n!=Ee&&getKeyMap(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),option("extraKeys",null),option("lineWrapping",!1,wrappingChanged,!0),option("gutters",[],function(e){setGuttersForLineNumbers(e.options),guttersChanged(e)},!0),option("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?compensateForHScroll(e.display)+"px":"0",e.refresh()},!0),option("coverGutterNextToScrollbar",!1,function(e){return updateScrollbars(e)},!0),option("scrollbarStyle","native",function(e){initScrollbars(e),updateScrollbars(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),option("lineNumbers",!1,function(e){setGuttersForLineNumbers(e.options),guttersChanged(e)},!0),option("firstLineNumber",1,guttersChanged,!0),option("lineNumberFormatter",function(e){return e},guttersChanged,!0),option("showCursorWhenSelecting",!1,updateSelection,!0),option("resetSelectionOnContextMenu",!0),option("lineWiseCopyCut",!0),option("readOnly",!1,function(e,t){"nocursor"==t?(onBlur(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),option("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),option("dragDrop",!0,dragDropChanged),option("allowDropFileTypes",null),option("cursorBlinkRate",530),option("cursorScrollMargin",0),option("cursorHeight",1,updateSelection,!0),option("singleCursorHeightPerLine",!0,updateSelection,!0),option("workTime",100),option("workDelay",100),option("flattenSpans",!0,resetModeState,!0),option("addModeClass",!1,resetModeState,!0),option("pollInterval",100),option("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),option("historyEventDelay",1250),option("viewportMargin",10,function(e){return e.refresh()},!0),option("maxHighlightLength",1e4,resetModeState,!0),option("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),option("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),option("autofocus",null),option("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(CodeMirror$1),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&operation(this,t[e])(this,n,i),signal(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](getKeyMap(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nr&&(indentLine(t,o.head.line,e,!0),r=o.head.line,i==t.doc.sel.primIndex&&ensureCursorVisible(t));else{var a=o.from(),s=o.to(),l=Math.max(r,a.line);r=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var c=l;c0&&replaceOneSelection(t.doc,i,new he(a,u[i].to()),D)}}}),getTokenAt:function(e,t){return takeToken(this,e,t)},getLineTokens:function(e,t){return takeToken(this,Pos(e),t,!0)},getTokenTypeAt:function(e){e=clipPos(this.doc,e);var t,n=getLineStyles(this,getLine(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=getLine(this.doc,e)}else r=e;return intoCoordSystem(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-heightAtLine(r):0)},defaultTextHeight:function(){return textHeight(this.display)},defaultCharWidth:function(){return charWidth(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=cursorCoords(this,clipPos(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&scrollIntoView(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:methodOp(onKeyDown),triggerOnKeyPress:methodOp(onKeyPress),triggerOnKeyUp:onKeyUp,execCommand:function(e){if(De.hasOwnProperty(e))return De[e].call(null,this)},triggerElectric:methodOp(function(e){triggerElectric(this,e)}),findPosH:function(e,t,n,r){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=clipPos(this.doc,e),s=0;s0&&s(n.charAt(r-1));)--r;for(;i.5)&&estimateLineHeights(this),signal(this,"refresh",this)}),swapDoc:methodOp(function(e){var t=this.doc;return t.cm=null,attachDoc(this,e),clearCaches(this),this.display.input.reset(),scrollToCoords(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,signalLater(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},eventMixin(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(CodeMirror$1);var je="iter insert remove copy getEditor constructor".split(" ");for(var Ge in we.prototype)we.prototype.hasOwnProperty(Ge)&&indexOf(je,Ge)<0&&(CodeMirror$1.prototype[Ge]=function(e){return function(){return e.apply(this.doc,arguments)}}(we.prototype[Ge]));return eventMixin(we),CodeMirror$1.inputStyles={textarea:Ve,contenteditable:Re},CodeMirror$1.defineMode=function(e){CodeMirror$1.defaults.mode||"null"==e||(CodeMirror$1.defaults.mode=e),defineMode.apply(this,arguments)},CodeMirror$1.defineMIME=defineMIME,CodeMirror$1.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),CodeMirror$1.defineMIME("text/plain","null"),CodeMirror$1.defineExtension=function(e,t){CodeMirror$1.prototype[e]=t},CodeMirror$1.defineDocExtension=function(e,t){we.prototype[e]=t},CodeMirror$1.fromTextArea=fromTextArea,function addLegacyProps(e){e.off=off,e.on=G,e.wheelEventPixels=wheelEventPixels,e.Doc=we,e.splitLines=U,e.countColumn=countColumn,e.findColumn=findColumn,e.isWordChar=isWordCharBasic,e.Pass=A,e.signal=signal,e.Line=Q,e.changeEnd=changeEnd,e.scrollbarModel=le,e.Pos=Pos,e.cmpPos=cmp,e.modes=X,e.mimeModes=Y,e.resolveMode=resolveMode,e.getMode=getMode,e.modeExtensions=Z,e.extendMode=extendMode,e.copyState=copyState,e.startState=startState,e.innerMode=innerMode,e.commands=De,e.keyMap=Pe,e.keyName=keyName,e.isModifierKey=isModifierKey,e.lookupKey=lookupKey,e.normalizeKeyMap=normalizeKeyMap,e.StringStream=J,e.SharedTextMarker=xe,e.TextMarker=be,e.LineWidget=ve,e.e_preventDefault=e_preventDefault,e.e_stopPropagation=e_stopPropagation,e.e_stop=e_stop,e.addClass=addClass,e.contains=contains,e.rmClass=L,e.keyNames=Le}(CodeMirror$1),CodeMirror$1.version="5.26.0",CodeMirror$1})},1037:function(e,t,n){!function(e){e(n(1036))}(function(e){"use strict";function expressionAllowed(e,t,n){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}e.defineMode("javascript",function(t,n){function readRegexp(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function ret(e,t,n){return r=e,i=n,t}function tokenBase(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=tokenString(n),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return ret("number","number");if("."==n&&e.match(".."))return ret("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return ret(n);if("="==n&&e.eat(">"))return ret("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),ret("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),ret("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),ret("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),ret("number","number");if("/"==n)return e.eat("*")?(t.tokenize=tokenComment,tokenComment(e,t)):e.eat("/")?(e.skipToEnd(),ret("comment","comment")):expressionAllowed(e,t,1)?(readRegexp(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),ret("regexp","string-2")):(e.eatWhile(p),ret("operator","operator",e.current()));if("`"==n)return t.tokenize=tokenQuasi,tokenQuasi(e,t);if("#"==n)return e.skipToEnd(),ret("error","error");if(p.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||e.eatWhile(p),ret("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var r=e.current(),i=d.propertyIsEnumerable(r)&&d[r];return i&&"."!=t.lastType?ret(i.type,i.style,r):ret("variable","variable",r)}}function tokenString(e){return function(t,n){var r,i=!1;if(s&&"@"==t.peek()&&t.match(f))return n.tokenize=tokenBase,ret("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=tokenBase),ret("string","string")}}function tokenComment(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=tokenBase;break}r="*"==n}return ret("comment","comment")}function tokenQuasi(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=tokenBase;break}r=!r&&"\\"==n}return ret("quasi","string-2",e.current())}function findFatArrow(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=h.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))o=!0;else{if(/["'\/]/.test(s))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function JSLexical(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function inScope(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function parseJS(e,t,n,r,i){var o=e.cc;for(m.state=e,m.stream=i,m.marked=null,m.cc=o,m.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():l?expression:statement)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return m.marked?m.marked:"variable"==n&&inScope(e,r)?"variable-2":t}}}function pass(){for(var e=arguments.length-1;e>=0;e--)m.cc.push(arguments[e])}function cont(){return pass.apply(null,arguments),!0}function register(e){function inList(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var t=m.state;if(m.marked="def",t.context){if(inList(t.localVars))return;t.localVars={name:e,next:t.localVars}}else{if(inList(t.globalVars))return;n.globalVars&&(t.globalVars={name:e,next:t.globalVars})}}function pushcontext(){m.state.context={prev:m.state.context,vars:m.state.localVars},m.state.localVars=v}function popcontext(){m.state.localVars=m.state.context.vars,m.state.context=m.state.context.prev}function pushlex(e,t){var n=function(){var n=m.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new JSLexical(r,m.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function poplex(){var e=m.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function expect(e){function exp(t){return t==e?cont():";"==e?pass():cont(exp)}return exp}function statement(e,t){return"var"==e?cont(pushlex("vardef",t.length),vardef,expect(";"),poplex):"keyword a"==e?cont(pushlex("form"),parenExpr,statement,poplex):"keyword b"==e?cont(pushlex("form"),statement,poplex):"{"==e?cont(pushlex("}"),block,poplex):";"==e?cont():"if"==e?("else"==m.state.lexical.info&&m.state.cc[m.state.cc.length-1]==poplex&&m.state.cc.pop()(),cont(pushlex("form"),parenExpr,statement,poplex,maybeelse)):"function"==e?cont(functiondef):"for"==e?cont(pushlex("form"),forspec,statement,poplex):"variable"==e?c&&"type"==t?(m.marked="keyword",cont(typeexpr,expect("operator"),typeexpr,expect(";"))):cont(pushlex("stat"),maybelabel):"switch"==e?cont(pushlex("form"),parenExpr,expect("{"),pushlex("}","switch"),block,poplex,poplex):"case"==e?cont(expression,expect(":")):"default"==e?cont(expect(":")):"catch"==e?cont(pushlex("form"),pushcontext,expect("("),funarg,expect(")"),statement,poplex,popcontext):"class"==e?cont(pushlex("form"),className,poplex):"export"==e?cont(pushlex("stat"),afterExport,poplex):"import"==e?cont(pushlex("stat"),afterImport,poplex):"module"==e?cont(pushlex("form"),pattern,expect("{"),pushlex("}"),block,poplex,poplex):"async"==e?cont(statement):"@"==t?cont(expression,statement):pass(pushlex("stat"),expression,expect(";"),poplex)}function expression(e){return expressionInner(e,!1)}function expressionNoComma(e){return expressionInner(e,!0)}function parenExpr(e){return"("!=e?pass():cont(pushlex(")"),expression,expect(")"),poplex)}function expressionInner(e,t){if(m.state.fatArrowAt==m.stream.start){var n=t?arrowBodyNoComma:arrowBody;if("("==e)return cont(pushcontext,pushlex(")"),commasep(pattern,")"),poplex,expect("=>"),n,popcontext);if("variable"==e)return pass(pushcontext,pattern,expect("=>"),n,popcontext)}var r=t?maybeoperatorNoComma:maybeoperatorComma;return g.hasOwnProperty(e)?cont(r):"function"==e?cont(functiondef,r):"class"==e?cont(pushlex("form"),classExpression,poplex):"keyword c"==e||"async"==e?cont(t?maybeexpressionNoComma:maybeexpression):"("==e?cont(pushlex(")"),maybeexpression,expect(")"),poplex,r):"operator"==e||"spread"==e?cont(t?expressionNoComma:expression):"["==e?cont(pushlex("]"),arrayLiteral,poplex,r):"{"==e?contCommasep(objprop,"}",null,r):"quasi"==e?pass(quasi,r):"new"==e?cont(maybeTarget(t)):cont()}function maybeexpression(e){return e.match(/[;\}\)\],]/)?pass():pass(expression)}function maybeexpressionNoComma(e){return e.match(/[;\}\)\],]/)?pass():pass(expressionNoComma)}function maybeoperatorComma(e,t){return","==e?cont(expression):maybeoperatorNoComma(e,t,!1)}function maybeoperatorNoComma(e,t,n){var r=0==n?maybeoperatorComma:maybeoperatorNoComma,i=0==n?expression:expressionNoComma;return"=>"==e?cont(pushcontext,n?arrowBodyNoComma:arrowBody,popcontext):"operator"==e?/\+\+|--/.test(t)?cont(r):"?"==t?cont(expression,expect(":"),i):cont(i):"quasi"==e?pass(quasi,r):";"!=e?"("==e?contCommasep(expressionNoComma,")","call",r):"."==e?cont(property,r):"["==e?cont(pushlex("]"),maybeexpression,expect("]"),poplex,r):void 0:void 0}function quasi(e,t){return"quasi"!=e?pass():"${"!=t.slice(t.length-2)?cont(quasi):cont(expression,continueQuasi)}function continueQuasi(e){if("}"==e)return m.marked="string-2",m.state.tokenize=tokenQuasi,cont(quasi)}function arrowBody(e){return findFatArrow(m.stream,m.state),pass("{"==e?statement:expression)}function arrowBodyNoComma(e){return findFatArrow(m.stream,m.state),pass("{"==e?statement:expressionNoComma)}function maybeTarget(e){return function(t){return"."==t?cont(e?targetNoComma:target):pass(e?expressionNoComma:expression)}}function target(e,t){if("target"==t)return m.marked="keyword",cont(maybeoperatorComma)}function targetNoComma(e,t){if("target"==t)return m.marked="keyword",cont(maybeoperatorNoComma)}function maybelabel(e){return":"==e?cont(poplex,statement):pass(maybeoperatorComma,expect(";"),poplex)}function property(e){if("variable"==e)return m.marked="property",cont()}function objprop(e,t){return"async"==e?(m.marked="property",cont(objprop)):"variable"==e||"keyword"==m.style?(m.marked="property",cont("get"==t||"set"==t?getterSetter:afterprop)):"number"==e||"string"==e?(m.marked=s?"property":m.style+" property",cont(afterprop)):"jsonld-keyword"==e?cont(afterprop):"modifier"==e?cont(objprop):"["==e?cont(expression,expect("]"),afterprop):"spread"==e?cont(expression):":"==e?pass(afterprop):void 0}function getterSetter(e){return"variable"!=e?pass(afterprop):(m.marked="property",cont(functiondef))}function afterprop(e){return":"==e?cont(expressionNoComma):"("==e?pass(functiondef):void 0}function commasep(e,t,n){function proceed(r,i){if(n?n.indexOf(r)>-1:","==r){var o=m.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),cont(function(n,r){return n==t||r==t?pass():pass(e)},proceed)}return r==t||i==t?cont():cont(expect(t))}return function(n,r){return n==t||r==t?cont():pass(e,proceed)}}function contCommasep(e,t,n){for(var r=3;r"==e)return cont(typeexpr)}function typeprop(e,t){return"variable"==e||"keyword"==m.style?(m.marked="property",cont(typeprop)):"?"==t?cont(typeprop):":"==e?cont(typeexpr):"["==e?cont(expression,maybetype,expect("]"),typeprop):void 0}function typearg(e){return"variable"==e?cont(typearg):":"==e?cont(typeexpr):void 0}function afterType(e,t){return"<"==t?cont(pushlex(">"),commasep(typeexpr,">"),poplex,afterType):"|"==t||"."==e?cont(typeexpr):"["==e?cont(expect("]"),afterType):"extends"==t?cont(typeexpr):void 0}function vardef(){return pass(pattern,maybetype,maybeAssign,vardefCont)}function pattern(e,t){return"modifier"==e?cont(pattern):"variable"==e?(register(t),cont()):"spread"==e?cont(pattern):"["==e?contCommasep(pattern,"]"):"{"==e?contCommasep(proppattern,"}"):void 0}function proppattern(e,t){return"variable"!=e||m.stream.match(/^\s*:/,!1)?("variable"==e&&(m.marked="property"),"spread"==e?cont(pattern):"}"==e?pass():cont(expect(":"),pattern,maybeAssign)):(register(t),cont(maybeAssign))}function maybeAssign(e,t){if("="==t)return cont(expressionNoComma)}function vardefCont(e){if(","==e)return cont(vardef)}function maybeelse(e,t){if("keyword b"==e&&"else"==t)return cont(pushlex("form","else"),statement,poplex)}function forspec(e){if("("==e)return cont(pushlex(")"),forspec1,expect(")"),poplex)}function forspec1(e){return"var"==e?cont(vardef,expect(";"),forspec2):";"==e?cont(forspec2):"variable"==e?cont(formaybeinof):pass(expression,expect(";"),forspec2)}function formaybeinof(e,t){return"in"==t||"of"==t?(m.marked="keyword",cont(expression)):cont(maybeoperatorComma,forspec2)}function forspec2(e,t){return";"==e?cont(forspec3):"in"==t||"of"==t?(m.marked="keyword",cont(expression)):pass(expression,expect(";"),forspec3)}function forspec3(e){")"!=e&&cont(expression)}function functiondef(e,t){return"*"==t?(m.marked="keyword",cont(functiondef)):"variable"==e?(register(t),cont(functiondef)):"("==e?cont(pushcontext,pushlex(")"),commasep(funarg,")"),poplex,maybetype,statement,popcontext):c&&"<"==t?cont(pushlex(">"),commasep(typeexpr,">"),poplex,functiondef):void 0}function funarg(e){return"spread"==e?cont(funarg):pass(pattern,maybetype,maybeAssign)}function classExpression(e,t){return"variable"==e?className(e,t):classNameAfter(e,t)}function className(e,t){if("variable"==e)return register(t),cont(classNameAfter)}function classNameAfter(e,t){return"<"==t?cont(pushlex(">"),commasep(typeexpr,">"),poplex,classNameAfter):"extends"==t||"implements"==t||c&&","==e?cont(c?typeexpr:expression,classNameAfter):"{"==e?cont(pushlex("}"),classBody,poplex):void 0}function classBody(e,t){return"variable"==e||"keyword"==m.style?("async"==t||"static"==t||"get"==t||"set"==t||c&&("public"==t||"private"==t||"protected"==t||"readonly"==t||"abstract"==t))&&m.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(m.marked="keyword",cont(classBody)):(m.marked="property",cont(c?classfield:functiondef,classBody)):"["==e?cont(expression,expect("]"),c?classfield:functiondef,classBody):"*"==t?(m.marked="keyword",cont(classBody)):";"==e?cont(classBody):"}"==e?cont():"@"==t?cont(expression,classBody):void 0}function classfield(e,t){return"?"==t?cont(classfield):":"==e?cont(typeexpr,maybeAssign):"="==t?cont(expressionNoComma):pass(functiondef)}function afterExport(e,t){return"*"==t?(m.marked="keyword",cont(maybeFrom,expect(";"))):"default"==t?(m.marked="keyword",cont(expression,expect(";"))):"{"==e?cont(commasep(exportField,"}"),maybeFrom,expect(";")):pass(statement)}function exportField(e,t){return"as"==t?(m.marked="keyword",cont(expect("variable"))):"variable"==e?pass(expressionNoComma,exportField):void 0}function afterImport(e){return"string"==e?cont():pass(importSpec,maybeMoreImports,maybeFrom)}function importSpec(e,t){return"{"==e?contCommasep(importSpec,"}"):("variable"==e&®ister(t),"*"==t&&(m.marked="keyword"),cont(maybeAs))}function maybeMoreImports(e){if(","==e)return cont(importSpec,maybeMoreImports)}function maybeAs(e,t){if("as"==t)return m.marked="keyword",cont(importSpec)}function maybeFrom(e,t){if("from"==t)return m.marked="keyword",cont(expression)}function arrayLiteral(e){return"]"==e?cont():pass(commasep(expressionNoComma,"]"))}function isContinuedStatement(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var r,i,o=t.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=n.typescript,u=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function kw(e){return{type:e,style:"keyword"}}var e=kw("keyword a"),t=kw("keyword b"),n=kw("keyword c"),r=kw("operator"),i={type:"atom",style:"atom"},o={if:kw("if"),while:e,with:e,else:t,do:t,try:t,finally:t,return:n,break:n,continue:n,new:kw("new"),delete:n,throw:n,debugger:n,var:kw("var"),const:kw("var"),let:kw("var"),function:kw("function"),catch:kw("catch"),for:kw("for"),switch:kw("switch"),case:kw("case"),default:kw("default"),in:r,typeof:r,instanceof:r,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:kw("this"),class:kw("class"),super:kw("atom"),yield:n,export:kw("export"),import:kw("import"),extends:n,await:n,async:kw("async")};if(c){var a={type:"variable",style:"variable-3"},s={interface:kw("class"),implements:n,namespace:n,module:kw("module"),enum:kw("module"),public:kw("modifier"),private:kw("modifier"),protected:kw("modifier"),abstract:kw("modifier"),as:r,string:a,number:a,boolean:a,any:a};for(var l in s)o[l]=s[l]}return o}(),p=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,h="([{}])",g={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},m={state:null,column:null,marked:null,cc:null},v={name:"this",next:{name:"arguments"}};return poplex.lex=!0,{startState:function(e){var t={tokenize:tokenBase,lastType:"sof",cc:[],lexical:new JSLexical((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),findFatArrow(e,t)),t.tokenize!=tokenComment&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",parseJS(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==tokenComment)return e.Pass;if(t.tokenize!=tokenBase)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==poplex)l=l.prev;else if(u!=maybeelse)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==maybeoperatorComma||i==maybeoperatorNoComma)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,p=s==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info+1:0):"form"==d&&"{"==s?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(isContinuedStatement(t,r)?a||o:0):"switch"!=l.info||p||0==n.doubleIndentSwitch?l.align?l.column+(p?0:1):l.indented+(p?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:expressionAllowed,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=expression&&t!=expressionNoComma||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},1038:function(e,t,n){!function(e){e(n(1036),n(1039),n(1037))}(function(e){"use strict";function Context(e,t,n,r){this.state=e,this.mode=t,this.depth=n,this.prev=r}function copyContext(t){return new Context(e.copyState(t.mode,t.state),t.mode,t.depth,t.prev&©Context(t.prev))}e.defineMode("jsx",function(t,n){function flatXMLIndent(e){var t=e.tagName;e.tagName=null;var n=r.indent(e,"");return e.tagName=t,n}function token(e,t){return t.context.mode==r?xmlToken(e,t,t.context):jsToken(e,t,t.context)}function xmlToken(n,o,a){if(2==a.depth)return n.match(/^.*?\*\//)?a.depth=1:n.skipToEnd(),"comment";if("{"==n.peek()){r.skipAttribute(a.state);var s=flatXMLIndent(a.state),l=a.state.context;if(l&&n.match(/^[^>]*>\s*$/,!1)){for(;l.prev&&!l.startOfLine;)l=l.prev;l.startOfLine?s-=t.indentUnit:a.prev.state.lexical&&(s=a.prev.state.lexical.indented)}else 1==a.depth&&(s+=t.indentUnit);return o.context=new Context(e.startState(i,s),i,0,o.context),null}if(1==a.depth){if("<"==n.peek())return r.skipAttribute(a.state),o.context=new Context(e.startState(r,flatXMLIndent(a.state)),r,0,o.context),null;if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return a.depth=2,token(n,o)}var c,u=r.token(n,a.state),d=n.current();return/\btag\b/.test(u)?/>$/.test(d)?a.state.context?a.depth=0:o.context=o.context.prev:/^-1&&n.backUp(d.length-c),u}function jsToken(t,n,o){if("<"==t.peek()&&i.expressionAllowed(t,o.state))return i.skipExpression(o.state),n.context=new Context(e.startState(r,i.indent(o.state,"")),r,0,n.context),null;var a=i.token(t,o.state);if(!a&&null!=o.depth){var s=t.current();"{"==s?o.depth++:"}"==s&&0==--o.depth&&(n.context=n.context.prev)}return a}var r=e.getMode(t,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1}),i=e.getMode(t,n&&n.base||"javascript");return{startState:function(){return{context:new Context(e.startState(i),i)}},copyState:function(e){return{context:copyContext(e.context)}},token:token,indent:function(e,t,n){return e.context.mode.indent(e.context.state,t,n)},innerMode:function(e){return e.context}}},"xml","javascript"),e.defineMIME("text/jsx","jsx"),e.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})},1039:function(e,t,n){!function(e){e(n(1036))}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(r,i){function inText(e,t){function chain(n){return t.tokenize=n,n(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?chain(inBlock("atom","]]>")):null:e.match("--")?chain(inBlock("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),chain(doctype(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=inBlock("meta","?>"),"meta"):(c=e.eat("/")?"closeTag":"openTag",t.tokenize=inTag,"tag bracket");if("&"==n){var r;return r=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),r?"atom":"error"}return e.eatWhile(/[^&<]/),null}function inTag(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=inText,c=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return c="equals",null;if("<"==n){t.tokenize=inText,t.state=baseState,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=inAttribute(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function inAttribute(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=inTag;break}return"string"};return t.isInAttribute=!0,t}function inBlock(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=inText;break}n.next()}return e}}function doctype(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=doctype(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=inText;break}return n.tokenize=doctype(e-1),n.tokenize(t,n)}}return"meta"}}function Context(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(a.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function popContext(e){e.context&&(e.context=e.context.prev)}function maybePopContext(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!a.contextGrabbers.hasOwnProperty(n)||!a.contextGrabbers[n].hasOwnProperty(t))return;popContext(e)}}function baseState(e,t,n){return"openTag"==e?(n.tagStart=t.column(),tagNameState):"closeTag"==e?closeTagNameState:baseState}function tagNameState(e,t,n){return"word"==e?(n.tagName=t.current(),u="tag",attrState):(u="error",tagNameState)}function closeTagNameState(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&a.implicitlyClosed.hasOwnProperty(n.context.tagName)&&popContext(n),n.context&&n.context.tagName==r||!1===a.matchClosing?(u="tag",closeState):(u="tag error",closeStateErr)}return u="error",closeStateErr}function closeState(e,t,n){return"endTag"!=e?(u="error",closeState):(popContext(n),baseState)}function closeStateErr(e,t,n){return u="error",closeState(e,t,n)}function attrState(e,t,n){if("word"==e)return u="attribute",attrEqState;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||a.autoSelfClosers.hasOwnProperty(r)?maybePopContext(n,r):(maybePopContext(n,r),n.context=new Context(n,r,i==n.indented)),baseState}return u="error",attrState}function attrEqState(e,t,n){return"equals"==e?attrValueState:(a.allowMissing||(u="error"),attrState(e,t,n))}function attrValueState(e,t,n){return"string"==e?attrContinuedState:"word"==e&&a.allowUnquoted?(u="string",attrState):(u="error",attrState(e,t,n))}function attrContinuedState(e,t,n){return"string"==e?attrContinuedState:attrState(e,t,n)}var o=r.indentUnit,a={},s=i.htmlMode?t:n;for(var l in s)a[l]=s[l];for(var l in i)a[l]=i[l];var c,u;return inText.isInText=!0,{startState:function(e){var t={tokenize:inText,state:baseState,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;c=null;var n=t.tokenize(e,t);return(n||c)&&"comment"!=n&&(u=null,t.state=t.state(c||n,e,t),u&&(n="error"==u?n+" error":u)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+o;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=inTag&&t.tokenize!=inText)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==a.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+o*(a.multilineTagIndentFactor||1);if(a.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:a.htmlMode?"html":"xml",helperType:a.htmlMode?"html":"xml",skipAttribute:function(e){e.state==attrValueState&&(e.state=attrState)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},1040:function(e,t,n){(function(t){function debounce(e,t,r){function invokeFunc(t){var n=i,r=o;return i=o=void 0,u=t,s=e.apply(r,n)}function leadingEdge(e){return u=e,l=setTimeout(timerExpired,t),d?invokeFunc(e):s}function remainingWait(e){var n=e-c,r=e-u,i=t-n;return p?m(i,a-r):i}function shouldInvoke(e){var n=e-c,r=e-u;return void 0===c||n>=t||n<0||p&&r>=a}function timerExpired(){var e=v();if(shouldInvoke(e))return trailingEdge(e);l=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){return l=void 0,f&&i?invokeFunc(e):(i=o=void 0,s)}function cancel(){void 0!==l&&clearTimeout(l),u=0,i=c=o=l=void 0}function flush(){return void 0===l?s:trailingEdge(v())}function debounced(){var e=v(),n=shouldInvoke(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return leadingEdge(c);if(p)return l=setTimeout(timerExpired,t),invokeFunc(c)}return void 0===l&&(l=setTimeout(timerExpired,t)),s}var i,o,a,s,l,c,u=0,d=!1,p=!1,f=!0;if("function"!=typeof e)throw new TypeError(n);return t=toNumber(t)||0,isObject(r)&&(d=!!r.leading,p="maxWait"in r,a=p?g(toNumber(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f),debounced.cancel=cancel,debounced.flush=flush,debounced}function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isObjectLike(e){return!!e&&"object"==typeof e}function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&h.call(e)==i}function toNumber(e){if("number"==typeof e)return e;if(isSymbol(e))return r;if(isObject(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?r:+e}var n="Expected a function",r=NaN,i="[object Symbol]",o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof t&&t&&t.Object===Object&&t,d="object"==typeof self&&self&&self.Object===Object&&self,p=u||d||Function("return this")(),f=Object.prototype,h=f.toString,g=Math.max,m=Math.min,v=function(){return p.Date.now()};e.exports=debounce}).call(t,n(16))},1041:function(e,t,n){"use strict";function normalizeLineEndings(e){return e?e.replace(/\r\n|\r/g,"\n"):e}var r=n(0),i=n(194),o=i.findDOMNode,a=n(37),s=n(1040),l=r.createClass({displayName:"CodeMirror",propTypes:{className:r.PropTypes.any,codeMirrorInstance:r.PropTypes.func,defaultValue:r.PropTypes.string,onChange:r.PropTypes.func,onFocusChange:r.PropTypes.func,onScroll:r.PropTypes.func,options:r.PropTypes.object,path:r.PropTypes.string,value:r.PropTypes.string,preserveScrollPosition:r.PropTypes.bool},getDefaultProps:function getDefaultProps(){return{preserveScrollPosition:!1}},getCodeMirrorInstance:function getCodeMirrorInstance(){return this.props.codeMirrorInstance||n(1036)},getInitialState:function getInitialState(){return{isFocused:!1}},componentWillMount:function componentWillMount(){this.componentWillReceiveProps=s(this.componentWillReceiveProps,0)},componentDidMount:function componentDidMount(){var e=o(this.refs.textarea),t=this.getCodeMirrorInstance();this.codeMirror=t.fromTextArea(e,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")},componentWillUnmount:function componentWillUnmount(){this.codeMirror&&this.codeMirror.toTextArea()},componentWillReceiveProps:function componentWillReceiveProps(e){if(this.codeMirror&&void 0!==e.value&&normalizeLineEndings(this.codeMirror.getValue())!==normalizeLineEndings(e.value))if(this.props.preserveScrollPosition){var t=this.codeMirror.getScrollInfo();this.codeMirror.setValue(e.value),this.codeMirror.scrollTo(t.left,t.top)}else this.codeMirror.setValue(e.value);if("object"==typeof e.options)for(var n in e.options)e.options.hasOwnProperty(n)&&this.codeMirror.setOption(n,e.options[n])},getCodeMirror:function getCodeMirror(){return this.codeMirror},focus:function focus(){this.codeMirror&&this.codeMirror.focus()},focusChanged:function focusChanged(e){this.setState({isFocused:e}),this.props.onFocusChange&&this.props.onFocusChange(e)},scrollChanged:function scrollChanged(e){this.props.onScroll&&this.props.onScroll(e.getScrollInfo())},codemirrorValueChanged:function codemirrorValueChanged(e,t){this.props.onChange&&"setValue"!==t.origin&&this.props.onChange(e.getValue(),t)},render:function render(){var e=a("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return r.createElement("div",{className:e},r.createElement("textarea",{ref:"textarea",name:this.props.path,defaultValue:this.props.value,autoComplete:"off"}))}});e.exports=l},1042:function(e,t,n){t=e.exports=n(330)(void 0),t.push([e.i,"/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace;\n height: 300px;\n color: black;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0 !important;\n background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n\n.cm-animate-fat-cursor {\n width: auto;\n border: 0;\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n background-color: #7e7;\n}\n@-moz-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@-webkit-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-rulers {\n position: absolute;\n left: 0; right: 0; top: -50px; bottom: -20px;\n overflow: hidden;\n}\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n top: 0; bottom: 0;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3 {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white;\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 30px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -30px; margin-right: -30px;\n padding-bottom: 30px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n}\n.CodeMirror-sizer {\n position: relative;\n border-right: 30px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n}\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -30px;\n}\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: contextual;\n font-variant-ligatures: contextual;\n}\n.CodeMirror-wrap pre {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n overflow: auto;\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor {\n position: absolute;\n pointer-events: none;\n}\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background: #ffa;\n background: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n",""])},1043:function(e,t,n){t=e.exports=n(330)(void 0),t.push([e.i,"/*\n\n Name: Base16 Default Light\n Author: Chris Kempson (http://chriskempson.com)\n\n CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)\n Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)\n\n*/\n\n.cm-s-base16-light.CodeMirror { background: #f5f5f5; color: #202020; }\n.cm-s-base16-light div.CodeMirror-selected { background: #e0e0e0; }\n.cm-s-base16-light .CodeMirror-line::selection, .cm-s-base16-light .CodeMirror-line > span::selection, .cm-s-base16-light .CodeMirror-line > span > span::selection { background: #e0e0e0; }\n.cm-s-base16-light .CodeMirror-line::-moz-selection, .cm-s-base16-light .CodeMirror-line > span::-moz-selection, .cm-s-base16-light .CodeMirror-line > span > span::-moz-selection { background: #e0e0e0; }\n.cm-s-base16-light .CodeMirror-gutters { background: #f5f5f5; border-right: 0px; }\n.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }\n.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }\n.cm-s-base16-light .CodeMirror-linenumber { color: #b0b0b0; }\n.cm-s-base16-light .CodeMirror-cursor { border-left: 1px solid #505050; }\n\n.cm-s-base16-light span.cm-comment { color: #8f5536; }\n.cm-s-base16-light span.cm-atom { color: #aa759f; }\n.cm-s-base16-light span.cm-number { color: #aa759f; }\n\n.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute { color: #90a959; }\n.cm-s-base16-light span.cm-keyword { color: #ac4142; }\n.cm-s-base16-light span.cm-string { color: #f4bf75; }\n\n.cm-s-base16-light span.cm-variable { color: #90a959; }\n.cm-s-base16-light span.cm-variable-2 { color: #6a9fb5; }\n.cm-s-base16-light span.cm-def { color: #d28445; }\n.cm-s-base16-light span.cm-bracket { color: #202020; }\n.cm-s-base16-light span.cm-tag { color: #ac4142; }\n.cm-s-base16-light span.cm-link { color: #aa759f; }\n.cm-s-base16-light span.cm-error { background: #ac4142; color: #505050; }\n\n.cm-s-base16-light .CodeMirror-activeline-background { background: #DDDCDC; }\n.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }\n",""])},1044:function(e,t,n){var r=n(1042);"string"==typeof r&&(r=[[e.i,r,""]]);var i={};i.transform=void 0;n(331)(r,i);r.locals&&(e.exports=r.locals)},1045:function(e,t,n){var r=n(1043);"string"==typeof r&&(r=[[e.i,r,""]]);var i={};i.transform=void 0;n(331)(r,i);r.locals&&(e.exports=r.locals)},333:function(e,t,n){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t 0; + --t + ) e.removeChild(e.firstChild); + return e; + } + function removeChildrenAndAdd(e, t) { + return removeChildren(e).appendChild(t); + } + function elt(e, t, n, r) { + var i = document.createElement(e); + if ( + (n && (i.className = n), r && (i.style.cssText = r), 'string' == + typeof t) + ) + i.appendChild(document.createTextNode(t)); + else if (t) for (var o = 0; o < t.length; ++o) i.appendChild(t[o]); + return i; + } + function eltP(e, t, n, r) { + var i = elt(e, t, n, r); + return i.setAttribute('role', 'presentation'), i; + } + function contains(e, t) { + if ((3 == t.nodeType && (t = t.parentNode), e.contains)) + return e.contains(t); + do { + if ((11 == t.nodeType && (t = t.host), t == e)) return !0; + } while ((t = t.parentNode)); + } + function activeElt() { + var e; + try { + e = document.activeElement; + } catch (t) { + e = document.body || null; + } + for ( + ; + e && e.shadowRoot && e.shadowRoot.activeElement; + + ) e = e.shadowRoot.activeElement; + return e; + } + function addClass(e, t) { + var n = e.className; + classTest(t).test(n) || (e.className += (n ? ' ' : '') + t); + } + function joinClasses(e, t) { + for ( + var n = e.split(' '), r = 0; + r < n.length; + r++ + ) n[r] && !classTest(n[r]).test(t) && (t += ' ' + n[r]); + return t; + } + function bind(e) { + var t = Array.prototype.slice.call(arguments, 1); + return function() { + return e.apply(null, t); + }; + } + function copyObj(e, t, n) { + t || (t = {}); + for (var r in e) !e.hasOwnProperty(r) || (!1 === n && t.hasOwnProperty(r)) || (t[r] = e[r]); + return t; + } + function countColumn(e, t, n, r, i) { + null == t && -1 == (t = e.search(/[^\s\u00a0]/)) && (t = e.length); + for (var o = r || 0, a = i || 0; ; ) { + var s = e.indexOf('\t', o); + if (s < 0 || s >= t) return a + (t - o); + (a += s - o), (a += n - a % n), (o = s + 1); + } + } + function indexOf(e, t) { + for (var n = 0; n < e.length; ++n) if (e[n] == t) return n; + return -1; + } + function findColumn(e, t, n) { + for (var r = 0, i = 0; ; ) { + var o = e.indexOf('\t', r); + -1 == o && (o = e.length); + var a = o - r; + if (o == e.length || i + a >= t) return r + Math.min(a, t - i); + if (((i += o - r), (i += n - i % n), (r = o + 1), i >= t)) return r; + } + } + function spaceStr(e) { + for (; E.length <= e; ) E.push(lst(E) + ' '); + return E[e]; + } + function lst(e) { + return e[e.length - 1]; + } + function map(e, t) { + for (var n = [], r = 0; r < e.length; r++) n[r] = t(e[r], r); + return n; + } + function insertSorted(e, t, n) { + for (var r = 0, i = n(t); r < e.length && n(e[r]) <= i; ) r++; + e.splice(r, 0, t); + } + function nothing() {} + function createObj(e, t) { + var n; + return Object.create + ? (n = Object.create(e)) + : ((nothing.prototype = e), (n = new nothing())), t && copyObj(t, n), n; + } + function isWordCharBasic(e) { + return ( + /\w/.test(e) || + (e > '€' && (e.toUpperCase() != e.toLowerCase() || I.test(e))) + ); + } + function isWordChar(e, t) { + return t + ? !!(t.source.indexOf('\\w') > -1 && isWordCharBasic(e)) || t.test(e) + : isWordCharBasic(e); + } + function isEmpty(e) { + for (var t in e) if (e.hasOwnProperty(t) && e[t]) return !1; + return !0; + } + function isExtendingChar(e) { + return e.charCodeAt(0) >= 768 && F.test(e); + } + function skipExtendingChars(e, t, n) { + for ( + ; + (n < 0 ? t > 0 : t < e.length) && isExtendingChar(e.charAt(t)); + + ) t += n; + return t; + } + function findFirst(e, t, n) { + for (;;) { + if (Math.abs(t - n) <= 1) return e(t) ? t : n; + var r = Math.floor((t + n) / 2); + e(r) ? (n = r) : (t = r); + } + } + function Display(e, t, r) { + var i = this; + (this.input = r), (i.scrollbarFiller = elt('div', null, 'CodeMirror-scrollbar-filler')), i.scrollbarFiller.setAttribute('cm-not-content', 'true'), (i.gutterFiller = elt('div', null, 'CodeMirror-gutter-filler')), i.gutterFiller.setAttribute('cm-not-content', 'true'), (i.lineDiv = eltP('div', null, 'CodeMirror-code')), (i.selectionDiv = elt('div', null, null, 'position: relative; z-index: 1')), (i.cursorDiv = elt('div', null, 'CodeMirror-cursors')), (i.measure = elt('div', null, 'CodeMirror-measure')), (i.lineMeasure = elt('div', null, 'CodeMirror-measure')), (i.lineSpace = eltP('div', [i.measure, i.lineMeasure, i.selectionDiv, i.cursorDiv, i.lineDiv], null, 'position: relative; outline: none')); + var o = eltP('div', [i.lineSpace], 'CodeMirror-lines'); + (i.mover = elt( + 'div', + [o], + null, + 'position: relative' + )), (i.sizer = elt('div', [i.mover], 'CodeMirror-sizer')), (i.sizerWidth = null), (i.heightForcer = elt('div', null, null, 'position: absolute; height: ' + N + 'px; width: 1px;')), (i.gutters = elt('div', null, 'CodeMirror-gutters')), (i.lineGutter = null), (i.scroller = elt('div', [i.sizer, i.heightForcer, i.gutters], 'CodeMirror-scroll')), i.scroller.setAttribute('tabIndex', '-1'), (i.wrapper = elt('div', [i.scrollbarFiller, i.gutterFiller, i.scroller], 'CodeMirror')), a && s < 8 && ((i.gutters.style.zIndex = -1), (i.scroller.style.paddingRight = 0)), l || (n && v) || (i.scroller.draggable = !0), e && (e.appendChild ? e.appendChild(i.wrapper) : e(i.wrapper)), (i.viewFrom = i.viewTo = t.first), (i.reportedViewFrom = i.reportedViewTo = t.first), (i.view = []), (i.renderedView = null), (i.externalMeasured = null), (i.viewOffset = 0), (i.lastWrapHeight = i.lastWrapWidth = 0), (i.updateLineNumbers = null), (i.nativeBarWidth = i.barHeight = i.barWidth = 0), (i.scrollbarsClipped = !1), (i.lineNumWidth = i.lineNumInnerWidth = i.lineNumChars = null), (i.alignWidgets = !1), (i.cachedCharWidth = i.cachedTextHeight = i.cachedPaddingH = null), (i.maxLine = null), (i.maxLineLength = 0), (i.maxLineChanged = !1), (i.wheelDX = i.wheelDY = i.wheelStartX = i.wheelStartY = null), (i.shift = !1), (i.selForContextMenu = null), (i.activeTouch = null), r.init(i); + } + function getLine(e, t) { + if ((t -= e.first) < 0 || t >= e.size) + throw new Error( + 'There is no line ' + (t + e.first) + ' in the document.' + ); + for (var n = e; !n.lines; ) for (var r = 0; ; ++r) { + var i = n.children[r], o = i.chunkSize(); + if (t < o) { + n = i; + break; + } + t -= o; + } + return n.lines[t]; + } + function getBetween(e, t, n) { + var r = [], i = t.line; + return e.iter(t.line, n.line + 1, function(e) { + var o = e.text; + i == n.line && + (o = o.slice( + 0, + n.ch + )), i == t.line && (o = o.slice(t.ch)), r.push(o), ++i; + }), r; + } + function getLines(e, t, n) { + var r = []; + return e.iter(t, n, function(e) { + r.push(e.text); + }), r; + } + function updateLineHeight(e, t) { + var n = t - e.height; + if (n) for (var r = e; r; r = r.parent) r.height += n; + } + function lineNo(e) { + if (null == e.parent) return null; + for ( + var t = e.parent, n = indexOf(t.lines, e), r = t.parent; + r; + (t = r), (r = r.parent) + ) for (var i = 0; r.children[i] != t; ++i) n += r.children[i].chunkSize(); + return n + t.first; + } + function lineAtHeight(e, t) { + var n = e.first; + e: do { + for (var r = 0; r < e.children.length; ++r) { + var i = e.children[r], o = i.height; + if (t < o) { + e = i; + continue e; + } + (t -= o), (n += i.chunkSize()); + } + return n; + } while (!e.lines); + for (var a = 0; a < e.lines.length; ++a) { + var s = e.lines[a], l = s.height; + if (t < l) break; + t -= l; + } + return n + a; + } + function isLine(e, t) { + return t >= e.first && t < e.first + e.size; + } + function lineNumberFor(e, t) { + return String(e.lineNumberFormatter(t + e.firstLineNumber)); + } + function Pos(e, t, n) { + if ((void 0 === n && (n = null), !(this instanceof Pos))) + return new Pos(e, t, n); + (this.line = e), (this.ch = t), (this.sticky = n); + } + function cmp(e, t) { + return e.line - t.line || e.ch - t.ch; + } + function equalCursorPos(e, t) { + return e.sticky == t.sticky && 0 == cmp(e, t); + } + function copyPos(e) { + return Pos(e.line, e.ch); + } + function maxPos(e, t) { + return cmp(e, t) < 0 ? t : e; + } + function minPos(e, t) { + return cmp(e, t) < 0 ? e : t; + } + function clipLine(e, t) { + return Math.max(e.first, Math.min(t, e.first + e.size - 1)); + } + function clipPos(e, t) { + if (t.line < e.first) return Pos(e.first, 0); + var n = e.first + e.size - 1; + return t.line > n + ? Pos(n, getLine(e, n).text.length) + : clipToLen(t, getLine(e, t.line).text.length); + } + function clipToLen(e, t) { + var n = e.ch; + return null == n || n > t ? Pos(e.line, t) : n < 0 ? Pos(e.line, 0) : e; + } + function clipPosArray(e, t) { + for (var n = [], r = 0; r < t.length; r++) n[r] = clipPos(e, t[r]); + return n; + } + function seeReadOnlySpans() { + B = !0; + } + function seeCollapsedSpans() { + z = !0; + } + function MarkedSpan(e, t, n) { + (this.marker = e), (this.from = t), (this.to = n); + } + function getMarkedSpanFor(e, t) { + if (e) + for (var n = 0; n < e.length; ++n) { + var r = e[n]; + if (r.marker == t) return r; + } + } + function removeMarkedSpan(e, t) { + for ( + var n, r = 0; + r < e.length; + ++r + ) e[r] != t && (n || (n = [])).push(e[r]); + return n; + } + function addMarkedSpan(e, t) { + (e.markedSpans = e.markedSpans + ? e.markedSpans.concat([t]) + : [t]), t.marker.attachLine(e); + } + function markedSpansBefore(e, t, n) { + var r; + if (e) + for (var i = 0; i < e.length; ++i) { + var o = e[i], + a = o.marker, + s = + null == o.from || (a.inclusiveLeft ? o.from <= t : o.from < t); + if ( + s || + (o.from == t && + 'bookmark' == a.type && + (!n || !o.marker.insertLeft)) + ) { + var l = null == o.to || (a.inclusiveRight ? o.to >= t : o.to > t); + (r || (r = [])).push(new MarkedSpan(a, o.from, l ? null : o.to)); + } + } + return r; + } + function markedSpansAfter(e, t, n) { + var r; + if (e) + for (var i = 0; i < e.length; ++i) { + var o = e[i], + a = o.marker, + s = null == o.to || (a.inclusiveRight ? o.to >= t : o.to > t); + if ( + s || + (o.from == t && + 'bookmark' == a.type && + (!n || o.marker.insertLeft)) + ) { + var l = + null == o.from || (a.inclusiveLeft ? o.from <= t : o.from < t); + (r || (r = [])) + .push( + new MarkedSpan( + a, + l ? null : o.from - t, + null == o.to ? null : o.to - t + ) + ); + } + } + return r; + } + function stretchSpansOverChange(e, t) { + if (t.full) return null; + var n = isLine(e, t.from.line) && getLine(e, t.from.line).markedSpans, + r = isLine(e, t.to.line) && getLine(e, t.to.line).markedSpans; + if (!n && !r) return null; + var i = t.from.ch, + o = t.to.ch, + a = 0 == cmp(t.from, t.to), + s = markedSpansBefore(n, i, a), + l = markedSpansAfter(r, o, a), + c = 1 == t.text.length, + u = lst(t.text).length + (c ? i : 0); + if (s) + for (var d = 0; d < s.length; ++d) { + var p = s[d]; + if (null == p.to) { + var f = getMarkedSpanFor(l, p.marker); + f ? c && (p.to = null == f.to ? null : f.to + u) : (p.to = i); + } + } + if (l) + for (var h = 0; h < l.length; ++h) { + var g = l[h]; + if ((null != g.to && (g.to += u), null == g.from)) { + var m = getMarkedSpanFor(s, g.marker); + m || ((g.from = u), c && (s || (s = [])).push(g)); + } else (g.from += u), c && (s || (s = [])).push(g); + } + s && (s = clearEmptySpans(s)), l && l != s && (l = clearEmptySpans(l)); + var v = [s]; + if (!c) { + var y, b = t.text.length - 2; + if (b > 0 && s) + for (var x = 0; x < s.length; ++x) + null == s[x].to && + (y || (y = [])).push(new MarkedSpan(s[x].marker, null, null)); + for (var C = 0; C < b; ++C) + v.push(y); + v.push(l); + } + return v; + } + function clearEmptySpans(e) { + for (var t = 0; t < e.length; ++t) { + var n = e[t]; + null != n.from && + n.from == n.to && + !1 !== n.marker.clearWhenEmpty && + e.splice(t--, 1); + } + return e.length ? e : null; + } + function removeReadOnlyRanges(e, t, n) { + var r = null; + if ( + (e.iter(t.line, n.line + 1, function(e) { + if (e.markedSpans) + for (var t = 0; t < e.markedSpans.length; ++t) { + var n = e.markedSpans[t].marker; + !n.readOnly || + (r && -1 != indexOf(r, n)) || + (r || (r = [])).push(n); + } + }), !r) + ) + return null; + for ( + var i = [{ from: t, to: n }], o = 0; + o < r.length; + ++o + ) for (var a = r[o], s = a.find(0), l = 0; l < i.length; ++l) { + var c = i[l]; + if (!(cmp(c.to, s.from) < 0 || cmp(c.from, s.to) > 0)) { + var u = [l, 1], d = cmp(c.from, s.from), p = cmp(c.to, s.to); + (d < 0 || (!a.inclusiveLeft && !d)) && + u.push({ from: c.from, to: s.from }), (p > 0 || + (!a.inclusiveRight && !p)) && + u.push({ from: s.to, to: c.to }), i.splice.apply(i, u), (l += + u.length - 3); + } + } + return i; + } + function detachMarkedSpans(e) { + var t = e.markedSpans; + if (t) { + for (var n = 0; n < t.length; ++n) + t[n].marker.detachLine(e); + e.markedSpans = null; + } + } + function attachMarkedSpans(e, t) { + if (t) { + for (var n = 0; n < t.length; ++n) + t[n].marker.attachLine(e); + e.markedSpans = t; + } + } + function extraLeft(e) { + return e.inclusiveLeft ? -1 : 0; + } + function extraRight(e) { + return e.inclusiveRight ? 1 : 0; + } + function compareCollapsedMarkers(e, t) { + var n = e.lines.length - t.lines.length; + if (0 != n) return n; + var r = e.find(), + i = t.find(), + o = cmp(r.from, i.from) || extraLeft(e) - extraLeft(t); + if (o) return -o; + var a = cmp(r.to, i.to) || extraRight(e) - extraRight(t); + return a || t.id - e.id; + } + function collapsedSpanAtSide(e, t) { + var n, r = z && e.markedSpans; + if (r) + for (var i = void 0, o = 0; o < r.length; ++o) + (i = r[o]), i.marker.collapsed && + null == (t ? i.from : i.to) && + (!n || compareCollapsedMarkers(n, i.marker) < 0) && + (n = i.marker); + return n; + } + function collapsedSpanAtStart(e) { + return collapsedSpanAtSide(e, !0); + } + function collapsedSpanAtEnd(e) { + return collapsedSpanAtSide(e, !1); + } + function conflictingCollapsedRange(e, t, n, r, i) { + var o = getLine(e, t), a = z && o.markedSpans; + if (a) + for (var s = 0; s < a.length; ++s) { + var l = a[s]; + if (l.marker.collapsed) { + var c = l.marker.find(0), + u = cmp(c.from, n) || extraLeft(l.marker) - extraLeft(i), + d = cmp(c.to, r) || extraRight(l.marker) - extraRight(i); + if ( + !((u >= 0 && d <= 0) || (u <= 0 && d >= 0)) && + ((u <= 0 && + (l.marker.inclusiveRight && i.inclusiveLeft + ? cmp(c.to, n) >= 0 + : cmp(c.to, n) > 0)) || + (u >= 0 && + (l.marker.inclusiveRight && i.inclusiveLeft + ? cmp(c.from, r) <= 0 + : cmp(c.from, r) < 0))) + ) + return !0; + } + } + } + function visualLine(e) { + for (var t; (t = collapsedSpanAtStart(e)); ) e = t.find(-1, !0).line; + return e; + } + function visualLineEnd(e) { + for (var t; (t = collapsedSpanAtEnd(e)); ) e = t.find(1, !0).line; + return e; + } + function visualLineContinued(e) { + for ( + var t, n; + (t = collapsedSpanAtEnd(e)); + + ) (e = t.find(1, !0).line), (n || (n = [])).push(e); + return n; + } + function visualLineNo(e, t) { + var n = getLine(e, t), r = visualLine(n); + return n == r ? t : lineNo(r); + } + function visualLineEndNo(e, t) { + if (t > e.lastLine()) return t; + var n, r = getLine(e, t); + if (!lineIsHidden(e, r)) return t; + for (; (n = collapsedSpanAtEnd(r)); ) r = n.find(1, !0).line; + return lineNo(r) + 1; + } + function lineIsHidden(e, t) { + var n = z && t.markedSpans; + if (n) + for (var r = void 0, i = 0; i < n.length; ++i) + if (((r = n[i]), r.marker.collapsed)) { + if (null == r.from) return !0; + if ( + !r.marker.widgetNode && + 0 == r.from && + r.marker.inclusiveLeft && + lineIsHiddenInner(e, t, r) + ) + return !0; + } + } + function lineIsHiddenInner(e, t, n) { + if (null == n.to) { + var r = n.marker.find(1, !0); + return lineIsHiddenInner( + e, + r.line, + getMarkedSpanFor(r.line.markedSpans, n.marker) + ); + } + if (n.marker.inclusiveRight && n.to == t.text.length) return !0; + for ( + var i = void 0, o = 0; + o < t.markedSpans.length; + ++o + ) if (((i = t.markedSpans[o]), i.marker.collapsed && !i.marker.widgetNode && i.from == n.to && (null == i.to || i.to != n.from) && (i.marker.inclusiveLeft || n.marker.inclusiveRight) && lineIsHiddenInner(e, t, i))) return !0; + } + function heightAtLine(e) { + e = visualLine(e); + for (var t = 0, n = e.parent, r = 0; r < n.lines.length; ++r) { + var i = n.lines[r]; + if (i == e) break; + t += i.height; + } + for ( + var o = n.parent; + o; + (n = o), (o = n.parent) + ) for (var a = 0; a < o.children.length; ++a) { + var s = o.children[a]; + if (s == n) break; + t += s.height; + } + return t; + } + function lineLength(e) { + if (0 == e.height) return 0; + for (var t, n = e.text.length, r = e; (t = collapsedSpanAtStart(r)); ) { + var i = t.find(0, !0); + (r = i.from.line), (n += i.from.ch - i.to.ch); + } + for (r = e; (t = collapsedSpanAtEnd(r)); ) { + var o = t.find(0, !0); + (n -= + r.text.length - + o.from.ch), (r = o.to.line), (n += r.text.length - o.to.ch); + } + return n; + } + function findMaxLine(e) { + var t = e.display, n = e.doc; + (t.maxLine = getLine( + n, + n.first + )), (t.maxLineLength = lineLength(t.maxLine)), (t.maxLineChanged = !0), n.iter( + function(e) { + var n = lineLength(e); + n > t.maxLineLength && ((t.maxLineLength = n), (t.maxLine = e)); + } + ); + } + function iterateBidiSections(e, t, n, r) { + if (!e) return r(t, n, 'ltr'); + for (var i = !1, o = 0; o < e.length; ++o) { + var a = e[o]; + ((a.from < n && a.to > t) || (t == n && a.to == t)) && + (r( + Math.max(a.from, t), + Math.min(a.to, n), + 1 == a.level ? 'rtl' : 'ltr' + ), (i = !0)); + } + i || r(t, n, 'ltr'); + } + function getBidiPartAt(e, t, n) { + var r; + R = null; + for (var i = 0; i < e.length; ++i) { + var o = e[i]; + if (o.from < t && o.to > t) return i; + o.to == t && + (o.from != o.to && 'before' == n + ? (r = i) + : (R = i)), o.from == t && (o.from != o.to && 'before' != n ? (r = i) : (R = i)); + } + return null != r ? r : R; + } + function getOrder(e, t) { + var n = e.order; + return null == n && (n = e.order = V(e.text, t)), n; + } + function moveCharLogically(e, t, n) { + var r = skipExtendingChars(e.text, t + n, n); + return r < 0 || r > e.text.length ? null : r; + } + function moveLogically(e, t, n) { + var r = moveCharLogically(e, t.ch, n); + return null == r + ? null + : new Pos(t.line, r, n < 0 ? 'after' : 'before'); + } + function endOfLine(e, t, n, r, i) { + if (e) { + var o = getOrder(n, t.doc.direction); + if (o) { + var a, + s = i < 0 ? lst(o) : o[0], + l = i < 0 == (1 == s.level), + c = l ? 'after' : 'before'; + if (s.level > 0) { + var u = prepareMeasureForLine(t, n); + a = i < 0 ? n.text.length - 1 : 0; + var d = measureCharPrepared(t, u, a).top; + (a = findFirst( + function(e) { + return measureCharPrepared(t, u, e).top == d; + }, + i < 0 == (1 == s.level) ? s.from : s.to - 1, + a + )), 'before' == c && (a = moveCharLogically(n, a, 1)); + } else a = i < 0 ? s.to : s.from; + return new Pos(r, a, c); + } + } + return new Pos( + r, + i < 0 ? n.text.length : 0, + i < 0 ? 'before' : 'after' + ); + } + function moveVisually(e, t, n, r) { + var i = getOrder(t, e.doc.direction); + if (!i) return moveLogically(t, n, r); + n.ch >= t.text.length + ? ((n.ch = t.text.length), (n.sticky = 'before')) + : n.ch <= 0 && ((n.ch = 0), (n.sticky = 'after')); + var o = getBidiPartAt(i, n.ch, n.sticky), a = i[o]; + if ( + 'ltr' == e.doc.direction && + a.level % 2 == 0 && + (r > 0 ? a.to > n.ch : a.from < n.ch) + ) + return moveLogically(t, n, r); + var s, + l = function(e, n) { + return moveCharLogically(t, e instanceof Pos ? e.ch : e, n); + }, + c = function(n) { + return e.options.lineWrapping + ? ((s = s || prepareMeasureForLine(e, t)), wrappedLineExtentChar( + e, + t, + s, + n + )) + : { begin: 0, end: t.text.length }; + }, + u = c('before' == n.sticky ? l(n, -1) : n.ch); + if ('rtl' == e.doc.direction || 1 == a.level) { + var d = 1 == a.level == r < 0, p = l(n, d ? 1 : -1); + if ( + null != p && + (d ? p <= a.to && p <= u.end : p >= a.from && p >= u.begin) + ) { + var f = d ? 'before' : 'after'; + return new Pos(n.line, p, f); + } + } + var h = function(e, t, r) { + for ( + var o = function(e, t) { + return t + ? new Pos(n.line, l(e, 1), 'before') + : new Pos(n.line, e, 'after'); + }; + e >= 0 && e < i.length; + e += t + ) { + var a = i[e], + s = t > 0 == (1 != a.level), + c = s ? r.begin : l(r.end, -1); + if (a.from <= c && c < a.to) return o(c, s); + if (((c = s ? a.from : l(a.to, -1)), r.begin <= c && c < r.end)) + return o(c, s); + } + }, + g = h(o + r, r, u); + if (g) return g; + var m = r > 0 ? u.end : l(u.begin, -1); + return null == m || + (r > 0 && m == t.text.length) || + !(g = h(r > 0 ? 0 : i.length - 1, r, c(m))) + ? null + : g; + } + function getHandlers(e, t) { + return (e._handlers && e._handlers[t]) || j; + } + function off(e, t, n) { + if (e.removeEventListener) e.removeEventListener(t, n, !1); + else if (e.detachEvent) e.detachEvent('on' + t, n); + else { + var r = e._handlers, i = r && r[t]; + if (i) { + var o = indexOf(i, n); + o > -1 && (r[t] = i.slice(0, o).concat(i.slice(o + 1))); + } + } + } + function signal(e, t) { + var n = getHandlers(e, t); + if (n.length) + for ( + var r = Array.prototype.slice.call(arguments, 2), i = 0; + i < n.length; + ++i + ) + n[i].apply(null, r); + } + function signalDOMEvent(e, t, n) { + return 'string' == typeof t && + (t = { + type: t, + preventDefault: function() { + this.defaultPrevented = !0; + } + }), signal(e, n || t.type, e, t), e_defaultPrevented(t) || t.codemirrorIgnore; + } + function signalCursorActivity(e) { + var t = e._handlers && e._handlers.cursorActivity; + if (t) + for ( + var n = + e.curOp.cursorActivityHandlers || + (e.curOp.cursorActivityHandlers = []), + r = 0; + r < t.length; + ++r + ) + -1 == indexOf(n, t[r]) && n.push(t[r]); + } + function hasHandler(e, t) { + return getHandlers(e, t).length > 0; + } + function eventMixin(e) { + (e.prototype.on = function(e, t) { + G(this, e, t); + }), (e.prototype.off = function(e, t) { + off(this, e, t); + }); + } + function e_preventDefault(e) { + e.preventDefault ? e.preventDefault() : (e.returnValue = !1); + } + function e_stopPropagation(e) { + e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = !0); + } + function e_defaultPrevented(e) { + return null != e.defaultPrevented + ? e.defaultPrevented + : 0 == e.returnValue; + } + function e_stop(e) { + e_preventDefault(e), e_stopPropagation(e); + } + function e_target(e) { + return e.target || e.srcElement; + } + function e_button(e) { + var t = e.which; + return null == t && + (1 & e.button + ? (t = 1) + : 2 & e.button + ? (t = 3) + : 4 & e.button && + (t = 2)), y && e.ctrlKey && 1 == t && (t = 3), t; + } + function zeroWidthElement(e) { + if (null == O) { + var t = elt('span', '​'); + removeChildrenAndAdd( + e, + elt('span', [t, document.createTextNode('x')]) + ), 0 != e.firstChild.offsetHeight && + (O = t.offsetWidth <= 1 && t.offsetHeight > 2 && !(a && s < 8)); + } + var n = O + ? elt('span', '​') + : elt( + 'span', + ' ', + null, + 'display: inline-block; width: 1px; margin-right: -1px' + ); + return n.setAttribute('cm-text', ''), n; + } + function hasBadBidiRects(e) { + if (null != P) return P; + var t = removeChildrenAndAdd(e, document.createTextNode('AخA')), + n = w(t, 0, 1).getBoundingClientRect(), + r = w(t, 1, 2).getBoundingClientRect(); + return removeChildren( + e + ), !(!n || n.left == n.right) && (P = r.right - n.right < 3); + } + function hasBadZoomedRects(e) { + if (null != q) return q; + var t = removeChildrenAndAdd(e, elt('span', 'x')), + n = t.getBoundingClientRect(), + r = w(t, 0, 1).getBoundingClientRect(); + return (q = Math.abs(n.left - r.left) > 1); + } + function defineMode(e, t) { + arguments.length > 2 && + (t.dependencies = Array.prototype.slice.call( + arguments, + 2 + )), (X[e] = t); + } + function defineMIME(e, t) { + Y[e] = t; + } + function resolveMode(e) { + if ('string' == typeof e && Y.hasOwnProperty(e)) e = Y[e]; + else if (e && 'string' == typeof e.name && Y.hasOwnProperty(e.name)) { + var t = Y[e.name]; + 'string' == typeof t && (t = { name: t }), (e = createObj( + t, + e + )), (e.name = t.name); + } else { + if ('string' == typeof e && /^[\w\-]+\/[\w\-]+\+xml$/.test(e)) + return resolveMode('application/xml'); + if ('string' == typeof e && /^[\w\-]+\/[\w\-]+\+json$/.test(e)) + return resolveMode('application/json'); + } + return 'string' == typeof e ? { name: e } : e || { name: 'null' }; + } + function getMode(e, t) { + t = resolveMode(t); + var n = X[t.name]; + if (!n) return getMode(e, 'text/plain'); + var r = n(e, t); + if (Z.hasOwnProperty(t.name)) { + var i = Z[t.name]; + for (var o in i) + i.hasOwnProperty(o) && + (r.hasOwnProperty(o) && (r['_' + o] = r[o]), (r[o] = i[o])); + } + if ( + ((r.name = t.name), t.helperType && + (r.helperType = t.helperType), t.modeProps) + ) + for (var a in t.modeProps) + r[a] = t.modeProps[a]; + return r; + } + function extendMode(e, t) { + copyObj(t, Z.hasOwnProperty(e) ? Z[e] : (Z[e] = {})); + } + function copyState(e, t) { + if (!0 === t) return t; + if (e.copyState) return e.copyState(t); + var n = {}; + for (var r in t) { + var i = t[r]; + i instanceof Array && (i = i.concat([])), (n[r] = i); + } + return n; + } + function innerMode(e, t) { + for ( + var n; + e.innerMode && (n = e.innerMode(t)) && n.mode != e; + + ) (t = n.state), (e = n.mode); + return n || { mode: e, state: t }; + } + function startState(e, t, n) { + return !e.startState || e.startState(t, n); + } + function highlightLine(e, t, n, r) { + var i = [e.state.modeGen], o = {}; + runMode( + e, + t.text, + e.doc.mode, + n, + function(e, t) { + return i.push(e, t); + }, + o, + r + ); + for (var a = 0; a < e.state.overlays.length; ++a) !(function(n) { + var r = e.state.overlays[n], a = 1, s = 0; + runMode( + e, + t.text, + r.mode, + !0, + function(e, t) { + for (var n = a; s < e; ) { + var o = i[a]; + o > e && + i.splice(a, 1, e, i[a + 1], o), (a += 2), (s = Math.min( + e, + o + )); + } + if (t) + if (r.opaque) + i.splice(n, a - n, e, 'overlay ' + t), (a = n + 2); + else + for (; n < a; n += 2) { + var l = i[n + 1]; + i[n + 1] = (l ? l + ' ' : '') + 'overlay ' + t; + } + }, + o + ); + })(a); + return { styles: i, classes: o.bgClass || o.textClass ? o : null }; + } + function getLineStyles(e, t, n) { + if (!t.styles || t.styles[0] != e.state.modeGen) { + var r = getStateBefore(e, lineNo(t)), + i = highlightLine( + e, + t, + t.text.length > e.options.maxHighlightLength + ? copyState(e.doc.mode, r) + : r + ); + (t.stateAfter = r), (t.styles = i.styles), i.classes + ? (t.styleClasses = i.classes) + : t.styleClasses && (t.styleClasses = null), n === e.doc.frontier && + e.doc.frontier++; + } + return t.styles; + } + function getStateBefore(e, t, n) { + var r = e.doc, i = e.display; + if (!r.mode.startState) return !0; + var o = findStartLine(e, t, n), + a = o > r.first && getLine(r, o - 1).stateAfter; + return (a = a + ? copyState(r.mode, a) + : startState(r.mode)), r.iter(o, t, function(n) { + processLine(e, n.text, a); + var s = o == t - 1 || o % 5 == 0 || (o >= i.viewFrom && o < i.viewTo); + (n.stateAfter = s ? copyState(r.mode, a) : null), ++o; + }), n && (r.frontier = o), a; + } + function processLine(e, t, n, r) { + var i = e.doc.mode, o = new J(t, e.options.tabSize); + for ( + (o.start = o.pos = r || 0), '' == t && callBlankLine(i, n); + !o.eol(); + + ) readToken(i, o, n), (o.start = o.pos); + } + function callBlankLine(e, t) { + if (e.blankLine) return e.blankLine(t); + if (e.innerMode) { + var n = innerMode(e, t); + return n.mode.blankLine ? n.mode.blankLine(n.state) : void 0; + } + } + function readToken(e, t, n, r) { + for (var i = 0; i < 10; i++) { + r && (r[0] = innerMode(e, n).mode); + var o = e.token(t, n); + if (t.pos > t.start) return o; + } + throw new Error('Mode ' + e.name + ' failed to advance stream.'); + } + function takeToken(e, t, n, r) { + var i, + o = function(e) { + return { + start: d.start, + end: d.pos, + string: d.current(), + type: i || null, + state: e ? copyState(a.mode, u) : u + }; + }, + a = e.doc, + s = a.mode; + t = clipPos(a, t); + var l, + c = getLine(a, t.line), + u = getStateBefore(e, t.line, n), + d = new J(c.text, e.options.tabSize); + for ( + r && (l = []); + (r || d.pos < t.ch) && !d.eol(); + + ) (d.start = d.pos), (i = readToken(s, d, u)), r && l.push(o(!0)); + return r ? l : o(); + } + function extractLineClasses(e, t) { + if (e) + for (;;) { + var n = e.match(/(?:^|\s+)line-(background-)?(\S+)/); + if (!n) break; + e = e.slice(0, n.index) + e.slice(n.index + n[0].length); + var r = n[1] ? 'bgClass' : 'textClass'; + null == t[r] + ? (t[r] = n[2]) + : new RegExp('(?:^|s)' + n[2] + '(?:$|s)').test(t[r]) || + (t[r] += ' ' + n[2]); + } + return e; + } + function runMode(e, t, n, r, i, o, a) { + var s = n.flattenSpans; + null == s && (s = e.options.flattenSpans); + var l, + c = 0, + u = null, + d = new J(t, e.options.tabSize), + p = e.options.addModeClass && [null]; + for ( + '' == t && extractLineClasses(callBlankLine(n, r), o); + !d.eol(); + + ) { + if ( + (d.pos > e.options.maxHighlightLength + ? ((s = !1), a && processLine(e, t, r, d.pos), (d.pos = + t.length), (l = null)) + : (l = extractLineClasses(readToken(n, d, r, p), o)), p) + ) { + var f = p[0].name; + f && (l = 'm-' + (l ? f + ' ' + l : f)); + } + if (!s || u != l) { + for (; c < d.start; ) + (c = Math.min(d.start, c + 5e3)), i(c, u); + u = l; + } + d.start = d.pos; + } + for (; c < d.pos; ) { + var h = Math.min(d.pos, c + 5e3); + i(h, u), (c = h); + } + } + function findStartLine(e, t, n) { + for ( + var r, + i, + o = e.doc, + a = n ? -1 : t - (e.doc.mode.innerMode ? 1e3 : 100), + s = t; + s > a; + --s + ) { + if (s <= o.first) return o.first; + var l = getLine(o, s - 1); + if (l.stateAfter && (!n || s <= o.frontier)) return s; + var c = countColumn(l.text, null, e.options.tabSize); + (null == i || r > c) && ((i = s - 1), (r = c)); + } + return i; + } + function updateLine(e, t, n, r) { + (e.text = t), e.stateAfter && (e.stateAfter = null), e.styles && (e.styles = null), null != e.order && (e.order = null), detachMarkedSpans(e), attachMarkedSpans(e, n); + var i = r ? r(e) : 1; + i != e.height && updateLineHeight(e, i); + } + function cleanUpLine(e) { + (e.parent = null), detachMarkedSpans(e); + } + function interpretTokenStyle(e, t) { + if (!e || /^\s*$/.test(e)) return null; + var n = t.addModeClass ? ne : te; + return n[e] || (n[e] = e.replace(/\S+/g, 'cm-$&')); + } + function buildLineContent(e, t) { + var n = eltP('span', null, null, l ? 'padding-right: .1px' : null), + r = { + pre: eltP('pre', [n], 'CodeMirror-line'), + content: n, + col: 0, + pos: 0, + cm: e, + trailingSpace: !1, + splitSpaces: (a || l) && e.getOption('lineWrapping') + }; + t.measure = {}; + for (var i = 0; i <= (t.rest ? t.rest.length : 0); i++) { + var o = i ? t.rest[i - 1] : t.line, s = void 0; + (r.pos = 0), (r.addToken = buildToken), hasBadBidiRects(e.display.measure) && (s = getOrder(o, e.doc.direction)) && (r.addToken = buildTokenBadBidi(r.addToken, s)), (r.map = []); + insertLineContent( + o, + r, + getLineStyles(e, o, t != e.display.externalMeasured && lineNo(o)) + ), o.styleClasses && (o.styleClasses.bgClass && (r.bgClass = joinClasses(o.styleClasses.bgClass, r.bgClass || '')), o.styleClasses.textClass && (r.textClass = joinClasses(o.styleClasses.textClass, r.textClass || ''))), 0 == r.map.length && r.map.push(0, 0, r.content.appendChild(zeroWidthElement(e.display.measure))), 0 == i ? ((t.measure.map = r.map), (t.measure.cache = {})) : ((t.measure.maps || (t.measure.maps = [])).push(r.map), (t.measure.caches || (t.measure.caches = [])).push({})); + } + if (l) { + var c = r.content.lastChild; + (/\bcm-tab\b/.test(c.className) || + (c.querySelector && c.querySelector('.cm-tab'))) && + (r.content.className = 'cm-tab-wrap-hack'); + } + return signal( + e, + 'renderLine', + e, + t.line, + r.pre + ), r.pre.className && (r.textClass = joinClasses(r.pre.className, r.textClass || '')), r; + } + function defaultSpecialCharPlaceholder(e) { + var t = elt('span', '•', 'cm-invalidchar'); + return (t.title = + '\\u' + + e + .charCodeAt(0) + .toString(16)), t.setAttribute('aria-label', t.title), t; + } + function buildToken(e, t, n, r, i, o, l) { + if (t) { + var c, + u = e.splitSpaces ? splitSpaces(t, e.trailingSpace) : t, + d = e.cm.state.specialChars, + p = !1; + if (d.test(t)) { + c = document.createDocumentFragment(); + for (var f = 0; ; ) { + d.lastIndex = f; + var h = d.exec(t), g = h ? h.index - f : t.length - f; + if (g) { + var m = document.createTextNode(u.slice(f, f + g)); + a && s < 9 + ? c.appendChild(elt('span', [m])) + : c.appendChild(m), e.map.push( + e.pos, + e.pos + g, + m + ), (e.col += g), (e.pos += g); + } + if (!h) break; + f += g + 1; + var v = void 0; + if ('\t' == h[0]) { + var y = e.cm.options.tabSize, b = y - e.col % y; + (v = c.appendChild( + elt('span', spaceStr(b), 'cm-tab') + )), v.setAttribute('role', 'presentation'), v.setAttribute( + 'cm-text', + '\t' + ), (e.col += b); + } else + '\r' == h[0] || '\n' == h[0] + ? ((v = c.appendChild( + elt('span', '\r' == h[0] ? '␍' : '␤', 'cm-invalidchar') + )), v.setAttribute('cm-text', h[0]), (e.col += 1)) + : ((v = e.cm.options.specialCharPlaceholder( + h[0] + )), v.setAttribute('cm-text', h[0]), a && s < 9 + ? c.appendChild(elt('span', [v])) + : c.appendChild(v), (e.col += 1)); + e.map.push(e.pos, e.pos + 1, v), e.pos++; + } + } else + (e.col += t.length), (c = document.createTextNode(u)), e.map.push( + e.pos, + e.pos + t.length, + c + ), a && s < 9 && (p = !0), (e.pos += t.length); + if ( + ((e.trailingSpace = 32 == u.charCodeAt(t.length - 1)), n || + r || + i || + p || + l) + ) { + var x = n || ''; + r && (x += r), i && (x += i); + var C = elt('span', [c], x, l); + return o && (C.title = o), e.content.appendChild(C); + } + e.content.appendChild(c); + } + } + function splitSpaces(e, t) { + if (e.length > 1 && !/ /.test(e)) return e; + for (var n = t, r = '', i = 0; i < e.length; i++) { + var o = e.charAt(i); + ' ' != o || + !n || + (i != e.length - 1 && 32 != e.charCodeAt(i + 1)) || + (o = ' '), (r += o), (n = ' ' == o); + } + return r; + } + function buildTokenBadBidi(e, t) { + return function(n, r, i, o, a, s, l) { + i = i ? i + ' cm-force-border' : 'cm-force-border'; + for (var c = n.pos, u = c + r.length; ; ) { + for ( + var d = void 0, p = 0; + p < t.length && ((d = t[p]), !(d.to > c && d.from <= c)); + p++ + ); + if (d.to >= u) return e(n, r, i, o, a, s, l); + e( + n, + r.slice(0, d.to - c), + i, + o, + null, + s, + l + ), (o = null), (r = r.slice(d.to - c)), (c = d.to); + } + }; + } + function buildCollapsedSpan(e, t, n, r) { + var i = !r && n.widgetNode; + i && + e.map.push( + e.pos, + e.pos + t, + i + ), !r && e.cm.display.input.needsContentAttribute && (i || (i = e.content.appendChild(document.createElement('span'))), i.setAttribute('cm-marker', n.id)), i && (e.cm.display.input.setUneditable(i), e.content.appendChild(i)), (e.pos += t), (e.trailingSpace = !1); + } + function insertLineContent(e, t, n) { + var r = e.markedSpans, i = e.text, o = 0; + if (r) + for ( + var a, s, l, c, u, d, p, f = i.length, h = 0, g = 1, m = '', v = 0; + ; + + ) { + if (v == h) { + (l = c = u = d = s = ''), (p = null), (v = 1 / 0); + for (var y = [], b = void 0, x = 0; x < r.length; ++x) { + var C = r[x], w = C.marker; + 'bookmark' == w.type && C.from == h && w.widgetNode + ? y.push(w) + : C.from <= h && + (null == C.to || + C.to > h || + (w.collapsed && C.to == h && C.from == h)) + ? (null != C.to && + C.to != h && + v > C.to && + ((v = C.to), (c = '')), w.className && + (l += ' ' + w.className), w.css && + (s = (s ? s + ';' : '') + w.css), w.startStyle && + C.from == h && + (u += ' ' + w.startStyle), w.endStyle && + C.to == v && + (b || (b = [])).push(w.endStyle, C.to), w.title && + !d && + (d = w.title), w.collapsed && + (!p || compareCollapsedMarkers(p.marker, w) < 0) && + (p = C)) + : C.from > h && v > C.from && (v = C.from); + } + if (b) + for (var S = 0; S < b.length; S += 2) + b[S + 1] == v && (c += ' ' + b[S]); + if (!p || p.from == h) + for (var k = 0; k < y.length; ++k) + buildCollapsedSpan(t, 0, y[k]); + if (p && (p.from || 0) == h) { + if ( + (buildCollapsedSpan( + t, + (null == p.to ? f + 1 : p.to) - h, + p.marker, + null == p.from + ), null == p.to) + ) + return; + p.to == h && (p = !1); + } + } + if (h >= f) break; + for (var L = Math.min(f, v); ; ) { + if (m) { + var M = h + m.length; + if (!p) { + var T = M > L ? m.slice(0, L - h) : m; + t.addToken( + t, + T, + a ? a + l : l, + u, + h + T.length == v ? c : '', + d, + s + ); + } + if (M >= L) { + (m = m.slice(L - h)), (h = L); + break; + } + (h = M), (u = ''); + } + (m = i.slice(o, (o = n[g++]))), (a = interpretTokenStyle( + n[g++], + t.cm.options + )); + } + } + else + for (var O = 1; O < n.length; O += 2) + t.addToken( + t, + i.slice(o, (o = n[O])), + interpretTokenStyle(n[O + 1], t.cm.options) + ); + } + function LineView(e, t, n) { + (this.line = t), (this.rest = visualLineContinued(t)), (this.size = this.rest ? lineNo(lst(this.rest)) - n + 1 : 1), (this.node = this.text = null), (this.hidden = lineIsHidden(e, t)); + } + function buildViewArray(e, t, n) { + for (var r, i = [], o = t; o < n; o = r) { + var a = new LineView(e.doc, getLine(e.doc, o), o); + (r = o + a.size), i.push(a); + } + return i; + } + function pushOperation(e) { + re + ? re.ops.push(e) + : (e.ownsGroup = re = { ops: [e], delayedCallbacks: [] }); + } + function fireCallbacksForOps(e) { + var t = e.delayedCallbacks, n = 0; + do { + for (; n < t.length; n++) t[n].call(null); + for (var r = 0; r < e.ops.length; r++) { + var i = e.ops[r]; + if (i.cursorActivityHandlers) + for (; i.cursorActivityCalled < i.cursorActivityHandlers.length; ) + i.cursorActivityHandlers[i.cursorActivityCalled++].call( + null, + i.cm + ); + } + } while (n < t.length); + } + function finishOperation(e, t) { + var n = e.ownsGroup; + if (n) + try { + fireCallbacksForOps(n); + } finally { + (re = null), t(n); + } + } + function signalLater(e, t) { + var n = getHandlers(e, t); + if (n.length) { + var r, i = Array.prototype.slice.call(arguments, 2); + re + ? (r = re.delayedCallbacks) + : ie ? (r = ie) : ((r = ie = []), setTimeout(fireOrphanDelayed, 0)); + for (var o = 0; o < n.length; ++o) + !(function(e) { + r.push(function() { + return n[e].apply(null, i); + }); + })(o); + } + } + function fireOrphanDelayed() { + var e = ie; + ie = null; + for (var t = 0; t < e.length; ++t) e[t](); + } + function updateLineForChanges(e, t, n, r) { + for (var i = 0; i < t.changes.length; i++) { + var o = t.changes[i]; + 'text' == o + ? updateLineText(e, t) + : 'gutter' == o + ? updateLineGutter(e, t, n, r) + : 'class' == o + ? updateLineClasses(e, t) + : 'widget' == o && updateLineWidgets(e, t, r); + } + t.changes = null; + } + function ensureLineWrapped(e) { + return e.node == e.text && + ((e.node = elt('div', null, null, 'position: relative')), e.text + .parentNode && + e.text.parentNode.replaceChild(e.node, e.text), e.node.appendChild( + e.text + ), a && s < 8 && (e.node.style.zIndex = 2)), e.node; + } + function updateLineBackground(e, t) { + var n = t.bgClass + ? t.bgClass + ' ' + (t.line.bgClass || '') + : t.line.bgClass; + if ((n && (n += ' CodeMirror-linebackground'), t.background)) + n + ? (t.background.className = n) + : (t.background.parentNode.removeChild( + t.background + ), (t.background = null)); + else if (n) { + var r = ensureLineWrapped(t); + (t.background = r.insertBefore( + elt('div', null, n), + r.firstChild + )), e.display.input.setUneditable(t.background); + } + } + function getLineContent(e, t) { + var n = e.display.externalMeasured; + return n && n.line == t.line + ? ((e.display.externalMeasured = null), (t.measure = + n.measure), n.built) + : buildLineContent(e, t); + } + function updateLineText(e, t) { + var n = t.text.className, r = getLineContent(e, t); + t.text == t.node && + (t.node = + r.pre), t.text.parentNode.replaceChild(r.pre, t.text), (t.text = r.pre), r.bgClass != t.bgClass || r.textClass != t.textClass ? ((t.bgClass = r.bgClass), (t.textClass = r.textClass), updateLineClasses(e, t)) : n && (t.text.className = n); + } + function updateLineClasses(e, t) { + updateLineBackground( + e, + t + ), t.line.wrapClass ? (ensureLineWrapped(t).className = t.line.wrapClass) : t.node != t.text && (t.node.className = ''); + var n = t.textClass + ? t.textClass + ' ' + (t.line.textClass || '') + : t.line.textClass; + t.text.className = n || ''; + } + function updateLineGutter(e, t, n, r) { + if ( + (t.gutter && + (t.node.removeChild( + t.gutter + ), (t.gutter = null)), t.gutterBackground && + (t.node.removeChild( + t.gutterBackground + ), (t.gutterBackground = null)), t.line.gutterClass) + ) { + var i = ensureLineWrapped(t); + (t.gutterBackground = elt( + 'div', + null, + 'CodeMirror-gutter-background ' + t.line.gutterClass, + 'left: ' + + (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) + + 'px; width: ' + + r.gutterTotalWidth + + 'px' + )), e.display.input.setUneditable(t.gutterBackground), i.insertBefore( + t.gutterBackground, + t.text + ); + } + var o = t.line.gutterMarkers; + if (e.options.lineNumbers || o) { + var a = ensureLineWrapped(t), + s = (t.gutter = elt( + 'div', + null, + 'CodeMirror-gutter-wrapper', + 'left: ' + + (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) + + 'px' + )); + if ( + (e.display.input.setUneditable(s), a.insertBefore(s, t.text), t.line + .gutterClass && (s.className += ' ' + t.line.gutterClass), !e + .options.lineNumbers || + (o && o['CodeMirror-linenumbers']) || + (t.lineNumber = s.appendChild( + elt( + 'div', + lineNumberFor(e.options, n), + 'CodeMirror-linenumber CodeMirror-gutter-elt', + 'left: ' + + r.gutterLeft['CodeMirror-linenumbers'] + + 'px; width: ' + + e.display.lineNumInnerWidth + + 'px' + ) + )), o) + ) + for (var l = 0; l < e.options.gutters.length; ++l) { + var c = e.options.gutters[l], u = o.hasOwnProperty(c) && o[c]; + u && + s.appendChild( + elt( + 'div', + [u], + 'CodeMirror-gutter-elt', + 'left: ' + + r.gutterLeft[c] + + 'px; width: ' + + r.gutterWidth[c] + + 'px' + ) + ); + } + } + } + function updateLineWidgets(e, t, n) { + t.alignable && (t.alignable = null); + for ( + var r = t.node.firstChild, i = void 0; + r; + r = i + ) (i = r.nextSibling), 'CodeMirror-linewidget' == r.className && t.node.removeChild(r); + insertLineWidgets(e, t, n); + } + function buildLineElement(e, t, n, r) { + var i = getLineContent(e, t); + return (t.text = t.node = + i.pre), i.bgClass && (t.bgClass = i.bgClass), i.textClass && (t.textClass = i.textClass), updateLineClasses(e, t), updateLineGutter(e, t, n, r), insertLineWidgets(e, t, r), t.node; + } + function insertLineWidgets(e, t, n) { + if ((insertLineWidgetsFor(e, t.line, t, n, !0), t.rest)) + for (var r = 0; r < t.rest.length; r++) + insertLineWidgetsFor(e, t.rest[r], t, n, !1); + } + function insertLineWidgetsFor(e, t, n, r, i) { + if (t.widgets) + for ( + var o = ensureLineWrapped(n), a = 0, s = t.widgets; + a < s.length; + ++a + ) { + var l = s[a], c = elt('div', [l.node], 'CodeMirror-linewidget'); + l.handleMouseEvents || + c.setAttribute('cm-ignore-events', 'true'), positionLineWidget( + l, + c, + n, + r + ), e.display.input.setUneditable(c), i && l.above + ? o.insertBefore(c, n.gutter || n.text) + : o.appendChild(c), signalLater(l, 'redraw'); + } + } + function positionLineWidget(e, t, n, r) { + if (e.noHScroll) { + (n.alignable || (n.alignable = [])).push(t); + var i = r.wrapperWidth; + (t.style.left = r.fixedPos + 'px'), e.coverGutter || + ((i -= r.gutterTotalWidth), (t.style.paddingLeft = + r.gutterTotalWidth + 'px')), (t.style.width = i + 'px'); + } + e.coverGutter && + ((t.style.zIndex = 5), (t.style.position = 'relative'), e.noHScroll || + (t.style.marginLeft = -r.gutterTotalWidth + 'px')); + } + function widgetHeight(e) { + if (null != e.height) return e.height; + var t = e.doc.cm; + if (!t) return 0; + if (!contains(document.body, e.node)) { + var n = 'position: relative;'; + e.coverGutter && + (n += + 'margin-left: -' + + t.display.gutters.offsetWidth + + 'px;'), e.noHScroll && + (n += + 'width: ' + + t.display.wrapper.clientWidth + + 'px;'), removeChildrenAndAdd( + t.display.measure, + elt('div', [e.node], null, n) + ); + } + return (e.height = e.node.parentNode.offsetHeight); + } + function eventInWidget(e, t) { + for ( + var n = e_target(t); + n != e.wrapper; + n = n.parentNode + ) if (!n || (1 == n.nodeType && 'true' == n.getAttribute('cm-ignore-events')) || (n.parentNode == e.sizer && n != e.mover)) return !0; + } + function paddingTop(e) { + return e.lineSpace.offsetTop; + } + function paddingVert(e) { + return e.mover.offsetHeight - e.lineSpace.offsetHeight; + } + function paddingH(e) { + if (e.cachedPaddingH) return e.cachedPaddingH; + var t = removeChildrenAndAdd(e.measure, elt('pre', 'x')), + n = window.getComputedStyle + ? window.getComputedStyle(t) + : t.currentStyle, + r = { + left: parseInt(n.paddingLeft), + right: parseInt(n.paddingRight) + }; + return isNaN(r.left) || isNaN(r.right) || (e.cachedPaddingH = r), r; + } + function scrollGap(e) { + return N - e.display.nativeBarWidth; + } + function displayWidth(e) { + return ( + e.display.scroller.clientWidth - scrollGap(e) - e.display.barWidth + ); + } + function displayHeight(e) { + return ( + e.display.scroller.clientHeight - scrollGap(e) - e.display.barHeight + ); + } + function ensureLineHeights(e, t, n) { + var r = e.options.lineWrapping, i = r && displayWidth(e); + if (!t.measure.heights || (r && t.measure.width != i)) { + var o = (t.measure.heights = []); + if (r) { + t.measure.width = i; + for ( + var a = t.text.firstChild.getClientRects(), s = 0; + s < a.length - 1; + s++ + ) { + var l = a[s], c = a[s + 1]; + Math.abs(l.bottom - c.bottom) > 2 && + o.push((l.bottom + c.top) / 2 - n.top); + } + } + o.push(n.bottom - n.top); + } + } + function mapFromLineView(e, t, n) { + if (e.line == t) return { map: e.measure.map, cache: e.measure.cache }; + for ( + var r = 0; + r < e.rest.length; + r++ + ) if (e.rest[r] == t) return { map: e.measure.maps[r], cache: e.measure.caches[r] }; + for ( + var i = 0; + i < e.rest.length; + i++ + ) if (lineNo(e.rest[i]) > n) return { map: e.measure.maps[i], cache: e.measure.caches[i], before: !0 }; + } + function updateExternalMeasurement(e, t) { + t = visualLine(t); + var n = lineNo(t), + r = (e.display.externalMeasured = new LineView(e.doc, t, n)); + r.lineN = n; + var i = (r.built = buildLineContent(e, r)); + return (r.text = + i.pre), removeChildrenAndAdd(e.display.lineMeasure, i.pre), r; + } + function measureChar(e, t, n, r) { + return measureCharPrepared(e, prepareMeasureForLine(e, t), n, r); + } + function findViewForLine(e, t) { + if (t >= e.display.viewFrom && t < e.display.viewTo) + return e.display.view[findViewIndex(e, t)]; + var n = e.display.externalMeasured; + return n && t >= n.lineN && t < n.lineN + n.size ? n : void 0; + } + function prepareMeasureForLine(e, t) { + var n = lineNo(t), r = findViewForLine(e, n); + r && !r.text + ? (r = null) + : r && + r.changes && + (updateLineForChanges( + e, + r, + n, + getDimensions(e) + ), (e.curOp.forceUpdate = !0)), r || (r = updateExternalMeasurement(e, t)); + var i = mapFromLineView(r, t, n); + return { + line: t, + view: r, + rect: null, + map: i.map, + cache: i.cache, + before: i.before, + hasHeights: !1 + }; + } + function measureCharPrepared(e, t, n, r, i) { + t.before && (n = -1); + var o, a = n + (r || ''); + return t.cache.hasOwnProperty(a) + ? (o = t.cache[a]) + : (t.rect || + (t.rect = t.view.text.getBoundingClientRect()), t.hasHeights || + (ensureLineHeights( + e, + t.view, + t.rect + ), (t.hasHeights = !0)), (o = measureCharInner( + e, + t, + n, + r + )), o.bogus || + (t.cache[ + a + ] = o)), { left: o.left, right: o.right, top: i ? o.rtop : o.top, bottom: i ? o.rbottom : o.bottom }; + } + function nodeAndOffsetInLineMap(e, t, n) { + for (var r, i, o, a, s, l, c = 0; c < e.length; c += 3) if ( + ((s = e[c]), (l = e[c + 1]), t < s + ? ((i = 0), (o = 1), (a = 'left')) + : t < l + ? ((i = t - s), (o = i + 1)) + : (c == e.length - 3 || (t == l && e[c + 3] > t)) && + ((o = l - s), (i = o - 1), t >= l && + (a = 'right')), null != i) + ) { + if ( + ((r = e[c + 2]), s == l && + n == (r.insertLeft ? 'left' : 'right') && + (a = n), 'left' == n && 0 == i) + ) + for (; c && e[c - 2] == e[c - 3] && e[c - 1].insertLeft; ) + (r = e[2 + (c -= 3)]), (a = 'left'); + if ('right' == n && i == l - s) + for ( + ; + c < e.length - 3 && + e[c + 3] == e[c + 4] && + !e[c + 5].insertLeft; + + ) + (r = e[(c += 3) + 2]), (a = 'right'); + break; + } + return { + node: r, + start: i, + end: o, + collapse: a, + coverStart: s, + coverEnd: l + }; + } + function getUsefulRect(e, t) { + var n = oe; + if ('left' == t) + for (var r = 0; r < e.length && (n = e[r]).left == n.right; r++); + else + for (var i = e.length - 1; i >= 0 && (n = e[i]).left == n.right; i--); + return n; + } + function measureCharInner(e, t, n, r) { + var i, + o = nodeAndOffsetInLineMap(t.map, n, r), + l = o.node, + c = o.start, + u = o.end, + d = o.collapse; + if (3 == l.nodeType) { + for (var p = 0; p < 4; p++) { + for (; c && isExtendingChar(t.line.text.charAt(o.coverStart + c)); ) + --c; + for ( + ; + o.coverStart + u < o.coverEnd && + isExtendingChar(t.line.text.charAt(o.coverStart + u)); + + ) + ++u; + if ( + ((i = a && s < 9 && 0 == c && u == o.coverEnd - o.coverStart + ? l.parentNode.getBoundingClientRect() + : getUsefulRect(w(l, c, u).getClientRects(), r)), i.left || + i.right || + 0 == c) + ) + break; + (u = c), (c -= 1), (d = 'right'); + } + a && s < 11 && (i = maybeUpdateRectForZooming(e.display.measure, i)); + } else { + c > 0 && (d = r = 'right'); + var f; + i = e.options.lineWrapping && (f = l.getClientRects()).length > 1 + ? f['right' == r ? f.length - 1 : 0] + : l.getBoundingClientRect(); + } + if (a && s < 9 && !c && (!i || (!i.left && !i.right))) { + var h = l.parentNode.getClientRects()[0]; + i = h + ? { + left: h.left, + right: h.left + charWidth(e.display), + top: h.top, + bottom: h.bottom + } + : oe; + } + for ( + var g = i.top - t.rect.top, + m = i.bottom - t.rect.top, + v = (g + m) / 2, + y = t.view.measure.heights, + b = 0; + b < y.length - 1 && !(v < y[b]); + b++ + ); + var x = b ? y[b - 1] : 0, + C = y[b], + S = { + left: ('right' == d ? i.right : i.left) - t.rect.left, + right: ('left' == d ? i.left : i.right) - t.rect.left, + top: x, + bottom: C + }; + return i.left || + i.right || + (S.bogus = !0), e.options.singleCursorHeightPerLine || ((S.rtop = g), (S.rbottom = m)), S; + } + function maybeUpdateRectForZooming(e, t) { + if ( + !window.screen || + null == screen.logicalXDPI || + screen.logicalXDPI == screen.deviceXDPI || + !hasBadZoomedRects(e) + ) + return t; + var n = screen.logicalXDPI / screen.deviceXDPI, + r = screen.logicalYDPI / screen.deviceYDPI; + return { + left: t.left * n, + right: t.right * n, + top: t.top * r, + bottom: t.bottom * r + }; + } + function clearLineMeasurementCacheFor(e) { + if ( + e.measure && + ((e.measure.cache = {}), (e.measure.heights = null), e.rest) + ) + for (var t = 0; t < e.rest.length; t++) + e.measure.caches[t] = {}; + } + function clearLineMeasurementCache(e) { + (e.display.externalMeasure = null), removeChildren(e.display.lineMeasure); + for ( + var t = 0; + t < e.display.view.length; + t++ + ) clearLineMeasurementCacheFor(e.display.view[t]); + } + function clearCaches(e) { + clearLineMeasurementCache( + e + ), (e.display.cachedCharWidth = e.display.cachedTextHeight = e.display.cachedPaddingH = null), e.options.lineWrapping || (e.display.maxLineChanged = !0), (e.display.lineNumChars = null); + } + function pageScrollX() { + return u && m + ? -(document.body.getBoundingClientRect().left - + parseInt(getComputedStyle(document.body).marginLeft)) + : window.pageXOffset || + (document.documentElement || document.body).scrollLeft; + } + function pageScrollY() { + return u && m + ? -(document.body.getBoundingClientRect().top - + parseInt(getComputedStyle(document.body).marginTop)) + : window.pageYOffset || + (document.documentElement || document.body).scrollTop; + } + function intoCoordSystem(e, t, n, r, i) { + if (!i && t.widgets) + for (var o = 0; o < t.widgets.length; ++o) + if (t.widgets[o].above) { + var a = widgetHeight(t.widgets[o]); + (n.top += a), (n.bottom += a); + } + if ('line' == r) return n; + r || (r = 'local'); + var s = heightAtLine(t); + if ( + ('local' == r + ? (s += paddingTop(e.display)) + : (s -= e.display.viewOffset), 'page' == r || 'window' == r) + ) { + var l = e.display.lineSpace.getBoundingClientRect(); + s += l.top + ('window' == r ? 0 : pageScrollY()); + var c = l.left + ('window' == r ? 0 : pageScrollX()); + (n.left += c), (n.right += c); + } + return (n.top += s), (n.bottom += s), n; + } + function fromCoordSystem(e, t, n) { + if ('div' == n) return t; + var r = t.left, i = t.top; + if ('page' == n) (r -= pageScrollX()), (i -= pageScrollY()); + else if ('local' == n || !n) { + var o = e.display.sizer.getBoundingClientRect(); + (r += o.left), (i += o.top); + } + var a = e.display.lineSpace.getBoundingClientRect(); + return { left: r - a.left, top: i - a.top }; + } + function charCoords(e, t, n, r, i) { + return r || + (r = getLine( + e.doc, + t.line + )), intoCoordSystem(e, r, measureChar(e, r, t.ch, i), n); + } + function cursorCoords(e, t, n, r, i, o) { + function get(t, a) { + var s = measureCharPrepared(e, i, t, a ? 'right' : 'left', o); + return a + ? (s.left = s.right) + : (s.right = s.left), intoCoordSystem(e, r, s, n); + } + function getBidi(e, t, n) { + var r = a[t], i = r.level % 2 != 0; + return get(n ? e - 1 : e, i != n); + } + (r = + r || getLine(e.doc, t.line)), i || (i = prepareMeasureForLine(e, r)); + var a = getOrder(r, e.doc.direction), s = t.ch, l = t.sticky; + if ( + (s >= r.text.length + ? ((s = r.text.length), (l = 'before')) + : s <= 0 && ((s = 0), (l = 'after')), !a) + ) + return get('before' == l ? s - 1 : s, 'before' == l); + var c = getBidiPartAt(a, s, l), u = R, d = getBidi(s, c, 'before' == l); + return null != u && (d.other = getBidi(s, u, 'before' != l)), d; + } + function estimateCoords(e, t) { + var n = 0; + (t = clipPos( + e.doc, + t + )), e.options.lineWrapping || (n = charWidth(e.display) * t.ch); + var r = getLine(e.doc, t.line), + i = heightAtLine(r) + paddingTop(e.display); + return { left: n, right: n, top: i, bottom: i + r.height }; + } + function PosWithInfo(e, t, n, r, i) { + var o = Pos(e, t, n); + return (o.xRel = i), r && (o.outside = !0), o; + } + function coordsChar(e, t, n) { + var r = e.doc; + if ((n += e.display.viewOffset) < 0) + return PosWithInfo(r.first, 0, null, !0, -1); + var i = lineAtHeight(r, n), o = r.first + r.size - 1; + if (i > o) + return PosWithInfo( + r.first + r.size - 1, + getLine(r, o).text.length, + null, + !0, + 1 + ); + t < 0 && (t = 0); + for (var a = getLine(r, i); ; ) { + var s = coordsCharInner(e, a, i, t, n), + l = collapsedSpanAtEnd(a), + c = l && l.find(0, !0); + if (!l || !(s.ch > c.from.ch || (s.ch == c.from.ch && s.xRel > 0))) + return s; + i = lineNo((a = c.to.line)); + } + } + function wrappedLineExtent(e, t, n, r) { + var i = function(r) { + return intoCoordSystem(e, t, measureCharPrepared(e, n, r), 'line'); + }, + o = t.text.length, + a = findFirst( + function(e) { + return i(e - 1).bottom <= r; + }, + o, + 0 + ); + return (o = findFirst( + function(e) { + return i(e).top > r; + }, + a, + o + )), { begin: a, end: o }; + } + function wrappedLineExtentChar(e, t, n, r) { + return wrappedLineExtent( + e, + t, + n, + intoCoordSystem(e, t, measureCharPrepared(e, n, r), 'line').top + ); + } + function coordsCharInner(e, t, n, r, i) { + i -= heightAtLine(t); + var o, a = 0, s = t.text.length, l = prepareMeasureForLine(e, t); + if (getOrder(t, e.doc.direction)) { + if (e.options.lineWrapping) { + var c; + (c = wrappedLineExtent(e, t, l, i)), (a = c.begin), (s = c.end); + } + o = new Pos(n, a); + var u, + d, + p = cursorCoords(e, o, 'line', t, l).left, + f = p < r ? 1 : -1, + h = p - r; + do { + if ( + ((u = h), (d = o), null == (o = moveVisually(e, t, o, f)) || + o.ch < a || + s <= ('before' == o.sticky ? o.ch - 1 : o.ch)) + ) { + o = d; + break; + } + h = cursorCoords(e, o, 'line', t, l).left - r; + } while (f < 0 != h < 0 && Math.abs(h) <= Math.abs(u)); + if (Math.abs(h) > Math.abs(u)) { + if (h < 0 == u < 0) + throw new Error('Broke out of infinite loop in coordsCharInner'); + o = d; + } + } else { + var g = findFirst( + function(n) { + var o = intoCoordSystem( + e, + t, + measureCharPrepared(e, l, n), + 'line' + ); + return o.top > i + ? ((s = Math.min(n, s)), !0) + : !(o.bottom <= i) && + (o.left > r || + (!(o.right < r) && r - o.left < o.right - r)); + }, + a, + s + ); + (g = skipExtendingChars(t.text, g, 1)), (o = new Pos( + n, + g, + g == s ? 'before' : 'after' + )); + } + var m = cursorCoords(e, o, 'line', t, l); + return (i < m.top || m.bottom < i) && + (o.outside = !0), (o.xRel = r < m.left ? -1 : r > m.right ? 1 : 0), o; + } + function textHeight(e) { + if (null != e.cachedTextHeight) return e.cachedTextHeight; + if (null == ee) { + ee = elt('pre'); + for (var t = 0; t < 49; ++t) + ee.appendChild(document.createTextNode('x')), ee.appendChild( + elt('br') + ); + ee.appendChild(document.createTextNode('x')); + } + removeChildrenAndAdd(e.measure, ee); + var n = ee.offsetHeight / 50; + return n > 3 && + (e.cachedTextHeight = n), removeChildren(e.measure), n || 1; + } + function charWidth(e) { + if (null != e.cachedCharWidth) return e.cachedCharWidth; + var t = elt('span', 'xxxxxxxxxx'), n = elt('pre', [t]); + removeChildrenAndAdd(e.measure, n); + var r = t.getBoundingClientRect(), i = (r.right - r.left) / 10; + return i > 2 && (e.cachedCharWidth = i), i || 10; + } + function getDimensions(e) { + for ( + var t = e.display, + n = {}, + r = {}, + i = t.gutters.clientLeft, + o = t.gutters.firstChild, + a = 0; + o; + (o = o.nextSibling), ++a + ) (n[e.options.gutters[a]] = o.offsetLeft + o.clientLeft + i), (r[e.options.gutters[a]] = o.clientWidth); + return { + fixedPos: compensateForHScroll(t), + gutterTotalWidth: t.gutters.offsetWidth, + gutterLeft: n, + gutterWidth: r, + wrapperWidth: t.wrapper.clientWidth + }; + } + function compensateForHScroll(e) { + return ( + e.scroller.getBoundingClientRect().left - + e.sizer.getBoundingClientRect().left + ); + } + function estimateHeight(e) { + var t = textHeight(e.display), + n = e.options.lineWrapping, + r = + n && + Math.max( + 5, + e.display.scroller.clientWidth / charWidth(e.display) - 3 + ); + return function(i) { + if (lineIsHidden(e.doc, i)) return 0; + var o = 0; + if (i.widgets) + for (var a = 0; a < i.widgets.length; a++) + i.widgets[a].height && (o += i.widgets[a].height); + return n ? o + (Math.ceil(i.text.length / r) || 1) * t : o + t; + }; + } + function estimateLineHeights(e) { + var t = e.doc, n = estimateHeight(e); + t.iter(function(e) { + var t = n(e); + t != e.height && updateLineHeight(e, t); + }); + } + function posFromMouse(e, t, n, r) { + var i = e.display; + if (!n && 'true' == e_target(t).getAttribute('cm-not-content')) + return null; + var o, a, s = i.lineSpace.getBoundingClientRect(); + try { + (o = t.clientX - s.left), (a = t.clientY - s.top); + } catch (t) { + return null; + } + var l, c = coordsChar(e, o, a); + if ( + r && + 1 == c.xRel && + (l = getLine(e.doc, c.line).text).length == c.ch + ) { + var u = countColumn(l, l.length, e.options.tabSize) - l.length; + c = Pos( + c.line, + Math.max( + 0, + Math.round( + (o - paddingH(e.display).left) / charWidth(e.display) + ) - u + ) + ); + } + return c; + } + function findViewIndex(e, t) { + if (t >= e.display.viewTo) return null; + if ((t -= e.display.viewFrom) < 0) return null; + for ( + var n = e.display.view, r = 0; + r < n.length; + r++ + ) if ((t -= n[r].size) < 0) return r; + } + function updateSelection(e) { + e.display.input.showSelection(e.display.input.prepareSelection()); + } + function prepareSelection(e, t) { + for ( + var n = e.doc, + r = {}, + i = (r.cursors = document.createDocumentFragment()), + o = (r.selection = document.createDocumentFragment()), + a = 0; + a < n.sel.ranges.length; + a++ + ) if (!1 !== t || a != n.sel.primIndex) { + var s = n.sel.ranges[a]; + if ( + !(s.from().line >= e.display.viewTo || + s.to().line < e.display.viewFrom) + ) { + var l = s.empty(); + (l || e.options.showCursorWhenSelecting) && + drawSelectionCursor(e, s.head, i), l || + drawSelectionRange(e, s, o); + } + } + return r; + } + function drawSelectionCursor(e, t, n) { + var r = cursorCoords( + e, + t, + 'div', + null, + null, + !e.options.singleCursorHeightPerLine + ), + i = n.appendChild(elt('div', ' ', 'CodeMirror-cursor')); + if ( + ((i.style.left = r.left + 'px'), (i.style.top = + r.top + 'px'), (i.style.height = + Math.max(0, r.bottom - r.top) * e.options.cursorHeight + + 'px'), r.other) + ) { + var o = n.appendChild( + elt('div', ' ', 'CodeMirror-cursor CodeMirror-secondarycursor') + ); + (o.style.display = ''), (o.style.left = + r.other.left + 'px'), (o.style.top = + r.other.top + 'px'), (o.style.height = + 0.85 * (r.other.bottom - r.other.top) + 'px'); + } + } + function drawSelectionRange(e, t, n) { + function add(e, t, n, r) { + t < 0 && + (t = 0), (t = Math.round(t)), (r = Math.round(r)), o.appendChild(elt('div', null, 'CodeMirror-selected', 'position: absolute; left: ' + e + 'px;\n top: ' + t + 'px; width: ' + (null == n ? l - e : n) + 'px;\n height: ' + (r - t) + 'px')); + } + function drawForLine(t, n, r) { + function coords(n, r) { + return charCoords(e, Pos(t, n), 'div', c, r); + } + var o, a, c = getLine(i, t), u = c.text.length; + return iterateBidiSections( + getOrder(c, i.direction), + n || 0, + null == r ? u : r, + function(e, t, i) { + var c, d, p, f = coords(e, 'left'); + if (e == t) (c = f), (d = p = f.left); + else { + if (((c = coords(t - 1, 'right')), 'rtl' == i)) { + var h = f; + (f = c), (c = h); + } + (d = f.left), (p = c.right); + } + null == n && 0 == e && (d = s), c.top - f.top > 3 && + (add(d, f.top, null, f.bottom), (d = s), f.bottom < c.top && + add(d, f.bottom, null, c.top)), null == r && + t == u && + (p = l), (!o || + f.top < o.top || + (f.top == o.top && f.left < o.left)) && + (o = f), (!a || + c.bottom > a.bottom || + (c.bottom == a.bottom && c.right > a.right)) && + (a = c), d < s + 1 && (d = s), add(d, c.top, p - d, c.bottom); + } + ), { start: o, end: a }; + } + var r = e.display, + i = e.doc, + o = document.createDocumentFragment(), + a = paddingH(e.display), + s = a.left, + l = + Math.max(r.sizerWidth, displayWidth(e) - r.sizer.offsetLeft) - + a.right, + c = t.from(), + u = t.to(); + if (c.line == u.line) drawForLine(c.line, c.ch, u.ch); + else { + var d = getLine(i, c.line), + p = getLine(i, u.line), + f = visualLine(d) == visualLine(p), + h = drawForLine(c.line, c.ch, f ? d.text.length + 1 : null).end, + g = drawForLine(u.line, f ? 0 : null, u.ch).start; + f && + (h.top < g.top - 2 + ? (add(h.right, h.top, null, h.bottom), add( + s, + g.top, + g.left, + g.bottom + )) + : add(h.right, h.top, g.left - h.right, h.bottom)), h.bottom < + g.top && add(s, h.bottom, null, g.top); + } + n.appendChild(o); + } + function restartBlink(e) { + if (e.state.focused) { + var t = e.display; + clearInterval(t.blinker); + var n = !0; + (t.cursorDiv.style.visibility = ''), e.options.cursorBlinkRate > 0 + ? (t.blinker = setInterval(function() { + return (t.cursorDiv.style.visibility = (n = !n) + ? '' + : 'hidden'); + }, e.options.cursorBlinkRate)) + : e.options.cursorBlinkRate < 0 && + (t.cursorDiv.style.visibility = 'hidden'); + } + } + function ensureFocus(e) { + e.state.focused || (e.display.input.focus(), onFocus(e)); + } + function delayBlurEvent(e) { + (e.state.delayingBlurEvent = !0), setTimeout(function() { + e.state.delayingBlurEvent && + ((e.state.delayingBlurEvent = !1), onBlur(e)); + }, 100); + } + function onFocus(e, t) { + e.state.delayingBlurEvent && + (e.state.delayingBlurEvent = !1), 'nocursor' != e.options.readOnly && + (e.state.focused || + (signal(e, 'focus', e, t), (e.state.focused = !0), addClass( + e.display.wrapper, + 'CodeMirror-focused' + ), e.curOp || + e.display.selForContextMenu == e.doc.sel || + (e.display.input.reset(), l && + setTimeout(function() { + return e.display.input.reset(!0); + }, 20)), e.display.input.receivedFocus()), restartBlink(e)); + } + function onBlur(e, t) { + e.state.delayingBlurEvent || + (e.state.focused && + (signal(e, 'blur', e, t), (e.state.focused = !1), L( + e.display.wrapper, + 'CodeMirror-focused' + )), clearInterval(e.display.blinker), setTimeout(function() { + e.state.focused || (e.display.shift = !1); + }, 150)); + } + function updateHeightsInViewport(e) { + for ( + var t = e.display, n = t.lineDiv.offsetTop, r = 0; + r < t.view.length; + r++ + ) { + var i = t.view[r], o = void 0; + if (!i.hidden) { + if (a && s < 8) { + var l = i.node.offsetTop + i.node.offsetHeight; + (o = l - n), (n = l); + } else { + var c = i.node.getBoundingClientRect(); + o = c.bottom - c.top; + } + var u = i.line.height - o; + if ( + (o < 2 && (o = textHeight(t)), (u > 0.001 || u < -0.001) && + (updateLineHeight(i.line, o), updateWidgetHeight( + i.line + ), i.rest)) + ) + for (var d = 0; d < i.rest.length; d++) + updateWidgetHeight(i.rest[d]); + } + } + } + function updateWidgetHeight(e) { + if (e.widgets) + for (var t = 0; t < e.widgets.length; ++t) + e.widgets[t].height = e.widgets[t].node.parentNode.offsetHeight; + } + function visibleLines(e, t, n) { + var r = n && null != n.top ? Math.max(0, n.top) : e.scroller.scrollTop; + r = Math.floor(r - paddingTop(e)); + var i = n && null != n.bottom ? n.bottom : r + e.wrapper.clientHeight, + o = lineAtHeight(t, r), + a = lineAtHeight(t, i); + if (n && n.ensure) { + var s = n.ensure.from.line, l = n.ensure.to.line; + s < o + ? ((o = s), (a = lineAtHeight( + t, + heightAtLine(getLine(t, s)) + e.wrapper.clientHeight + ))) + : Math.min(l, t.lastLine()) >= a && + ((o = lineAtHeight( + t, + heightAtLine(getLine(t, l)) - e.wrapper.clientHeight + )), (a = l)); + } + return { from: o, to: Math.max(a, o + 1) }; + } + function alignHorizontally(e) { + var t = e.display, n = t.view; + if (t.alignWidgets || (t.gutters.firstChild && e.options.fixedGutter)) { + for ( + var r = + compensateForHScroll(t) - + t.scroller.scrollLeft + + e.doc.scrollLeft, + i = t.gutters.offsetWidth, + o = r + 'px', + a = 0; + a < n.length; + a++ + ) + if (!n[a].hidden) { + e.options.fixedGutter && + (n[a].gutter && (n[a].gutter.style.left = o), n[a] + .gutterBackground && (n[a].gutterBackground.style.left = o)); + var s = n[a].alignable; + if (s) for (var l = 0; l < s.length; l++) s[l].style.left = o; + } + e.options.fixedGutter && (t.gutters.style.left = r + i + 'px'); + } + } + function maybeUpdateLineNumberWidth(e) { + if (!e.options.lineNumbers) return !1; + var t = e.doc, + n = lineNumberFor(e.options, t.first + t.size - 1), + r = e.display; + if (n.length != r.lineNumChars) { + var i = r.measure.appendChild( + elt( + 'div', + [elt('div', n)], + 'CodeMirror-linenumber CodeMirror-gutter-elt' + ) + ), + o = i.firstChild.offsetWidth, + a = i.offsetWidth - o; + return (r.lineGutter.style.width = ''), (r.lineNumInnerWidth = + Math.max(o, r.lineGutter.offsetWidth - a) + 1), (r.lineNumWidth = + r.lineNumInnerWidth + a), (r.lineNumChars = r.lineNumInnerWidth + ? n.length + : -1), (r.lineGutter.style.width = + r.lineNumWidth + 'px'), updateGutterSpace(e), !0; + } + return !1; + } + function maybeScrollWindow(e, t) { + if (!signalDOMEvent(e, 'scrollCursorIntoView')) { + var n = e.display, r = n.sizer.getBoundingClientRect(), i = null; + if ( + (t.top + r.top < 0 + ? (i = !0) + : t.bottom + r.top > + (window.innerHeight || + document.documentElement.clientHeight) && (i = !1), null != + i && !h) + ) { + var o = elt( + 'div', + '​', + null, + 'position: absolute;\n top: ' + + (t.top - n.viewOffset - paddingTop(e.display)) + + 'px;\n height: ' + + (t.bottom - t.top + scrollGap(e) + n.barHeight) + + 'px;\n left: ' + + t.left + + 'px; width: ' + + Math.max(2, t.right - t.left) + + 'px;' + ); + e.display.lineSpace.appendChild(o), o.scrollIntoView( + i + ), e.display.lineSpace.removeChild(o); + } + } + } + function scrollPosIntoView(e, t, n, r) { + null == r && (r = 0); + for (var i, o = 0; o < 5; o++) { + var a = !1, + s = cursorCoords(e, t), + l = n && n != t ? cursorCoords(e, n) : s; + i = { + left: Math.min(s.left, l.left), + top: Math.min(s.top, l.top) - r, + right: Math.max(s.left, l.left), + bottom: Math.max(s.bottom, l.bottom) + r + }; + var c = calculateScrollPos(e, i), + u = e.doc.scrollTop, + d = e.doc.scrollLeft; + if ( + (null != c.scrollTop && + (updateScrollTop(e, c.scrollTop), Math.abs(e.doc.scrollTop - u) > + 1 && (a = !0)), null != c.scrollLeft && + (setScrollLeft(e, c.scrollLeft), Math.abs(e.doc.scrollLeft - d) > + 1 && (a = !0)), !a) + ) + break; + } + return i; + } + function scrollIntoView(e, t) { + var n = calculateScrollPos(e, t); + null != n.scrollTop && + updateScrollTop( + e, + n.scrollTop + ), null != n.scrollLeft && setScrollLeft(e, n.scrollLeft); + } + function calculateScrollPos(e, t) { + var n = e.display, r = textHeight(e.display); + t.top < 0 && (t.top = 0); + var i = e.curOp && null != e.curOp.scrollTop + ? e.curOp.scrollTop + : n.scroller.scrollTop, + o = displayHeight(e), + a = {}; + t.bottom - t.top > o && (t.bottom = t.top + o); + var s = e.doc.height + paddingVert(n), + l = t.top < r, + c = t.bottom > s - r; + if (t.top < i) a.scrollTop = l ? 0 : t.top; + else if (t.bottom > i + o) { + var u = Math.min(t.top, (c ? s : t.bottom) - o); + u != i && (a.scrollTop = u); + } + var d = e.curOp && null != e.curOp.scrollLeft + ? e.curOp.scrollLeft + : n.scroller.scrollLeft, + p = + displayWidth(e) - + (e.options.fixedGutter ? n.gutters.offsetWidth : 0), + f = t.right - t.left > p; + return f && + (t.right = + t.left + + p), t.left < 10 ? (a.scrollLeft = 0) : t.left < d ? (a.scrollLeft = Math.max(0, t.left - (f ? 0 : 10))) : t.right > p + d - 3 && (a.scrollLeft = t.right + (f ? 0 : 10) - p), a; + } + function addToScrollTop(e, t) { + null != t && + (resolveScrollToPos(e), (e.curOp.scrollTop = + (null == e.curOp.scrollTop ? e.doc.scrollTop : e.curOp.scrollTop) + + t)); + } + function ensureCursorVisible(e) { + resolveScrollToPos(e); + var t = e.getCursor(), n = t, r = t; + e.options.lineWrapping || + ((n = t.ch ? Pos(t.line, t.ch - 1) : t), (r = Pos( + t.line, + t.ch + 1 + ))), (e.curOp.scrollToPos = { from: n, to: r, margin: e.options.cursorScrollMargin }); + } + function scrollToCoords(e, t, n) { + (null == t && null == n) || + resolveScrollToPos( + e + ), null != t && (e.curOp.scrollLeft = t), null != n && (e.curOp.scrollTop = n); + } + function scrollToRange(e, t) { + resolveScrollToPos(e), (e.curOp.scrollToPos = t); + } + function resolveScrollToPos(e) { + var t = e.curOp.scrollToPos; + if (t) { + e.curOp.scrollToPos = null; + scrollToCoordsRange( + e, + estimateCoords(e, t.from), + estimateCoords(e, t.to), + t.margin + ); + } + } + function scrollToCoordsRange(e, t, n, r) { + var i = calculateScrollPos(e, { + left: Math.min(t.left, n.left), + top: Math.min(t.top, n.top) - r, + right: Math.max(t.right, n.right), + bottom: Math.max(t.bottom, n.bottom) + r + }); + scrollToCoords(e, i.scrollLeft, i.scrollTop); + } + function updateScrollTop(e, t) { + Math.abs(e.doc.scrollTop - t) < 2 || + (n || updateDisplaySimple(e, { top: t }), setScrollTop(e, t, !0), n && + updateDisplaySimple(e), startWorker(e, 100)); + } + function setScrollTop(e, t, n) { + (t = Math.min( + e.display.scroller.scrollHeight - e.display.scroller.clientHeight, + t + )), (e.display.scroller.scrollTop != t || n) && ((e.doc.scrollTop = t), e.display.scrollbars.setScrollTop(t), e.display.scroller.scrollTop != t && (e.display.scroller.scrollTop = t)); + } + function setScrollLeft(e, t, n, r) { + (t = Math.min( + t, + e.display.scroller.scrollWidth - e.display.scroller.clientWidth + )), ((n ? t == e.doc.scrollLeft : Math.abs(e.doc.scrollLeft - t) < 2) && !r) || ((e.doc.scrollLeft = t), alignHorizontally(e), e.display.scroller.scrollLeft != t && (e.display.scroller.scrollLeft = t), e.display.scrollbars.setScrollLeft(t)); + } + function measureForScrollbars(e) { + var t = e.display, + n = t.gutters.offsetWidth, + r = Math.round(e.doc.height + paddingVert(e.display)); + return { + clientHeight: t.scroller.clientHeight, + viewHeight: t.wrapper.clientHeight, + scrollWidth: t.scroller.scrollWidth, + clientWidth: t.scroller.clientWidth, + viewWidth: t.wrapper.clientWidth, + barLeft: e.options.fixedGutter ? n : 0, + docHeight: r, + scrollHeight: r + scrollGap(e) + t.barHeight, + nativeBarWidth: t.nativeBarWidth, + gutterWidth: n + }; + } + function updateScrollbars(e, t) { + t || (t = measureForScrollbars(e)); + var n = e.display.barWidth, r = e.display.barHeight; + updateScrollbarsInner(e, t); + for ( + var i = 0; + (i < 4 && n != e.display.barWidth) || r != e.display.barHeight; + i++ + ) n != e.display.barWidth && e.options.lineWrapping && updateHeightsInViewport(e), updateScrollbarsInner(e, measureForScrollbars(e)), (n = e.display.barWidth), (r = e.display.barHeight); + } + function updateScrollbarsInner(e, t) { + var n = e.display, r = n.scrollbars.update(t); + (n.sizer.style.paddingRight = + (n.barWidth = r.right) + + 'px'), (n.sizer.style.paddingBottom = (n.barHeight = r.bottom) + 'px'), (n.heightForcer.style.borderBottom = r.bottom + 'px solid transparent'), r.right && r.bottom ? ((n.scrollbarFiller.style.display = 'block'), (n.scrollbarFiller.style.height = r.bottom + 'px'), (n.scrollbarFiller.style.width = r.right + 'px')) : (n.scrollbarFiller.style.display = ''), r.bottom && e.options.coverGutterNextToScrollbar && e.options.fixedGutter ? ((n.gutterFiller.style.display = 'block'), (n.gutterFiller.style.height = r.bottom + 'px'), (n.gutterFiller.style.width = t.gutterWidth + 'px')) : (n.gutterFiller.style.display = ''); + } + function initScrollbars(e) { + e.display.scrollbars && + (e.display.scrollbars.clear(), e.display.scrollbars.addClass && + L( + e.display.wrapper, + e.display.scrollbars.addClass + )), (e.display.scrollbars = new le[e.options.scrollbarStyle]( + function(t) { + e.display.wrapper.insertBefore( + t, + e.display.scrollbarFiller + ), G(t, 'mousedown', function() { + e.state.focused && + setTimeout(function() { + return e.display.input.focus(); + }, 0); + }), t.setAttribute('cm-not-content', 'true'); + }, + function(t, n) { + 'horizontal' == n ? setScrollLeft(e, t) : updateScrollTop(e, t); + }, + e + )), e.display.scrollbars.addClass && addClass(e.display.wrapper, e.display.scrollbars.addClass); + } + function startOperation(e) { + (e.curOp = { + cm: e, + viewChanged: !1, + startHeight: e.doc.height, + forceUpdate: !1, + updateInput: null, + typing: !1, + changeObjs: null, + cursorActivityHandlers: null, + cursorActivityCalled: 0, + selectionChanged: !1, + updateMaxLine: !1, + scrollLeft: null, + scrollTop: null, + scrollToPos: null, + focus: !1, + id: ++ce + }), pushOperation(e.curOp); + } + function endOperation(e) { + finishOperation(e.curOp, function(e) { + for (var t = 0; t < e.ops.length; t++) e.ops[t].cm.curOp = null; + endOperations(e); + }); + } + function endOperations(e) { + for (var t = e.ops, n = 0; n < t.length; n++) endOperation_R1(t[n]); + for (var r = 0; r < t.length; r++) endOperation_W1(t[r]); + for (var i = 0; i < t.length; i++) endOperation_R2(t[i]); + for (var o = 0; o < t.length; o++) endOperation_W2(t[o]); + for (var a = 0; a < t.length; a++) endOperation_finish(t[a]); + } + function endOperation_R1(e) { + var t = e.cm, n = t.display; + maybeClipScrollbars( + t + ), e.updateMaxLine && findMaxLine(t), (e.mustUpdate = e.viewChanged || e.forceUpdate || null != e.scrollTop || (e.scrollToPos && (e.scrollToPos.from.line < n.viewFrom || e.scrollToPos.to.line >= n.viewTo)) || (n.maxLineChanged && t.options.lineWrapping)), (e.update = e.mustUpdate && new ue(t, e.mustUpdate && { top: e.scrollTop, ensure: e.scrollToPos }, e.forceUpdate)); + } + function endOperation_W1(e) { + e.updatedDisplay = + e.mustUpdate && updateDisplayIfNeeded(e.cm, e.update); + } + function endOperation_R2(e) { + var t = e.cm, n = t.display; + e.updatedDisplay && + updateHeightsInViewport( + t + ), (e.barMeasure = measureForScrollbars(t)), n.maxLineChanged && !t.options.lineWrapping && ((e.adjustWidthTo = measureChar(t, n.maxLine, n.maxLine.text.length).left + 3), (t.display.sizerWidth = e.adjustWidthTo), (e.barMeasure.scrollWidth = Math.max(n.scroller.clientWidth, n.sizer.offsetLeft + e.adjustWidthTo + scrollGap(t) + t.display.barWidth)), (e.maxScrollLeft = Math.max(0, n.sizer.offsetLeft + e.adjustWidthTo - displayWidth(t)))), (e.updatedDisplay || e.selectionChanged) && (e.preparedSelection = n.input.prepareSelection(e.focus)); + } + function endOperation_W2(e) { + var t = e.cm; + null != e.adjustWidthTo && + ((t.display.sizer.style.minWidth = + e.adjustWidthTo + 'px'), e.maxScrollLeft < t.doc.scrollLeft && + setScrollLeft( + t, + Math.min(t.display.scroller.scrollLeft, e.maxScrollLeft), + !0 + ), (t.display.maxLineChanged = !1)); + var n = + e.focus && + e.focus == activeElt() && + (!document.hasFocus || document.hasFocus()); + e.preparedSelection && + t.display.input.showSelection( + e.preparedSelection, + n + ), (e.updatedDisplay || e.startHeight != t.doc.height) && updateScrollbars(t, e.barMeasure), e.updatedDisplay && setDocumentHeight(t, e.barMeasure), e.selectionChanged && restartBlink(t), t.state.focused && e.updateInput && t.display.input.reset(e.typing), n && ensureFocus(e.cm); + } + function endOperation_finish(e) { + var t = e.cm, n = t.display, r = t.doc; + if ( + (e.updatedDisplay && postUpdateDisplay(t, e.update), null == + n.wheelStartX || + (null == e.scrollTop && null == e.scrollLeft && !e.scrollToPos) || + (n.wheelStartX = n.wheelStartY = null), null != e.scrollTop && + setScrollTop(t, e.scrollTop, e.forceScroll), null != e.scrollLeft && + setScrollLeft(t, e.scrollLeft, !0, !0), e.scrollToPos) + ) { + maybeScrollWindow( + t, + scrollPosIntoView( + t, + clipPos(r, e.scrollToPos.from), + clipPos(r, e.scrollToPos.to), + e.scrollToPos.margin + ) + ); + } + var i = e.maybeHiddenMarkers, o = e.maybeUnhiddenMarkers; + if (i) + for (var a = 0; a < i.length; ++a) + i[a].lines.length || signal(i[a], 'hide'); + if (o) + for (var s = 0; s < o.length; ++s) + o[s].lines.length && signal(o[s], 'unhide'); + n.wrapper.offsetHeight && + (r.scrollTop = + t.display.scroller.scrollTop), e.changeObjs && signal(t, 'changes', t, e.changeObjs), e.update && e.update.finish(); + } + function runInOp(e, t) { + if (e.curOp) return t(); + startOperation(e); + try { + return t(); + } finally { + endOperation(e); + } + } + function operation(e, t) { + return function() { + if (e.curOp) return t.apply(e, arguments); + startOperation(e); + try { + return t.apply(e, arguments); + } finally { + endOperation(e); + } + }; + } + function methodOp(e) { + return function() { + if (this.curOp) return e.apply(this, arguments); + startOperation(this); + try { + return e.apply(this, arguments); + } finally { + endOperation(this); + } + }; + } + function docMethodOp(e) { + return function() { + var t = this.cm; + if (!t || t.curOp) return e.apply(this, arguments); + startOperation(t); + try { + return e.apply(this, arguments); + } finally { + endOperation(t); + } + }; + } + function regChange(e, t, n, r) { + null == t && + (t = + e.doc + .first), null == n && (n = e.doc.first + e.doc.size), r || (r = 0); + var i = e.display; + if ( + (r && + n < i.viewTo && + (null == i.updateLineNumbers || i.updateLineNumbers > t) && + (i.updateLineNumbers = t), (e.curOp.viewChanged = !0), t >= + i.viewTo) + ) + z && visualLineNo(e.doc, t) < i.viewTo && resetView(e); + else if (n <= i.viewFrom) + z && visualLineEndNo(e.doc, n + r) > i.viewFrom + ? resetView(e) + : ((i.viewFrom += r), (i.viewTo += r)); + else if (t <= i.viewFrom && n >= i.viewTo) resetView(e); + else if (t <= i.viewFrom) { + var o = viewCuttingPoint(e, n, n + r, 1); + o + ? ((i.view = i.view.slice(o.index)), (i.viewFrom = + o.lineN), (i.viewTo += r)) + : resetView(e); + } else if (n >= i.viewTo) { + var a = viewCuttingPoint(e, t, t, -1); + a + ? ((i.view = i.view.slice(0, a.index)), (i.viewTo = a.lineN)) + : resetView(e); + } else { + var s = viewCuttingPoint(e, t, t, -1), + l = viewCuttingPoint(e, n, n + r, 1); + s && l + ? ((i.view = i.view + .slice(0, s.index) + .concat(buildViewArray(e, s.lineN, l.lineN)) + .concat(i.view.slice(l.index))), (i.viewTo += r)) + : resetView(e); + } + var c = i.externalMeasured; + c && + (n < c.lineN + ? (c.lineN += r) + : t < c.lineN + c.size && (i.externalMeasured = null)); + } + function regLineChange(e, t, n) { + e.curOp.viewChanged = !0; + var r = e.display, i = e.display.externalMeasured; + if ( + (i && + t >= i.lineN && + t < i.lineN + i.size && + (r.externalMeasured = null), !(t < r.viewFrom || t >= r.viewTo)) + ) { + var o = r.view[findViewIndex(e, t)]; + if (null != o.node) { + var a = o.changes || (o.changes = []); + -1 == indexOf(a, n) && a.push(n); + } + } + } + function resetView(e) { + (e.display.viewFrom = e.display.viewTo = + e.doc.first), (e.display.view = []), (e.display.viewOffset = 0); + } + function viewCuttingPoint(e, t, n, r) { + var i, o = findViewIndex(e, t), a = e.display.view; + if (!z || n == e.doc.first + e.doc.size) return { index: o, lineN: n }; + for (var s = e.display.viewFrom, l = 0; l < o; l++) s += a[l].size; + if (s != t) { + if (r > 0) { + if (o == a.length - 1) return null; + (i = s + a[o].size - t), o++; + } else i = s - t; + (t += i), (n += i); + } + for (; visualLineNo(e.doc, n) != n; ) { + if (o == (r < 0 ? 0 : a.length - 1)) return null; + (n += r * a[o - (r < 0 ? 1 : 0)].size), (o += r); + } + return { index: o, lineN: n }; + } + function adjustView(e, t, n) { + var r = e.display; + 0 == r.view.length || t >= r.viewTo || n <= r.viewFrom + ? ((r.view = buildViewArray(e, t, n)), (r.viewFrom = t)) + : (r.viewFrom > t + ? (r.view = buildViewArray(e, t, r.viewFrom).concat(r.view)) + : r.viewFrom < t && + (r.view = r.view.slice( + findViewIndex(e, t) + )), (r.viewFrom = t), r.viewTo < n + ? (r.view = r.view.concat(buildViewArray(e, r.viewTo, n))) + : r.viewTo > n && + (r.view = r.view.slice( + 0, + findViewIndex(e, n) + ))), (r.viewTo = n); + } + function countDirtyView(e) { + for (var t = e.display.view, n = 0, r = 0; r < t.length; r++) { + var i = t[r]; + i.hidden || (i.node && !i.changes) || ++n; + } + return n; + } + function startWorker(e, t) { + e.doc.mode.startState && + e.doc.frontier < e.display.viewTo && + e.state.highlight.set(t, bind(highlightWorker, e)); + } + function highlightWorker(e) { + var t = e.doc; + if ( + (t.frontier < t.first && (t.frontier = t.first), !(t.frontier >= + e.display.viewTo)) + ) { + var n = +new Date() + e.options.workTime, + r = copyState(t.mode, getStateBefore(e, t.frontier)), + i = []; + t.iter( + t.frontier, + Math.min(t.first + t.size, e.display.viewTo + 500), + function(o) { + if (t.frontier >= e.display.viewFrom) { + var a = o.styles, + s = o.text.length > e.options.maxHighlightLength, + l = highlightLine(e, o, s ? copyState(t.mode, r) : r, !0); + o.styles = l.styles; + var c = o.styleClasses, u = l.classes; + u ? (o.styleClasses = u) : c && (o.styleClasses = null); + for ( + var d = + !a || + a.length != o.styles.length || + (c != u && + (!c || + !u || + c.bgClass != u.bgClass || + c.textClass != u.textClass)), + p = 0; + !d && p < a.length; + ++p + ) + d = a[p] != o.styles[p]; + d && i.push(t.frontier), (o.stateAfter = s + ? r + : copyState(t.mode, r)); + } else + o.text.length <= e.options.maxHighlightLength && + processLine(e, o.text, r), (o.stateAfter = t.frontier % 5 == 0 + ? copyState(t.mode, r) + : null); + if ((++t.frontier, +new Date() > n)) + return startWorker(e, e.options.workDelay), !0; + } + ), i.length && + runInOp(e, function() { + for (var t = 0; t < i.length; t++) regLineChange(e, i[t], 'text'); + }); + } + } + function maybeClipScrollbars(e) { + var t = e.display; + !t.scrollbarsClipped && + t.scroller.offsetWidth && + ((t.nativeBarWidth = + t.scroller.offsetWidth - + t.scroller.clientWidth), (t.heightForcer.style.height = + scrollGap(e) + 'px'), (t.sizer.style.marginBottom = + -t.nativeBarWidth + 'px'), (t.sizer.style.borderRightWidth = + scrollGap(e) + 'px'), (t.scrollbarsClipped = !0)); + } + function selectionSnapshot(e) { + if (e.hasFocus()) return null; + var t = activeElt(); + if (!t || !contains(e.display.lineDiv, t)) return null; + var n = { activeElt: t }; + if (window.getSelection) { + var r = window.getSelection(); + r.anchorNode && + r.extend && + contains(e.display.lineDiv, r.anchorNode) && + ((n.anchorNode = r.anchorNode), (n.anchorOffset = + r.anchorOffset), (n.focusNode = r.focusNode), (n.focusOffset = + r.focusOffset)); + } + return n; + } + function restoreSelection(e) { + if ( + e && + e.activeElt && + e.activeElt != activeElt() && + (e.activeElt.focus(), e.anchorNode && + contains(document.body, e.anchorNode) && + contains(document.body, e.focusNode)) + ) { + var t = window.getSelection(), n = document.createRange(); + n.setEnd(e.anchorNode, e.anchorOffset), n.collapse( + !1 + ), t.removeAllRanges(), t.addRange(n), t.extend( + e.focusNode, + e.focusOffset + ); + } + } + function updateDisplayIfNeeded(e, t) { + var n = e.display, r = e.doc; + if (t.editorIsHidden) return resetView(e), !1; + if ( + !t.force && + t.visible.from >= n.viewFrom && + t.visible.to <= n.viewTo && + (null == n.updateLineNumbers || n.updateLineNumbers >= n.viewTo) && + n.renderedView == n.view && + 0 == countDirtyView(e) + ) + return !1; + maybeUpdateLineNumberWidth(e) && + (resetView(e), (t.dims = getDimensions(e))); + var i = r.first + r.size, + o = Math.max(t.visible.from - e.options.viewportMargin, r.first), + a = Math.min(i, t.visible.to + e.options.viewportMargin); + n.viewFrom < o && + o - n.viewFrom < 20 && + (o = Math.max( + r.first, + n.viewFrom + )), n.viewTo > a && n.viewTo - a < 20 && (a = Math.min(i, n.viewTo)), z && ((o = visualLineNo(e.doc, o)), (a = visualLineEndNo(e.doc, a))); + var s = + o != n.viewFrom || + a != n.viewTo || + n.lastWrapHeight != t.wrapperHeight || + n.lastWrapWidth != t.wrapperWidth; + adjustView( + e, + o, + a + ), (n.viewOffset = heightAtLine(getLine(e.doc, n.viewFrom))), (e.display.mover.style.top = n.viewOffset + 'px'); + var l = countDirtyView(e); + if ( + !s && + 0 == l && + !t.force && + n.renderedView == n.view && + (null == n.updateLineNumbers || n.updateLineNumbers >= n.viewTo) + ) + return !1; + var c = selectionSnapshot(e); + return l > 4 && + (n.lineDiv.style.display = + 'none'), patchDisplay(e, n.updateLineNumbers, t.dims), l > 4 && (n.lineDiv.style.display = ''), (n.renderedView = n.view), restoreSelection(c), removeChildren(n.cursorDiv), removeChildren(n.selectionDiv), (n.gutters.style.height = n.sizer.style.minHeight = 0), s && ((n.lastWrapHeight = t.wrapperHeight), (n.lastWrapWidth = t.wrapperWidth), startWorker(e, 400)), (n.updateLineNumbers = null), !0; + } + function postUpdateDisplay(e, t) { + for ( + var n = t.viewport, r = !0; + ((r && + e.options.lineWrapping && + t.oldDisplayWidth != displayWidth(e)) || + (n && + null != n.top && + (n = { + top: Math.min( + e.doc.height + paddingVert(e.display) - displayHeight(e), + n.top + ) + }), (t.visible = visibleLines(e.display, e.doc, n)), !(t.visible + .from >= e.display.viewFrom && + t.visible.to <= e.display.viewTo))) && + updateDisplayIfNeeded(e, t); + r = !1 + ) { + updateHeightsInViewport(e); + var i = measureForScrollbars(e); + updateSelection(e), updateScrollbars(e, i), setDocumentHeight(e, i); + } + t.signal( + e, + 'update', + e + ), (e.display.viewFrom == e.display.reportedViewFrom && e.display.viewTo == e.display.reportedViewTo) || (t.signal(e, 'viewportChange', e, e.display.viewFrom, e.display.viewTo), (e.display.reportedViewFrom = e.display.viewFrom), (e.display.reportedViewTo = e.display.viewTo)); + } + function updateDisplaySimple(e, t) { + var n = new ue(e, t); + if (updateDisplayIfNeeded(e, n)) { + updateHeightsInViewport(e), postUpdateDisplay(e, n); + var r = measureForScrollbars(e); + updateSelection(e), updateScrollbars(e, r), setDocumentHeight( + e, + r + ), n.finish(); + } + } + function patchDisplay(e, t, n) { + function rm(t) { + var n = t.nextSibling; + return l && y && e.display.currentWheelTarget == t + ? (t.style.display = 'none') + : t.parentNode.removeChild(t), n; + } + for ( + var r = e.display, + i = e.options.lineNumbers, + o = r.lineDiv, + a = o.firstChild, + s = r.view, + c = r.viewFrom, + u = 0; + u < s.length; + u++ + ) { + var d = s[u]; + if (d.hidden); + else if (d.node && d.node.parentNode == o) { + for (; a != d.node; ) + a = rm(a); + var p = i && null != t && t <= c && d.lineNumber; + d.changes && + (indexOf(d.changes, 'gutter') > -1 && + (p = !1), updateLineForChanges(e, d, c, n)), p && + (removeChildren(d.lineNumber), d.lineNumber.appendChild( + document.createTextNode(lineNumberFor(e.options, c)) + )), (a = d.node.nextSibling); + } else { + var f = buildLineElement(e, d, c, n); + o.insertBefore(f, a); + } + c += d.size; + } + for (; a; ) a = rm(a); + } + function updateGutterSpace(e) { + var t = e.display.gutters.offsetWidth; + e.display.sizer.style.marginLeft = t + 'px'; + } + function setDocumentHeight(e, t) { + (e.display.sizer.style.minHeight = + t.docHeight + + 'px'), (e.display.heightForcer.style.top = t.docHeight + 'px'), (e.display.gutters.style.height = t.docHeight + e.display.barHeight + scrollGap(e) + 'px'); + } + function updateGutters(e) { + var t = e.display.gutters, n = e.options.gutters; + removeChildren(t); + for (var r = 0; r < n.length; ++r) { + var i = n[r], + o = t.appendChild(elt('div', null, 'CodeMirror-gutter ' + i)); + 'CodeMirror-linenumbers' == i && + ((e.display.lineGutter = o), (o.style.width = + (e.display.lineNumWidth || 1) + 'px')); + } + (t.style.display = r ? '' : 'none'), updateGutterSpace(e); + } + function setGuttersForLineNumbers(e) { + var t = indexOf(e.gutters, 'CodeMirror-linenumbers'); + -1 == t && e.lineNumbers + ? (e.gutters = e.gutters.concat(['CodeMirror-linenumbers'])) + : t > -1 && + !e.lineNumbers && + ((e.gutters = e.gutters.slice(0)), e.gutters.splice(t, 1)); + } + function wheelEventDelta(e) { + var t = e.wheelDeltaX, n = e.wheelDeltaY; + return null == t && + e.detail && + e.axis == e.HORIZONTAL_AXIS && + (t = + e.detail), null == n && e.detail && e.axis == e.VERTICAL_AXIS ? (n = e.detail) : null == n && (n = e.wheelDelta), { x: t, y: n }; + } + function wheelEventPixels(e) { + var t = wheelEventDelta(e); + return (t.x *= pe), (t.y *= pe), t; + } + function onScrollWheel(e, t) { + var r = wheelEventDelta(t), + i = r.x, + o = r.y, + a = e.display, + s = a.scroller, + c = s.scrollWidth > s.clientWidth, + u = s.scrollHeight > s.clientHeight; + if ((i && c) || (o && u)) { + if (o && y && l) + e: for (var p = t.target, f = a.view; p != s; p = p.parentNode) + for (var h = 0; h < f.length; h++) + if (f[h].node == p) { + e.display.currentWheelTarget = p; + break e; + } + if (i && !n && !d && null != pe) + return o && + u && + updateScrollTop( + e, + Math.max(0, s.scrollTop + o * pe) + ), setScrollLeft(e, Math.max(0, s.scrollLeft + i * pe)), (!o || + (o && u)) && + e_preventDefault(t), void (a.wheelStartX = null); + if (o && null != pe) { + var g = o * pe, m = e.doc.scrollTop, v = m + a.wrapper.clientHeight; + g < 0 + ? (m = Math.max(0, m + g - 50)) + : (v = Math.min( + e.doc.height, + v + g + 50 + )), updateDisplaySimple(e, { top: m, bottom: v }); + } + de < 20 && + (null == a.wheelStartX + ? ((a.wheelStartX = s.scrollLeft), (a.wheelStartY = + s.scrollTop), (a.wheelDX = i), (a.wheelDY = o), setTimeout( + function() { + if (null != a.wheelStartX) { + var e = s.scrollLeft - a.wheelStartX, + t = s.scrollTop - a.wheelStartY, + n = + (t && a.wheelDY && t / a.wheelDY) || + (e && a.wheelDX && e / a.wheelDX); + (a.wheelStartX = a.wheelStartY = null), n && + ((pe = (pe * de + n) / (de + 1)), ++de); + } + }, + 200 + )) + : ((a.wheelDX += i), (a.wheelDY += o))); + } + } + function normalizeSelection(e, t) { + var n = e[t]; + e.sort(function(e, t) { + return cmp(e.from(), t.from()); + }), (t = indexOf(e, n)); + for (var r = 1; r < e.length; r++) { + var i = e[r], o = e[r - 1]; + if (cmp(o.to(), i.from()) >= 0) { + var a = minPos(o.from(), i.from()), + s = maxPos(o.to(), i.to()), + l = o.empty() ? i.from() == i.head : o.from() == o.head; + r <= t && --t, e.splice(--r, 2, new he(l ? s : a, l ? a : s)); + } + } + return new fe(e, t); + } + function simpleSelection(e, t) { + return new fe([new he(e, t || e)], 0); + } + function changeEnd(e) { + return e.text + ? Pos( + e.from.line + e.text.length - 1, + lst(e.text).length + (1 == e.text.length ? e.from.ch : 0) + ) + : e.to; + } + function adjustForChange(e, t) { + if (cmp(e, t.from) < 0) return e; + if (cmp(e, t.to) <= 0) return changeEnd(t); + var n = e.line + t.text.length - (t.to.line - t.from.line) - 1, + r = e.ch; + return e.line == t.to.line && + (r += changeEnd(t).ch - t.to.ch), Pos(n, r); + } + function computeSelAfterChange(e, t) { + for (var n = [], r = 0; r < e.sel.ranges.length; r++) { + var i = e.sel.ranges[r]; + n.push( + new he(adjustForChange(i.anchor, t), adjustForChange(i.head, t)) + ); + } + return normalizeSelection(n, e.sel.primIndex); + } + function offsetPos(e, t, n) { + return e.line == t.line + ? Pos(n.line, e.ch - t.ch + n.ch) + : Pos(n.line + (e.line - t.line), e.ch); + } + function computeReplacedSel(e, t, n) { + for (var r = [], i = Pos(e.first, 0), o = i, a = 0; a < t.length; a++) { + var s = t[a], + l = offsetPos(s.from, i, o), + c = offsetPos(changeEnd(s), i, o); + if (((i = s.to), (o = c), 'around' == n)) { + var u = e.sel.ranges[a], d = cmp(u.head, u.anchor) < 0; + r[a] = new he(d ? c : l, d ? l : c); + } else r[a] = new he(l, l); + } + return new fe(r, e.sel.primIndex); + } + function loadMode(e) { + (e.doc.mode = getMode(e.options, e.doc.modeOption)), resetModeState(e); + } + function resetModeState(e) { + e.doc.iter(function(e) { + e.stateAfter && (e.stateAfter = null), e.styles && (e.styles = null); + }), (e.doc.frontier = + e.doc.first), startWorker(e, 100), e.state.modeGen++, e.curOp && regChange(e); + } + function isWholeLineUpdate(e, t) { + return ( + 0 == t.from.ch && + 0 == t.to.ch && + '' == lst(t.text) && + (!e.cm || e.cm.options.wholeLineUpdateBefore) + ); + } + function updateDoc(e, t, n, r) { + function spansFor(e) { + return n ? n[e] : null; + } + function update(e, n, i) { + updateLine(e, n, i, r), signalLater(e, 'change', e, t); + } + function linesFor(e, t) { + for ( + var n = [], i = e; + i < t; + ++i + ) n.push(new Q(a[i], spansFor(i), r)); + return n; + } + var i = t.from, + o = t.to, + a = t.text, + s = getLine(e, i.line), + l = getLine(e, o.line), + c = lst(a), + u = spansFor(a.length - 1), + d = o.line - i.line; + if (t.full) + e.insert(0, linesFor(0, a.length)), e.remove( + a.length, + e.size - a.length + ); + else if (isWholeLineUpdate(e, t)) { + var p = linesFor(0, a.length - 1); + update(l, l.text, u), d && e.remove(i.line, d), p.length && + e.insert(i.line, p); + } else if (s == l) + if (1 == a.length) + update(s, s.text.slice(0, i.ch) + c + s.text.slice(o.ch), u); + else { + var f = linesFor(1, a.length - 1); + f.push(new Q(c + s.text.slice(o.ch), u, r)), update( + s, + s.text.slice(0, i.ch) + a[0], + spansFor(0) + ), e.insert(i.line + 1, f); + } + else if (1 == a.length) + update( + s, + s.text.slice(0, i.ch) + a[0] + l.text.slice(o.ch), + spansFor(0) + ), e.remove(i.line + 1, d); + else { + update(s, s.text.slice(0, i.ch) + a[0], spansFor(0)), update( + l, + c + l.text.slice(o.ch), + u + ); + var h = linesFor(1, a.length - 1); + d > 1 && e.remove(i.line + 1, d - 1), e.insert(i.line + 1, h); + } + signalLater(e, 'change', e, t); + } + function linkedDocs(e, t, n) { + function propagate(e, r, i) { + if (e.linked) + for (var o = 0; o < e.linked.length; ++o) { + var a = e.linked[o]; + if (a.doc != r) { + var s = i && a.sharedHist; + (n && !s) || (t(a.doc, s), propagate(a.doc, e, s)); + } + } + } + propagate(e, null, !0); + } + function attachDoc(e, t) { + if (t.cm) throw new Error('This document is already in use.'); + (e.doc = t), (t.cm = e), estimateLineHeights(e), loadMode(e), setDirectionClass(e), e.options.lineWrapping || findMaxLine(e), (e.options.mode = t.modeOption), regChange(e); + } + function setDirectionClass(e) { + ('rtl' == e.doc.direction + ? addClass + : L)(e.display.lineDiv, 'CodeMirror-rtl'); + } + function directionChanged(e) { + runInOp(e, function() { + setDirectionClass(e), regChange(e); + }); + } + function History(e) { + (this.done = []), (this.undone = []), (this.undoDepth = 1 / 0), (this.lastModTime = this.lastSelTime = 0), (this.lastOp = this.lastSelOp = null), (this.lastOrigin = this.lastSelOrigin = null), (this.generation = this.maxGeneration = e || 1); + } + function historyChangeFromChange(e, t) { + var n = { + from: copyPos(t.from), + to: changeEnd(t), + text: getBetween(e, t.from, t.to) + }; + return attachLocalSpans(e, n, t.from.line, t.to.line + 1), linkedDocs( + e, + function(e) { + return attachLocalSpans(e, n, t.from.line, t.to.line + 1); + }, + !0 + ), n; + } + function clearSelectionEvents(e) { + for (; e.length; ) { + if (!lst(e).ranges) break; + e.pop(); + } + } + function lastChangeEvent(e, t) { + return t + ? (clearSelectionEvents(e.done), lst(e.done)) + : e.done.length && !lst(e.done).ranges + ? lst(e.done) + : e.done.length > 1 && !e.done[e.done.length - 2].ranges + ? (e.done.pop(), lst(e.done)) + : void 0; + } + function addChangeToHistory(e, t, n, r) { + var i = e.history; + i.undone.length = 0; + var o, a, s = +new Date(); + if ( + (i.lastOp == r || + (i.lastOrigin == t.origin && + t.origin && + (('+' == t.origin.charAt(0) && + e.cm && + i.lastModTime > s - e.cm.options.historyEventDelay) || + '*' == t.origin.charAt(0)))) && + (o = lastChangeEvent(i, i.lastOp == r)) + ) + (a = lst(o.changes)), 0 == cmp(t.from, t.to) && 0 == cmp(t.from, a.to) + ? (a.to = changeEnd(t)) + : o.changes.push(historyChangeFromChange(e, t)); + else { + var l = lst(i.done); + for ( + (l && l.ranges) || pushSelectionToHistory(e.sel, i.done), (o = { + changes: [historyChangeFromChange(e, t)], + generation: i.generation + }), i.done.push(o); + i.done.length > i.undoDepth; + + ) + i.done.shift(), i.done[0].ranges || i.done.shift(); + } + i.done.push( + n + ), (i.generation = ++i.maxGeneration), (i.lastModTime = i.lastSelTime = s), (i.lastOp = i.lastSelOp = r), (i.lastOrigin = i.lastSelOrigin = t.origin), a || signal(e, 'historyAdded'); + } + function selectionEventCanBeMerged(e, t, n, r) { + var i = t.charAt(0); + return ( + '*' == i || + ('+' == i && + n.ranges.length == r.ranges.length && + n.somethingSelected() == r.somethingSelected() && + new Date() - e.history.lastSelTime <= + (e.cm ? e.cm.options.historyEventDelay : 500)) + ); + } + function addSelectionToHistory(e, t, n, r) { + var i = e.history, o = r && r.origin; + n == i.lastSelOp || + (o && + i.lastSelOrigin == o && + ((i.lastModTime == i.lastSelTime && i.lastOrigin == o) || + selectionEventCanBeMerged(e, o, lst(i.done), t))) + ? (i.done[i.done.length - 1] = t) + : pushSelectionToHistory( + t, + i.done + ), (i.lastSelTime = +new Date()), (i.lastSelOrigin = o), (i.lastSelOp = n), r && !1 !== r.clearRedo && clearSelectionEvents(i.undone); + } + function pushSelectionToHistory(e, t) { + var n = lst(t); + (n && n.ranges && n.equals(e)) || t.push(e); + } + function attachLocalSpans(e, t, n, r) { + var i = t['spans_' + e.id], o = 0; + e.iter(Math.max(e.first, n), Math.min(e.first + e.size, r), function( + n + ) { + n.markedSpans && + ((i || (i = t['spans_' + e.id] = {}))[o] = n.markedSpans), ++o; + }); + } + function removeClearedSpans(e) { + if (!e) return null; + for ( + var t, n = 0; + n < e.length; + ++n + ) e[n].marker.explicitlyCleared ? t || (t = e.slice(0, n)) : t && t.push(e[n]); + return t ? (t.length ? t : null) : e; + } + function getOldSpans(e, t) { + var n = t['spans_' + e.id]; + if (!n) return null; + for ( + var r = [], i = 0; + i < t.text.length; + ++i + ) r.push(removeClearedSpans(n[i])); + return r; + } + function mergeOldSpans(e, t) { + var n = getOldSpans(e, t), r = stretchSpansOverChange(e, t); + if (!n) return r; + if (!r) return n; + for (var i = 0; i < n.length; ++i) { + var o = n[i], a = r[i]; + if (o && a) + e: for (var s = 0; s < a.length; ++s) { + for (var l = a[s], c = 0; c < o.length; ++c) + if (o[c].marker == l.marker) continue e; + o.push(l); + } + else a && (n[i] = a); + } + return n; + } + function copyHistoryArray(e, t, n) { + for (var r = [], i = 0; i < e.length; ++i) { + var o = e[i]; + if (o.ranges) r.push(n ? fe.prototype.deepCopy.call(o) : o); + else { + var a = o.changes, s = []; + r.push({ changes: s }); + for (var l = 0; l < a.length; ++l) { + var c = a[l], u = void 0; + if ((s.push({ from: c.from, to: c.to, text: c.text }), t)) + for (var d in c) + (u = d.match(/^spans_(\d+)$/)) && + indexOf(t, Number(u[1])) > -1 && + ((lst(s)[d] = c[d]), delete c[d]); + } + } + } + return r; + } + function extendRange(e, t, n, r) { + if ((e.cm && e.cm.display.shift) || e.extend) { + var i = t.anchor; + if (r) { + var o = cmp(n, i) < 0; + o != cmp(r, i) < 0 + ? ((i = n), (n = r)) + : o != cmp(n, r) < 0 && (n = r); + } + return new he(i, n); + } + return new he(r || n, n); + } + function extendSelection(e, t, n, r) { + setSelection(e, new fe([extendRange(e, e.sel.primary(), t, n)], 0), r); + } + function extendSelections(e, t, n) { + for ( + var r = [], i = 0; + i < e.sel.ranges.length; + i++ + ) r[i] = extendRange(e, e.sel.ranges[i], t[i], null); + setSelection(e, normalizeSelection(r, e.sel.primIndex), n); + } + function replaceOneSelection(e, t, n, r) { + var i = e.sel.ranges.slice(0); + (i[t] = n), setSelection(e, normalizeSelection(i, e.sel.primIndex), r); + } + function setSimpleSelection(e, t, n, r) { + setSelection(e, simpleSelection(t, n), r); + } + function filterSelectionChange(e, t, n) { + var r = { + ranges: t.ranges, + update: function(t) { + var n = this; + this.ranges = []; + for (var r = 0; r < t.length; r++) + n.ranges[r] = new he( + clipPos(e, t[r].anchor), + clipPos(e, t[r].head) + ); + }, + origin: n && n.origin + }; + return signal( + e, + 'beforeSelectionChange', + e, + r + ), e.cm && signal(e.cm, 'beforeSelectionChange', e.cm, r), r.ranges != t.ranges ? normalizeSelection(r.ranges, r.ranges.length - 1) : t; + } + function setSelectionReplaceHistory(e, t, n) { + var r = e.history.done, i = lst(r); + i && i.ranges + ? ((r[r.length - 1] = t), setSelectionNoUndo(e, t, n)) + : setSelection(e, t, n); + } + function setSelection(e, t, n) { + setSelectionNoUndo( + e, + t, + n + ), addSelectionToHistory(e, e.sel, e.cm ? e.cm.curOp.id : NaN, n); + } + function setSelectionNoUndo(e, t, n) { + (hasHandler(e, 'beforeSelectionChange') || + (e.cm && hasHandler(e.cm, 'beforeSelectionChange'))) && + (t = filterSelectionChange( + e, + t, + n + )), setSelectionInner(e, skipAtomicInSelection(e, t, (n && n.bias) || (cmp(t.primary().head, e.sel.primary().head) < 0 ? -1 : 1), !0)), (n && !1 === n.scroll) || !e.cm || ensureCursorVisible(e.cm); + } + function setSelectionInner(e, t) { + t.equals(e.sel) || + ((e.sel = t), e.cm && + ((e.cm.curOp.updateInput = e.cm.curOp.selectionChanged = !0), signalCursorActivity( + e.cm + )), signalLater(e, 'cursorActivity', e)); + } + function reCheckSelection(e) { + setSelectionInner(e, skipAtomicInSelection(e, e.sel, null, !1)); + } + function skipAtomicInSelection(e, t, n, r) { + for (var i, o = 0; o < t.ranges.length; o++) { + var a = t.ranges[o], + s = t.ranges.length == e.sel.ranges.length && e.sel.ranges[o], + l = skipAtomic(e, a.anchor, s && s.anchor, n, r), + c = skipAtomic(e, a.head, s && s.head, n, r); + (i || l != a.anchor || c != a.head) && + (i || (i = t.ranges.slice(0, o)), (i[o] = new he(l, c))); + } + return i ? normalizeSelection(i, t.primIndex) : t; + } + function skipAtomicInner(e, t, n, r, i) { + var o = getLine(e, t.line); + if (o.markedSpans) + for (var a = 0; a < o.markedSpans.length; ++a) { + var s = o.markedSpans[a], l = s.marker; + if ( + (null == s.from || + (l.inclusiveLeft ? s.from <= t.ch : s.from < t.ch)) && + (null == s.to || (l.inclusiveRight ? s.to >= t.ch : s.to > t.ch)) + ) { + if (i && (signal(l, 'beforeCursorEnter'), l.explicitlyCleared)) { + if (o.markedSpans) { + --a; + continue; + } + break; + } + if (!l.atomic) continue; + if (n) { + var c = l.find(r < 0 ? 1 : -1), u = void 0; + if ( + ((r < 0 ? l.inclusiveRight : l.inclusiveLeft) && + (c = movePos( + e, + c, + -r, + c && c.line == t.line ? o : null + )), c && + c.line == t.line && + (u = cmp(c, n)) && + (r < 0 ? u < 0 : u > 0)) + ) + return skipAtomicInner(e, c, t, r, i); + } + var d = l.find(r < 0 ? -1 : 1); + return (r < 0 ? l.inclusiveLeft : l.inclusiveRight) && + (d = movePos(e, d, r, d.line == t.line ? o : null)), d + ? skipAtomicInner(e, d, t, r, i) + : null; + } + } + return t; + } + function skipAtomic(e, t, n, r, i) { + var o = r || 1, + a = + skipAtomicInner(e, t, n, o, i) || + (!i && skipAtomicInner(e, t, n, o, !0)) || + skipAtomicInner(e, t, n, -o, i) || + (!i && skipAtomicInner(e, t, n, -o, !0)); + return a || ((e.cantEdit = !0), Pos(e.first, 0)); + } + function movePos(e, t, n, r) { + return n < 0 && 0 == t.ch + ? t.line > e.first ? clipPos(e, Pos(t.line - 1)) : null + : n > 0 && t.ch == (r || getLine(e, t.line)).text.length + ? t.line < e.first + e.size - 1 ? Pos(t.line + 1, 0) : null + : new Pos(t.line, t.ch + n); + } + function selectAll(e) { + e.setSelection(Pos(e.firstLine(), 0), Pos(e.lastLine()), D); + } + function filterChange(e, t, n) { + var r = { + canceled: !1, + from: t.from, + to: t.to, + text: t.text, + origin: t.origin, + cancel: function() { + return (r.canceled = !0); + } + }; + return n && + (r.update = function(t, n, i, o) { + t && (r.from = clipPos(e, t)), n && (r.to = clipPos(e, n)), i && + (r.text = i), void 0 !== o && (r.origin = o); + }), signal(e, 'beforeChange', e, r), e.cm && signal(e.cm, 'beforeChange', e.cm, r), r.canceled ? null : { from: r.from, to: r.to, text: r.text, origin: r.origin }; + } + function makeChange(e, t, n) { + if (e.cm) { + if (!e.cm.curOp) return operation(e.cm, makeChange)(e, t, n); + if (e.cm.state.suppressEdits) return; + } + if ( + !(hasHandler(e, 'beforeChange') || + (e.cm && hasHandler(e.cm, 'beforeChange'))) || + (t = filterChange(e, t, !0)) + ) { + var r = B && !n && removeReadOnlyRanges(e, t.from, t.to); + if (r) + for (var i = r.length - 1; i >= 0; --i) + makeChangeInner(e, { + from: r[i].from, + to: r[i].to, + text: i ? [''] : t.text + }); + else makeChangeInner(e, t); + } + } + function makeChangeInner(e, t) { + if (1 != t.text.length || '' != t.text[0] || 0 != cmp(t.from, t.to)) { + var n = computeSelAfterChange(e, t); + addChangeToHistory( + e, + t, + n, + e.cm ? e.cm.curOp.id : NaN + ), makeChangeSingleDoc(e, t, n, stretchSpansOverChange(e, t)); + var r = []; + linkedDocs(e, function(e, n) { + n || + -1 != indexOf(r, e.history) || + (rebaseHist(e.history, t), r.push( + e.history + )), makeChangeSingleDoc(e, t, null, stretchSpansOverChange(e, t)); + }); + } + } + function makeChangeFromHistory(e, t, n) { + if (!e.cm || !e.cm.state.suppressEdits || n) { + for ( + var r, + i = e.history, + o = e.sel, + a = 'undo' == t ? i.done : i.undone, + s = 'undo' == t ? i.undone : i.done, + l = 0; + l < a.length && + ((r = a[l]), n ? !r.ranges || r.equals(e.sel) : r.ranges); + l++ + ); + if (l != a.length) { + for ( + i.lastOrigin = i.lastSelOrigin = null; + (r = a.pop()), r.ranges; + + ) { + if ((pushSelectionToHistory(r, s), n && !r.equals(e.sel))) + return void setSelection(e, r, { clearRedo: !1 }); + o = r; + } + var c = []; + pushSelectionToHistory(o, s), s.push({ + changes: c, + generation: i.generation + }), (i.generation = r.generation || ++i.maxGeneration); + for ( + var u = + hasHandler(e, 'beforeChange') || + (e.cm && hasHandler(e.cm, 'beforeChange')), + d = r.changes.length - 1; + d >= 0; + --d + ) { + var p = (function(n) { + var i = r.changes[n]; + if (((i.origin = t), u && !filterChange(e, i, !1))) + return (a.length = 0), {}; + c.push(historyChangeFromChange(e, i)); + var o = n ? computeSelAfterChange(e, i) : lst(a); + makeChangeSingleDoc(e, i, o, mergeOldSpans(e, i)), !n && + e.cm && + e.cm.scrollIntoView({ from: i.from, to: changeEnd(i) }); + var s = []; + linkedDocs(e, function(e, t) { + t || + -1 != indexOf(s, e.history) || + (rebaseHist(e.history, i), s.push( + e.history + )), makeChangeSingleDoc(e, i, null, mergeOldSpans(e, i)); + }); + })(d); + if (p) return p.v; + } + } + } + } + function shiftDoc(e, t) { + if ( + 0 != t && + ((e.first += t), (e.sel = new fe( + map(e.sel.ranges, function(e) { + return new he( + Pos(e.anchor.line + t, e.anchor.ch), + Pos(e.head.line + t, e.head.ch) + ); + }), + e.sel.primIndex + )), e.cm) + ) { + regChange(e.cm, e.first, e.first - t, t); + for (var n = e.cm.display, r = n.viewFrom; r < n.viewTo; r++) + regLineChange(e.cm, r, 'gutter'); + } + } + function makeChangeSingleDoc(e, t, n, r) { + if (e.cm && !e.cm.curOp) + return operation(e.cm, makeChangeSingleDoc)(e, t, n, r); + if (t.to.line < e.first) + return void shiftDoc( + e, + t.text.length - 1 - (t.to.line - t.from.line) + ); + if (!(t.from.line > e.lastLine())) { + if (t.from.line < e.first) { + var i = t.text.length - 1 - (e.first - t.from.line); + shiftDoc(e, i), (t = { + from: Pos(e.first, 0), + to: Pos(t.to.line + i, t.to.ch), + text: [lst(t.text)], + origin: t.origin + }); + } + var o = e.lastLine(); + t.to.line > o && + (t = { + from: t.from, + to: Pos(o, getLine(e, o).text.length), + text: [t.text[0]], + origin: t.origin + }), (t.removed = getBetween(e, t.from, t.to)), n || + (n = computeSelAfterChange(e, t)), e.cm + ? makeChangeSingleDocInEditor(e.cm, t, r) + : updateDoc(e, t, r), setSelectionNoUndo(e, n, D); + } + } + function makeChangeSingleDocInEditor(e, t, n) { + var r = e.doc, i = e.display, o = t.from, a = t.to, s = !1, l = o.line; + e.options.lineWrapping || + ((l = lineNo(visualLine(getLine(r, o.line)))), r.iter( + l, + a.line + 1, + function(e) { + if (e == i.maxLine) return (s = !0), !0; + } + )), r.sel.contains(t.from, t.to) > -1 && signalCursorActivity(e), updateDoc(r, t, n, estimateHeight(e)), e + .options.lineWrapping || + (r.iter(l, o.line + t.text.length, function(e) { + var t = lineLength(e); + t > i.maxLineLength && + ((i.maxLine = e), (i.maxLineLength = t), (i.maxLineChanged = !0), (s = !1)); + }), s && + (e.curOp.updateMaxLine = !0)), (r.frontier = Math.min(r.frontier, o.line)), startWorker(e, 400); + var c = t.text.length - (a.line - o.line) - 1; + t.full + ? regChange(e) + : o.line != a.line || + 1 != t.text.length || + isWholeLineUpdate(e.doc, t) + ? regChange(e, o.line, a.line + 1, c) + : regLineChange(e, o.line, 'text'); + var u = hasHandler(e, 'changes'), d = hasHandler(e, 'change'); + if (d || u) { + var p = { + from: o, + to: a, + text: t.text, + removed: t.removed, + origin: t.origin + }; + d && signalLater(e, 'change', e, p), u && + (e.curOp.changeObjs || (e.curOp.changeObjs = [])).push(p); + } + e.display.selForContextMenu = null; + } + function replaceRange(e, t, n, r, i) { + if ((r || (r = n), cmp(r, n) < 0)) { + var o = r; + (r = n), (n = o); + } + 'string' == typeof t && + (t = e.splitLines( + t + )), makeChange(e, { from: n, to: r, text: t, origin: i }); + } + function rebaseHistSelSingle(e, t, n, r) { + n < e.line ? (e.line += r) : t < e.line && ((e.line = t), (e.ch = 0)); + } + function rebaseHistArray(e, t, n, r) { + for (var i = 0; i < e.length; ++i) { + var o = e[i], a = !0; + if (o.ranges) { + o.copied || ((o = e[i] = o.deepCopy()), (o.copied = !0)); + for (var s = 0; s < o.ranges.length; s++) + rebaseHistSelSingle( + o.ranges[s].anchor, + t, + n, + r + ), rebaseHistSelSingle(o.ranges[s].head, t, n, r); + } else { + for (var l = 0; l < o.changes.length; ++l) { + var c = o.changes[l]; + if (n < c.from.line) + (c.from = Pos(c.from.line + r, c.from.ch)), (c.to = Pos( + c.to.line + r, + c.to.ch + )); + else if (t <= c.to.line) { + a = !1; + break; + } + } + a || (e.splice(0, i + 1), (i = 0)); + } + } + } + function rebaseHist(e, t) { + var n = t.from.line, r = t.to.line, i = t.text.length - (r - n) - 1; + rebaseHistArray(e.done, n, r, i), rebaseHistArray(e.undone, n, r, i); + } + function changeLine(e, t, n, r) { + var i = t, o = t; + return 'number' == typeof t + ? (o = getLine(e, clipLine(e, t))) + : (i = lineNo( + t + )), null == i ? null : (r(o, i) && e.cm && regLineChange(e.cm, i, n), o); + } + function adjustScrollWhenAboveVisible(e, t, n) { + heightAtLine(t) < ((e.curOp && e.curOp.scrollTop) || e.doc.scrollTop) && + addToScrollTop(e, n); + } + function addLineWidget(e, t, n, r) { + var i = new ve(e, n, r), o = e.cm; + return o && + i.noHScroll && + (o.display.alignWidgets = !0), changeLine(e, t, 'widget', function(t) { + var n = t.widgets || (t.widgets = []); + if ( + (null == i.insertAt + ? n.push(i) + : n.splice( + Math.min(n.length - 1, Math.max(0, i.insertAt)), + 0, + i + ), (i.line = t), o && !lineIsHidden(e, t)) + ) { + var r = heightAtLine(t) < e.scrollTop; + updateLineHeight(t, t.height + widgetHeight(i)), r && + addToScrollTop(o, i.height), (o.curOp.forceUpdate = !0); + } + return !0; + }), signalLater( + o, + 'lineWidgetAdded', + o, + i, + 'number' == typeof t ? t : lineNo(t) + ), i; + } + function markText(e, t, n, r, i) { + if (r && r.shared) return markTextShared(e, t, n, r, i); + if (e.cm && !e.cm.curOp) + return operation(e.cm, markText)(e, t, n, r, i); + var o = new be(e, i), a = cmp(t, n); + if ( + (r && copyObj(r, o, !1), a > 0 || (0 == a && !1 !== o.clearWhenEmpty)) + ) + return o; + if ( + (o.replacedWith && + ((o.collapsed = !0), (o.widgetNode = eltP( + 'span', + [o.replacedWith], + 'CodeMirror-widget' + )), r.handleMouseEvents || + o.widgetNode.setAttribute( + 'cm-ignore-events', + 'true' + ), r.insertLeft && (o.widgetNode.insertLeft = !0)), o.collapsed) + ) { + if ( + conflictingCollapsedRange(e, t.line, t, n, o) || + (t.line != n.line && conflictingCollapsedRange(e, n.line, t, n, o)) + ) + throw new Error( + 'Inserting collapsed marker partially overlapping an existing one' + ); + seeCollapsedSpans(); + } + o.addToHistory && + addChangeToHistory( + e, + { from: t, to: n, origin: 'markText' }, + e.sel, + NaN + ); + var s, l = t.line, c = e.cm; + if ( + (e.iter(l, n.line + 1, function(e) { + c && + o.collapsed && + !c.options.lineWrapping && + visualLine(e) == c.display.maxLine && + (s = !0), o.collapsed && l != t.line && updateLineHeight(e, 0), addMarkedSpan(e, new MarkedSpan(o, l == t.line ? t.ch : null, l == n.line ? n.ch : null)), ++l; + }), o.collapsed && + e.iter(t.line, n.line + 1, function(t) { + lineIsHidden(e, t) && updateLineHeight(t, 0); + }), o.clearOnEnter && + G(o, 'beforeCursorEnter', function() { + return o.clear(); + }), o.readOnly && + (seeReadOnlySpans(), (e.history.done.length || + e.history.undone.length) && + e.clearHistory()), o.collapsed && + ((o.id = ++ye), (o.atomic = !0)), c) + ) { + if ((s && (c.curOp.updateMaxLine = !0), o.collapsed)) + regChange(c, t.line, n.line + 1); + else if ( + o.className || + o.title || + o.startStyle || + o.endStyle || + o.css + ) + for (var u = t.line; u <= n.line; u++) + regLineChange(c, u, 'text'); + o.atomic && reCheckSelection(c.doc), signalLater( + c, + 'markerAdded', + c, + o + ); + } + return o; + } + function markTextShared(e, t, n, r, i) { + (r = copyObj(r)), (r.shared = !1); + var o = [markText(e, t, n, r, i)], a = o[0], s = r.widgetNode; + return linkedDocs(e, function(e) { + s && + (r.widgetNode = s.cloneNode( + !0 + )), o.push(markText(e, clipPos(e, t), clipPos(e, n), r, i)); + for ( + var l = 0; + l < e.linked.length; + ++l + ) if (e.linked[l].isParent) return; + a = lst(o); + }), new xe(o, a); + } + function findSharedMarkers(e) { + return e.findMarks( + Pos(e.first, 0), + e.clipPos(Pos(e.lastLine())), + function(e) { + return e.parent; + } + ); + } + function copySharedMarkers(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n], + i = r.find(), + o = e.clipPos(i.from), + a = e.clipPos(i.to); + if (cmp(o, a)) { + var s = markText(e, o, a, r.primary, r.primary.type); + r.markers.push(s), (s.parent = r); + } + } + } + function detachSharedMarkers(e) { + for (var t = 0; t < e.length; t++) !(function(t) { + var n = e[t], r = [n.primary.doc]; + linkedDocs(n.primary.doc, function(e) { + return r.push(e); + }); + for (var i = 0; i < n.markers.length; i++) { + var o = n.markers[i]; + -1 == indexOf(r, o.doc) && + ((o.parent = null), n.markers.splice(i--, 1)); + } + })(t); + } + function onDrop(e) { + var t = this; + if ( + (clearDragCursor(t), !signalDOMEvent(t, e) && + !eventInWidget(t.display, e)) + ) { + e_preventDefault(e), a && (Se = +new Date()); + var n = posFromMouse(t, e, !0), r = e.dataTransfer.files; + if (n && !t.isReadOnly()) + if (r && r.length && window.FileReader && window.File) + for (var i = r.length, o = Array(i), s = 0, l = 0; l < i; ++l) + !(function(e, r) { + if ( + !t.options.allowDropFileTypes || + -1 != indexOf(t.options.allowDropFileTypes, e.type) + ) { + var a = new FileReader(); + (a.onload = operation(t, function() { + var e = a.result; + if ( + (/[\x00-\x08\x0e-\x1f]{2}/.test(e) && (e = ''), (o[ + r + ] = e), ++s == i) + ) { + n = clipPos(t.doc, n); + var l = { + from: n, + to: n, + text: t.doc.splitLines(o.join(t.doc.lineSeparator())), + origin: 'paste' + }; + makeChange(t.doc, l), setSelectionReplaceHistory( + t.doc, + simpleSelection(n, changeEnd(l)) + ); + } + })), a.readAsText(e); + } + })(r[l], l); + else { + if (t.state.draggingText && t.doc.sel.contains(n) > -1) + return t.state.draggingText(e), void setTimeout(function() { + return t.display.input.focus(); + }, 20); + try { + var c = e.dataTransfer.getData('Text'); + if (c) { + var u; + if ( + (t.state.draggingText && + !t.state.draggingText.copy && + (u = t.listSelections()), setSelectionNoUndo( + t.doc, + simpleSelection(n, n) + ), u) + ) + for (var d = 0; d < u.length; ++d) + replaceRange(t.doc, '', u[d].anchor, u[d].head, 'drag'); + t.replaceSelection( + c, + 'around', + 'paste' + ), t.display.input.focus(); + } + } catch (e) {} + } + } + } + function onDragStart(e, t) { + if (a && (!e.state.draggingText || +new Date() - Se < 100)) + return void e_stop(t); + if ( + !signalDOMEvent(e, t) && + !eventInWidget(e.display, t) && + (t.dataTransfer.setData( + 'Text', + e.getSelection() + ), (t.dataTransfer.effectAllowed = 'copyMove'), t.dataTransfer + .setDragImage && !p) + ) { + var n = elt('img', null, null, 'position: fixed; left: 0; top: 0;'); + (n.src = + 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='), d && + ((n.width = n.height = 1), e.display.wrapper.appendChild( + n + ), (n._top = n.offsetTop)), t.dataTransfer.setDragImage( + n, + 0, + 0 + ), d && n.parentNode.removeChild(n); + } + } + function onDragOver(e, t) { + var n = posFromMouse(e, t); + if (n) { + var r = document.createDocumentFragment(); + drawSelectionCursor(e, n, r), e.display.dragCursor || + ((e.display.dragCursor = elt( + 'div', + null, + 'CodeMirror-cursors CodeMirror-dragcursors' + )), e.display.lineSpace.insertBefore( + e.display.dragCursor, + e.display.cursorDiv + )), removeChildrenAndAdd(e.display.dragCursor, r); + } + } + function clearDragCursor(e) { + e.display.dragCursor && + (e.display.lineSpace.removeChild( + e.display.dragCursor + ), (e.display.dragCursor = null)); + } + function forEachCodeMirror(e) { + if (document.body.getElementsByClassName) + for ( + var t = document.body.getElementsByClassName('CodeMirror'), n = 0; + n < t.length; + n++ + ) { + var r = t[n].CodeMirror; + r && e(r); + } + } + function ensureGlobalHandlers() { + ke || (registerGlobalHandlers(), (ke = !0)); + } + function registerGlobalHandlers() { + var e; + G(window, 'resize', function() { + null == e && + (e = setTimeout(function() { + (e = null), forEachCodeMirror(onResize); + }, 100)); + }), G(window, 'blur', function() { + return forEachCodeMirror(onBlur); + }); + } + function onResize(e) { + var t = e.display; + (t.lastWrapHeight == t.wrapper.clientHeight && + t.lastWrapWidth == t.wrapper.clientWidth) || + ((t.cachedCharWidth = t.cachedTextHeight = t.cachedPaddingH = null), (t.scrollbarsClipped = !1), e.setSize()); + } + function normalizeKeyName(e) { + var t = e.split(/-(?!$)/); + e = t[t.length - 1]; + for (var n, r, i, o, a = 0; a < t.length - 1; a++) { + var s = t[a]; + if (/^(cmd|meta|m)$/i.test(s)) o = !0; + else if (/^a(lt)?$/i.test(s)) n = !0; + else if (/^(c|ctrl|control)$/i.test(s)) r = !0; + else { + if (!/^s(hift)?$/i.test(s)) + throw new Error('Unrecognized modifier name: ' + s); + i = !0; + } + } + return n && + (e = + 'Alt-' + + e), r && (e = 'Ctrl-' + e), o && (e = 'Cmd-' + e), i && (e = 'Shift-' + e), e; + } + function normalizeKeyMap(e) { + var t = {}; + for (var n in e) if (e.hasOwnProperty(n)) { + var r = e[n]; + if (/^(name|fallthrough|(de|at)tach)$/.test(n)) continue; + if ('...' == r) { + delete e[n]; + continue; + } + for ( + var i = map(n.split(' '), normalizeKeyName), o = 0; + o < i.length; + o++ + ) { + var a = void 0, s = void 0; + o == i.length - 1 + ? ((s = i.join(' ')), (a = r)) + : ((s = i.slice(0, o + 1).join(' ')), (a = '...')); + var l = t[s]; + if (l) { + if (l != a) throw new Error('Inconsistent bindings for ' + s); + } else t[s] = a; + } + delete e[n]; + } + for (var c in t) e[c] = t[c]; + return e; + } + function lookupKey(e, t, n, r) { + t = getKeyMap(t); + var i = t.call ? t.call(e, r) : t[e]; + if (!1 === i) return 'nothing'; + if ('...' === i) return 'multi'; + if (null != i && n(i)) return 'handled'; + if (t.fallthrough) { + if ('[object Array]' != Object.prototype.toString.call(t.fallthrough)) + return lookupKey(e, t.fallthrough, n, r); + for (var o = 0; o < t.fallthrough.length; o++) { + var a = lookupKey(e, t.fallthrough[o], n, r); + if (a) return a; + } + } + } + function isModifierKey(e) { + var t = 'string' == typeof e ? e : Le[e.keyCode]; + return 'Ctrl' == t || 'Alt' == t || 'Shift' == t || 'Mod' == t; + } + function keyName(e, t) { + if (d && 34 == e.keyCode && e.char) return !1; + var n = Le[e.keyCode], r = n; + return ( + null != r && + !e.altGraphKey && + (e.altKey && 'Alt' != n && (r = 'Alt-' + r), (S + ? e.metaKey + : e.ctrlKey) && + 'Ctrl' != n && + (r = 'Ctrl-' + r), (S ? e.ctrlKey : e.metaKey) && + 'Cmd' != n && + (r = 'Cmd-' + r), !t && + e.shiftKey && + 'Shift' != n && + (r = 'Shift-' + r), r) + ); + } + function getKeyMap(e) { + return 'string' == typeof e ? Pe[e] : e; + } + function deleteNearSelection(e, t) { + for (var n = e.doc.sel.ranges, r = [], i = 0; i < n.length; i++) { + for (var o = t(n[i]); r.length && cmp(o.from, lst(r).to) <= 0; ) { + var a = r.pop(); + if (cmp(a.from, o.from) < 0) { + o.from = a.from; + break; + } + } + r.push(o); + } + runInOp(e, function() { + for ( + var t = r.length - 1; + t >= 0; + t-- + ) replaceRange(e.doc, '', r[t].from, r[t].to, '+delete'); + ensureCursorVisible(e); + }); + } + function lineStart(e, t) { + var n = getLine(e.doc, t), r = visualLine(n); + return r != n && (t = lineNo(r)), endOfLine(!0, e, r, t, 1); + } + function lineEnd(e, t) { + var n = getLine(e.doc, t), r = visualLineEnd(n); + return r != n && (t = lineNo(r)), endOfLine(!0, e, n, t, -1); + } + function lineStartSmart(e, t) { + var n = lineStart(e, t.line), + r = getLine(e.doc, n.line), + i = getOrder(r, e.doc.direction); + if (!i || 0 == i[0].level) { + var o = Math.max(0, r.text.search(/\S/)), + a = t.line == n.line && t.ch <= o && t.ch; + return Pos(n.line, a ? 0 : o, n.sticky); + } + return n; + } + function doHandleBinding(e, t, n) { + if ('string' == typeof t && !(t = De[t])) return !1; + e.display.input.ensurePolled(); + var r = e.display.shift, i = !1; + try { + e.isReadOnly() && + (e.state.suppressEdits = !0), n && (e.display.shift = !1), (i = t(e) != A); + } finally { + (e.display.shift = r), (e.state.suppressEdits = !1); + } + return i; + } + function lookupKeyForEditor(e, t, n) { + for (var r = 0; r < e.state.keyMaps.length; r++) { + var i = lookupKey(t, e.state.keyMaps[r], n, e); + if (i) return i; + } + return ( + (e.options.extraKeys && lookupKey(t, e.options.extraKeys, n, e)) || + lookupKey(t, e.options.keyMap, n, e) + ); + } + function dispatchKey(e, t, n, r) { + var i = e.state.keySeq; + if (i) { + if (isModifierKey(t)) return 'handled'; + He.set(50, function() { + e.state.keySeq == i && + ((e.state.keySeq = null), e.display.input.reset()); + }), (t = i + ' ' + t); + } + var o = lookupKeyForEditor(e, t, r); + return 'multi' == o && + (e.state.keySeq = t), 'handled' == o && signalLater(e, 'keyHandled', e, t, n), ('handled' != o && 'multi' != o) || (e_preventDefault(n), restartBlink(e)), i && !o && /\'$/.test(t) ? (e_preventDefault(n), !0) : !!o; + } + function handleKeyBinding(e, t) { + var n = keyName(t, !0); + return ( + !!n && + (t.shiftKey && !e.state.keySeq + ? dispatchKey(e, 'Shift-' + n, t, function(t) { + return doHandleBinding(e, t, !0); + }) || + dispatchKey(e, n, t, function(t) { + if ('string' == typeof t ? /^go[A-Z]/.test(t) : t.motion) + return doHandleBinding(e, t); + }) + : dispatchKey(e, n, t, function(t) { + return doHandleBinding(e, t); + })) + ); + } + function handleCharBinding(e, t, n) { + return dispatchKey(e, "'" + n + "'", t, function(t) { + return doHandleBinding(e, t, !0); + }); + } + function onKeyDown(e) { + var t = this; + if (((t.curOp.focus = activeElt()), !signalDOMEvent(t, e))) { + a && s < 11 && 27 == e.keyCode && (e.returnValue = !1); + var n = e.keyCode; + t.display.shift = 16 == n || e.shiftKey; + var r = handleKeyBinding(t, e); + d && + ((We = r ? n : null), !r && + 88 == n && + !$ && + (y ? e.metaKey : e.ctrlKey) && + t.replaceSelection('', null, 'cut')), 18 != n || + /\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className) || + showCrossHair(t); + } + } + function showCrossHair(e) { + function up(e) { + (18 != e.keyCode && e.altKey) || + (L(t, 'CodeMirror-crosshair'), off(document, 'keyup', up), off( + document, + 'mouseover', + up + )); + } + var t = e.display.lineDiv; + addClass( + t, + 'CodeMirror-crosshair' + ), G(document, 'keyup', up), G(document, 'mouseover', up); + } + function onKeyUp(e) { + 16 == e.keyCode && (this.doc.sel.shift = !1), signalDOMEvent(this, e); + } + function onKeyPress(e) { + var t = this; + if ( + !(eventInWidget(t.display, e) || + signalDOMEvent(t, e) || + (e.ctrlKey && !e.altKey) || + (y && e.metaKey)) + ) { + var n = e.keyCode, r = e.charCode; + if (d && n == We) return (We = null), void e_preventDefault(e); + if (!d || (e.which && !(e.which < 10)) || !handleKeyBinding(t, e)) { + var i = String.fromCharCode(null == r ? n : r); + '\b' != i && + (handleCharBinding(t, e, i) || t.display.input.onKeyPress(e)); + } + } + } + function onMouseDown(e) { + var t = this, n = t.display; + if ( + !(signalDOMEvent(t, e) || (n.activeTouch && n.input.supportsTouch())) + ) { + if ( + (n.input.ensurePolled(), (n.shift = e.shiftKey), eventInWidget( + n, + e + )) + ) + return void (l || + ((n.scroller.draggable = !1), setTimeout(function() { + return (n.scroller.draggable = !0); + }, 100))); + if (!clickInGutter(t, e)) { + var r = posFromMouse(t, e); + switch ((window.focus(), e_button(e))) { + case 1: + t.state.selectingText + ? t.state.selectingText(e) + : r + ? leftButtonDown(t, e, r) + : e_target(e) == n.scroller && e_preventDefault(e); + break; + case 2: + l && (t.state.lastMiddleDown = +new Date()), r && + extendSelection(t.doc, r), setTimeout(function() { + return n.input.focus(); + }, 20), e_preventDefault(e); + break; + case 3: + k ? onContextMenu(t, e) : delayBlurEvent(t); + } + } + } + } + function leftButtonDown(e, t, n) { + a ? setTimeout(bind(ensureFocus, e), 0) : (e.curOp.focus = activeElt()); + var r, i = +new Date(); + Ae && Ae.time > i - 400 && 0 == cmp(Ae.pos, n) + ? (r = 'triple') + : Ne && Ne.time > i - 400 && 0 == cmp(Ne.pos, n) + ? ((r = 'double'), (Ae = { time: i, pos: n })) + : ((r = 'single'), (Ne = { time: i, pos: n })); + var o, s = e.doc.sel, l = y ? t.metaKey : t.ctrlKey; + e.options.dragDrop && + _ && + !e.isReadOnly() && + 'single' == r && + (o = s.contains(n)) > -1 && + (cmp((o = s.ranges[o]).from(), n) < 0 || n.xRel > 0) && + (cmp(o.to(), n) > 0 || n.xRel < 0) + ? leftButtonStartDrag(e, t, n, l) + : leftButtonSelect(e, t, n, r, l); + } + function leftButtonStartDrag(e, t, n, r) { + var i = e.display, + o = !1, + c = operation(e, function(t) { + l && + (i.scroller.draggable = !1), (e.state.draggingText = !1), off(document, 'mouseup', c), off(document, 'mousemove', u), off(i.scroller, 'dragstart', d), off(i.scroller, 'drop', c), o || + (e_preventDefault(t), r || extendSelection(e.doc, n), l || + (a && 9 == s) + ? setTimeout(function() { + document.body.focus(), i.input.focus(); + }, 20) + : i.input.focus()); + }), + u = function(e) { + o = + o || + Math.abs(t.clientX - e.clientX) + + Math.abs(t.clientY - e.clientY) >= + 10; + }, + d = function() { + return (o = !0); + }; + l && + (i.scroller.draggable = !0), (e.state.draggingText = c), (c.copy = y ? t.altKey : t.ctrlKey), i.scroller.dragDrop && i.scroller.dragDrop(), G(document, 'mouseup', c), G(document, 'mousemove', u), G(i.scroller, 'dragstart', d), G(i.scroller, 'drop', c), delayBlurEvent(e), setTimeout(function() { + return i.input.focus(); + }, 20); + } + function leftButtonSelect(e, t, n, r, i) { + function extendTo(t) { + if (0 != cmp(f, t)) + if (((f = t), 'rect' == r)) { + for ( + var i = [], + o = e.options.tabSize, + u = countColumn(getLine(a, n.line).text, n.ch, o), + d = countColumn(getLine(a, t.line).text, t.ch, o), + p = Math.min(u, d), + h = Math.max(u, d), + g = Math.min(n.line, t.line), + m = Math.min(e.lastLine(), Math.max(n.line, t.line)); + g <= m; + g++ + ) { + var v = getLine(a, g).text, y = findColumn(v, p, o); + p == h + ? i.push(new he(Pos(g, y), Pos(g, y))) + : v.length > y && + i.push(new he(Pos(g, y), Pos(g, findColumn(v, h, o)))); + } + i.length || + i.push(new he(n, n)), setSelection( + a, + normalizeSelection(c.ranges.slice(0, l).concat(i), l), + { origin: '*mouse', scroll: !1 } + ), e.scrollIntoView(t); + } else { + var b = s, x = b.anchor, C = t; + if ('single' != r) { + var w; + (w = 'double' == r + ? e.findWordAt(t) + : new he( + Pos(t.line, 0), + clipPos(a, Pos(t.line + 1, 0)) + )), cmp(w.anchor, x) > 0 + ? ((C = w.head), (x = minPos(b.from(), w.anchor))) + : ((C = w.anchor), (x = maxPos(b.to(), w.head))); + } + var S = c.ranges.slice(0); + (S[l] = new he(clipPos(a, x), C)), setSelection( + a, + normalizeSelection(S, l), + H + ); + } + } + function extend(t) { + var n = ++g, i = posFromMouse(e, t, !0, 'rect' == r); + if (i) + if (0 != cmp(i, f)) { + (e.curOp.focus = activeElt()), extendTo(i); + var s = visibleLines(o, a); + (i.line >= s.to || i.line < s.from) && + setTimeout( + operation(e, function() { + g == n && extend(t); + }), + 150 + ); + } else { + var l = t.clientY < h.top ? -20 : t.clientY > h.bottom ? 20 : 0; + l && + setTimeout( + operation(e, function() { + g == n && ((o.scroller.scrollTop += l), extend(t)); + }), + 50 + ); + } + } + function done(t) { + (e.state.selectingText = !1), (g = 1 / 0), e_preventDefault(t), o.input.focus(), off(document, 'mousemove', m), off(document, 'mouseup', v), (a.history.lastSelOrigin = null); + } + var o = e.display, a = e.doc; + e_preventDefault(t); + var s, l, c = a.sel, u = c.ranges; + if ( + (i && !t.shiftKey + ? ((l = a.sel.contains(n)), (s = l > -1 ? u[l] : new he(n, n))) + : ((s = a.sel.primary()), (l = a.sel.primIndex)), b + ? t.shiftKey && t.metaKey + : t.altKey) + ) + (r = 'rect'), i || (s = new he(n, n)), (n = posFromMouse( + e, + t, + !0, + !0 + )), (l = -1); + else if ('double' == r) { + var d = e.findWordAt(n); + s = e.display.shift || a.extend + ? extendRange(a, s, d.anchor, d.head) + : d; + } else if ('triple' == r) { + var p = new he(Pos(n.line, 0), clipPos(a, Pos(n.line + 1, 0))); + s = e.display.shift || a.extend + ? extendRange(a, s, p.anchor, p.head) + : p; + } else s = extendRange(a, s, n); + i + ? -1 == l + ? ((l = u.length), setSelection( + a, + normalizeSelection(u.concat([s]), l), + { scroll: !1, origin: '*mouse' } + )) + : u.length > 1 && u[l].empty() && 'single' == r && !t.shiftKey + ? (setSelection( + a, + normalizeSelection( + u.slice(0, l).concat(u.slice(l + 1)), + 0 + ), + { scroll: !1, origin: '*mouse' } + ), (c = a.sel)) + : replaceOneSelection(a, l, s, H) + : ((l = 0), setSelection(a, new fe([s], 0), H), (c = a.sel)); + var f = n, + h = o.wrapper.getBoundingClientRect(), + g = 0, + m = operation(e, function(e) { + e_button(e) ? extend(e) : done(e); + }), + v = operation(e, done); + (e.state.selectingText = v), G(document, 'mousemove', m), G(document, 'mouseup', v); + } + function gutterEvent(e, t, n, r) { + var i, o; + try { + (i = t.clientX), (o = t.clientY); + } catch (t) { + return !1; + } + if (i >= Math.floor(e.display.gutters.getBoundingClientRect().right)) + return !1; + r && e_preventDefault(t); + var a = e.display, s = a.lineDiv.getBoundingClientRect(); + if (o > s.bottom || !hasHandler(e, n)) return e_defaultPrevented(t); + o -= s.top - a.viewOffset; + for (var l = 0; l < e.options.gutters.length; ++l) { + var c = a.gutters.childNodes[l]; + if (c && c.getBoundingClientRect().right >= i) { + return signal( + e, + n, + e, + lineAtHeight(e.doc, o), + e.options.gutters[l], + t + ), e_defaultPrevented(t); + } + } + } + function clickInGutter(e, t) { + return gutterEvent(e, t, 'gutterClick', !0); + } + function onContextMenu(e, t) { + eventInWidget(e.display, t) || + contextMenuInGutter(e, t) || + signalDOMEvent(e, t, 'contextmenu') || + e.display.input.onContextMenu(t); + } + function contextMenuInGutter(e, t) { + return ( + !!hasHandler(e, 'gutterContextMenu') && + gutterEvent(e, t, 'gutterContextMenu', !1) + ); + } + function themeChanged(e) { + (e.display.wrapper.className = + e.display.wrapper.className.replace(/\s*cm-s-\S+/g, '') + + e.options.theme.replace(/(^|\s)\s*/g, ' cm-s-')), clearCaches(e); + } + function guttersChanged(e) { + updateGutters(e), regChange(e), alignHorizontally(e); + } + function dragDropChanged(e, t, n) { + if (!t != !(n && n != Ee)) { + var r = e.display.dragFunctions, i = t ? G : off; + i(e.display.scroller, 'dragstart', r.start), i( + e.display.scroller, + 'dragenter', + r.enter + ), i(e.display.scroller, 'dragover', r.over), i( + e.display.scroller, + 'dragleave', + r.leave + ), i(e.display.scroller, 'drop', r.drop); + } + } + function wrappingChanged(e) { + e.options.lineWrapping + ? (addClass( + e.display.wrapper, + 'CodeMirror-wrap' + ), (e.display.sizer.style.minWidth = + ''), (e.display.sizerWidth = null)) + : (L(e.display.wrapper, 'CodeMirror-wrap'), findMaxLine( + e + )), estimateLineHeights(e), regChange(e), clearCaches(e), setTimeout(function() { + return updateScrollbars(e); + }, 100); + } + function CodeMirror$1(e, t) { + var n = this; + if (!(this instanceof CodeMirror$1)) return new CodeMirror$1(e, t); + (this.options = t = t + ? copyObj(t) + : {}), copyObj(Ie, t, !1), setGuttersForLineNumbers(t); + var r = t.value; + 'string' == typeof r && + (r = new we( + r, + t.mode, + null, + t.lineSeparator, + t.direction + )), (this.doc = r); + var i = new CodeMirror$1.inputStyles[t.inputStyle](this), + o = (this.display = new Display(e, r, i)); + (o.wrapper.CodeMirror = this), updateGutters(this), themeChanged(this), t.lineWrapping && (this.display.wrapper.className += ' CodeMirror-wrap'), initScrollbars(this), (this.state = { keyMaps: [], overlays: [], modeGen: 0, overwrite: !1, delayingBlurEvent: !1, focused: !1, suppressEdits: !1, pasteIncoming: !1, cutIncoming: !1, selectingText: !1, draggingText: !1, highlight: new T(), keySeq: null, specialChars: null }), t.autofocus && !v && o.input.focus(), a && + s < 11 && + setTimeout(function() { + return n.display.input.reset(!0); + }, 20), registerEventHandlers( + this + ), ensureGlobalHandlers(), startOperation(this), (this.curOp.forceUpdate = !0), attachDoc(this, r), (t.autofocus && !v) || this.hasFocus() ? setTimeout(bind(onFocus, this), 20) : onBlur(this); + for (var c in Fe) Fe.hasOwnProperty(c) && Fe[c](n, t[c], Ee); + maybeUpdateLineNumberWidth(this), t.finishInit && t.finishInit(this); + for (var u = 0; u < Be.length; ++u) Be[u](n); + endOperation( + this + ), l && t.lineWrapping && 'optimizelegibility' == getComputedStyle(o.lineDiv).textRendering && (o.lineDiv.style.textRendering = 'auto'); + } + function registerEventHandlers(e) { + function finishTouch() { + t.activeTouch && + ((n = setTimeout(function() { + return (t.activeTouch = null); + }, 1e3)), (r = t.activeTouch), (r.end = +new Date())); + } + function isMouseLikeTouchEvent(e) { + if (1 != e.touches.length) return !1; + var t = e.touches[0]; + return t.radiusX <= 1 && t.radiusY <= 1; + } + function farAway(e, t) { + if (null == t.left) return !0; + var n = t.left - e.left, r = t.top - e.top; + return n * n + r * r > 400; + } + var t = e.display; + G(t.scroller, 'mousedown', operation(e, onMouseDown)), a && s < 11 + ? G( + t.scroller, + 'dblclick', + operation(e, function(t) { + if (!signalDOMEvent(e, t)) { + var n = posFromMouse(e, t); + if ( + n && + !clickInGutter(e, t) && + !eventInWidget(e.display, t) + ) { + e_preventDefault(t); + var r = e.findWordAt(n); + extendSelection(e.doc, r.anchor, r.head); + } + } + }) + ) + : G(t.scroller, 'dblclick', function(t) { + return signalDOMEvent(e, t) || e_preventDefault(t); + }), k || + G(t.scroller, 'contextmenu', function(t) { + return onContextMenu(e, t); + }); + var n, r = { end: 0 }; + G(t.scroller, 'touchstart', function(i) { + if (!signalDOMEvent(e, i) && !isMouseLikeTouchEvent(i)) { + t.input.ensurePolled(), clearTimeout(n); + var o = +new Date(); + (t.activeTouch = { + start: o, + moved: !1, + prev: o - r.end <= 300 ? r : null + }), 1 == i.touches.length && + ((t.activeTouch.left = i.touches[0].pageX), (t.activeTouch.top = + i.touches[0].pageY)); + } + }), G(t.scroller, 'touchmove', function() { + t.activeTouch && (t.activeTouch.moved = !0); + }), G(t.scroller, 'touchend', function(n) { + var r = t.activeTouch; + if ( + r && + !eventInWidget(t, n) && + null != r.left && + !r.moved && + new Date() - r.start < 300 + ) { + var i, o = e.coordsChar(t.activeTouch, 'page'); + (i = !r.prev || farAway(r, r.prev) + ? new he(o, o) + : !r.prev.prev || farAway(r, r.prev.prev) + ? e.findWordAt(o) + : new he( + Pos(o.line, 0), + clipPos(e.doc, Pos(o.line + 1, 0)) + )), e.setSelection( + i.anchor, + i.head + ), e.focus(), e_preventDefault(n); + } + finishTouch(); + }), G( + t.scroller, + 'touchcancel', + finishTouch + ), G(t.scroller, 'scroll', function() { + t.scroller.clientHeight && + (updateScrollTop(e, t.scroller.scrollTop), setScrollLeft( + e, + t.scroller.scrollLeft, + !0 + ), signal(e, 'scroll', e)); + }), G(t.scroller, 'mousewheel', function(t) { + return onScrollWheel(e, t); + }), G(t.scroller, 'DOMMouseScroll', function(t) { + return onScrollWheel(e, t); + }), G(t.wrapper, 'scroll', function() { + return (t.wrapper.scrollTop = t.wrapper.scrollLeft = 0); + }), (t.dragFunctions = { + enter: function(t) { + signalDOMEvent(e, t) || e_stop(t); + }, + over: function(t) { + signalDOMEvent(e, t) || (onDragOver(e, t), e_stop(t)); + }, + start: function(t) { + return onDragStart(e, t); + }, + drop: operation(e, onDrop), + leave: function(t) { + signalDOMEvent(e, t) || clearDragCursor(e); + } + }); + var i = t.input.getField(); + G(i, 'keyup', function(t) { + return onKeyUp.call(e, t); + }), G( + i, + 'keydown', + operation(e, onKeyDown) + ), G(i, 'keypress', operation(e, onKeyPress)), G(i, 'focus', function(t) { + return onFocus(e, t); + }), G(i, 'blur', function(t) { + return onBlur(e, t); + }); + } + function indentLine(e, t, n, r) { + var i, o = e.doc; + null == n && + (n = + 'add'), 'smart' == n && (o.mode.indent ? (i = getStateBefore(e, t)) : (n = 'prev')); + var a = e.options.tabSize, + s = getLine(o, t), + l = countColumn(s.text, null, a); + s.stateAfter && (s.stateAfter = null); + var c, u = s.text.match(/^\s*/)[0]; + if (r || /\S/.test(s.text)) { + if ( + 'smart' == n && + ((c = o.mode.indent(i, s.text.slice(u.length), s.text)) == A || + c > 150) + ) { + if (!r) return; + n = 'prev'; + } + } else (c = 0), (n = 'not'); + 'prev' == n + ? (c = t > o.first ? countColumn(getLine(o, t - 1).text, null, a) : 0) + : 'add' == n + ? (c = l + e.options.indentUnit) + : 'subtract' == n + ? (c = l - e.options.indentUnit) + : 'number' == typeof n && (c = l + n), (c = Math.max(0, c)); + var d = '', p = 0; + if (e.options.indentWithTabs) + for (var f = Math.floor(c / a); f; --f) + (p += a), (d += '\t'); + if ((p < c && (d += spaceStr(c - p)), d != u)) + return replaceRange( + o, + d, + Pos(t, 0), + Pos(t, u.length), + '+input' + ), (s.stateAfter = null), !0; + for (var h = 0; h < o.sel.ranges.length; h++) { + var g = o.sel.ranges[h]; + if (g.head.line == t && g.head.ch < u.length) { + var m = Pos(t, u.length); + replaceOneSelection(o, h, new he(m, m)); + break; + } + } + } + function setLastCopied(e) { + ze = e; + } + function applyTextInput(e, t, n, r, i) { + var o = e.doc; + (e.display.shift = !1), r || (r = o.sel); + var a = e.state.pasteIncoming || 'paste' == i, s = U(t), l = null; + if (a && r.ranges.length > 1) + if (ze && ze.text.join('\n') == t) { + if (r.ranges.length % ze.text.length == 0) { + l = []; + for (var c = 0; c < ze.text.length; c++) + l.push(o.splitLines(ze.text[c])); + } + } else + s.length == r.ranges.length && + (l = map(s, function(e) { + return [e]; + })); + for (var u, d = r.ranges.length - 1; d >= 0; d--) { + var p = r.ranges[d], f = p.from(), h = p.to(); + p.empty() && + (n && n > 0 + ? (f = Pos(f.line, f.ch - n)) + : e.state.overwrite && !a + ? (h = Pos( + h.line, + Math.min( + getLine(o, h.line).text.length, + h.ch + lst(s).length + ) + )) + : ze && + ze.lineWise && + ze.text.join('\n') == t && + (f = h = Pos(f.line, 0))), (u = e.curOp.updateInput); + var g = { + from: f, + to: h, + text: l ? l[d % l.length] : s, + origin: i || (a ? 'paste' : e.state.cutIncoming ? 'cut' : '+input') + }; + makeChange(e.doc, g), signalLater(e, 'inputRead', e, g); + } + t && + !a && + triggerElectric( + e, + t + ), ensureCursorVisible(e), (e.curOp.updateInput = u), (e.curOp.typing = !0), (e.state.pasteIncoming = e.state.cutIncoming = !1); + } + function handlePaste(e, t) { + var n = e.clipboardData && e.clipboardData.getData('Text'); + if (n) + return e.preventDefault(), t.isReadOnly() || + t.options.disableInput || + runInOp(t, function() { + return applyTextInput(t, n, 0, null, 'paste'); + }), !0; + } + function triggerElectric(e, t) { + if (e.options.electricChars && e.options.smartIndent) + for (var n = e.doc.sel, r = n.ranges.length - 1; r >= 0; r--) { + var i = n.ranges[r]; + if ( + !(i.head.ch > 100 || + (r && n.ranges[r - 1].head.line == i.head.line)) + ) { + var o = e.getModeAt(i.head), a = !1; + if (o.electricChars) { + for (var s = 0; s < o.electricChars.length; s++) + if (t.indexOf(o.electricChars.charAt(s)) > -1) { + a = indentLine(e, i.head.line, 'smart'); + break; + } + } else + o.electricInput && + o.electricInput.test( + getLine(e.doc, i.head.line).text.slice(0, i.head.ch) + ) && + (a = indentLine(e, i.head.line, 'smart')); + a && signalLater(e, 'electricInput', e, i.head.line); + } + } + } + function copyableRanges(e) { + for (var t = [], n = [], r = 0; r < e.doc.sel.ranges.length; r++) { + var i = e.doc.sel.ranges[r].head.line, + o = { anchor: Pos(i, 0), head: Pos(i + 1, 0) }; + n.push(o), t.push(e.getRange(o.anchor, o.head)); + } + return { text: t, ranges: n }; + } + function disableBrowserMagic(e, t) { + e.setAttribute( + 'autocorrect', + 'off' + ), e.setAttribute('autocapitalize', 'off'), e.setAttribute('spellcheck', !!t); + } + function hiddenTextarea() { + var e = elt( + 'textarea', + null, + null, + 'position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none' + ), + t = elt( + 'div', + [e], + null, + 'overflow: hidden; position: relative; width: 3px; height: 0px;' + ); + return l + ? (e.style.width = '1000px') + : e.setAttribute( + 'wrap', + 'off' + ), g && (e.style.border = '1px solid black'), disableBrowserMagic(e), t; + } + function findPosH(e, t, n, r, i) { + function findNextLine() { + var r = t.line + n; + return ( + !(r < e.first || r >= e.first + e.size) && + ((t = new Pos(r, t.ch, t.sticky)), (s = getLine(e, r))) + ); + } + function moveOnce(r) { + var o; + if ( + null == + (o = i ? moveVisually(e.cm, s, t, n) : moveLogically(s, t, n)) + ) { + if (r || !findNextLine()) return !1; + t = endOfLine(i, e.cm, s, t.line, n); + } else t = o; + return !0; + } + var o = t, a = n, s = getLine(e, t.line); + if ('char' == r) moveOnce(); + else if ('column' == r) moveOnce(!0); + else if ('word' == r || 'group' == r) + for ( + var l = null, + c = 'group' == r, + u = e.cm && e.cm.getHelper(t, 'wordChars'), + d = !0; + !(n < 0) || moveOnce(!d); + d = !1 + ) { + var p = s.text.charAt(t.ch) || '\n', + f = isWordChar(p, u) + ? 'w' + : c && '\n' == p ? 'n' : !c || /\s/.test(p) ? null : 'p'; + if ((!c || d || f || (f = 's'), l && l != f)) { + n < 0 && ((n = 1), moveOnce(), (t.sticky = 'after')); + break; + } + if ((f && (l = f), n > 0 && !moveOnce(!d))) break; + } + var h = skipAtomic(e, t, o, a, !0); + return equalCursorPos(o, h) && (h.hitSide = !0), h; + } + function findPosV(e, t, n, r) { + var i, o = e.doc, a = t.left; + if ('page' == r) { + var s = Math.min( + e.display.wrapper.clientHeight, + window.innerHeight || document.documentElement.clientHeight + ), + l = Math.max(s - 0.5 * textHeight(e.display), 3); + i = (n > 0 ? t.bottom : t.top) + n * l; + } else 'line' == r && (i = n > 0 ? t.bottom + 3 : t.top - 3); + for (var c; (c = coordsChar(e, a, i)), c.outside; ) { + if (n < 0 ? i <= 0 : i >= o.height) { + c.hitSide = !0; + break; + } + i += 5 * n; + } + return c; + } + function posToDOM(e, t) { + var n = findViewForLine(e, t.line); + if (!n || n.hidden) return null; + var r = getLine(e.doc, t.line), + i = mapFromLineView(n, r, t.line), + o = getOrder(r, e.doc.direction), + a = 'left'; + if (o) { + a = getBidiPartAt(o, t.ch) % 2 ? 'right' : 'left'; + } + var s = nodeAndOffsetInLineMap(i.map, t.ch, a); + return (s.offset = 'right' == s.collapse ? s.end : s.start), s; + } + function isInGutter(e) { + for ( + var t = e; + t; + t = t.parentNode + ) if (/CodeMirror-gutter-wrapper/.test(t.className)) return !0; + return !1; + } + function badPos(e, t) { + return t && (e.bad = !0), e; + } + function domTextBetween(e, t, n, r, i) { + function recognizeMarker(e) { + return function(t) { + return t.id == e; + }; + } + function close() { + a && ((o += s), (a = !1)); + } + function addText(e) { + e && (close(), (o += e)); + } + function walk(t) { + if (1 == t.nodeType) { + var n = t.getAttribute('cm-text'); + if (null != n) + return void addText(n || t.textContent.replace(/\u200b/g, '')); + var o, l = t.getAttribute('cm-marker'); + if (l) { + var c = e.findMarks( + Pos(r, 0), + Pos(i + 1, 0), + recognizeMarker(+l) + ); + return void (c.length && + (o = c[0].find()) && + addText(getBetween(e.doc, o.from, o.to).join(s))); + } + if ('false' == t.getAttribute('contenteditable')) return; + var u = /^(pre|div|p)$/i.test(t.nodeName); + u && close(); + for (var d = 0; d < t.childNodes.length; d++) + walk(t.childNodes[d]); + u && (a = !0); + } else 3 == t.nodeType && addText(t.nodeValue); + } + for ( + var o = '', a = !1, s = e.doc.lineSeparator(); + walk(t), t != n; + + ) t = t.nextSibling; + return o; + } + function domToPos(e, t, n) { + var r; + if (t == e.display.lineDiv) { + if (!(r = e.display.lineDiv.childNodes[n])) + return badPos(e.clipPos(Pos(e.display.viewTo - 1)), !0); + (t = null), (n = 0); + } else + for (r = t; ; r = r.parentNode) { + if (!r || r == e.display.lineDiv) return null; + if (r.parentNode && r.parentNode == e.display.lineDiv) break; + } + for (var i = 0; i < e.display.view.length; i++) { + var o = e.display.view[i]; + if (o.node == r) return locateNodeInLineView(o, t, n); + } + } + function locateNodeInLineView(e, t, n) { + function find(t, n, r) { + for ( + var i = -1; + i < (c ? c.length : 0); + i++ + ) for (var o = i < 0 ? l.map : c[i], a = 0; a < o.length; a += 3) { + var s = o[a + 2]; + if (s == t || s == n) { + var u = lineNo(i < 0 ? e.line : e.rest[i]), d = o[a] + r; + return (r < 0 || s != t) && (d = o[a + (r ? 1 : 0)]), Pos(u, d); + } + } + } + var r = e.text.firstChild, i = !1; + if (!t || !contains(r, t)) return badPos(Pos(lineNo(e.line), 0), !0); + if (t == r && ((i = !0), (t = r.childNodes[n]), (n = 0), !t)) { + var o = e.rest ? lst(e.rest) : e.line; + return badPos(Pos(lineNo(o), o.text.length), i); + } + var a = 3 == t.nodeType ? t : null, s = t; + for ( + a || + 1 != t.childNodes.length || + 3 != t.firstChild.nodeType || + ((a = t.firstChild), n && (n = a.nodeValue.length)); + s.parentNode != r; + + ) s = s.parentNode; + var l = e.measure, c = l.maps, u = find(a, s, n); + if (u) return badPos(u, i); + for ( + var d = s.nextSibling, p = a ? a.nodeValue.length - n : 0; + d; + d = d.nextSibling + ) { + if ((u = find(d, d.firstChild, 0))) + return badPos(Pos(u.line, u.ch - p), i); + p += d.textContent.length; + } + for (var f = s.previousSibling, h = n; f; f = f.previousSibling) { + if ((u = find(f, f.firstChild, -1))) + return badPos(Pos(u.line, u.ch + h), i); + h += f.textContent.length; + } + } + function fromTextArea(e, t) { + function save() { + e.value = a.getValue(); + } + if ( + ((t = t ? copyObj(t) : {}), (t.value = e.value), !t.tabindex && + e.tabIndex && + (t.tabindex = e.tabIndex), !t.placeholder && + e.placeholder && + (t.placeholder = e.placeholder), null == t.autofocus) + ) { + var n = activeElt(); + t.autofocus = + n == e || + (null != e.getAttribute('autofocus') && n == document.body); + } + var r; + if (e.form && (G(e.form, 'submit', save), !t.leaveSubmitMethodAlone)) { + var i = e.form; + r = i.submit; + try { + var o = (i.submit = function() { + save(), (i.submit = r), i.submit(), (i.submit = o); + }); + } catch (e) {} + } + (t.finishInit = function(t) { + (t.save = save), (t.getTextArea = function() { + return e; + }), (t.toTextArea = function() { + (t.toTextArea = isNaN), save(), e.parentNode.removeChild( + t.getWrapperElement() + ), (e.style.display = ''), e.form && + (off(e.form, 'submit', save), 'function' == + typeof e.form.submit && (e.form.submit = r)); + }); + }), (e.style.display = 'none'); + var a = CodeMirror$1(function(t) { + return e.parentNode.insertBefore(t, e.nextSibling); + }, t); + return a; + } + var e = navigator.userAgent, + t = navigator.platform, + n = /gecko\/\d/i.test(e), + r = /MSIE \d/.test(e), + i = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e), + o = /Edge\/(\d+)/.exec(e), + a = r || i || o, + s = a && (r ? document.documentMode || 6 : +(o || i)[1]), + l = !o && /WebKit\//.test(e), + c = l && /Qt\/\d+\.\d+/.test(e), + u = !o && /Chrome\//.test(e), + d = /Opera\//.test(e), + p = /Apple Computer/.test(navigator.vendor), + f = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e), + h = /PhantomJS/.test(e), + g = !o && /AppleWebKit/.test(e) && /Mobile\/\w+/.test(e), + m = /Android/.test(e), + v = + g || m || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e), + y = g || /Mac/.test(t), + b = /\bCrOS\b/.test(e), + x = /win/i.test(t), + C = d && e.match(/Version\/(\d*\.\d*)/); + C && (C = Number(C[1])), C && C >= 15 && ((d = !1), (l = !0)); + var w, + S = y && (c || (d && (null == C || C < 12.11))), + k = n || (a && s >= 9), + L = function(e, t) { + var n = e.className, r = classTest(t).exec(n); + if (r) { + var i = n.slice(r.index + r[0].length); + e.className = n.slice(0, r.index) + (i ? r[1] + i : ''); + } + }; + w = document.createRange + ? function(e, t, n, r) { + var i = document.createRange(); + return i.setEnd(r || e, n), i.setStart(e, t), i; + } + : function(e, t, n) { + var r = document.body.createTextRange(); + try { + r.moveToElementText(e.parentNode); + } catch (e) { + return r; + } + return r.collapse(!0), r.moveEnd('character', n), r.moveStart( + 'character', + t + ), r; + }; + var M = function(e) { + e.select(); + }; + g + ? (M = function(e) { + (e.selectionStart = 0), (e.selectionEnd = e.value.length); + }) + : a && + (M = function(e) { + try { + e.select(); + } catch (e) {} + }); + var T = function() { + this.id = null; + }; + T.prototype.set = function(e, t) { + clearTimeout(this.id), (this.id = setTimeout(t, e)); + }; + var O, + P, + N = 30, + A = { + toString: function() { + return 'CodeMirror.Pass'; + } + }, + D = { scroll: !1 }, + H = { origin: '*mouse' }, + W = { origin: '+move' }, + E = [''], + I = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/, + F = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/, + B = !1, + z = !1, + R = null, + V = (function() { + function charType(n) { + return n <= 247 + ? e.charAt(n) + : 1424 <= n && n <= 1524 + ? 'R' + : 1536 <= n && n <= 1785 + ? t.charAt(n - 1536) + : 1774 <= n && n <= 2220 + ? 'r' + : 8192 <= n && n <= 8203 + ? 'w' + : 8204 == n ? 'b' : 'L'; + } + function BidiSpan(e, t, n) { + (this.level = e), (this.from = t), (this.to = n); + } + var e = + 'bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN', + t = + 'nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111', + n = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/, + r = /[stwN]/, + i = /[LRr]/, + o = /[Lb1n]/, + a = /[1n]/; + return function(e, t) { + var s = 'ltr' == t ? 'L' : 'R'; + if (0 == e.length || ('ltr' == t && !n.test(e))) return !1; + for (var l = e.length, c = [], u = 0; u < l; ++u) + c.push(charType(e.charCodeAt(u))); + for (var d = 0, p = s; d < l; ++d) { + var f = c[d]; + 'm' == f ? (c[d] = p) : (p = f); + } + for (var h = 0, g = s; h < l; ++h) { + var m = c[h]; + '1' == m && 'r' == g + ? (c[h] = 'n') + : i.test(m) && ((g = m), 'r' == m && (c[h] = 'R')); + } + for (var v = 1, y = c[0]; v < l - 1; ++v) { + var b = c[v]; + '+' == b && '1' == y && '1' == c[v + 1] + ? (c[v] = '1') + : ',' != b || + y != c[v + 1] || + ('1' != y && 'n' != y) || + (c[v] = y), (y = b); + } + for (var x = 0; x < l; ++x) { + var C = c[x]; + if (',' == C) c[x] = 'N'; + else if ('%' == C) { + var w = void 0; + for (w = x + 1; w < l && '%' == c[w]; ++w); + for ( + var S = (x && '!' == c[x - 1]) || (w < l && '1' == c[w]) + ? '1' + : 'N', + k = x; + k < w; + ++k + ) + c[k] = S; + x = w - 1; + } + } + for (var L = 0, M = s; L < l; ++L) { + var T = c[L]; + 'L' == M && '1' == T ? (c[L] = 'L') : i.test(T) && (M = T); + } + for (var O = 0; O < l; ++O) + if (r.test(c[O])) { + var P = void 0; + for (P = O + 1; P < l && r.test(c[P]); ++P); + for ( + var N = 'L' == (O ? c[O - 1] : s), + A = 'L' == (P < l ? c[P] : s), + D = N == A ? (N ? 'L' : 'R') : s, + H = O; + H < P; + ++H + ) + c[H] = D; + O = P - 1; + } + for (var W, E = [], I = 0; I < l; ) + if (o.test(c[I])) { + var F = I; + for (++I; I < l && o.test(c[I]); ++I); + E.push(new BidiSpan(0, F, I)); + } else { + var B = I, z = E.length; + for (++I; I < l && 'L' != c[I]; ++I); + for (var R = B; R < I; ) + if (a.test(c[R])) { + B < R && E.splice(z, 0, new BidiSpan(1, B, R)); + var V = R; + for (++R; R < I && a.test(c[R]); ++R); + E.splice(z, 0, new BidiSpan(2, V, R)), (B = R); + } else ++R; + B < I && E.splice(z, 0, new BidiSpan(1, B, I)); + } + return 1 == E[0].level && + (W = e.match(/^\s+/)) && + ((E[0].from = W[0].length), E.unshift( + new BidiSpan(0, 0, W[0].length) + )), 1 == lst(E).level && + (W = e.match(/\s+$/)) && + ((lst(E).to -= W[0].length), E.push( + new BidiSpan(0, l - W[0].length, l) + )), 'rtl' == t ? E.reverse() : E; + }; + })(), + j = [], + G = function(e, t, n) { + if (e.addEventListener) e.addEventListener(t, n, !1); + else if (e.attachEvent) e.attachEvent('on' + t, n); + else { + var r = e._handlers || (e._handlers = {}); + r[t] = (r[t] || j).concat(n); + } + }, + _ = (function() { + if (a && s < 9) return !1; + var e = elt('div'); + return 'draggable' in e || 'dragDrop' in e; + })(), + U = 3 != '\n\nb'.split(/\n/).length + ? function(e) { + for (var t = 0, n = [], r = e.length; t <= r; ) { + var i = e.indexOf('\n', t); + -1 == i && (i = e.length); + var o = e.slice(t, '\r' == e.charAt(i - 1) ? i - 1 : i), + a = o.indexOf('\r'); + -1 != a + ? (n.push(o.slice(0, a)), (t += a + 1)) + : (n.push(o), (t = i + 1)); + } + return n; + } + : function(e) { + return e.split(/\r\n?|\n/); + }, + K = window.getSelection + ? function(e) { + try { + return e.selectionStart != e.selectionEnd; + } catch (e) { + return !1; + } + } + : function(e) { + var t; + try { + t = e.ownerDocument.selection.createRange(); + } catch (e) {} + return ( + !(!t || t.parentElement() != e) && + 0 != t.compareEndPoints('StartToEnd', t) + ); + }, + $ = (function() { + var e = elt('div'); + return ( + 'oncopy' in e || + (e.setAttribute('oncopy', 'return;'), 'function' == typeof e.oncopy) + ); + })(), + q = null, + X = {}, + Y = {}, + Z = {}, + J = function(e, t) { + (this.pos = this.start = 0), (this.string = e), (this.tabSize = + t || + 8), (this.lastColumnPos = this.lastColumnValue = 0), (this.lineStart = 0); + }; + (J.prototype.eol = function() { + return this.pos >= this.string.length; + }), (J.prototype.sol = function() { + return this.pos == this.lineStart; + }), (J.prototype.peek = function() { + return this.string.charAt(this.pos) || void 0; + }), (J.prototype.next = function() { + if (this.pos < this.string.length) + return this.string.charAt(this.pos++); + }), (J.prototype.eat = function(e) { + var t = this.string.charAt(this.pos); + if ('string' == typeof e ? t == e : t && (e.test ? e.test(t) : e(t))) + return ++this.pos, t; + }), (J.prototype.eatWhile = function(e) { + for (var t = this.pos; this.eat(e); ); + return this.pos > t; + }), (J.prototype.eatSpace = function() { + for ( + var e = this, t = this.pos; + /[\s\u00a0]/.test(this.string.charAt(this.pos)); + + ) + ++e.pos; + return this.pos > t; + }), (J.prototype.skipToEnd = function() { + this.pos = this.string.length; + }), (J.prototype.skipTo = function(e) { + var t = this.string.indexOf(e, this.pos); + if (t > -1) return (this.pos = t), !0; + }), (J.prototype.backUp = function(e) { + this.pos -= e; + }), (J.prototype.column = function() { + return this.lastColumnPos < this.start && + ((this.lastColumnValue = countColumn( + this.string, + this.start, + this.tabSize, + this.lastColumnPos, + this.lastColumnValue + )), (this.lastColumnPos = this.start)), this.lastColumnValue - + (this.lineStart + ? countColumn(this.string, this.lineStart, this.tabSize) + : 0); + }), (J.prototype.indentation = function() { + return ( + countColumn(this.string, null, this.tabSize) - + (this.lineStart + ? countColumn(this.string, this.lineStart, this.tabSize) + : 0) + ); + }), (J.prototype.match = function(e, t, n) { + if ('string' != typeof e) { + var r = this.string.slice(this.pos).match(e); + return r && r.index > 0 + ? null + : (r && !1 !== t && (this.pos += r[0].length), r); + } + var i = function(e) { + return n ? e.toLowerCase() : e; + }; + if (i(this.string.substr(this.pos, e.length)) == i(e)) + return !1 !== t && (this.pos += e.length), !0; + }), (J.prototype.current = function() { + return this.string.slice(this.start, this.pos); + }), (J.prototype.hideFirstChars = function(e, t) { + this.lineStart += e; + try { + return t(); + } finally { + this.lineStart -= e; + } + }); + var Q = function(e, t, n) { + (this.text = e), attachMarkedSpans(this, t), (this.height = n + ? n(this) + : 1); + }; + (Q.prototype.lineNo = function() { + return lineNo(this); + }), eventMixin(Q); + var ee, + te = {}, + ne = {}, + re = null, + ie = null, + oe = { left: 0, right: 0, top: 0, bottom: 0 }, + ae = function(e, t, n) { + this.cm = n; + var r = (this.vert = elt( + 'div', + [elt('div', null, null, 'min-width: 1px')], + 'CodeMirror-vscrollbar' + )), + i = (this.horiz = elt( + 'div', + [elt('div', null, null, 'height: 100%; min-height: 1px')], + 'CodeMirror-hscrollbar' + )); + e(r), e(i), G(r, 'scroll', function() { + r.clientHeight && t(r.scrollTop, 'vertical'); + }), G(i, 'scroll', function() { + i.clientWidth && t(i.scrollLeft, 'horizontal'); + }), (this.checkedZeroWidth = !1), a && + s < 8 && + (this.horiz.style.minHeight = this.vert.style.minWidth = '18px'); + }; + (ae.prototype.update = function(e) { + var t = e.scrollWidth > e.clientWidth + 1, + n = e.scrollHeight > e.clientHeight + 1, + r = e.nativeBarWidth; + if (n) { + (this.vert.style.display = 'block'), (this.vert.style.bottom = t + ? r + 'px' + : '0'); + var i = e.viewHeight - (t ? r : 0); + this.vert.firstChild.style.height = + Math.max(0, e.scrollHeight - e.clientHeight + i) + 'px'; + } else + (this.vert.style.display = ''), (this.vert.firstChild.style.height = + '0'); + if (t) { + (this.horiz.style.display = 'block'), (this.horiz.style.right = n + ? r + 'px' + : '0'), (this.horiz.style.left = e.barLeft + 'px'); + var o = e.viewWidth - e.barLeft - (n ? r : 0); + this.horiz.firstChild.style.width = + Math.max(0, e.scrollWidth - e.clientWidth + o) + 'px'; + } else + (this.horiz.style.display = ''), (this.horiz.firstChild.style.width = + '0'); + return !this.checkedZeroWidth && + e.clientHeight > 0 && + (0 == r && this.zeroWidthHack(), (this.checkedZeroWidth = !0)), { + right: n ? r : 0, + bottom: t ? r : 0 + }; + }), (ae.prototype.setScrollLeft = function(e) { + this.horiz.scrollLeft != e && (this.horiz.scrollLeft = e), this + .disableHoriz && + this.enableZeroWidthBar(this.horiz, this.disableHoriz, 'horiz'); + }), (ae.prototype.setScrollTop = function(e) { + this.vert.scrollTop != e && (this.vert.scrollTop = e), this + .disableVert && + this.enableZeroWidthBar(this.vert, this.disableVert, 'vert'); + }), (ae.prototype.zeroWidthHack = function() { + var e = y && !f ? '12px' : '18px'; + (this.horiz.style.height = this.vert.style.width = e), (this.horiz.style.pointerEvents = this.vert.style.pointerEvents = + 'none'), (this.disableHoriz = new T()), (this.disableVert = new T()); + }), (ae.prototype.enableZeroWidthBar = function(e, t, n) { + function maybeDisable() { + var r = e.getBoundingClientRect(); + ('vert' == n + ? document.elementFromPoint(r.right - 1, (r.top + r.bottom) / 2) + : document.elementFromPoint( + (r.right + r.left) / 2, + r.bottom - 1 + )) != e + ? (e.style.pointerEvents = 'none') + : t.set(1e3, maybeDisable); + } + (e.style.pointerEvents = 'auto'), t.set(1e3, maybeDisable); + }), (ae.prototype.clear = function() { + var e = this.horiz.parentNode; + e.removeChild(this.horiz), e.removeChild(this.vert); + }); + var se = function() {}; + (se.prototype.update = function() { + return { bottom: 0, right: 0 }; + }), (se.prototype.setScrollLeft = function() {}), (se.prototype.setScrollTop = function() {}), (se.prototype.clear = function() {}); + var le = { native: ae, null: se }, + ce = 0, + ue = function(e, t, n) { + var r = e.display; + (this.viewport = t), (this.visible = visibleLines( + r, + e.doc, + t + )), (this.editorIsHidden = !r.wrapper + .offsetWidth), (this.wrapperHeight = + r.wrapper.clientHeight), (this.wrapperWidth = + r.wrapper.clientWidth), (this.oldDisplayWidth = displayWidth( + e + )), (this.force = n), (this.dims = getDimensions( + e + )), (this.events = []); + }; + (ue.prototype.signal = function(e, t) { + hasHandler(e, t) && this.events.push(arguments); + }), (ue.prototype.finish = function() { + for (var e = this, t = 0; t < this.events.length; t++) + signal.apply(null, e.events[t]); + }); + var de = 0, pe = null; + a ? (pe = -0.53) : n ? (pe = 15) : u ? (pe = -0.7) : p && (pe = -1 / 3); + var fe = function(e, t) { + (this.ranges = e), (this.primIndex = t); + }; + (fe.prototype.primary = function() { + return this.ranges[this.primIndex]; + }), (fe.prototype.equals = function(e) { + var t = this; + if (e == this) return !0; + if ( + e.primIndex != this.primIndex || + e.ranges.length != this.ranges.length + ) + return !1; + for (var n = 0; n < this.ranges.length; n++) { + var r = t.ranges[n], i = e.ranges[n]; + if ( + !equalCursorPos(r.anchor, i.anchor) || + !equalCursorPos(r.head, i.head) + ) + return !1; + } + return !0; + }), (fe.prototype.deepCopy = function() { + for (var e = this, t = [], n = 0; n < this.ranges.length; n++) + t[n] = new he(copyPos(e.ranges[n].anchor), copyPos(e.ranges[n].head)); + return new fe(t, this.primIndex); + }), (fe.prototype.somethingSelected = function() { + for (var e = this, t = 0; t < this.ranges.length; t++) + if (!e.ranges[t].empty()) return !0; + return !1; + }), (fe.prototype.contains = function(e, t) { + var n = this; + t || (t = e); + for (var r = 0; r < this.ranges.length; r++) { + var i = n.ranges[r]; + if (cmp(t, i.from()) >= 0 && cmp(e, i.to()) <= 0) return r; + } + return -1; + }); + var he = function(e, t) { + (this.anchor = e), (this.head = t); + }; + (he.prototype.from = function() { + return minPos(this.anchor, this.head); + }), (he.prototype.to = function() { + return maxPos(this.anchor, this.head); + }), (he.prototype.empty = function() { + return ( + this.head.line == this.anchor.line && this.head.ch == this.anchor.ch + ); + }); + var ge = function(e) { + var t = this; + (this.lines = e), (this.parent = null); + for (var n = 0, r = 0; r < e.length; ++r) + (e[r].parent = t), (n += e[r].height); + this.height = n; + }; + (ge.prototype.chunkSize = function() { + return this.lines.length; + }), (ge.prototype.removeInner = function(e, t) { + for (var n = this, r = e, i = e + t; r < i; ++r) { + var o = n.lines[r]; + (n.height -= o.height), cleanUpLine(o), signalLater(o, 'delete'); + } + this.lines.splice(e, t); + }), (ge.prototype.collapse = function(e) { + e.push.apply(e, this.lines); + }), (ge.prototype.insertInner = function(e, t, n) { + var r = this; + (this.height += n), (this.lines = this.lines + .slice(0, e) + .concat(t) + .concat(this.lines.slice(e))); + for (var i = 0; i < t.length; ++i) + t[i].parent = r; + }), (ge.prototype.iterN = function(e, t, n) { + for (var r = this, i = e + t; e < i; ++e) + if (n(r.lines[e])) return !0; + }); + var me = function(e) { + var t = this; + this.children = e; + for (var n = 0, r = 0, i = 0; i < e.length; ++i) { + var o = e[i]; + (n += o.chunkSize()), (r += o.height), (o.parent = t); + } + (this.size = n), (this.height = r), (this.parent = null); + }; + (me.prototype.chunkSize = function() { + return this.size; + }), (me.prototype.removeInner = function(e, t) { + var n = this; + this.size -= t; + for (var r = 0; r < this.children.length; ++r) { + var i = n.children[r], o = i.chunkSize(); + if (e < o) { + var a = Math.min(t, o - e), s = i.height; + if ( + (i.removeInner(e, a), (n.height -= s - i.height), o == a && + (n.children.splice(r--, 1), (i.parent = null)), 0 == (t -= a)) + ) + break; + e = 0; + } else e -= o; + } + if ( + this.size - t < 25 && + (this.children.length > 1 || !(this.children[0] instanceof ge)) + ) { + var l = []; + this.collapse(l), (this.children = [ + new ge(l) + ]), (this.children[0].parent = this); + } + }), (me.prototype.collapse = function(e) { + for (var t = this, n = 0; n < this.children.length; ++n) + t.children[n].collapse(e); + }), (me.prototype.insertInner = function(e, t, n) { + var r = this; + (this.size += t.length), (this.height += n); + for (var i = 0; i < this.children.length; ++i) { + var o = r.children[i], a = o.chunkSize(); + if (e <= a) { + if ((o.insertInner(e, t, n), o.lines && o.lines.length > 50)) { + for ( + var s = o.lines.length % 25 + 25, l = s; + l < o.lines.length; + + ) { + var c = new ge(o.lines.slice(l, (l += 25))); + (o.height -= c.height), r.children.splice( + ++i, + 0, + c + ), (c.parent = r); + } + (o.lines = o.lines.slice(0, s)), r.maybeSpill(); + } + break; + } + e -= a; + } + }), (me.prototype.maybeSpill = function() { + if (!(this.children.length <= 10)) { + var e = this; + do { + var t = e.children.splice(e.children.length - 5, 5), n = new me(t); + if (e.parent) { + (e.size -= n.size), (e.height -= n.height); + var r = indexOf(e.parent.children, e); + e.parent.children.splice(r + 1, 0, n); + } else { + var i = new me(e.children); + (i.parent = e), (e.children = [i, n]), (e = i); + } + n.parent = e.parent; + } while (e.children.length > 10); + e.parent.maybeSpill(); + } + }), (me.prototype.iterN = function(e, t, n) { + for (var r = this, i = 0; i < this.children.length; ++i) { + var o = r.children[i], a = o.chunkSize(); + if (e < a) { + var s = Math.min(t, a - e); + if (o.iterN(e, s, n)) return !0; + if (0 == (t -= s)) break; + e = 0; + } else e -= a; + } + }); + var ve = function(e, t, n) { + var r = this; + if (n) for (var i in n) n.hasOwnProperty(i) && (r[i] = n[i]); + (this.doc = e), (this.node = t); + }; + (ve.prototype.clear = function() { + var e = this, + t = this.doc.cm, + n = this.line.widgets, + r = this.line, + i = lineNo(r); + if (null != i && n) { + for (var o = 0; o < n.length; ++o) + n[o] == e && n.splice(o--, 1); + n.length || (r.widgets = null); + var a = widgetHeight(this); + updateLineHeight(r, Math.max(0, r.height - a)), t && + (runInOp(t, function() { + adjustScrollWhenAboveVisible( + t, + r, + -a + ), regLineChange(t, i, 'widget'); + }), signalLater(t, 'lineWidgetCleared', t, this, i)); + } + }), (ve.prototype.changed = function() { + var e = this, t = this.height, n = this.doc.cm, r = this.line; + this.height = null; + var i = widgetHeight(this) - t; + i && + (updateLineHeight(r, r.height + i), n && + runInOp(n, function() { + (n.curOp.forceUpdate = !0), adjustScrollWhenAboveVisible(n, r, i), signalLater(n, 'lineWidgetChanged', n, e, lineNo(r)); + })); + }), eventMixin(ve); + var ye = 0, + be = function(e, t) { + (this.lines = []), (this.type = t), (this.doc = e), (this.id = ++ye); + }; + (be.prototype.clear = function() { + var e = this; + if (!this.explicitlyCleared) { + var t = this.doc.cm, n = t && !t.curOp; + if ((n && startOperation(t), hasHandler(this, 'clear'))) { + var r = this.find(); + r && signalLater(this, 'clear', r.from, r.to); + } + for (var i = null, o = null, a = 0; a < this.lines.length; ++a) { + var s = e.lines[a], l = getMarkedSpanFor(s.markedSpans, e); + t && !e.collapsed + ? regLineChange(t, lineNo(s), 'text') + : t && + (null != l.to && (o = lineNo(s)), null != l.from && + (i = lineNo(s))), (s.markedSpans = removeMarkedSpan( + s.markedSpans, + l + )), null == l.from && + e.collapsed && + !lineIsHidden(e.doc, s) && + t && + updateLineHeight(s, textHeight(t.display)); + } + if (t && this.collapsed && !t.options.lineWrapping) + for (var c = 0; c < this.lines.length; ++c) { + var u = visualLine(e.lines[c]), d = lineLength(u); + d > t.display.maxLineLength && + ((t.display.maxLine = u), (t.display.maxLineLength = d), (t.display.maxLineChanged = !0)); + } + null != i && + t && + this.collapsed && + regChange( + t, + i, + o + 1 + ), (this.lines.length = 0), (this.explicitlyCleared = !0), this + .atomic && + this.doc.cantEdit && + ((this.doc.cantEdit = !1), t && reCheckSelection(t.doc)), t && + signalLater(t, 'markerCleared', t, this, i, o), n && + endOperation(t), this.parent && this.parent.clear(); + } + }), (be.prototype.find = function(e, t) { + var n = this; + null == e && 'bookmark' == this.type && (e = 1); + for (var r, i, o = 0; o < this.lines.length; ++o) { + var a = n.lines[o], s = getMarkedSpanFor(a.markedSpans, n); + if (null != s.from && ((r = Pos(t ? a : lineNo(a), s.from)), -1 == e)) + return r; + if (null != s.to && ((i = Pos(t ? a : lineNo(a), s.to)), 1 == e)) + return i; + } + return r && { from: r, to: i }; + }), (be.prototype.changed = function() { + var e = this, t = this.find(-1, !0), n = this, r = this.doc.cm; + t && + r && + runInOp(r, function() { + var i = t.line, o = lineNo(t.line), a = findViewForLine(r, o); + if ( + (a && + (clearLineMeasurementCacheFor( + a + ), (r.curOp.selectionChanged = r.curOp.forceUpdate = !0)), (r.curOp.updateMaxLine = !0), !lineIsHidden( + n.doc, + i + ) && null != n.height) + ) { + var s = n.height; + n.height = null; + var l = widgetHeight(n) - s; + l && updateLineHeight(i, i.height + l); + } + signalLater(r, 'markerChanged', r, e); + }); + }), (be.prototype.attachLine = function(e) { + if (!this.lines.length && this.doc.cm) { + var t = this.doc.cm.curOp; + (t.maybeHiddenMarkers && -1 != indexOf(t.maybeHiddenMarkers, this)) || + (t.maybeUnhiddenMarkers || (t.maybeUnhiddenMarkers = [])) + .push(this); + } + this.lines.push(e); + }), (be.prototype.detachLine = function(e) { + if ( + (this.lines.splice(indexOf(this.lines, e), 1), !this.lines.length && + this.doc.cm) + ) { + var t = this.doc.cm.curOp; + (t.maybeHiddenMarkers || (t.maybeHiddenMarkers = [])).push(this); + } + }), eventMixin(be); + var xe = function(e, t) { + var n = this; + (this.markers = e), (this.primary = t); + for (var r = 0; r < e.length; ++r) + e[r].parent = n; + }; + (xe.prototype.clear = function() { + var e = this; + if (!this.explicitlyCleared) { + this.explicitlyCleared = !0; + for (var t = 0; t < this.markers.length; ++t) + e.markers[t].clear(); + signalLater(this, 'clear'); + } + }), (xe.prototype.find = function(e, t) { + return this.primary.find(e, t); + }), eventMixin(xe); + var Ce = 0, + we = function(e, t, n, r, i) { + if (!(this instanceof we)) return new we(e, t, n, r, i); + null == n && (n = 0), me.call(this, [ + new ge([new Q('', null)]) + ]), (this.first = n), (this.scrollTop = this.scrollLeft = 0), (this.cantEdit = !1), (this.cleanGeneration = 1), (this.frontier = n); + var o = Pos(n, 0); + (this.sel = simpleSelection(o)), (this.history = new History( + null + )), (this.id = ++Ce), (this.modeOption = t), (this.lineSep = r), (this.direction = 'rtl' == + i + ? 'rtl' + : 'ltr'), (this.extend = !1), 'string' == typeof e && + (e = this.splitLines(e)), updateDoc(this, { + from: o, + to: o, + text: e + }), setSelection(this, simpleSelection(o), D); + }; + (we.prototype = createObj(me.prototype, { + constructor: we, + iter: function(e, t, n) { + n + ? this.iterN(e - this.first, t - e, n) + : this.iterN(this.first, this.first + this.size, e); + }, + insert: function(e, t) { + for (var n = 0, r = 0; r < t.length; ++r) + n += t[r].height; + this.insertInner(e - this.first, t, n); + }, + remove: function(e, t) { + this.removeInner(e - this.first, t); + }, + getValue: function(e) { + var t = getLines(this, this.first, this.first + this.size); + return !1 === e ? t : t.join(e || this.lineSeparator()); + }, + setValue: docMethodOp(function(e) { + var t = Pos(this.first, 0), n = this.first + this.size - 1; + makeChange( + this, + { + from: t, + to: Pos(n, getLine(this, n).text.length), + text: this.splitLines(e), + origin: 'setValue', + full: !0 + }, + !0 + ), this.cm && scrollToCoords(this.cm, 0, 0), setSelection(this, simpleSelection(t), D); + }), + replaceRange: function(e, t, n, r) { + (t = clipPos(this, t)), (n = n ? clipPos(this, n) : t), replaceRange( + this, + e, + t, + n, + r + ); + }, + getRange: function(e, t, n) { + var r = getBetween(this, clipPos(this, e), clipPos(this, t)); + return !1 === n ? r : r.join(n || this.lineSeparator()); + }, + getLine: function(e) { + var t = this.getLineHandle(e); + return t && t.text; + }, + getLineHandle: function(e) { + if (isLine(this, e)) return getLine(this, e); + }, + getLineNumber: function(e) { + return lineNo(e); + }, + getLineHandleVisualStart: function(e) { + return 'number' == typeof e && (e = getLine(this, e)), visualLine(e); + }, + lineCount: function() { + return this.size; + }, + firstLine: function() { + return this.first; + }, + lastLine: function() { + return this.first + this.size - 1; + }, + clipPos: function(e) { + return clipPos(this, e); + }, + getCursor: function(e) { + var t = this.sel.primary(); + return null == e || 'head' == e + ? t.head + : 'anchor' == e + ? t.anchor + : 'end' == e || 'to' == e || !1 === e ? t.to() : t.from(); + }, + listSelections: function() { + return this.sel.ranges; + }, + somethingSelected: function() { + return this.sel.somethingSelected(); + }, + setCursor: docMethodOp(function(e, t, n) { + setSimpleSelection( + this, + clipPos(this, 'number' == typeof e ? Pos(e, t || 0) : e), + null, + n + ); + }), + setSelection: docMethodOp(function(e, t, n) { + setSimpleSelection(this, clipPos(this, e), clipPos(this, t || e), n); + }), + extendSelection: docMethodOp(function(e, t, n) { + extendSelection(this, clipPos(this, e), t && clipPos(this, t), n); + }), + extendSelections: docMethodOp(function(e, t) { + extendSelections(this, clipPosArray(this, e), t); + }), + extendSelectionsBy: docMethodOp(function(e, t) { + extendSelections( + this, + clipPosArray(this, map(this.sel.ranges, e)), + t + ); + }), + setSelections: docMethodOp(function(e, t, n) { + var r = this; + if (e.length) { + for (var i = [], o = 0; o < e.length; o++) + i[o] = new he(clipPos(r, e[o].anchor), clipPos(r, e[o].head)); + null == t && + (t = Math.min(e.length - 1, this.sel.primIndex)), setSelection( + this, + normalizeSelection(i, t), + n + ); + } + }), + addSelection: docMethodOp(function(e, t, n) { + var r = this.sel.ranges.slice(0); + r.push( + new he(clipPos(this, e), clipPos(this, t || e)) + ), setSelection(this, normalizeSelection(r, r.length - 1), n); + }), + getSelection: function(e) { + for (var t, n = this, r = this.sel.ranges, i = 0; i < r.length; i++) { + var o = getBetween(n, r[i].from(), r[i].to()); + t = t ? t.concat(o) : o; + } + return !1 === e ? t : t.join(e || this.lineSeparator()); + }, + getSelections: function(e) { + for ( + var t = this, n = [], r = this.sel.ranges, i = 0; + i < r.length; + i++ + ) { + var o = getBetween(t, r[i].from(), r[i].to()); + !1 !== e && (o = o.join(e || t.lineSeparator())), (n[i] = o); + } + return n; + }, + replaceSelection: function(e, t, n) { + for (var r = [], i = 0; i < this.sel.ranges.length; i++) + r[i] = e; + this.replaceSelections(r, t, n || '+input'); + }, + replaceSelections: docMethodOp(function(e, t, n) { + for ( + var r = this, i = [], o = this.sel, a = 0; + a < o.ranges.length; + a++ + ) { + var s = o.ranges[a]; + i[a] = { + from: s.from(), + to: s.to(), + text: r.splitLines(e[a]), + origin: n + }; + } + for ( + var l = t && 'end' != t && computeReplacedSel(this, i, t), + c = i.length - 1; + c >= 0; + c-- + ) makeChange(r, i[c]); + l + ? setSelectionReplaceHistory(this, l) + : this.cm && ensureCursorVisible(this.cm); + }), + undo: docMethodOp(function() { + makeChangeFromHistory(this, 'undo'); + }), + redo: docMethodOp(function() { + makeChangeFromHistory(this, 'redo'); + }), + undoSelection: docMethodOp(function() { + makeChangeFromHistory(this, 'undo', !0); + }), + redoSelection: docMethodOp(function() { + makeChangeFromHistory(this, 'redo', !0); + }), + setExtending: function(e) { + this.extend = e; + }, + getExtending: function() { + return this.extend; + }, + historySize: function() { + for ( + var e = this.history, t = 0, n = 0, r = 0; + r < e.done.length; + r++ + ) + e.done[r].ranges || ++t; + for (var i = 0; i < e.undone.length; i++) + e.undone[i].ranges || ++n; + return { undo: t, redo: n }; + }, + clearHistory: function() { + this.history = new History(this.history.maxGeneration); + }, + markClean: function() { + this.cleanGeneration = this.changeGeneration(!0); + }, + changeGeneration: function(e) { + return e && + (this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null), this + .history.generation; + }, + isClean: function(e) { + return this.history.generation == (e || this.cleanGeneration); + }, + getHistory: function() { + return { + done: copyHistoryArray(this.history.done), + undone: copyHistoryArray(this.history.undone) + }; + }, + setHistory: function(e) { + var t = (this.history = new History(this.history.maxGeneration)); + (t.done = copyHistoryArray( + e.done.slice(0), + null, + !0 + )), (t.undone = copyHistoryArray(e.undone.slice(0), null, !0)); + }, + setGutterMarker: docMethodOp(function(e, t, n) { + return changeLine(this, e, 'gutter', function(e) { + var r = e.gutterMarkers || (e.gutterMarkers = {}); + return (r[t] = n), !n && isEmpty(r) && (e.gutterMarkers = null), !0; + }); + }), + clearGutter: docMethodOp(function(e) { + var t = this; + this.iter(function(n) { + n.gutterMarkers && + n.gutterMarkers[e] && + changeLine(t, n, 'gutter', function() { + return (n.gutterMarkers[ + e + ] = null), isEmpty(n.gutterMarkers) && (n.gutterMarkers = null), !0; + }); + }); + }), + lineInfo: function(e) { + var t; + if ('number' == typeof e) { + if (!isLine(this, e)) return null; + if (((t = e), !(e = getLine(this, e)))) return null; + } else if (null == (t = lineNo(e))) return null; + return { + line: t, + handle: e, + text: e.text, + gutterMarkers: e.gutterMarkers, + textClass: e.textClass, + bgClass: e.bgClass, + wrapClass: e.wrapClass, + widgets: e.widgets + }; + }, + addLineClass: docMethodOp(function(e, t, n) { + return changeLine( + this, + e, + 'gutter' == t ? 'gutter' : 'class', + function(e) { + var r = 'text' == t + ? 'textClass' + : 'background' == t + ? 'bgClass' + : 'gutter' == t ? 'gutterClass' : 'wrapClass'; + if (e[r]) { + if (classTest(n).test(e[r])) return !1; + e[r] += ' ' + n; + } else e[r] = n; + return !0; + } + ); + }), + removeLineClass: docMethodOp(function(e, t, n) { + return changeLine( + this, + e, + 'gutter' == t ? 'gutter' : 'class', + function(e) { + var r = 'text' == t + ? 'textClass' + : 'background' == t + ? 'bgClass' + : 'gutter' == t ? 'gutterClass' : 'wrapClass', + i = e[r]; + if (!i) return !1; + if (null == n) e[r] = null; + else { + var o = i.match(classTest(n)); + if (!o) return !1; + var a = o.index + o[0].length; + e[r] = + i.slice(0, o.index) + + (o.index && a != i.length ? ' ' : '') + + i.slice(a) || null; + } + return !0; + } + ); + }), + addLineWidget: docMethodOp(function(e, t, n) { + return addLineWidget(this, e, t, n); + }), + removeLineWidget: function(e) { + e.clear(); + }, + markText: function(e, t, n) { + return markText( + this, + clipPos(this, e), + clipPos(this, t), + n, + (n && n.type) || 'range' + ); + }, + setBookmark: function(e, t) { + var n = { + replacedWith: t && (null == t.nodeType ? t.widget : t), + insertLeft: t && t.insertLeft, + clearWhenEmpty: !1, + shared: t && t.shared, + handleMouseEvents: t && t.handleMouseEvents + }; + return (e = clipPos(this, e)), markText(this, e, e, n, 'bookmark'); + }, + findMarksAt: function(e) { + e = clipPos(this, e); + var t = [], n = getLine(this, e.line).markedSpans; + if (n) + for (var r = 0; r < n.length; ++r) { + var i = n[r]; + (null == i.from || i.from <= e.ch) && + (null == i.to || i.to >= e.ch) && + t.push(i.marker.parent || i.marker); + } + return t; + }, + findMarks: function(e, t, n) { + (e = clipPos(this, e)), (t = clipPos(this, t)); + var r = [], i = e.line; + return this.iter(e.line, t.line + 1, function(o) { + var a = o.markedSpans; + if (a) + for (var s = 0; s < a.length; s++) { + var l = a[s]; + (null != l.to && i == e.line && e.ch >= l.to) || + (null == l.from && i != e.line) || + (null != l.from && i == t.line && l.from >= t.ch) || + (n && !n(l.marker)) || + r.push(l.marker.parent || l.marker); + } + ++i; + }), r; + }, + getAllMarks: function() { + var e = []; + return this.iter(function(t) { + var n = t.markedSpans; + if (n) + for (var r = 0; r < n.length; ++r) + null != n[r].from && e.push(n[r].marker); + }), e; + }, + posFromIndex: function(e) { + var t, n = this.first, r = this.lineSeparator().length; + return this.iter(function(i) { + var o = i.text.length + r; + if (o > e) return (t = e), !0; + (e -= o), ++n; + }), clipPos(this, Pos(n, t)); + }, + indexFromPos: function(e) { + e = clipPos(this, e); + var t = e.ch; + if (e.line < this.first || e.ch < 0) return 0; + var n = this.lineSeparator().length; + return this.iter(this.first, e.line, function(e) { + t += e.text.length + n; + }), t; + }, + copy: function(e) { + var t = new we( + getLines(this, this.first, this.first + this.size), + this.modeOption, + this.first, + this.lineSep, + this.direction + ); + return (t.scrollTop = this.scrollTop), (t.scrollLeft = this.scrollLeft), (t.sel = this.sel), (t.extend = !1), e && + ((t.history.undoDepth = this.history.undoDepth), t.setHistory( + this.getHistory() + )), t; + }, + linkedDoc: function(e) { + e || (e = {}); + var t = this.first, n = this.first + this.size; + null != e.from && e.from > t && (t = e.from), null != e.to && + e.to < n && + (n = e.to); + var r = new we( + getLines(this, t, n), + e.mode || this.modeOption, + t, + this.lineSep, + this.direction + ); + return e.sharedHist && (r.history = this.history), (this.linked || + (this.linked = [])) + .push({ doc: r, sharedHist: e.sharedHist }), (r.linked = [ + { doc: this, isParent: !0, sharedHist: e.sharedHist } + ]), copySharedMarkers(r, findSharedMarkers(this)), r; + }, + unlinkDoc: function(e) { + var t = this; + if ((e instanceof CodeMirror$1 && (e = e.doc), this.linked)) + for (var n = 0; n < this.linked.length; ++n) { + var r = t.linked[n]; + if (r.doc == e) { + t.linked.splice(n, 1), e.unlinkDoc(t), detachSharedMarkers( + findSharedMarkers(t) + ); + break; + } + } + if (e.history == this.history) { + var i = [e.id]; + linkedDocs( + e, + function(e) { + return i.push(e.id); + }, + !0 + ), (e.history = new History( + null + )), (e.history.done = copyHistoryArray( + this.history.done, + i + )), (e.history.undone = copyHistoryArray(this.history.undone, i)); + } + }, + iterLinkedDocs: function(e) { + linkedDocs(this, e); + }, + getMode: function() { + return this.mode; + }, + getEditor: function() { + return this.cm; + }, + splitLines: function(e) { + return this.lineSep ? e.split(this.lineSep) : U(e); + }, + lineSeparator: function() { + return this.lineSep || '\n'; + }, + setDirection: docMethodOp(function(e) { + 'rtl' != e && (e = 'ltr'), e != this.direction && + ((this.direction = e), this.iter(function(e) { + return (e.order = null); + }), this.cm && directionChanged(this.cm)); + }) + })), (we.prototype.eachLine = we.prototype.iter); + for ( + var Se = 0, + ke = !1, + Le = { + 3: 'Enter', + 8: 'Backspace', + 9: 'Tab', + 13: 'Enter', + 16: 'Shift', + 17: 'Ctrl', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Esc', + 32: 'Space', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'Left', + 38: 'Up', + 39: 'Right', + 40: 'Down', + 44: 'PrintScrn', + 45: 'Insert', + 46: 'Delete', + 59: ';', + 61: '=', + 91: 'Mod', + 92: 'Mod', + 93: 'Mod', + 106: '*', + 107: '=', + 109: '-', + 110: '.', + 111: '/', + 127: 'Delete', + 173: '-', + 186: ';', + 187: '=', + 188: ',', + 189: '-', + 190: '.', + 191: '/', + 192: '`', + 219: '[', + 220: '\\', + 221: ']', + 222: "'", + 63232: 'Up', + 63233: 'Down', + 63234: 'Left', + 63235: 'Right', + 63272: 'Delete', + 63273: 'Home', + 63275: 'End', + 63276: 'PageUp', + 63277: 'PageDown', + 63302: 'Insert' + }, + Me = 0; + Me < 10; + Me++ + ) Le[Me + 48] = Le[Me + 96] = String(Me); + for (var Te = 65; Te <= 90; Te++) Le[Te] = String.fromCharCode(Te); + for (var Oe = 1; Oe <= 12; Oe++) Le[Oe + 111] = Le[Oe + 63235] = 'F' + Oe; + var Pe = {}; + (Pe.basic = { + Left: 'goCharLeft', + Right: 'goCharRight', + Up: 'goLineUp', + Down: 'goLineDown', + End: 'goLineEnd', + Home: 'goLineStartSmart', + PageUp: 'goPageUp', + PageDown: 'goPageDown', + Delete: 'delCharAfter', + Backspace: 'delCharBefore', + 'Shift-Backspace': 'delCharBefore', + Tab: 'defaultTab', + 'Shift-Tab': 'indentAuto', + Enter: 'newlineAndIndent', + Insert: 'toggleOverwrite', + Esc: 'singleSelection' + }), (Pe.pcDefault = { 'Ctrl-A': 'selectAll', 'Ctrl-D': 'deleteLine', 'Ctrl-Z': 'undo', 'Shift-Ctrl-Z': 'redo', 'Ctrl-Y': 'redo', 'Ctrl-Home': 'goDocStart', 'Ctrl-End': 'goDocEnd', 'Ctrl-Up': 'goLineUp', 'Ctrl-Down': 'goLineDown', 'Ctrl-Left': 'goGroupLeft', 'Ctrl-Right': 'goGroupRight', 'Alt-Left': 'goLineStart', 'Alt-Right': 'goLineEnd', 'Ctrl-Backspace': 'delGroupBefore', 'Ctrl-Delete': 'delGroupAfter', 'Ctrl-S': 'save', 'Ctrl-F': 'find', 'Ctrl-G': 'findNext', 'Shift-Ctrl-G': 'findPrev', 'Shift-Ctrl-F': 'replace', 'Shift-Ctrl-R': 'replaceAll', 'Ctrl-[': 'indentLess', 'Ctrl-]': 'indentMore', 'Ctrl-U': 'undoSelection', 'Shift-Ctrl-U': 'redoSelection', 'Alt-U': 'redoSelection', fallthrough: 'basic' }), (Pe.emacsy = { 'Ctrl-F': 'goCharRight', 'Ctrl-B': 'goCharLeft', 'Ctrl-P': 'goLineUp', 'Ctrl-N': 'goLineDown', 'Alt-F': 'goWordRight', 'Alt-B': 'goWordLeft', 'Ctrl-A': 'goLineStart', 'Ctrl-E': 'goLineEnd', 'Ctrl-V': 'goPageDown', 'Shift-Ctrl-V': 'goPageUp', 'Ctrl-D': 'delCharAfter', 'Ctrl-H': 'delCharBefore', 'Alt-D': 'delWordAfter', 'Alt-Backspace': 'delWordBefore', 'Ctrl-K': 'killLine', 'Ctrl-T': 'transposeChars', 'Ctrl-O': 'openLine' }), (Pe.macDefault = { 'Cmd-A': 'selectAll', 'Cmd-D': 'deleteLine', 'Cmd-Z': 'undo', 'Shift-Cmd-Z': 'redo', 'Cmd-Y': 'redo', 'Cmd-Home': 'goDocStart', 'Cmd-Up': 'goDocStart', 'Cmd-End': 'goDocEnd', 'Cmd-Down': 'goDocEnd', 'Alt-Left': 'goGroupLeft', 'Alt-Right': 'goGroupRight', 'Cmd-Left': 'goLineLeft', 'Cmd-Right': 'goLineRight', 'Alt-Backspace': 'delGroupBefore', 'Ctrl-Alt-Backspace': 'delGroupAfter', 'Alt-Delete': 'delGroupAfter', 'Cmd-S': 'save', 'Cmd-F': 'find', 'Cmd-G': 'findNext', 'Shift-Cmd-G': 'findPrev', 'Cmd-Alt-F': 'replace', 'Shift-Cmd-Alt-F': 'replaceAll', 'Cmd-[': 'indentLess', 'Cmd-]': 'indentMore', 'Cmd-Backspace': 'delWrappedLineLeft', 'Cmd-Delete': 'delWrappedLineRight', 'Cmd-U': 'undoSelection', 'Shift-Cmd-U': 'redoSelection', 'Ctrl-Up': 'goDocStart', 'Ctrl-Down': 'goDocEnd', fallthrough: ['basic', 'emacsy'] }), (Pe.default = y ? Pe.macDefault : Pe.pcDefault); + var Ne, + Ae, + De = { + selectAll: selectAll, + singleSelection: function(e) { + return e.setSelection( + e.getCursor('anchor'), + e.getCursor('head'), + D + ); + }, + killLine: function(e) { + return deleteNearSelection(e, function(t) { + if (t.empty()) { + var n = getLine(e.doc, t.head.line).text.length; + return t.head.ch == n && t.head.line < e.lastLine() + ? { from: t.head, to: Pos(t.head.line + 1, 0) } + : { from: t.head, to: Pos(t.head.line, n) }; + } + return { from: t.from(), to: t.to() }; + }); + }, + deleteLine: function(e) { + return deleteNearSelection(e, function(t) { + return { + from: Pos(t.from().line, 0), + to: clipPos(e.doc, Pos(t.to().line + 1, 0)) + }; + }); + }, + delLineLeft: function(e) { + return deleteNearSelection(e, function(e) { + return { from: Pos(e.from().line, 0), to: e.from() }; + }); + }, + delWrappedLineLeft: function(e) { + return deleteNearSelection(e, function(t) { + var n = e.charCoords(t.head, 'div').top + 5; + return { + from: e.coordsChar({ left: 0, top: n }, 'div'), + to: t.from() + }; + }); + }, + delWrappedLineRight: function(e) { + return deleteNearSelection(e, function(t) { + var n = e.charCoords(t.head, 'div').top + 5, + r = e.coordsChar( + { left: e.display.lineDiv.offsetWidth + 100, top: n }, + 'div' + ); + return { from: t.from(), to: r }; + }); + }, + undo: function(e) { + return e.undo(); + }, + redo: function(e) { + return e.redo(); + }, + undoSelection: function(e) { + return e.undoSelection(); + }, + redoSelection: function(e) { + return e.redoSelection(); + }, + goDocStart: function(e) { + return e.extendSelection(Pos(e.firstLine(), 0)); + }, + goDocEnd: function(e) { + return e.extendSelection(Pos(e.lastLine())); + }, + goLineStart: function(e) { + return e.extendSelectionsBy( + function(t) { + return lineStart(e, t.head.line); + }, + { origin: '+move', bias: 1 } + ); + }, + goLineStartSmart: function(e) { + return e.extendSelectionsBy( + function(t) { + return lineStartSmart(e, t.head); + }, + { origin: '+move', bias: 1 } + ); + }, + goLineEnd: function(e) { + return e.extendSelectionsBy( + function(t) { + return lineEnd(e, t.head.line); + }, + { origin: '+move', bias: -1 } + ); + }, + goLineRight: function(e) { + return e.extendSelectionsBy(function(t) { + var n = e.charCoords(t.head, 'div').top + 5; + return e.coordsChar( + { left: e.display.lineDiv.offsetWidth + 100, top: n }, + 'div' + ); + }, W); + }, + goLineLeft: function(e) { + return e.extendSelectionsBy(function(t) { + var n = e.charCoords(t.head, 'div').top + 5; + return e.coordsChar({ left: 0, top: n }, 'div'); + }, W); + }, + goLineLeftSmart: function(e) { + return e.extendSelectionsBy(function(t) { + var n = e.charCoords(t.head, 'div').top + 5, + r = e.coordsChar({ left: 0, top: n }, 'div'); + return r.ch < e.getLine(r.line).search(/\S/) + ? lineStartSmart(e, t.head) + : r; + }, W); + }, + goLineUp: function(e) { + return e.moveV(-1, 'line'); + }, + goLineDown: function(e) { + return e.moveV(1, 'line'); + }, + goPageUp: function(e) { + return e.moveV(-1, 'page'); + }, + goPageDown: function(e) { + return e.moveV(1, 'page'); + }, + goCharLeft: function(e) { + return e.moveH(-1, 'char'); + }, + goCharRight: function(e) { + return e.moveH(1, 'char'); + }, + goColumnLeft: function(e) { + return e.moveH(-1, 'column'); + }, + goColumnRight: function(e) { + return e.moveH(1, 'column'); + }, + goWordLeft: function(e) { + return e.moveH(-1, 'word'); + }, + goGroupRight: function(e) { + return e.moveH(1, 'group'); + }, + goGroupLeft: function(e) { + return e.moveH(-1, 'group'); + }, + goWordRight: function(e) { + return e.moveH(1, 'word'); + }, + delCharBefore: function(e) { + return e.deleteH(-1, 'char'); + }, + delCharAfter: function(e) { + return e.deleteH(1, 'char'); + }, + delWordBefore: function(e) { + return e.deleteH(-1, 'word'); + }, + delWordAfter: function(e) { + return e.deleteH(1, 'word'); + }, + delGroupBefore: function(e) { + return e.deleteH(-1, 'group'); + }, + delGroupAfter: function(e) { + return e.deleteH(1, 'group'); + }, + indentAuto: function(e) { + return e.indentSelection('smart'); + }, + indentMore: function(e) { + return e.indentSelection('add'); + }, + indentLess: function(e) { + return e.indentSelection('subtract'); + }, + insertTab: function(e) { + return e.replaceSelection('\t'); + }, + insertSoftTab: function(e) { + for ( + var t = [], n = e.listSelections(), r = e.options.tabSize, i = 0; + i < n.length; + i++ + ) { + var o = n[i].from(), a = countColumn(e.getLine(o.line), o.ch, r); + t.push(spaceStr(r - a % r)); + } + e.replaceSelections(t); + }, + defaultTab: function(e) { + e.somethingSelected() + ? e.indentSelection('add') + : e.execCommand('insertTab'); + }, + transposeChars: function(e) { + return runInOp(e, function() { + for ( + var t = e.listSelections(), n = [], r = 0; + r < t.length; + r++ + ) if (t[r].empty()) { + var i = t[r].head, o = getLine(e.doc, i.line).text; + if (o) + if ( + (i.ch == o.length && + (i = new Pos(i.line, i.ch - 1)), i.ch > 0) + ) + (i = new Pos(i.line, i.ch + 1)), e.replaceRange( + o.charAt(i.ch - 1) + o.charAt(i.ch - 2), + Pos(i.line, i.ch - 2), + i, + '+transpose' + ); + else if (i.line > e.doc.first) { + var a = getLine(e.doc, i.line - 1).text; + a && + ((i = new Pos(i.line, 1)), e.replaceRange( + o.charAt(0) + + e.doc.lineSeparator() + + a.charAt(a.length - 1), + Pos(i.line - 1, a.length - 1), + i, + '+transpose' + )); + } + n.push(new he(i, i)); + } + e.setSelections(n); + }); + }, + newlineAndIndent: function(e) { + return runInOp(e, function() { + for ( + var t = e.listSelections(), n = t.length - 1; + n >= 0; + n-- + ) e.replaceRange(e.doc.lineSeparator(), t[n].anchor, t[n].head, '+input'); + t = e.listSelections(); + for ( + var r = 0; + r < t.length; + r++ + ) e.indentLine(t[r].from().line, null, !0); + ensureCursorVisible(e); + }); + }, + openLine: function(e) { + return e.replaceSelection('\n', 'start'); + }, + toggleOverwrite: function(e) { + return e.toggleOverwrite(); + } + }, + He = new T(), + We = null, + Ee = { + toString: function() { + return 'CodeMirror.Init'; + } + }, + Ie = {}, + Fe = {}; + (CodeMirror$1.defaults = Ie), (CodeMirror$1.optionHandlers = Fe); + var Be = []; + CodeMirror$1.defineInitHook = function(e) { + return Be.push(e); + }; + var ze = null, + Re = function(e) { + (this.cm = e), (this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null), (this.polling = new T()), (this.composing = null), (this.gracePeriod = !1), (this.readDOMTimeout = null); + }; + (Re.prototype.init = function(e) { + function onCopyCut(e) { + if (!signalDOMEvent(r, e)) { + if (r.somethingSelected()) + setLastCopied({ lineWise: !1, text: r.getSelections() }), 'cut' == + e.type && r.replaceSelection('', null, 'cut'); + else { + if (!r.options.lineWiseCopyCut) return; + var t = copyableRanges(r); + setLastCopied({ lineWise: !0, text: t.text }), 'cut' == e.type && + r.operation(function() { + r.setSelections( + t.ranges, + 0, + D + ), r.replaceSelection('', null, 'cut'); + }); + } + if (e.clipboardData) { + e.clipboardData.clearData(); + var o = ze.text.join('\n'); + if ( + (e.clipboardData.setData('Text', o), e.clipboardData.getData( + 'Text' + ) == o) + ) + return void e.preventDefault(); + } + var a = hiddenTextarea(), s = a.firstChild; + r.display.lineSpace.insertBefore( + a, + r.display.lineSpace.firstChild + ), (s.value = ze.text.join('\n')); + var l = document.activeElement; + M(s), setTimeout(function() { + r.display.lineSpace.removeChild( + a + ), l.focus(), l == i && n.showPrimarySelection(); + }, 50); + } + } + var t = this, n = this, r = n.cm, i = (n.div = e.lineDiv); + disableBrowserMagic(i, r.options.spellcheck), G(i, 'paste', function( + e + ) { + signalDOMEvent(r, e) || + handlePaste(e, r) || + (s <= 11 && + setTimeout( + operation(r, function() { + return t.updateFromDOM(); + }), + 20 + )); + }), G(i, 'compositionstart', function(e) { + t.composing = { data: e.data, done: !1 }; + }), G(i, 'compositionupdate', function(e) { + t.composing || (t.composing = { data: e.data, done: !1 }); + }), G(i, 'compositionend', function(e) { + t.composing && + (e.data != t.composing.data && + t.readFromDOMSoon(), (t.composing.done = !0)); + }), G(i, 'touchstart', function() { + return n.forceCompositionEnd(); + }), G(i, 'input', function() { + t.composing || t.readFromDOMSoon(); + }), G(i, 'copy', onCopyCut), G(i, 'cut', onCopyCut); + }), (Re.prototype.prepareSelection = function() { + var e = prepareSelection(this.cm, !1); + return (e.focus = this.cm.state.focused), e; + }), (Re.prototype.showSelection = function(e, t) { + e && + this.cm.display.view.length && + ((e.focus || t) && + this.showPrimarySelection(), this.showMultipleSelections(e)); + }), (Re.prototype.showPrimarySelection = function() { + var e = window.getSelection(), + t = this.cm, + r = t.doc.sel.primary(), + i = r.from(), + o = r.to(); + if ( + t.display.viewTo == t.display.viewFrom || + i.line >= t.display.viewTo || + o.line < t.display.viewFrom + ) + return void e.removeAllRanges(); + var a = domToPos(t, e.anchorNode, e.anchorOffset), + s = domToPos(t, e.focusNode, e.focusOffset); + if ( + !a || + a.bad || + !s || + s.bad || + 0 != cmp(minPos(a, s), i) || + 0 != cmp(maxPos(a, s), o) + ) { + var l = t.display.view, + c = (i.line >= t.display.viewFrom && posToDOM(t, i)) || { + node: l[0].measure.map[2], + offset: 0 + }, + u = o.line < t.display.viewTo && posToDOM(t, o); + if (!u) { + var d = l[l.length - 1].measure, + p = d.maps ? d.maps[d.maps.length - 1] : d.map; + u = { + node: p[p.length - 1], + offset: p[p.length - 2] - p[p.length - 3] + }; + } + if (!c || !u) return void e.removeAllRanges(); + var f, h = e.rangeCount && e.getRangeAt(0); + try { + f = w(c.node, c.offset, u.offset, u.node); + } catch (e) {} + f && + (!n && t.state.focused + ? (e.collapse(c.node, c.offset), f.collapsed || + (e.removeAllRanges(), e.addRange(f))) + : (e.removeAllRanges(), e.addRange(f)), h && null == e.anchorNode + ? e.addRange(h) + : n && this.startGracePeriod()), this.rememberSelection(); + } + }), (Re.prototype.startGracePeriod = function() { + var e = this; + clearTimeout( + this.gracePeriod + ), (this.gracePeriod = setTimeout(function() { + (e.gracePeriod = !1), e.selectionChanged() && + e.cm.operation(function() { + return (e.cm.curOp.selectionChanged = !0); + }); + }, 20)); + }), (Re.prototype.showMultipleSelections = function(e) { + removeChildrenAndAdd( + this.cm.display.cursorDiv, + e.cursors + ), removeChildrenAndAdd(this.cm.display.selectionDiv, e.selection); + }), (Re.prototype.rememberSelection = function() { + var e = window.getSelection(); + (this.lastAnchorNode = e.anchorNode), (this.lastAnchorOffset = + e.anchorOffset), (this.lastFocusNode = + e.focusNode), (this.lastFocusOffset = e.focusOffset); + }), (Re.prototype.selectionInEditor = function() { + var e = window.getSelection(); + if (!e.rangeCount) return !1; + var t = e.getRangeAt(0).commonAncestorContainer; + return contains(this.div, t); + }), (Re.prototype.focus = function() { + 'nocursor' != this.cm.options.readOnly && + (this.selectionInEditor() || + this.showSelection(this.prepareSelection(), !0), this.div.focus()); + }), (Re.prototype.blur = function() { + this.div.blur(); + }), (Re.prototype.getField = function() { + return this.div; + }), (Re.prototype.supportsTouch = function() { + return !0; + }), (Re.prototype.receivedFocus = function() { + function poll() { + e.cm.state.focused && + (e.pollSelection(), e.polling.set(e.cm.options.pollInterval, poll)); + } + var e = this; + this.selectionInEditor() + ? this.pollSelection() + : runInOp(this.cm, function() { + return (e.cm.curOp.selectionChanged = !0); + }), this.polling.set(this.cm.options.pollInterval, poll); + }), (Re.prototype.selectionChanged = function() { + var e = window.getSelection(); + return ( + e.anchorNode != this.lastAnchorNode || + e.anchorOffset != this.lastAnchorOffset || + e.focusNode != this.lastFocusNode || + e.focusOffset != this.lastFocusOffset + ); + }), (Re.prototype.pollSelection = function() { + if ( + null == this.readDOMTimeout && + !this.gracePeriod && + this.selectionChanged() + ) { + var e = window.getSelection(), t = this.cm; + if ( + m && + u && + this.cm.options.gutters.length && + isInGutter(e.anchorNode) + ) + return this.cm.triggerOnKeyDown({ + type: 'keydown', + keyCode: 8, + preventDefault: Math.abs + }), this.blur(), void this.focus(); + if (!this.composing) { + this.rememberSelection(); + var n = domToPos(t, e.anchorNode, e.anchorOffset), + r = domToPos(t, e.focusNode, e.focusOffset); + n && + r && + runInOp(t, function() { + setSelection( + t.doc, + simpleSelection(n, r), + D + ), (n.bad || r.bad) && (t.curOp.selectionChanged = !0); + }); + } + } + }), (Re.prototype.pollContent = function() { + null != this.readDOMTimeout && + (clearTimeout(this.readDOMTimeout), (this.readDOMTimeout = null)); + var e = this.cm, + t = e.display, + n = e.doc.sel.primary(), + r = n.from(), + i = n.to(); + if ( + (0 == r.ch && + r.line > e.firstLine() && + (r = Pos(r.line - 1, getLine(e.doc, r.line - 1).length)), i.ch == + getLine(e.doc, i.line).text.length && + i.line < e.lastLine() && + (i = Pos(i.line + 1, 0)), r.line < t.viewFrom || + i.line > t.viewTo - 1) + ) + return !1; + var o, a, s; + r.line == t.viewFrom || 0 == (o = findViewIndex(e, r.line)) + ? ((a = lineNo(t.view[0].line)), (s = t.view[0].node)) + : ((a = lineNo(t.view[o].line)), (s = + t.view[o - 1].node.nextSibling)); + var l, c, u = findViewIndex(e, i.line); + if ( + (u == t.view.length - 1 + ? ((l = t.viewTo - 1), (c = t.lineDiv.lastChild)) + : ((l = lineNo(t.view[u + 1].line) - 1), (c = + t.view[u + 1].node.previousSibling)), !s) + ) + return !1; + for ( + var d = e.doc.splitLines(domTextBetween(e, s, c, a, l)), + p = getBetween( + e.doc, + Pos(a, 0), + Pos(l, getLine(e.doc, l).text.length) + ); + d.length > 1 && p.length > 1; + + ) + if (lst(d) == lst(p)) d.pop(), p.pop(), l--; + else { + if (d[0] != p[0]) break; + d.shift(), p.shift(), a++; + } + for ( + var f = 0, + h = 0, + g = d[0], + m = p[0], + v = Math.min(g.length, m.length); + f < v && g.charCodeAt(f) == m.charCodeAt(f); + + ) + ++f; + for ( + var y = lst(d), + b = lst(p), + x = Math.min( + y.length - (1 == d.length ? f : 0), + b.length - (1 == p.length ? f : 0) + ); + h < x && + y.charCodeAt(y.length - h - 1) == b.charCodeAt(b.length - h - 1); + + ) + ++h; + if (1 == d.length && 1 == p.length && a == r.line) + for ( + ; + f && + f > r.ch && + y.charCodeAt(y.length - h - 1) == b.charCodeAt(b.length - h - 1); + + ) + f--, h++; + (d[d.length - 1] = y + .slice(0, y.length - h) + .replace(/^\u200b+/, '')), (d[0] = d[0] + .slice(f) + .replace(/\u200b+$/, '')); + var C = Pos(a, f), w = Pos(l, p.length ? lst(p).length - h : 0); + return d.length > 1 || d[0] || cmp(C, w) + ? (replaceRange(e.doc, d, C, w, '+input'), !0) + : void 0; + }), (Re.prototype.ensurePolled = function() { + this.forceCompositionEnd(); + }), (Re.prototype.reset = function() { + this.forceCompositionEnd(); + }), (Re.prototype.forceCompositionEnd = function() { + this.composing && + (clearTimeout( + this.readDOMTimeout + ), (this.composing = null), this.updateFromDOM(), this.div.blur(), this.div.focus()); + }), (Re.prototype.readFromDOMSoon = function() { + var e = this; + null == this.readDOMTimeout && + (this.readDOMTimeout = setTimeout(function() { + if (((e.readDOMTimeout = null), e.composing)) { + if (!e.composing.done) return; + e.composing = null; + } + e.updateFromDOM(); + }, 80)); + }), (Re.prototype.updateFromDOM = function() { + var e = this; + (!this.cm.isReadOnly() && this.pollContent()) || + runInOp(this.cm, function() { + return regChange(e.cm); + }); + }), (Re.prototype.setUneditable = function(e) { + e.contentEditable = 'false'; + }), (Re.prototype.onKeyPress = function(e) { + 0 != e.charCode && + (e.preventDefault(), this.cm.isReadOnly() || + operation(this.cm, applyTextInput)( + this.cm, + String.fromCharCode(null == e.charCode ? e.keyCode : e.charCode), + 0 + )); + }), (Re.prototype.readOnlyChanged = function(e) { + this.div.contentEditable = String('nocursor' != e); + }), (Re.prototype.onContextMenu = function() {}), (Re.prototype.resetPosition = function() {}), (Re.prototype.needsContentAttribute = !0); + var Ve = function(e) { + (this.cm = e), (this.prevInput = + ''), (this.pollingFast = !1), (this.polling = new T()), (this.inaccurateSelection = !1), (this.hasSelection = !1), (this.composing = null); + }; + (Ve.prototype.init = function(e) { + function prepareCopyCut(e) { + if (!signalDOMEvent(r, e)) { + if (r.somethingSelected()) + setLastCopied({ + lineWise: !1, + text: r.getSelections() + }), n.inaccurateSelection && + ((n.prevInput = + ''), (n.inaccurateSelection = !1), (o.value = ze.text.join( + '\n' + )), M(o)); + else { + if (!r.options.lineWiseCopyCut) return; + var t = copyableRanges(r); + setLastCopied({ lineWise: !0, text: t.text }), 'cut' == e.type + ? r.setSelections(t.ranges, null, D) + : ((n.prevInput = ''), (o.value = t.text.join('\n')), M(o)); + } + 'cut' == e.type && (r.state.cutIncoming = !0); + } + } + var t = this, + n = this, + r = this.cm, + i = (this.wrapper = hiddenTextarea()), + o = (this.textarea = i.firstChild); + e.wrapper.insertBefore(i, e.wrapper.firstChild), g && + (o.style.width = '0px'), G(o, 'input', function() { + a && s >= 9 && t.hasSelection && (t.hasSelection = null), n.poll(); + }), G(o, 'paste', function(e) { + signalDOMEvent(r, e) || + handlePaste(e, r) || + ((r.state.pasteIncoming = !0), n.fastPoll()); + }), G(o, 'cut', prepareCopyCut), G( + o, + 'copy', + prepareCopyCut + ), G(e.scroller, 'paste', function(t) { + eventInWidget(e, t) || + signalDOMEvent(r, t) || + ((r.state.pasteIncoming = !0), n.focus()); + }), G(e.lineSpace, 'selectstart', function(t) { + eventInWidget(e, t) || e_preventDefault(t); + }), G(o, 'compositionstart', function() { + var e = r.getCursor('from'); + n.composing && + n.composing.range.clear(), (n.composing = { start: e, range: r.markText(e, r.getCursor('to'), { className: 'CodeMirror-composing' }) }); + }), G(o, 'compositionend', function() { + n.composing && + (n.poll(), n.composing.range.clear(), (n.composing = null)); + }); + }), (Ve.prototype.prepareSelection = function() { + var e = this.cm, t = e.display, n = e.doc, r = prepareSelection(e); + if (e.options.moveInputWithCursor) { + var i = cursorCoords(e, n.sel.primary().head, 'div'), + o = t.wrapper.getBoundingClientRect(), + a = t.lineDiv.getBoundingClientRect(); + (r.teTop = Math.max( + 0, + Math.min(t.wrapper.clientHeight - 10, i.top + a.top - o.top) + )), (r.teLeft = Math.max( + 0, + Math.min(t.wrapper.clientWidth - 10, i.left + a.left - o.left) + )); + } + return r; + }), (Ve.prototype.showSelection = function(e) { + var t = this.cm, n = t.display; + removeChildrenAndAdd(n.cursorDiv, e.cursors), removeChildrenAndAdd( + n.selectionDiv, + e.selection + ), null != e.teTop && + ((this.wrapper.style.top = e.teTop + 'px'), (this.wrapper.style.left = + e.teLeft + 'px')); + }), (Ve.prototype.reset = function(e) { + if (!this.contextMenuPending && !this.composing) { + var t, n, r = this.cm, i = r.doc; + if (r.somethingSelected()) { + this.prevInput = ''; + var o = i.sel.primary(); + t = + $ && + (o.to().line - o.from().line > 100 || + (n = r.getSelection()).length > 1e3); + var l = t ? '-' : n || r.getSelection(); + (this.textarea.value = l), r.state.focused && M(this.textarea), a && + s >= 9 && + (this.hasSelection = l); + } else + e || + ((this.prevInput = this.textarea.value = ''), a && + s >= 9 && + (this.hasSelection = null)); + this.inaccurateSelection = t; + } + }), (Ve.prototype.getField = function() { + return this.textarea; + }), (Ve.prototype.supportsTouch = function() { + return !1; + }), (Ve.prototype.focus = function() { + if ( + 'nocursor' != this.cm.options.readOnly && + (!v || activeElt() != this.textarea) + ) + try { + this.textarea.focus(); + } catch (e) {} + }), (Ve.prototype.blur = function() { + this.textarea.blur(); + }), (Ve.prototype.resetPosition = function() { + this.wrapper.style.top = this.wrapper.style.left = 0; + }), (Ve.prototype.receivedFocus = function() { + this.slowPoll(); + }), (Ve.prototype.slowPoll = function() { + var e = this; + this.pollingFast || + this.polling.set(this.cm.options.pollInterval, function() { + e.poll(), e.cm.state.focused && e.slowPoll(); + }); + }), (Ve.prototype.fastPoll = function() { + function p() { + t.poll() || e + ? ((t.pollingFast = !1), t.slowPoll()) + : ((e = !0), t.polling.set(60, p)); + } + var e = !1, t = this; + (t.pollingFast = !0), t.polling.set(20, p); + }), (Ve.prototype.poll = function() { + var e = this, t = this.cm, n = this.textarea, r = this.prevInput; + if ( + this.contextMenuPending || + !t.state.focused || + (K(n) && !r && !this.composing) || + t.isReadOnly() || + t.options.disableInput || + t.state.keySeq + ) + return !1; + var i = n.value; + if (i == r && !t.somethingSelected()) return !1; + if ( + (a && s >= 9 && this.hasSelection === i) || + (y && /[\uf700-\uf7ff]/.test(i)) + ) + return t.display.input.reset(), !1; + if (t.doc.sel == t.display.selForContextMenu) { + var o = i.charCodeAt(0); + if ((8203 != o || r || (r = '​'), 8666 == o)) + return this.reset(), this.cm.execCommand('undo'); + } + for ( + var l = 0, c = Math.min(r.length, i.length); + l < c && r.charCodeAt(l) == i.charCodeAt(l); + + ) + ++l; + return runInOp(t, function() { + applyTextInput( + t, + i.slice(l), + r.length - l, + null, + e.composing ? '*compose' : null + ), i.length > 1e3 || i.indexOf('\n') > -1 ? (n.value = e.prevInput = '') : (e.prevInput = i), e.composing && (e.composing.range.clear(), (e.composing.range = t.markText(e.composing.start, t.getCursor('to'), { className: 'CodeMirror-composing' }))); + }), !0; + }), (Ve.prototype.ensurePolled = function() { + this.pollingFast && this.poll() && (this.pollingFast = !1); + }), (Ve.prototype.onKeyPress = function() { + a && s >= 9 && (this.hasSelection = null), this.fastPoll(); + }), (Ve.prototype.onContextMenu = function(e) { + function prepareSelectAllHack() { + if (null != i.selectionStart) { + var e = n.somethingSelected(), o = '​' + (e ? i.value : ''); + (i.value = '⇚'), (i.value = o), (t.prevInput = e + ? '' + : '​'), (i.selectionStart = 1), (i.selectionEnd = + o.length), (r.selForContextMenu = n.doc.sel); + } + } + function rehide() { + if ( + ((t.contextMenuPending = !1), (t.wrapper.style.cssText = p), (i.style.cssText = u), a && + s < 9 && + r.scrollbars.setScrollTop((r.scroller.scrollTop = c)), null != + i.selectionStart) + ) { + (!a || (a && s < 9)) && prepareSelectAllHack(); + var e = 0, + o = function() { + r.selForContextMenu == n.doc.sel && + 0 == i.selectionStart && + i.selectionEnd > 0 && + '​' == t.prevInput + ? operation(n, selectAll)(n) + : e++ < 10 + ? (r.detectingSelectAll = setTimeout(o, 500)) + : ((r.selForContextMenu = null), r.input.reset()); + }; + r.detectingSelectAll = setTimeout(o, 200); + } + } + var t = this, + n = t.cm, + r = n.display, + i = t.textarea, + o = posFromMouse(n, e), + c = r.scroller.scrollTop; + if (o && !d) { + n.options.resetSelectionOnContextMenu && + -1 == n.doc.sel.contains(o) && + operation(n, setSelection)(n.doc, simpleSelection(o), D); + var u = i.style.cssText, p = t.wrapper.style.cssText; + t.wrapper.style.cssText = 'position: absolute'; + var f = t.wrapper.getBoundingClientRect(); + i.style.cssText = + 'position: absolute; width: 30px; height: 30px;\n top: ' + + (e.clientY - f.top - 5) + + 'px; left: ' + + (e.clientX - f.left - 5) + + 'px;\n z-index: 1000; background: ' + + (a ? 'rgba(255, 255, 255, .05)' : 'transparent') + + ';\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);'; + var h; + if ( + (l && (h = window.scrollY), r.input.focus(), l && + window.scrollTo( + null, + h + ), r.input.reset(), n.somethingSelected() || + (i.value = t.prevInput = + ' '), (t.contextMenuPending = !0), (r.selForContextMenu = + n.doc.sel), clearTimeout(r.detectingSelectAll), a && + s >= 9 && + prepareSelectAllHack(), k) + ) { + e_stop(e); + var g = function() { + off(window, 'mouseup', g), setTimeout(rehide, 20); + }; + G(window, 'mouseup', g); + } else setTimeout(rehide, 50); + } + }), (Ve.prototype.readOnlyChanged = function(e) { + e || this.reset(); + }), (Ve.prototype.setUneditable = function() {}), (Ve.prototype.needsContentAttribute = !1), (function defineOptions(e) { + function option(n, r, i, o) { + (e.defaults[n] = r), i && + (t[n] = o + ? function(e, t, n) { + n != Ee && i(e, t, n); + } + : i); + } + var t = e.optionHandlers; + (e.defineOption = option), (e.Init = Ee), option( + 'value', + '', + function(e, t) { + return e.setValue(t); + }, + !0 + ), option( + 'mode', + null, + function(e, t) { + (e.doc.modeOption = t), loadMode(e); + }, + !0 + ), option('indentUnit', 2, loadMode, !0), option('indentWithTabs', !1), option('smartIndent', !0), option( + 'tabSize', + 4, + function(e) { + resetModeState(e), clearCaches(e), regChange(e); + }, + !0 + ), option('lineSeparator', null, function(e, t) { + if (((e.doc.lineSep = t), t)) { + var n = [], r = e.doc.first; + e.doc.iter(function(e) { + for (var i = 0; ; ) { + var o = e.text.indexOf(t, i); + if (-1 == o) break; + (i = o + t.length), n.push(Pos(r, o)); + } + r++; + }); + for (var i = n.length - 1; i >= 0; i--) + replaceRange(e.doc, t, n[i], Pos(n[i].line, n[i].ch + t.length)); + } + }), option( + 'specialChars', + /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g, + function(e, t, n) { + (e.state.specialChars = new RegExp( + t.source + (t.test('\t') ? '' : '|\t'), + 'g' + )), n != Ee && e.refresh(); + } + ), option( + 'specialCharPlaceholder', + defaultSpecialCharPlaceholder, + function(e) { + return e.refresh(); + }, + !0 + ), option('electricChars', !0), option( + 'inputStyle', + v ? 'contenteditable' : 'textarea', + function() { + throw new Error( + 'inputStyle can not (yet) be changed in a running editor' + ); + }, + !0 + ), option( + 'spellcheck', + !1, + function(e, t) { + return (e.getInputField().spellcheck = t); + }, + !0 + ), option('rtlMoveVisually', !x), option('wholeLineUpdateBefore', !0), option( + 'theme', + 'default', + function(e) { + themeChanged(e), guttersChanged(e); + }, + !0 + ), option('keyMap', 'default', function(e, t, n) { + var r = getKeyMap(t), i = n != Ee && getKeyMap(n); + i && i.detach && i.detach(e, r), r.attach && r.attach(e, i || null); + }), option( + 'extraKeys', + null + ), option('lineWrapping', !1, wrappingChanged, !0), option( + 'gutters', + [], + function(e) { + setGuttersForLineNumbers(e.options), guttersChanged(e); + }, + !0 + ), option( + 'fixedGutter', + !0, + function(e, t) { + (e.display.gutters.style.left = t + ? compensateForHScroll(e.display) + 'px' + : '0'), e.refresh(); + }, + !0 + ), option( + 'coverGutterNextToScrollbar', + !1, + function(e) { + return updateScrollbars(e); + }, + !0 + ), option( + 'scrollbarStyle', + 'native', + function(e) { + initScrollbars(e), updateScrollbars( + e + ), e.display.scrollbars.setScrollTop( + e.doc.scrollTop + ), e.display.scrollbars.setScrollLeft(e.doc.scrollLeft); + }, + !0 + ), option( + 'lineNumbers', + !1, + function(e) { + setGuttersForLineNumbers(e.options), guttersChanged(e); + }, + !0 + ), option('firstLineNumber', 1, guttersChanged, !0), option( + 'lineNumberFormatter', + function(e) { + return e; + }, + guttersChanged, + !0 + ), option('showCursorWhenSelecting', !1, updateSelection, !0), option('resetSelectionOnContextMenu', !0), option('lineWiseCopyCut', !0), option('readOnly', !1, function(e, t) { + 'nocursor' == t + ? (onBlur(e), e.display.input.blur(), (e.display.disabled = !0)) + : (e.display.disabled = !1), e.display.input.readOnlyChanged(t); + }), option( + 'disableInput', + !1, + function(e, t) { + t || e.display.input.reset(); + }, + !0 + ), option('dragDrop', !0, dragDropChanged), option('allowDropFileTypes', null), option('cursorBlinkRate', 530), option('cursorScrollMargin', 0), option('cursorHeight', 1, updateSelection, !0), option('singleCursorHeightPerLine', !0, updateSelection, !0), option('workTime', 100), option('workDelay', 100), option('flattenSpans', !0, resetModeState, !0), option('addModeClass', !1, resetModeState, !0), option('pollInterval', 100), option('undoDepth', 200, function(e, t) { + return (e.doc.history.undoDepth = t); + }), option('historyEventDelay', 1250), option( + 'viewportMargin', + 10, + function(e) { + return e.refresh(); + }, + !0 + ), option('maxHighlightLength', 1e4, resetModeState, !0), option('moveInputWithCursor', !0, function(e, t) { + t || e.display.input.resetPosition(); + }), option('tabindex', null, function(e, t) { + return (e.display.input.getField().tabIndex = t || ''); + }), option('autofocus', null), option( + 'direction', + 'ltr', + function(e, t) { + return e.doc.setDirection(t); + }, + !0 + ); + })(CodeMirror$1), (function(e) { + var t = e.optionHandlers, n = (e.helpers = {}); + (e.prototype = { + constructor: e, + focus: function() { + window.focus(), this.display.input.focus(); + }, + setOption: function(e, n) { + var r = this.options, i = r[e]; + (r[e] == n && 'mode' != e) || + ((r[e] = n), t.hasOwnProperty(e) && + operation(this, t[e])(this, n, i), signal( + this, + 'optionChange', + this, + e + )); + }, + getOption: function(e) { + return this.options[e]; + }, + getDoc: function() { + return this.doc; + }, + addKeyMap: function(e, t) { + this.state.keyMaps[t ? 'push' : 'unshift'](getKeyMap(e)); + }, + removeKeyMap: function(e) { + for (var t = this.state.keyMaps, n = 0; n < t.length; ++n) + if (t[n] == e || t[n].name == e) return t.splice(n, 1), !0; + }, + addOverlay: methodOp(function(t, n) { + var r = t.token ? t : e.getMode(this.options, t); + if (r.startState) throw new Error('Overlays may not be stateful.'); + insertSorted( + this.state.overlays, + { + mode: r, + modeSpec: t, + opaque: n && n.opaque, + priority: (n && n.priority) || 0 + }, + function(e) { + return e.priority; + } + ), this.state.modeGen++, regChange(this); + }), + removeOverlay: methodOp(function(e) { + for ( + var t = this, n = this.state.overlays, r = 0; + r < n.length; + ++r + ) { + var i = n[r].modeSpec; + if (i == e || ('string' == typeof e && i.name == e)) + return n.splice(r, 1), t.state.modeGen++, void regChange(t); + } + }), + indentLine: methodOp(function(e, t, n) { + 'string' != typeof t && + 'number' != typeof t && + (t = null == t + ? this.options.smartIndent ? 'smart' : 'prev' + : t + ? 'add' + : 'subtract'), isLine(this.doc, e) && indentLine(this, e, t, n); + }), + indentSelection: methodOp(function(e) { + for ( + var t = this, n = this.doc.sel.ranges, r = -1, i = 0; + i < n.length; + i++ + ) { + var o = n[i]; + if (o.empty()) + o.head.line > r && + (indentLine(t, o.head.line, e, !0), (r = o.head.line), i == + t.doc.sel.primIndex && ensureCursorVisible(t)); + else { + var a = o.from(), s = o.to(), l = Math.max(r, a.line); + r = Math.min(t.lastLine(), s.line - (s.ch ? 0 : 1)) + 1; + for (var c = l; c < r; ++c) + indentLine(t, c, e); + var u = t.doc.sel.ranges; + 0 == a.ch && + n.length == u.length && + u[i].from().ch > 0 && + replaceOneSelection(t.doc, i, new he(a, u[i].to()), D); + } + } + }), + getTokenAt: function(e, t) { + return takeToken(this, e, t); + }, + getLineTokens: function(e, t) { + return takeToken(this, Pos(e), t, !0); + }, + getTokenTypeAt: function(e) { + e = clipPos(this.doc, e); + var t, + n = getLineStyles(this, getLine(this.doc, e.line)), + r = 0, + i = (n.length - 1) / 2, + o = e.ch; + if (0 == o) t = n[2]; + else + for (;;) { + var a = (r + i) >> 1; + if ((a ? n[2 * a - 1] : 0) >= o) i = a; + else { + if (!(n[2 * a + 1] < o)) { + t = n[2 * a + 2]; + break; + } + r = a + 1; + } + } + var s = t ? t.indexOf('overlay ') : -1; + return s < 0 ? t : 0 == s ? null : t.slice(0, s - 1); + }, + getModeAt: function(t) { + var n = this.doc.mode; + return n.innerMode + ? e.innerMode(n, this.getTokenAt(t).state).mode + : n; + }, + getHelper: function(e, t) { + return this.getHelpers(e, t)[0]; + }, + getHelpers: function(e, t) { + var r = this, i = []; + if (!n.hasOwnProperty(t)) return i; + var o = n[t], a = this.getModeAt(e); + if ('string' == typeof a[t]) o[a[t]] && i.push(o[a[t]]); + else if (a[t]) + for (var s = 0; s < a[t].length; s++) { + var l = o[a[t][s]]; + l && i.push(l); + } + else + a.helperType && o[a.helperType] + ? i.push(o[a.helperType]) + : o[a.name] && i.push(o[a.name]); + for (var c = 0; c < o._global.length; c++) { + var u = o._global[c]; + u.pred(a, r) && -1 == indexOf(i, u.val) && i.push(u.val); + } + return i; + }, + getStateAfter: function(e, t) { + var n = this.doc; + return (e = clipLine( + n, + null == e ? n.first + n.size - 1 : e + )), getStateBefore(this, e + 1, t); + }, + cursorCoords: function(e, t) { + var n, r = this.doc.sel.primary(); + return (n = null == e + ? r.head + : 'object' == typeof e + ? clipPos(this.doc, e) + : e ? r.from() : r.to()), cursorCoords(this, n, t || 'page'); + }, + charCoords: function(e, t) { + return charCoords(this, clipPos(this.doc, e), t || 'page'); + }, + coordsChar: function(e, t) { + return (e = fromCoordSystem(this, e, t || 'page')), coordsChar( + this, + e.left, + e.top + ); + }, + lineAtHeight: function(e, t) { + return (e = fromCoordSystem(this, { top: e, left: 0 }, t || 'page') + .top), lineAtHeight(this.doc, e + this.display.viewOffset); + }, + heightAtLine: function(e, t, n) { + var r, i = !1; + if ('number' == typeof e) { + var o = this.doc.first + this.doc.size - 1; + e < this.doc.first + ? (e = this.doc.first) + : e > o && ((e = o), (i = !0)), (r = getLine(this.doc, e)); + } else r = e; + return ( + intoCoordSystem(this, r, { top: 0, left: 0 }, t || 'page', n || i) + .top + (i ? this.doc.height - heightAtLine(r) : 0) + ); + }, + defaultTextHeight: function() { + return textHeight(this.display); + }, + defaultCharWidth: function() { + return charWidth(this.display); + }, + getViewport: function() { + return { from: this.display.viewFrom, to: this.display.viewTo }; + }, + addWidget: function(e, t, n, r, i) { + var o = this.display; + e = cursorCoords(this, clipPos(this.doc, e)); + var a = e.bottom, s = e.left; + if ( + ((t.style.position = 'absolute'), t.setAttribute( + 'cm-ignore-events', + 'true' + ), this.display.input.setUneditable(t), o.sizer.appendChild( + t + ), 'over' == r) + ) + a = e.top; + else if ('above' == r || 'near' == r) { + var l = Math.max(o.wrapper.clientHeight, this.doc.height), + c = Math.max(o.sizer.clientWidth, o.lineSpace.clientWidth); + ('above' == r || e.bottom + t.offsetHeight > l) && + e.top > t.offsetHeight + ? (a = e.top - t.offsetHeight) + : e.bottom + t.offsetHeight <= l && (a = e.bottom), s + + t.offsetWidth > + c && (s = c - t.offsetWidth); + } + (t.style.top = a + 'px'), (t.style.left = t.style.right = + ''), 'right' == i + ? ((s = o.sizer.clientWidth - t.offsetWidth), (t.style.right = + '0px')) + : ('left' == i + ? (s = 0) + : 'middle' == i && + (s = + (o.sizer.clientWidth - t.offsetWidth) / + 2), (t.style.left = s + 'px')), n && + scrollIntoView(this, { + left: s, + top: a, + right: s + t.offsetWidth, + bottom: a + t.offsetHeight + }); + }, + triggerOnKeyDown: methodOp(onKeyDown), + triggerOnKeyPress: methodOp(onKeyPress), + triggerOnKeyUp: onKeyUp, + execCommand: function(e) { + if (De.hasOwnProperty(e)) return De[e].call(null, this); + }, + triggerElectric: methodOp(function(e) { + triggerElectric(this, e); + }), + findPosH: function(e, t, n, r) { + var i = this, o = 1; + t < 0 && ((o = -1), (t = -t)); + for ( + var a = clipPos(this.doc, e), s = 0; + s < t && ((a = findPosH(i.doc, a, o, n, r)), !a.hitSide); + ++s + ); + return a; + }, + moveH: methodOp(function(e, t) { + var n = this; + this.extendSelectionsBy(function(r) { + return n.display.shift || n.doc.extend || r.empty() + ? findPosH(n.doc, r.head, e, t, n.options.rtlMoveVisually) + : e < 0 ? r.from() : r.to(); + }, W); + }), + deleteH: methodOp(function(e, t) { + var n = this.doc.sel, r = this.doc; + n.somethingSelected() + ? r.replaceSelection('', null, '+delete') + : deleteNearSelection(this, function(n) { + var i = findPosH(r, n.head, e, t, !1); + return e < 0 + ? { from: i, to: n.head } + : { from: n.head, to: i }; + }); + }), + findPosV: function(e, t, n, r) { + var i = this, o = 1, a = r; + t < 0 && ((o = -1), (t = -t)); + for (var s = clipPos(this.doc, e), l = 0; l < t; ++l) { + var c = cursorCoords(i, s, 'div'); + if ( + (null == a ? (a = c.left) : (c.left = a), (s = findPosV( + i, + c, + o, + n + )), s.hitSide) + ) + break; + } + return s; + }, + moveV: methodOp(function(e, t) { + var n = this, + r = this.doc, + i = [], + o = !this.display.shift && !r.extend && r.sel.somethingSelected(); + if ( + (r.extendSelectionsBy(function(a) { + if (o) return e < 0 ? a.from() : a.to(); + var s = cursorCoords(n, a.head, 'div'); + null != a.goalColumn && (s.left = a.goalColumn), i.push(s.left); + var l = findPosV(n, s, e, t); + return 'page' == t && + a == r.sel.primary() && + addToScrollTop(n, charCoords(n, l, 'div').top - s.top), l; + }, W), i.length) + ) + for (var a = 0; a < r.sel.ranges.length; a++) + r.sel.ranges[a].goalColumn = i[a]; + }), + findWordAt: function(e) { + var t = this.doc, n = getLine(t, e.line).text, r = e.ch, i = e.ch; + if (n) { + var o = this.getHelper(e, 'wordChars'); + ('before' != e.sticky && i != n.length) || !r ? ++i : --r; + for ( + var a = n.charAt(r), + s = isWordChar(a, o) + ? function(e) { + return isWordChar(e, o); + } + : /\s/.test(a) + ? function(e) { + return /\s/.test(e); + } + : function(e) { + return !/\s/.test(e) && !isWordChar(e); + }; + r > 0 && s(n.charAt(r - 1)); + + ) + --r; + for (; i < n.length && s(n.charAt(i)); ) + ++i; + } + return new he(Pos(e.line, r), Pos(e.line, i)); + }, + toggleOverwrite: function(e) { + (null != e && e == this.state.overwrite) || + ((this.state.overwrite = !this.state.overwrite) + ? addClass(this.display.cursorDiv, 'CodeMirror-overwrite') + : L(this.display.cursorDiv, 'CodeMirror-overwrite'), signal( + this, + 'overwriteToggle', + this, + this.state.overwrite + )); + }, + hasFocus: function() { + return this.display.input.getField() == activeElt(); + }, + isReadOnly: function() { + return !(!this.options.readOnly && !this.doc.cantEdit); + }, + scrollTo: methodOp(function(e, t) { + scrollToCoords(this, e, t); + }), + getScrollInfo: function() { + var e = this.display.scroller; + return { + left: e.scrollLeft, + top: e.scrollTop, + height: e.scrollHeight - scrollGap(this) - this.display.barHeight, + width: e.scrollWidth - scrollGap(this) - this.display.barWidth, + clientHeight: displayHeight(this), + clientWidth: displayWidth(this) + }; + }, + scrollIntoView: methodOp(function(e, t) { + null == e + ? ((e = { from: this.doc.sel.primary().head, to: null }), null == + t && (t = this.options.cursorScrollMargin)) + : 'number' == typeof e + ? (e = { from: Pos(e, 0), to: null }) + : null == e.from && + (e = { + from: e, + to: null + }), e.to || (e.to = e.from), (e.margin = t || 0), null != e.from.line ? scrollToRange(this, e) : scrollToCoordsRange(this, e.from, e.to, e.margin); + }), + setSize: methodOp(function(e, t) { + var n = this, + r = function(e) { + return 'number' == typeof e || /^\d+$/.test(String(e)) + ? e + 'px' + : e; + }; + null != e && + (this.display.wrapper.style.width = r( + e + )), null != t && (this.display.wrapper.style.height = r(t)), this.options.lineWrapping && clearLineMeasurementCache(this); + var i = this.display.viewFrom; + this.doc.iter(i, this.display.viewTo, function(e) { + if (e.widgets) + for (var t = 0; t < e.widgets.length; t++) + if (e.widgets[t].noHScroll) { + regLineChange(n, i, 'widget'); + break; + } + ++i; + }), (this.curOp.forceUpdate = !0), signal(this, 'refresh', this); + }), + operation: function(e) { + return runInOp(this, e); + }, + refresh: methodOp(function() { + var e = this.display.cachedTextHeight; + regChange( + this + ), (this.curOp.forceUpdate = !0), clearCaches(this), scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop), updateGutterSpace(this), (null == e || Math.abs(e - textHeight(this.display)) > 0.5) && estimateLineHeights(this), signal(this, 'refresh', this); + }), + swapDoc: methodOp(function(e) { + var t = this.doc; + return (t.cm = null), attachDoc(this, e), clearCaches(this), this.display.input.reset(), scrollToCoords(this, e.scrollLeft, e.scrollTop), (this.curOp.forceScroll = !0), signalLater(this, 'swapDoc', this, t), t; + }), + getInputField: function() { + return this.display.input.getField(); + }, + getWrapperElement: function() { + return this.display.wrapper; + }, + getScrollerElement: function() { + return this.display.scroller; + }, + getGutterElement: function() { + return this.display.gutters; + } + }), eventMixin(e), (e.registerHelper = function(t, r, i) { + n.hasOwnProperty(t) || (n[t] = e[t] = { _global: [] }), (n[t][r] = i); + }), (e.registerGlobalHelper = function(t, r, i, o) { + e.registerHelper(t, r, o), n[t]._global.push({ pred: i, val: o }); + }); + })(CodeMirror$1); + var je = 'iter insert remove copy getEditor constructor'.split(' '); + for (var Ge in we.prototype) we.prototype.hasOwnProperty(Ge) && + indexOf(je, Ge) < 0 && + (CodeMirror$1.prototype[Ge] = (function(e) { + return function() { + return e.apply(this.doc, arguments); + }; + })(we.prototype[Ge])); + return eventMixin( + we + ), (CodeMirror$1.inputStyles = { textarea: Ve, contenteditable: Re }), (CodeMirror$1.defineMode = function( + e + ) { + CodeMirror$1.defaults.mode || + 'null' == e || + (CodeMirror$1.defaults.mode = e), defineMode.apply(this, arguments); + }), (CodeMirror$1.defineMIME = defineMIME), CodeMirror$1.defineMode( + 'null', + function() { + return { + token: function(e) { + return e.skipToEnd(); + } + }; + } + ), CodeMirror$1.defineMIME('text/plain', 'null'), (CodeMirror$1.defineExtension = function( + e, + t + ) { + CodeMirror$1.prototype[e] = t; + }), (CodeMirror$1.defineDocExtension = function(e, t) { + we.prototype[e] = t; + }), (CodeMirror$1.fromTextArea = fromTextArea), (function addLegacyProps(e) { + (e.off = off), (e.on = G), (e.wheelEventPixels = wheelEventPixels), (e.Doc = we), (e.splitLines = U), (e.countColumn = countColumn), (e.findColumn = findColumn), (e.isWordChar = isWordCharBasic), (e.Pass = A), (e.signal = signal), (e.Line = Q), (e.changeEnd = changeEnd), (e.scrollbarModel = le), (e.Pos = Pos), (e.cmpPos = cmp), (e.modes = X), (e.mimeModes = Y), (e.resolveMode = resolveMode), (e.getMode = getMode), (e.modeExtensions = Z), (e.extendMode = extendMode), (e.copyState = copyState), (e.startState = startState), (e.innerMode = innerMode), (e.commands = De), (e.keyMap = Pe), (e.keyName = keyName), (e.isModifierKey = isModifierKey), (e.lookupKey = lookupKey), (e.normalizeKeyMap = normalizeKeyMap), (e.StringStream = J), (e.SharedTextMarker = xe), (e.TextMarker = be), (e.LineWidget = ve), (e.e_preventDefault = e_preventDefault), (e.e_stopPropagation = e_stopPropagation), (e.e_stop = e_stop), (e.addClass = addClass), (e.contains = contains), (e.rmClass = L), (e.keyNames = Le); + })(CodeMirror$1), (CodeMirror$1.version = '5.26.0'), CodeMirror$1; + }); + }, + 1037: function(e, t, n) { + !(function(e) { + e(n(1036)); + })(function(e) { + 'use strict'; + function expressionAllowed(e, t, n) { + return ( + /^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test( + t.lastType + ) || + ('quasi' == t.lastType && + /\{\s*$/.test(e.string.slice(0, e.pos - (n || 0)))) + ); + } + e.defineMode('javascript', function(t, n) { + function readRegexp(e) { + for (var t, n = !1, r = !1; null != (t = e.next()); ) { + if (!n) { + if ('/' == t && !r) return; + '[' == t ? (r = !0) : r && ']' == t && (r = !1); + } + n = !n && '\\' == t; + } + } + function ret(e, t, n) { + return (r = e), (i = n), t; + } + function tokenBase(e, t) { + var n = e.next(); + if ('"' == n || "'" == n) + return (t.tokenize = tokenString(n)), t.tokenize(e, t); + if ('.' == n && e.match(/^\d+(?:[eE][+\-]?\d+)?/)) + return ret('number', 'number'); + if ('.' == n && e.match('..')) return ret('spread', 'meta'); + if (/[\[\]{}\(\),;\:\.]/.test(n)) return ret(n); + if ('=' == n && e.eat('>')) return ret('=>', 'operator'); + if ('0' == n && e.eat(/x/i)) + return e.eatWhile(/[\da-f]/i), ret('number', 'number'); + if ('0' == n && e.eat(/o/i)) + return e.eatWhile(/[0-7]/i), ret('number', 'number'); + if ('0' == n && e.eat(/b/i)) + return e.eatWhile(/[01]/i), ret('number', 'number'); + if (/\d/.test(n)) + return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/), ret( + 'number', + 'number' + ); + if ('/' == n) + return e.eat('*') + ? ((t.tokenize = tokenComment), tokenComment(e, t)) + : e.eat('/') + ? (e.skipToEnd(), ret('comment', 'comment')) + : expressionAllowed(e, t, 1) + ? (readRegexp(e), e.match( + /^\b(([gimyu])(?![gimyu]*\2))+\b/ + ), ret('regexp', 'string-2')) + : (e.eatWhile(p), ret( + 'operator', + 'operator', + e.current() + )); + if ('`' == n) return (t.tokenize = tokenQuasi), tokenQuasi(e, t); + if ('#' == n) return e.skipToEnd(), ret('error', 'error'); + if (p.test(n)) + return ('>' == n && t.lexical && '>' == t.lexical.type) || + e.eatWhile(p), ret('operator', 'operator', e.current()); + if (u.test(n)) { + e.eatWhile(u); + var r = e.current(), i = d.propertyIsEnumerable(r) && d[r]; + return i && '.' != t.lastType + ? ret(i.type, i.style, r) + : ret('variable', 'variable', r); + } + } + function tokenString(e) { + return function(t, n) { + var r, i = !1; + if (s && '@' == t.peek() && t.match(f)) + return (n.tokenize = tokenBase), ret('jsonld-keyword', 'meta'); + for ( + ; + null != (r = t.next()) && (r != e || i); + + ) i = !i && '\\' == r; + return i || (n.tokenize = tokenBase), ret('string', 'string'); + }; + } + function tokenComment(e, t) { + for (var n, r = !1; (n = e.next()); ) { + if ('/' == n && r) { + t.tokenize = tokenBase; + break; + } + r = '*' == n; + } + return ret('comment', 'comment'); + } + function tokenQuasi(e, t) { + for (var n, r = !1; null != (n = e.next()); ) { + if (!r && ('`' == n || ('$' == n && e.eat('{')))) { + t.tokenize = tokenBase; + break; + } + r = !r && '\\' == n; + } + return ret('quasi', 'string-2', e.current()); + } + function findFatArrow(e, t) { + t.fatArrowAt && (t.fatArrowAt = null); + var n = e.string.indexOf('=>', e.start); + if (!(n < 0)) { + if (c) { + var r = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec( + e.string.slice(e.start, n) + ); + r && (n = r.index); + } + for (var i = 0, o = !1, a = n - 1; a >= 0; --a) { + var s = e.string.charAt(a), l = h.indexOf(s); + if (l >= 0 && l < 3) { + if (!i) { + ++a; + break; + } + if (0 == --i) { + '(' == s && (o = !0); + break; + } + } else if (l >= 3 && l < 6) ++i; + else if (u.test(s)) o = !0; + else { + if (/["'\/]/.test(s)) return; + if (o && !i) { + ++a; + break; + } + } + } + o && !i && (t.fatArrowAt = a); + } + } + function JSLexical(e, t, n, r, i, o) { + (this.indented = e), (this.column = t), (this.type = n), (this.prev = i), (this.info = o), null != r && (this.align = r); + } + function inScope(e, t) { + for (var n = e.localVars; n; n = n.next) if (n.name == t) return !0; + for ( + var r = e.context; + r; + r = r.prev + ) for (var n = r.vars; n; n = n.next) if (n.name == t) return !0; + } + function parseJS(e, t, n, r, i) { + var o = e.cc; + for ( + (m.state = e), (m.stream = i), (m.marked = null), (m.cc = o), (m.style = t), e.lexical.hasOwnProperty( + 'align' + ) || (e.lexical.align = !0); + ; + + ) { + if ((o.length ? o.pop() : l ? expression : statement)(n, r)) { + for (; o.length && o[o.length - 1].lex; ) + o.pop()(); + return m.marked + ? m.marked + : 'variable' == n && inScope(e, r) ? 'variable-2' : t; + } + } + } + function pass() { + for ( + var e = arguments.length - 1; + e >= 0; + e-- + ) m.cc.push(arguments[e]); + } + function cont() { + return pass.apply(null, arguments), !0; + } + function register(e) { + function inList(t) { + for (var n = t; n; n = n.next) if (n.name == e) return !0; + return !1; + } + var t = m.state; + if (((m.marked = 'def'), t.context)) { + if (inList(t.localVars)) return; + t.localVars = { name: e, next: t.localVars }; + } else { + if (inList(t.globalVars)) return; + n.globalVars && (t.globalVars = { name: e, next: t.globalVars }); + } + } + function pushcontext() { + (m.state.context = { + prev: m.state.context, + vars: m.state.localVars + }), (m.state.localVars = v); + } + function popcontext() { + (m.state.localVars = + m.state.context.vars), (m.state.context = m.state.context.prev); + } + function pushlex(e, t) { + var n = function() { + var n = m.state, r = n.indented; + if ('stat' == n.lexical.type) r = n.lexical.indented; + else + for (var i = n.lexical; i && ')' == i.type && i.align; i = i.prev) + r = i.indented; + n.lexical = new JSLexical( + r, + m.stream.column(), + e, + null, + n.lexical, + t + ); + }; + return (n.lex = !0), n; + } + function poplex() { + var e = m.state; + e.lexical.prev && + (')' == e.lexical.type && + (e.indented = e.lexical.indented), (e.lexical = e.lexical.prev)); + } + function expect(e) { + function exp(t) { + return t == e ? cont() : ';' == e ? pass() : cont(exp); + } + return exp; + } + function statement(e, t) { + return 'var' == e + ? cont(pushlex('vardef', t.length), vardef, expect(';'), poplex) + : 'keyword a' == e + ? cont(pushlex('form'), parenExpr, statement, poplex) + : 'keyword b' == e + ? cont(pushlex('form'), statement, poplex) + : '{' == e + ? cont(pushlex('}'), block, poplex) + : ';' == e + ? cont() + : 'if' == e + ? ('else' == m.state.lexical.info && + m.state.cc[m.state.cc.length - 1] == + poplex && + m.state.cc.pop()(), cont( + pushlex('form'), + parenExpr, + statement, + poplex, + maybeelse + )) + : 'function' == e + ? cont(functiondef) + : 'for' == e + ? cont( + pushlex('form'), + forspec, + statement, + poplex + ) + : 'variable' == e + ? c && 'type' == t + ? ((m.marked = 'keyword'), cont( + typeexpr, + expect('operator'), + typeexpr, + expect(';') + )) + : cont( + pushlex('stat'), + maybelabel + ) + : 'switch' == e + ? cont( + pushlex('form'), + parenExpr, + expect('{'), + pushlex('}', 'switch'), + block, + poplex, + poplex + ) + : 'case' == e + ? cont( + expression, + expect(':') + ) + : 'default' == e + ? cont(expect(':')) + : 'catch' == e + ? cont( + pushlex('form'), + pushcontext, + expect('('), + funarg, + expect(')'), + statement, + poplex, + popcontext + ) + : 'class' == e + ? cont( + pushlex( + 'form' + ), + className, + poplex + ) + : 'export' == e + ? cont( + pushlex( + 'stat' + ), + afterExport, + poplex + ) + : 'import' == + e + ? cont( + pushlex( + 'stat' + ), + afterImport, + poplex + ) + : 'module' == + e + ? cont( + pushlex( + 'form' + ), + pattern, + expect( + '{' + ), + pushlex( + '}' + ), + block, + poplex, + poplex + ) + : 'async' == + e + ? cont( + statement + ) + : '@' == + t + ? cont( + expression, + statement + ) + : pass( + pushlex( + 'stat' + ), + expression, + expect( + ';' + ), + poplex + ); + } + function expression(e) { + return expressionInner(e, !1); + } + function expressionNoComma(e) { + return expressionInner(e, !0); + } + function parenExpr(e) { + return '(' != e + ? pass() + : cont(pushlex(')'), expression, expect(')'), poplex); + } + function expressionInner(e, t) { + if (m.state.fatArrowAt == m.stream.start) { + var n = t ? arrowBodyNoComma : arrowBody; + if ('(' == e) + return cont( + pushcontext, + pushlex(')'), + commasep(pattern, ')'), + poplex, + expect('=>'), + n, + popcontext + ); + if ('variable' == e) + return pass(pushcontext, pattern, expect('=>'), n, popcontext); + } + var r = t ? maybeoperatorNoComma : maybeoperatorComma; + return g.hasOwnProperty(e) + ? cont(r) + : 'function' == e + ? cont(functiondef, r) + : 'class' == e + ? cont(pushlex('form'), classExpression, poplex) + : 'keyword c' == e || 'async' == e + ? cont(t ? maybeexpressionNoComma : maybeexpression) + : '(' == e + ? cont( + pushlex(')'), + maybeexpression, + expect(')'), + poplex, + r + ) + : 'operator' == e || 'spread' == e + ? cont(t ? expressionNoComma : expression) + : '[' == e + ? cont( + pushlex(']'), + arrayLiteral, + poplex, + r + ) + : '{' == e + ? contCommasep(objprop, '}', null, r) + : 'quasi' == e + ? pass(quasi, r) + : 'new' == e + ? cont(maybeTarget(t)) + : cont(); + } + function maybeexpression(e) { + return e.match(/[;\}\)\],]/) ? pass() : pass(expression); + } + function maybeexpressionNoComma(e) { + return e.match(/[;\}\)\],]/) ? pass() : pass(expressionNoComma); + } + function maybeoperatorComma(e, t) { + return ',' == e ? cont(expression) : maybeoperatorNoComma(e, t, !1); + } + function maybeoperatorNoComma(e, t, n) { + var r = 0 == n ? maybeoperatorComma : maybeoperatorNoComma, + i = 0 == n ? expression : expressionNoComma; + return '=>' == e + ? cont(pushcontext, n ? arrowBodyNoComma : arrowBody, popcontext) + : 'operator' == e + ? /\+\+|--/.test(t) + ? cont(r) + : '?' == t ? cont(expression, expect(':'), i) : cont(i) + : 'quasi' == e + ? pass(quasi, r) + : ';' != e + ? '(' == e + ? contCommasep(expressionNoComma, ')', 'call', r) + : '.' == e + ? cont(property, r) + : '[' == e + ? cont( + pushlex(']'), + maybeexpression, + expect(']'), + poplex, + r + ) + : void 0 + : void 0; + } + function quasi(e, t) { + return 'quasi' != e + ? pass() + : '${' != t.slice(t.length - 2) + ? cont(quasi) + : cont(expression, continueQuasi); + } + function continueQuasi(e) { + if ('}' == e) + return (m.marked = + 'string-2'), (m.state.tokenize = tokenQuasi), cont(quasi); + } + function arrowBody(e) { + return findFatArrow( + m.stream, + m.state + ), pass('{' == e ? statement : expression); + } + function arrowBodyNoComma(e) { + return findFatArrow( + m.stream, + m.state + ), pass('{' == e ? statement : expressionNoComma); + } + function maybeTarget(e) { + return function(t) { + return '.' == t + ? cont(e ? targetNoComma : target) + : pass(e ? expressionNoComma : expression); + }; + } + function target(e, t) { + if ('target' == t) + return (m.marked = 'keyword'), cont(maybeoperatorComma); + } + function targetNoComma(e, t) { + if ('target' == t) + return (m.marked = 'keyword'), cont(maybeoperatorNoComma); + } + function maybelabel(e) { + return ':' == e + ? cont(poplex, statement) + : pass(maybeoperatorComma, expect(';'), poplex); + } + function property(e) { + if ('variable' == e) return (m.marked = 'property'), cont(); + } + function objprop(e, t) { + return 'async' == e + ? ((m.marked = 'property'), cont(objprop)) + : 'variable' == e || 'keyword' == m.style + ? ((m.marked = 'property'), cont( + 'get' == t || 'set' == t ? getterSetter : afterprop + )) + : 'number' == e || 'string' == e + ? ((m.marked = s + ? 'property' + : m.style + ' property'), cont(afterprop)) + : 'jsonld-keyword' == e + ? cont(afterprop) + : 'modifier' == e + ? cont(objprop) + : '[' == e + ? cont(expression, expect(']'), afterprop) + : 'spread' == e + ? cont(expression) + : ':' == e ? pass(afterprop) : void 0; + } + function getterSetter(e) { + return 'variable' != e + ? pass(afterprop) + : ((m.marked = 'property'), cont(functiondef)); + } + function afterprop(e) { + return ':' == e + ? cont(expressionNoComma) + : '(' == e ? pass(functiondef) : void 0; + } + function commasep(e, t, n) { + function proceed(r, i) { + if (n ? n.indexOf(r) > -1 : ',' == r) { + var o = m.state.lexical; + return 'call' == o.info && + (o.pos = (o.pos || 0) + 1), cont(function(n, r) { + return n == t || r == t ? pass() : pass(e); + }, proceed); + } + return r == t || i == t ? cont() : cont(expect(t)); + } + return function(n, r) { + return n == t || r == t ? cont() : pass(e, proceed); + }; + } + function contCommasep(e, t, n) { + for (var r = 3; r < arguments.length; r++) m.cc.push(arguments[r]); + return cont(pushlex(t, n), commasep(e, t), poplex); + } + function block(e) { + return '}' == e ? cont() : pass(statement, block); + } + function maybetype(e, t) { + if (c) { + if (':' == e) return cont(typeexpr); + if ('?' == t) return cont(maybetype); + } + } + function typeexpr(e) { + return 'variable' == e + ? ((m.marked = 'variable-3'), cont(afterType)) + : 'string' == e || 'number' == e || 'atom' == e + ? cont(afterType) + : '{' == e + ? cont( + pushlex('}'), + commasep(typeprop, '}', ',;'), + poplex, + afterType + ) + : '(' == e + ? cont(commasep(typearg, ')'), maybeReturnType) + : void 0; + } + function maybeReturnType(e) { + if ('=>' == e) return cont(typeexpr); + } + function typeprop(e, t) { + return 'variable' == e || 'keyword' == m.style + ? ((m.marked = 'property'), cont(typeprop)) + : '?' == t + ? cont(typeprop) + : ':' == e + ? cont(typeexpr) + : '[' == e + ? cont(expression, maybetype, expect(']'), typeprop) + : void 0; + } + function typearg(e) { + return 'variable' == e + ? cont(typearg) + : ':' == e ? cont(typeexpr) : void 0; + } + function afterType(e, t) { + return '<' == t + ? cont(pushlex('>'), commasep(typeexpr, '>'), poplex, afterType) + : '|' == t || '.' == e + ? cont(typeexpr) + : '[' == e + ? cont(expect(']'), afterType) + : 'extends' == t ? cont(typeexpr) : void 0; + } + function vardef() { + return pass(pattern, maybetype, maybeAssign, vardefCont); + } + function pattern(e, t) { + return 'modifier' == e + ? cont(pattern) + : 'variable' == e + ? (register(t), cont()) + : 'spread' == e + ? cont(pattern) + : '[' == e + ? contCommasep(pattern, ']') + : '{' == e ? contCommasep(proppattern, '}') : void 0; + } + function proppattern(e, t) { + return 'variable' != e || m.stream.match(/^\s*:/, !1) + ? ('variable' == e && (m.marked = 'property'), 'spread' == e + ? cont(pattern) + : '}' == e ? pass() : cont(expect(':'), pattern, maybeAssign)) + : (register(t), cont(maybeAssign)); + } + function maybeAssign(e, t) { + if ('=' == t) return cont(expressionNoComma); + } + function vardefCont(e) { + if (',' == e) return cont(vardef); + } + function maybeelse(e, t) { + if ('keyword b' == e && 'else' == t) + return cont(pushlex('form', 'else'), statement, poplex); + } + function forspec(e) { + if ('(' == e) + return cont(pushlex(')'), forspec1, expect(')'), poplex); + } + function forspec1(e) { + return 'var' == e + ? cont(vardef, expect(';'), forspec2) + : ';' == e + ? cont(forspec2) + : 'variable' == e + ? cont(formaybeinof) + : pass(expression, expect(';'), forspec2); + } + function formaybeinof(e, t) { + return 'in' == t || 'of' == t + ? ((m.marked = 'keyword'), cont(expression)) + : cont(maybeoperatorComma, forspec2); + } + function forspec2(e, t) { + return ';' == e + ? cont(forspec3) + : 'in' == t || 'of' == t + ? ((m.marked = 'keyword'), cont(expression)) + : pass(expression, expect(';'), forspec3); + } + function forspec3(e) { + ')' != e && cont(expression); + } + function functiondef(e, t) { + return '*' == t + ? ((m.marked = 'keyword'), cont(functiondef)) + : 'variable' == e + ? (register(t), cont(functiondef)) + : '(' == e + ? cont( + pushcontext, + pushlex(')'), + commasep(funarg, ')'), + poplex, + maybetype, + statement, + popcontext + ) + : c && '<' == t + ? cont( + pushlex('>'), + commasep(typeexpr, '>'), + poplex, + functiondef + ) + : void 0; + } + function funarg(e) { + return 'spread' == e + ? cont(funarg) + : pass(pattern, maybetype, maybeAssign); + } + function classExpression(e, t) { + return 'variable' == e ? className(e, t) : classNameAfter(e, t); + } + function className(e, t) { + if ('variable' == e) return register(t), cont(classNameAfter); + } + function classNameAfter(e, t) { + return '<' == t + ? cont( + pushlex('>'), + commasep(typeexpr, '>'), + poplex, + classNameAfter + ) + : 'extends' == t || 'implements' == t || (c && ',' == e) + ? cont(c ? typeexpr : expression, classNameAfter) + : '{' == e ? cont(pushlex('}'), classBody, poplex) : void 0; + } + function classBody(e, t) { + return 'variable' == e || 'keyword' == m.style + ? ('async' == t || + 'static' == t || + 'get' == t || + 'set' == t || + (c && + ('public' == t || + 'private' == t || + 'protected' == t || + 'readonly' == t || + 'abstract' == t))) && + m.stream.match(/^\s+[\w$\xa1-\uffff]/, !1) + ? ((m.marked = 'keyword'), cont(classBody)) + : ((m.marked = 'property'), cont( + c ? classfield : functiondef, + classBody + )) + : '[' == e + ? cont( + expression, + expect(']'), + c ? classfield : functiondef, + classBody + ) + : '*' == t + ? ((m.marked = 'keyword'), cont(classBody)) + : ';' == e + ? cont(classBody) + : '}' == e + ? cont() + : '@' == t ? cont(expression, classBody) : void 0; + } + function classfield(e, t) { + return '?' == t + ? cont(classfield) + : ':' == e + ? cont(typeexpr, maybeAssign) + : '=' == t ? cont(expressionNoComma) : pass(functiondef); + } + function afterExport(e, t) { + return '*' == t + ? ((m.marked = 'keyword'), cont(maybeFrom, expect(';'))) + : 'default' == t + ? ((m.marked = 'keyword'), cont(expression, expect(';'))) + : '{' == e + ? cont(commasep(exportField, '}'), maybeFrom, expect(';')) + : pass(statement); + } + function exportField(e, t) { + return 'as' == t + ? ((m.marked = 'keyword'), cont(expect('variable'))) + : 'variable' == e ? pass(expressionNoComma, exportField) : void 0; + } + function afterImport(e) { + return 'string' == e + ? cont() + : pass(importSpec, maybeMoreImports, maybeFrom); + } + function importSpec(e, t) { + return '{' == e + ? contCommasep(importSpec, '}') + : ('variable' == e && register(t), '*' == t && + (m.marked = 'keyword'), cont(maybeAs)); + } + function maybeMoreImports(e) { + if (',' == e) return cont(importSpec, maybeMoreImports); + } + function maybeAs(e, t) { + if ('as' == t) return (m.marked = 'keyword'), cont(importSpec); + } + function maybeFrom(e, t) { + if ('from' == t) return (m.marked = 'keyword'), cont(expression); + } + function arrayLiteral(e) { + return ']' == e ? cont() : pass(commasep(expressionNoComma, ']')); + } + function isContinuedStatement(e, t) { + return ( + 'operator' == e.lastType || + ',' == e.lastType || + p.test(t.charAt(0)) || + /[,.]/.test(t.charAt(0)) + ); + } + var r, + i, + o = t.indentUnit, + a = n.statementIndent, + s = n.jsonld, + l = n.json || s, + c = n.typescript, + u = n.wordCharacters || /[\w$\xa1-\uffff]/, + d = (function() { + function kw(e) { + return { type: e, style: 'keyword' }; + } + var e = kw('keyword a'), + t = kw('keyword b'), + n = kw('keyword c'), + r = kw('operator'), + i = { type: 'atom', style: 'atom' }, + o = { + if: kw('if'), + while: e, + with: e, + else: t, + do: t, + try: t, + finally: t, + return: n, + break: n, + continue: n, + new: kw('new'), + delete: n, + throw: n, + debugger: n, + var: kw('var'), + const: kw('var'), + let: kw('var'), + function: kw('function'), + catch: kw('catch'), + for: kw('for'), + switch: kw('switch'), + case: kw('case'), + default: kw('default'), + in: r, + typeof: r, + instanceof: r, + true: i, + false: i, + null: i, + undefined: i, + NaN: i, + Infinity: i, + this: kw('this'), + class: kw('class'), + super: kw('atom'), + yield: n, + export: kw('export'), + import: kw('import'), + extends: n, + await: n, + async: kw('async') + }; + if (c) { + var a = { type: 'variable', style: 'variable-3' }, + s = { + interface: kw('class'), + implements: n, + namespace: n, + module: kw('module'), + enum: kw('module'), + public: kw('modifier'), + private: kw('modifier'), + protected: kw('modifier'), + abstract: kw('modifier'), + as: r, + string: a, + number: a, + boolean: a, + any: a + }; + for (var l in s) + o[l] = s[l]; + } + return o; + })(), + p = /[+\-*&%=<>!?|~^@]/, + f = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/, + h = '([{}])', + g = { + atom: !0, + number: !0, + variable: !0, + string: !0, + regexp: !0, + this: !0, + 'jsonld-keyword': !0 + }, + m = { state: null, column: null, marked: null, cc: null }, + v = { name: 'this', next: { name: 'arguments' } }; + return (poplex.lex = !0), { + startState: function(e) { + var t = { + tokenize: tokenBase, + lastType: 'sof', + cc: [], + lexical: new JSLexical((e || 0) - o, 0, 'block', !1), + localVars: n.localVars, + context: n.localVars && { vars: n.localVars }, + indented: e || 0 + }; + return n.globalVars && + 'object' == typeof n.globalVars && + (t.globalVars = n.globalVars), t; + }, + token: function(e, t) { + if ( + (e.sol() && + (t.lexical.hasOwnProperty('align') || + (t.lexical.align = !1), (t.indented = e.indentation()), findFatArrow( + e, + t + )), t.tokenize != tokenComment && e.eatSpace()) + ) + return null; + var n = t.tokenize(e, t); + return 'comment' == r + ? n + : ((t.lastType = 'operator' != r || ('++' != i && '--' != i) + ? r + : 'incdec'), parseJS(t, n, r, i, e)); + }, + indent: function(t, r) { + if (t.tokenize == tokenComment) return e.Pass; + if (t.tokenize != tokenBase) return 0; + var i, s = r && r.charAt(0), l = t.lexical; + if (!/^\s*else\b/.test(r)) + for (var c = t.cc.length - 1; c >= 0; --c) { + var u = t.cc[c]; + if (u == poplex) l = l.prev; + else if (u != maybeelse) break; + } + for ( + ; + ('stat' == l.type || 'form' == l.type) && + ('}' == s || + ((i = t.cc[t.cc.length - 1]) && + (i == maybeoperatorComma || i == maybeoperatorNoComma) && + !/^[,\.=+\-*:?[\(]/.test(r))); + + ) + l = l.prev; + a && ')' == l.type && 'stat' == l.prev.type && (l = l.prev); + var d = l.type, p = s == d; + return 'vardef' == d + ? l.indented + + ('operator' == t.lastType || ',' == t.lastType + ? l.info + 1 + : 0) + : 'form' == d && '{' == s + ? l.indented + : 'form' == d + ? l.indented + o + : 'stat' == d + ? l.indented + + (isContinuedStatement(t, r) ? a || o : 0) + : 'switch' != l.info || p || 0 == n.doubleIndentSwitch + ? l.align + ? l.column + (p ? 0 : 1) + : l.indented + (p ? 0 : o) + : l.indented + + (/^(?:case|default)\b/.test(r) ? o : 2 * o); + }, + electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, + blockCommentStart: l ? null : '/*', + blockCommentEnd: l ? null : '*/', + lineComment: l ? null : '//', + fold: 'brace', + closeBrackets: '()[]{}\'\'""``', + helperType: l ? 'json' : 'javascript', + jsonldMode: s, + jsonMode: l, + expressionAllowed: expressionAllowed, + skipExpression: function(e) { + var t = e.cc[e.cc.length - 1]; + (t != expression && t != expressionNoComma) || e.cc.pop(); + } + }; + }), e.registerHelper( + 'wordChars', + 'javascript', + /[\w$]/ + ), e.defineMIME('text/javascript', 'javascript'), e.defineMIME('text/ecmascript', 'javascript'), e.defineMIME('application/javascript', 'javascript'), e.defineMIME('application/x-javascript', 'javascript'), e.defineMIME('application/ecmascript', 'javascript'), e.defineMIME('application/json', { name: 'javascript', json: !0 }), e.defineMIME('application/x-json', { name: 'javascript', json: !0 }), e.defineMIME('application/ld+json', { name: 'javascript', jsonld: !0 }), e.defineMIME('text/typescript', { name: 'javascript', typescript: !0 }), e.defineMIME('application/typescript', { name: 'javascript', typescript: !0 }); + }); + }, + 1038: function(e, t, n) { + !(function(e) { + e(n(1036), n(1039), n(1037)); + })(function(e) { + 'use strict'; + function Context(e, t, n, r) { + (this.state = e), (this.mode = t), (this.depth = n), (this.prev = r); + } + function copyContext(t) { + return new Context( + e.copyState(t.mode, t.state), + t.mode, + t.depth, + t.prev && copyContext(t.prev) + ); + } + e.defineMode( + 'jsx', + function(t, n) { + function flatXMLIndent(e) { + var t = e.tagName; + e.tagName = null; + var n = r.indent(e, ''); + return (e.tagName = t), n; + } + function token(e, t) { + return t.context.mode == r + ? xmlToken(e, t, t.context) + : jsToken(e, t, t.context); + } + function xmlToken(n, o, a) { + if (2 == a.depth) + return n.match(/^.*?\*\//) + ? (a.depth = 1) + : n.skipToEnd(), 'comment'; + if ('{' == n.peek()) { + r.skipAttribute(a.state); + var s = flatXMLIndent(a.state), l = a.state.context; + if (l && n.match(/^[^>]*>\s*$/, !1)) { + for (; l.prev && !l.startOfLine; ) + l = l.prev; + l.startOfLine + ? (s -= t.indentUnit) + : a.prev.state.lexical && (s = a.prev.state.lexical.indented); + } else 1 == a.depth && (s += t.indentUnit); + return (o.context = new Context( + e.startState(i, s), + i, + 0, + o.context + )), null; + } + if (1 == a.depth) { + if ('<' == n.peek()) + return r.skipAttribute(a.state), (o.context = new Context( + e.startState(r, flatXMLIndent(a.state)), + r, + 0, + o.context + )), null; + if (n.match('//')) return n.skipToEnd(), 'comment'; + if (n.match('/*')) return (a.depth = 2), token(n, o); + } + var c, u = r.token(n, a.state), d = n.current(); + return /\btag\b/.test(u) + ? />$/.test(d) + ? a.state.context + ? (a.depth = 0) + : (o.context = o.context.prev) + : /^ -1 && n.backUp(d.length - c), u; + } + function jsToken(t, n, o) { + if ('<' == t.peek() && i.expressionAllowed(t, o.state)) + return i.skipExpression(o.state), (n.context = new Context( + e.startState(r, i.indent(o.state, '')), + r, + 0, + n.context + )), null; + var a = i.token(t, o.state); + if (!a && null != o.depth) { + var s = t.current(); + '{' == s + ? o.depth++ + : '}' == s && 0 == --o.depth && (n.context = n.context.prev); + } + return a; + } + var r = e.getMode(t, { + name: 'xml', + allowMissing: !0, + multilineTagIndentPastTag: !1 + }), + i = e.getMode(t, (n && n.base) || 'javascript'); + return { + startState: function() { + return { context: new Context(e.startState(i), i) }; + }, + copyState: function(e) { + return { context: copyContext(e.context) }; + }, + token: token, + indent: function(e, t, n) { + return e.context.mode.indent(e.context.state, t, n); + }, + innerMode: function(e) { + return e.context; + } + }; + }, + 'xml', + 'javascript' + ), e.defineMIME('text/jsx', 'jsx'), e.defineMIME('text/typescript-jsx', { name: 'jsx', base: { name: 'javascript', typescript: !0 } }); + }); + }, + 1039: function(e, t, n) { + !(function(e) { + e(n(1036)); + })(function(e) { + 'use strict'; + var t = { + autoSelfClosers: { + area: !0, + base: !0, + br: !0, + col: !0, + command: !0, + embed: !0, + frame: !0, + hr: !0, + img: !0, + input: !0, + keygen: !0, + link: !0, + meta: !0, + param: !0, + source: !0, + track: !0, + wbr: !0, + menuitem: !0 + }, + implicitlyClosed: { + dd: !0, + li: !0, + optgroup: !0, + option: !0, + p: !0, + rp: !0, + rt: !0, + tbody: !0, + td: !0, + tfoot: !0, + th: !0, + tr: !0 + }, + contextGrabbers: { + dd: { dd: !0, dt: !0 }, + dt: { dd: !0, dt: !0 }, + li: { li: !0 }, + option: { option: !0, optgroup: !0 }, + optgroup: { optgroup: !0 }, + p: { + address: !0, + article: !0, + aside: !0, + blockquote: !0, + dir: !0, + div: !0, + dl: !0, + fieldset: !0, + footer: !0, + form: !0, + h1: !0, + h2: !0, + h3: !0, + h4: !0, + h5: !0, + h6: !0, + header: !0, + hgroup: !0, + hr: !0, + menu: !0, + nav: !0, + ol: !0, + p: !0, + pre: !0, + section: !0, + table: !0, + ul: !0 + }, + rp: { rp: !0, rt: !0 }, + rt: { rp: !0, rt: !0 }, + tbody: { tbody: !0, tfoot: !0 }, + td: { td: !0, th: !0 }, + tfoot: { tbody: !0 }, + th: { td: !0, th: !0 }, + thead: { tbody: !0, tfoot: !0 }, + tr: { tr: !0 } + }, + doNotIndent: { pre: !0 }, + allowUnquoted: !0, + allowMissing: !0, + caseFold: !0 + }, + n = { + autoSelfClosers: {}, + implicitlyClosed: {}, + contextGrabbers: {}, + doNotIndent: {}, + allowUnquoted: !1, + allowMissing: !1, + caseFold: !1 + }; + e.defineMode('xml', function(r, i) { + function inText(e, t) { + function chain(n) { + return (t.tokenize = n), n(e, t); + } + var n = e.next(); + if ('<' == n) + return e.eat('!') + ? e.eat('[') + ? e.match('CDATA[') ? chain(inBlock('atom', ']]>')) : null + : e.match('--') + ? chain(inBlock('comment', '--\x3e')) + : e.match('DOCTYPE', !0, !0) + ? (e.eatWhile(/[\w\._\-]/), chain(doctype(1))) + : null + : e.eat('?') + ? (e.eatWhile(/[\w\._\-]/), (t.tokenize = inBlock( + 'meta', + '?>' + )), 'meta') + : ((c = e.eat('/') + ? 'closeTag' + : 'openTag'), (t.tokenize = inTag), 'tag bracket'); + if ('&' == n) { + var r; + return (r = e.eat('#') + ? e.eat('x') + ? e.eatWhile(/[a-fA-F\d]/) && e.eat(';') + : e.eatWhile(/[\d]/) && e.eat(';') + : e.eatWhile(/[\w\.\-:]/) && e.eat(';')), r ? 'atom' : 'error'; + } + return e.eatWhile(/[^&<]/), null; + } + function inTag(e, t) { + var n = e.next(); + if ('>' == n || ('/' == n && e.eat('>'))) + return (t.tokenize = inText), (c = '>' == n + ? 'endTag' + : 'selfcloseTag'), 'tag bracket'; + if ('=' == n) return (c = 'equals'), null; + if ('<' == n) { + (t.tokenize = inText), (t.state = baseState), (t.tagName = t.tagStart = null); + var r = t.tokenize(e, t); + return r ? r + ' tag error' : 'tag error'; + } + return /[\'\"]/.test(n) + ? ((t.tokenize = inAttribute( + n + )), (t.stringStartCol = e.column()), t.tokenize(e, t)) + : (e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/), 'word'); + } + function inAttribute(e) { + var t = function(t, n) { + for (; !t.eol(); ) + if (t.next() == e) { + n.tokenize = inTag; + break; + } + return 'string'; + }; + return (t.isInAttribute = !0), t; + } + function inBlock(e, t) { + return function(n, r) { + for (; !n.eol(); ) { + if (n.match(t)) { + r.tokenize = inText; + break; + } + n.next(); + } + return e; + }; + } + function doctype(e) { + return function(t, n) { + for (var r; null != (r = t.next()); ) { + if ('<' == r) + return (n.tokenize = doctype(e + 1)), n.tokenize(t, n); + if ('>' == r) { + if (1 == e) { + n.tokenize = inText; + break; + } + return (n.tokenize = doctype(e - 1)), n.tokenize(t, n); + } + } + return 'meta'; + }; + } + function Context(e, t, n) { + (this.prev = + e.context), (this.tagName = t), (this.indent = e.indented), (this.startOfLine = n), (a.doNotIndent.hasOwnProperty(t) || (e.context && e.context.noIndent)) && (this.noIndent = !0); + } + function popContext(e) { + e.context && (e.context = e.context.prev); + } + function maybePopContext(e, t) { + for (var n; ; ) { + if (!e.context) return; + if ( + ((n = e.context.tagName), !a.contextGrabbers.hasOwnProperty(n) || + !a.contextGrabbers[n].hasOwnProperty(t)) + ) + return; + popContext(e); + } + } + function baseState(e, t, n) { + return 'openTag' == e + ? ((n.tagStart = t.column()), tagNameState) + : 'closeTag' == e ? closeTagNameState : baseState; + } + function tagNameState(e, t, n) { + return 'word' == e + ? ((n.tagName = t.current()), (u = 'tag'), attrState) + : ((u = 'error'), tagNameState); + } + function closeTagNameState(e, t, n) { + if ('word' == e) { + var r = t.current(); + return n.context && + n.context.tagName != r && + a.implicitlyClosed.hasOwnProperty(n.context.tagName) && + popContext(n), (n.context && n.context.tagName == r) || + !1 === a.matchClosing + ? ((u = 'tag'), closeState) + : ((u = 'tag error'), closeStateErr); + } + return (u = 'error'), closeStateErr; + } + function closeState(e, t, n) { + return 'endTag' != e + ? ((u = 'error'), closeState) + : (popContext(n), baseState); + } + function closeStateErr(e, t, n) { + return (u = 'error'), closeState(e, t, n); + } + function attrState(e, t, n) { + if ('word' == e) return (u = 'attribute'), attrEqState; + if ('endTag' == e || 'selfcloseTag' == e) { + var r = n.tagName, i = n.tagStart; + return (n.tagName = n.tagStart = null), 'selfcloseTag' == e || + a.autoSelfClosers.hasOwnProperty(r) + ? maybePopContext(n, r) + : (maybePopContext(n, r), (n.context = new Context( + n, + r, + i == n.indented + ))), baseState; + } + return (u = 'error'), attrState; + } + function attrEqState(e, t, n) { + return 'equals' == e + ? attrValueState + : (a.allowMissing || (u = 'error'), attrState(e, t, n)); + } + function attrValueState(e, t, n) { + return 'string' == e + ? attrContinuedState + : 'word' == e && a.allowUnquoted + ? ((u = 'string'), attrState) + : ((u = 'error'), attrState(e, t, n)); + } + function attrContinuedState(e, t, n) { + return 'string' == e ? attrContinuedState : attrState(e, t, n); + } + var o = r.indentUnit, a = {}, s = i.htmlMode ? t : n; + for (var l in s) a[l] = s[l]; + for (var l in i) a[l] = i[l]; + var c, u; + return (inText.isInText = !0), { + startState: function(e) { + var t = { + tokenize: inText, + state: baseState, + indented: e || 0, + tagName: null, + tagStart: null, + context: null + }; + return null != e && (t.baseIndent = e), t; + }, + token: function(e, t) { + if ( + (!t.tagName && + e.sol() && + (t.indented = e.indentation()), e.eatSpace()) + ) + return null; + c = null; + var n = t.tokenize(e, t); + return (n || c) && + 'comment' != n && + ((u = null), (t.state = t.state(c || n, e, t)), u && + (n = 'error' == u ? n + ' error' : u)), n; + }, + indent: function(t, n, r) { + var i = t.context; + if (t.tokenize.isInAttribute) + return t.tagStart == t.indented + ? t.stringStartCol + 1 + : t.indented + o; + if (i && i.noIndent) return e.Pass; + if (t.tokenize != inTag && t.tokenize != inText) + return r ? r.match(/^(\s*)/)[0].length : 0; + if (t.tagName) + return !1 !== a.multilineTagIndentPastTag + ? t.tagStart + t.tagName.length + 2 + : t.tagStart + o * (a.multilineTagIndentFactor || 1); + if (a.alignCDATA && /$/, + blockCommentStart: '\x3c!--', + blockCommentEnd: '--\x3e', + configuration: a.htmlMode ? 'html' : 'xml', + helperType: a.htmlMode ? 'html' : 'xml', + skipAttribute: function(e) { + e.state == attrValueState && (e.state = attrState); + } + }; + }), e.defineMIME( + 'text/xml', + 'xml' + ), e.defineMIME('application/xml', 'xml'), e.mimeModes.hasOwnProperty('text/html') || e.defineMIME('text/html', { name: 'xml', htmlMode: !0 }); + }); + }, + 1040: function(e, t, n) { + (function(t) { + function debounce(e, t, r) { + function invokeFunc(t) { + var n = i, r = o; + return (i = o = void 0), (u = t), (s = e.apply(r, n)); + } + function leadingEdge(e) { + return (u = e), (l = setTimeout(timerExpired, t)), d + ? invokeFunc(e) + : s; + } + function remainingWait(e) { + var n = e - c, r = e - u, i = t - n; + return p ? m(i, a - r) : i; + } + function shouldInvoke(e) { + var n = e - c, r = e - u; + return void 0 === c || n >= t || n < 0 || (p && r >= a); + } + function timerExpired() { + var e = v(); + if (shouldInvoke(e)) return trailingEdge(e); + l = setTimeout(timerExpired, remainingWait(e)); + } + function trailingEdge(e) { + return (l = void 0), f && i ? invokeFunc(e) : ((i = o = void 0), s); + } + function cancel() { + void 0 !== l && clearTimeout(l), (u = 0), (i = c = o = l = void 0); + } + function flush() { + return void 0 === l ? s : trailingEdge(v()); + } + function debounced() { + var e = v(), n = shouldInvoke(e); + if (((i = arguments), (o = this), (c = e), n)) { + if (void 0 === l) return leadingEdge(c); + if (p) return (l = setTimeout(timerExpired, t)), invokeFunc(c); + } + return void 0 === l && (l = setTimeout(timerExpired, t)), s; + } + var i, o, a, s, l, c, u = 0, d = !1, p = !1, f = !0; + if ('function' != typeof e) throw new TypeError(n); + return (t = toNumber(t) || 0), isObject(r) && + ((d = !!r.leading), (p = 'maxWait' in r), (a = p + ? g(toNumber(r.maxWait) || 0, t) + : a), (f = 'trailing' in r + ? !!r.trailing + : f)), (debounced.cancel = cancel), (debounced.flush = flush), debounced; + } + function isObject(e) { + var t = typeof e; + return !!e && ('object' == t || 'function' == t); + } + function isObjectLike(e) { + return !!e && 'object' == typeof e; + } + function isSymbol(e) { + return 'symbol' == typeof e || (isObjectLike(e) && h.call(e) == i); + } + function toNumber(e) { + if ('number' == typeof e) return e; + if (isSymbol(e)) return r; + if (isObject(e)) { + var t = 'function' == typeof e.valueOf ? e.valueOf() : e; + e = isObject(t) ? t + '' : t; + } + if ('string' != typeof e) return 0 === e ? e : +e; + e = e.replace(o, ''); + var n = s.test(e); + return n || l.test(e) ? c(e.slice(2), n ? 2 : 8) : a.test(e) ? r : +e; + } + var n = 'Expected a function', + r = NaN, + i = '[object Symbol]', + o = /^\s+|\s+$/g, + a = /^[-+]0x[0-9a-f]+$/i, + s = /^0b[01]+$/i, + l = /^0o[0-7]+$/i, + c = parseInt, + u = 'object' == typeof t && t && t.Object === Object && t, + d = 'object' == typeof self && self && self.Object === Object && self, + p = u || d || Function('return this')(), + f = Object.prototype, + h = f.toString, + g = Math.max, + m = Math.min, + v = function() { + return p.Date.now(); + }; + e.exports = debounce; + }.call(t, n(16))); + }, + 1041: function(e, t, n) { + 'use strict'; + function normalizeLineEndings(e) { + return e ? e.replace(/\r\n|\r/g, '\n') : e; + } + var r = n(0), + i = n(194), + o = i.findDOMNode, + a = n(37), + s = n(1040), + l = r.createClass({ + displayName: 'CodeMirror', + propTypes: { + className: r.PropTypes.any, + codeMirrorInstance: r.PropTypes.func, + defaultValue: r.PropTypes.string, + onChange: r.PropTypes.func, + onFocusChange: r.PropTypes.func, + onScroll: r.PropTypes.func, + options: r.PropTypes.object, + path: r.PropTypes.string, + value: r.PropTypes.string, + preserveScrollPosition: r.PropTypes.bool + }, + getDefaultProps: function getDefaultProps() { + return { preserveScrollPosition: !1 }; + }, + getCodeMirrorInstance: function getCodeMirrorInstance() { + return this.props.codeMirrorInstance || n(1036); + }, + getInitialState: function getInitialState() { + return { isFocused: !1 }; + }, + componentWillMount: function componentWillMount() { + this.componentWillReceiveProps = s(this.componentWillReceiveProps, 0); + }, + componentDidMount: function componentDidMount() { + var e = o(this.refs.textarea), t = this.getCodeMirrorInstance(); + (this.codeMirror = t.fromTextArea( + e, + this.props.options + )), this.codeMirror.on( + 'change', + this.codemirrorValueChanged + ), this.codeMirror.on( + 'focus', + this.focusChanged.bind(this, !0) + ), this.codeMirror.on( + 'blur', + this.focusChanged.bind(this, !1) + ), this.codeMirror.on( + 'scroll', + this.scrollChanged + ), this.codeMirror.setValue( + this.props.defaultValue || this.props.value || '' + ); + }, + componentWillUnmount: function componentWillUnmount() { + this.codeMirror && this.codeMirror.toTextArea(); + }, + componentWillReceiveProps: function componentWillReceiveProps(e) { + if ( + this.codeMirror && + void 0 !== e.value && + normalizeLineEndings(this.codeMirror.getValue()) !== + normalizeLineEndings(e.value) + ) + if (this.props.preserveScrollPosition) { + var t = this.codeMirror.getScrollInfo(); + this.codeMirror.setValue(e.value), this.codeMirror.scrollTo( + t.left, + t.top + ); + } else this.codeMirror.setValue(e.value); + if ('object' == typeof e.options) + for (var n in e.options) + e.options.hasOwnProperty(n) && + this.codeMirror.setOption(n, e.options[n]); + }, + getCodeMirror: function getCodeMirror() { + return this.codeMirror; + }, + focus: function focus() { + this.codeMirror && this.codeMirror.focus(); + }, + focusChanged: function focusChanged(e) { + this.setState({ isFocused: e }), this.props.onFocusChange && + this.props.onFocusChange(e); + }, + scrollChanged: function scrollChanged(e) { + this.props.onScroll && this.props.onScroll(e.getScrollInfo()); + }, + codemirrorValueChanged: function codemirrorValueChanged(e, t) { + this.props.onChange && + 'setValue' !== t.origin && + this.props.onChange(e.getValue(), t); + }, + render: function render() { + var e = a( + 'ReactCodeMirror', + this.state.isFocused ? 'ReactCodeMirror--focused' : null, + this.props.className + ); + return r.createElement( + 'div', + { className: e }, + r.createElement('textarea', { + ref: 'textarea', + name: this.props.path, + defaultValue: this.props.value, + autoComplete: 'off' + }) + ); + } + }); + e.exports = l; + }, + 1042: function(e, t, n) { + (t = e.exports = n(330)(void 0)), t.push([ + e.i, + "/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace;\n height: 300px;\n color: black;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0 !important;\n background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n\n.cm-animate-fat-cursor {\n width: auto;\n border: 0;\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n background-color: #7e7;\n}\n@-moz-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@-webkit-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-rulers {\n position: absolute;\n left: 0; right: 0; top: -50px; bottom: -20px;\n overflow: hidden;\n}\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n top: 0; bottom: 0;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3 {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white;\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 30px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -30px; margin-right: -30px;\n padding-bottom: 30px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n}\n.CodeMirror-sizer {\n position: relative;\n border-right: 30px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n}\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -30px;\n}\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: contextual;\n font-variant-ligatures: contextual;\n}\n.CodeMirror-wrap pre {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n overflow: auto;\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor {\n position: absolute;\n pointer-events: none;\n}\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background: #ffa;\n background: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n", + '' + ]); + }, + 1043: function(e, t, n) { + (t = e.exports = n(330)(void 0)), t.push([ + e.i, + '/*\n\n Name: Base16 Default Light\n Author: Chris Kempson (http://chriskempson.com)\n\n CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)\n Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)\n\n*/\n\n.cm-s-base16-light.CodeMirror { background: #f5f5f5; color: #202020; }\n.cm-s-base16-light div.CodeMirror-selected { background: #e0e0e0; }\n.cm-s-base16-light .CodeMirror-line::selection, .cm-s-base16-light .CodeMirror-line > span::selection, .cm-s-base16-light .CodeMirror-line > span > span::selection { background: #e0e0e0; }\n.cm-s-base16-light .CodeMirror-line::-moz-selection, .cm-s-base16-light .CodeMirror-line > span::-moz-selection, .cm-s-base16-light .CodeMirror-line > span > span::-moz-selection { background: #e0e0e0; }\n.cm-s-base16-light .CodeMirror-gutters { background: #f5f5f5; border-right: 0px; }\n.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }\n.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }\n.cm-s-base16-light .CodeMirror-linenumber { color: #b0b0b0; }\n.cm-s-base16-light .CodeMirror-cursor { border-left: 1px solid #505050; }\n\n.cm-s-base16-light span.cm-comment { color: #8f5536; }\n.cm-s-base16-light span.cm-atom { color: #aa759f; }\n.cm-s-base16-light span.cm-number { color: #aa759f; }\n\n.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute { color: #90a959; }\n.cm-s-base16-light span.cm-keyword { color: #ac4142; }\n.cm-s-base16-light span.cm-string { color: #f4bf75; }\n\n.cm-s-base16-light span.cm-variable { color: #90a959; }\n.cm-s-base16-light span.cm-variable-2 { color: #6a9fb5; }\n.cm-s-base16-light span.cm-def { color: #d28445; }\n.cm-s-base16-light span.cm-bracket { color: #202020; }\n.cm-s-base16-light span.cm-tag { color: #ac4142; }\n.cm-s-base16-light span.cm-link { color: #aa759f; }\n.cm-s-base16-light span.cm-error { background: #ac4142; color: #505050; }\n\n.cm-s-base16-light .CodeMirror-activeline-background { background: #DDDCDC; }\n.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }\n', + '' + ]); + }, + 1044: function(e, t, n) { + var r = n(1042); + 'string' == typeof r && (r = [[e.i, r, '']]); + var i = {}; + i.transform = void 0; + n(331)(r, i); + r.locals && (e.exports = r.locals); + }, + 1045: function(e, t, n) { + var r = n(1043); + 'string' == typeof r && (r = [[e.i, r, '']]); + var i = {}; + i.transform = void 0; + n(331)(r, i); + r.locals && (e.exports = r.locals); + }, + 333: function(e, t, n) { + 'use strict'; + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _classCallCheck(e, t) { + if (!(e instanceof t)) + throw new TypeError('Cannot call a class as a function'); + } + function _possibleConstructorReturn(e, t) { + if (!e) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return !t || ('object' != typeof t && 'function' != typeof t) ? e : t; + } + function _inherits(e, t) { + if ('function' != typeof t && null !== t) + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof t + ); + (e.prototype = Object.create(t && t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0 + } + })), t && + (Object.setPrototypeOf + ? Object.setPrototypeOf(e, t) + : (e.__proto__ = t)); + } + Object.defineProperty(t, '__esModule', { value: !0 }); + var r = + Object.assign || + function(e) { + for (var t = 1; t < arguments.length; t++) { + var n = arguments[t]; + for (var r in n) + Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]); + } + return e; + }, + i = (function() { + function defineProperties(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + (r.enumerable = + r.enumerable || !1), (r.configurable = !0), 'value' in r && + (r.writable = !0), Object.defineProperty(e, r.key, r); + } + } + return function(e, t, n) { + return t && defineProperties(e.prototype, t), n && + defineProperties(e, n), e; + }; + })(), + o = n(0), + a = _interopRequireDefault(o), + s = n(1), + l = _interopRequireDefault(s), + c = n(332), + u = _interopRequireDefault(c), + d = n(1041), + p = _interopRequireDefault(d); + n(1038), n(1044), n(1045); + var f = { + mode: 'jsx', + lineNumbers: !1, + lineWrapping: !0, + smartIndent: !1, + matchBrackets: !0, + viewportMargin: 1 / 0 + }, + h = 10, + g = (function(e) { + function Editor() { + _classCallCheck(this, Editor); + var e = _possibleConstructorReturn( + this, + (Editor.__proto__ || Object.getPrototypeOf(Editor)).call(this) + ); + return (e.handleChange = (0, u.default)( + e.handleChange.bind(e), + h + )), e; + } + return _inherits(Editor, e), i(Editor, [ + { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate() { + return !1; + } + }, + { + key: 'handleChange', + value: function handleChange(e) { + this.props.onChange(e); + } + }, + { + key: 'render', + value: function render() { + var e = this.props.code, + t = this.context.config.highlightTheme, + n = r({}, f, { theme: t }); + return a.default.createElement(p.default, { + value: e, + onChange: this.handleChange, + options: n + }); + } + } + ]), Editor; + })(o.Component); + (g.propTypes = { + code: l.default.string.isRequired, + onChange: l.default.func.isRequired + }), (g.contextTypes = { + config: l.default.object.isRequired + }), (t.default = g); + } +}); diff --git a/packages/ui-toolkit/styleguide/build/bundle.968e47c5.js b/packages/ui-toolkit/styleguide/build/bundle.968e47c5.js index 48c34644..3e2cb2a6 100644 --- a/packages/ui-toolkit/styleguide/build/bundle.968e47c5.js +++ b/packages/ui-toolkit/styleguide/build/bundle.968e47c5.js @@ -1,168 +1,203 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // install a JSONP callback for chunk loading -/******/ var parentJsonpFunction = window["webpackJsonp"]; -/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) { -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0, resolves = [], result; -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(installedChunks[chunkId]) { -/******/ resolves.push(installedChunks[chunkId][0]); -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ for(moduleId in moreModules) { -/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ modules[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules); -/******/ while(resolves.length) { -/******/ resolves.shift()(); -/******/ } -/******/ -/******/ }; -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // objects to store loaded and loading chunks -/******/ var installedChunks = { -/******/ 1: 0 -/******/ }; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ // This file contains only the entry chunk. -/******/ // The chunk loading function for additional chunks -/******/ __webpack_require__.e = function requireEnsure(chunkId) { -/******/ var installedChunkData = installedChunks[chunkId]; -/******/ if(installedChunkData === 0) { -/******/ return new Promise(function(resolve) { resolve(); }); -/******/ } -/******/ -/******/ // a Promise means "currently loading". -/******/ if(installedChunkData) { -/******/ return installedChunkData[2]; -/******/ } -/******/ -/******/ // setup Promise in chunk cache -/******/ var promise = new Promise(function(resolve, reject) { -/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; -/******/ }); -/******/ installedChunkData[2] = promise; -/******/ -/******/ // start chunk loading -/******/ var head = document.getElementsByTagName('head')[0]; -/******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; -/******/ script.charset = 'utf-8'; -/******/ script.async = true; -/******/ script.timeout = 120000; -/******/ -/******/ if (__webpack_require__.nc) { -/******/ script.setAttribute("nonce", __webpack_require__.nc); -/******/ } -/******/ script.src = __webpack_require__.p + "build/" + ({}[chunkId]||chunkId) + "." + {"0":"8d987fcd"}[chunkId] + ".js"; -/******/ var timeout = setTimeout(onScriptComplete, 120000); -/******/ script.onerror = script.onload = onScriptComplete; -/******/ function onScriptComplete() { -/******/ // avoid mem leaks in IE. -/******/ script.onerror = script.onload = null; -/******/ clearTimeout(timeout); -/******/ var chunk = installedChunks[chunkId]; -/******/ if(chunk !== 0) { -/******/ if(chunk) { -/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.')); -/******/ } -/******/ installedChunks[chunkId] = undefined; -/******/ } -/******/ }; -/******/ head.appendChild(script); -/******/ -/******/ return promise; -/******/ }; -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // on error function for async loading -/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1035); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { +/******/ (function(modules) { + // webpackBootstrap + /******/ // install a JSONP callback for chunk loading + /******/ var parentJsonpFunction = window['webpackJsonp']; + /******/ window['webpackJsonp'] = function webpackJsonpCallback( + chunkIds, + moreModules, + executeModules + ) { + /******/ // add "moreModules" to the modules object, + /******/ // then flag all "chunkIds" as loaded and fire callback + /******/ var moduleId, chunkId, i = 0, resolves = [], result; + /******/ for (; i < chunkIds.length; i++) { + /******/ chunkId = chunkIds[i]; + /******/ if (installedChunks[chunkId]) { + /******/ resolves.push(installedChunks[chunkId][0]); + /******/ + } + /******/ installedChunks[chunkId] = 0; + /******/ + } + /******/ for (moduleId in moreModules) { + /******/ if ( + Object.prototype.hasOwnProperty.call(moreModules, moduleId) + ) { + /******/ modules[moduleId] = moreModules[moduleId]; + /******/ + } + /******/ + } + /******/ if (parentJsonpFunction) + parentJsonpFunction(chunkIds, moreModules, executeModules); + /******/ while (resolves.length) { + /******/ resolves.shift()(); + /******/ + } + /******/ + /******/ + }; // The module cache + /******/ + /******/ /******/ var installedModules = {}; // objects to store loaded and loading chunks + /******/ + /******/ /******/ var installedChunks = { + /******/ 1: 0 + /******/ + }; // The require function + /******/ + /******/ /******/ function __webpack_require__(moduleId) { + /******/ + /******/ // Check if module is in cache + /******/ if (installedModules[moduleId]) { + /******/ return installedModules[moduleId].exports; + /******/ + } // Create a new module (and put it into the cache) + /******/ /******/ var module = (installedModules[moduleId] = { + /******/ i: moduleId, + /******/ l: false, + /******/ exports: {} + /******/ + }); // Execute the module function + /******/ + /******/ /******/ modules[moduleId].call( + module.exports, + module, + module.exports, + __webpack_require__ + ); // Flag the module as loaded + /******/ + /******/ /******/ module.l = true; // Return the exports of the module + /******/ + /******/ /******/ return module.exports; + /******/ + } // This file contains only the entry chunk. // The chunk loading function for additional chunks + /******/ + /******/ /******/ /******/ __webpack_require__.e = function requireEnsure( + chunkId + ) { + /******/ var installedChunkData = installedChunks[chunkId]; + /******/ if (installedChunkData === 0) { + /******/ return new Promise(function(resolve) { + resolve(); + }); + /******/ + } // a Promise means "currently loading". + /******/ + /******/ /******/ if (installedChunkData) { + /******/ return installedChunkData[2]; + /******/ + } // setup Promise in chunk cache + /******/ + /******/ /******/ var promise = new Promise(function(resolve, reject) { + /******/ installedChunkData = installedChunks[chunkId] = [ + resolve, + reject + ]; + /******/ + }); + /******/ installedChunkData[2] = promise; // start chunk loading + /******/ + /******/ /******/ var head = document.getElementsByTagName('head')[0]; + /******/ var script = document.createElement('script'); + /******/ script.type = 'text/javascript'; + /******/ script.charset = 'utf-8'; + /******/ script.async = true; + /******/ script.timeout = 120000; + /******/ + /******/ if (__webpack_require__.nc) { + /******/ script.setAttribute('nonce', __webpack_require__.nc); + /******/ + } + /******/ script.src = + __webpack_require__.p + + 'build/' + + ({}[chunkId] || chunkId) + + '.' + + { '0': '8d987fcd' }[chunkId] + + '.js'; + /******/ var timeout = setTimeout(onScriptComplete, 120000); + /******/ script.onerror = script.onload = onScriptComplete; + /******/ function onScriptComplete() { + /******/ // avoid mem leaks in IE. + /******/ script.onerror = script.onload = null; + /******/ clearTimeout(timeout); + /******/ var chunk = installedChunks[chunkId]; + /******/ if (chunk !== 0) { + /******/ if (chunk) { + /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.')); + /******/ + } + /******/ installedChunks[chunkId] = undefined; + /******/ + } + /******/ + } + /******/ head.appendChild(script); + /******/ + /******/ return promise; + /******/ + }; // expose the modules object (__webpack_modules__) + /******/ + /******/ /******/ __webpack_require__.m = modules; // expose the module cache + /******/ + /******/ /******/ __webpack_require__.c = installedModules; // identity function for calling harmony imports with the correct context + /******/ + /******/ /******/ __webpack_require__.i = function(value) { + return value; + }; // define getter function for harmony exports + /******/ + /******/ /******/ __webpack_require__.d = function(exports, name, getter) { + /******/ if (!__webpack_require__.o(exports, name)) { + /******/ Object.defineProperty(exports, name, { + /******/ configurable: false, + /******/ enumerable: true, + /******/ get: getter + /******/ + }); + /******/ + } + /******/ + }; // getDefaultExport function for compatibility with non-harmony modules + /******/ + /******/ /******/ __webpack_require__.n = function(module) { + /******/ var getter = module && module.__esModule + ? /******/ function getDefault() { + return module['default']; + } + : /******/ function getModuleExports() { + return module; + }; + /******/ __webpack_require__.d(getter, 'a', getter); + /******/ return getter; + /******/ + }; // Object.prototype.hasOwnProperty.call + /******/ + /******/ /******/ __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; // __webpack_public_path__ + /******/ + /******/ /******/ __webpack_require__.p = ''; // on error function for async loading + /******/ + /******/ /******/ __webpack_require__.oe = function(err) { + console.error(err); + throw err; + }; // Load entry module and return exports + /******/ + /******/ /******/ return __webpack_require__((__webpack_require__.s = 1035)); + /******/ +})( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + module.exports = __webpack_require__(60); -"use strict"; - - -module.exports = __webpack_require__(60); - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -/** + /***/ + }, + /* 1 */ + /***/ function(module, exports, __webpack_require__) { + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -171,35 +206,40 @@ module.exports = __webpack_require__(60); * of patent rights can be found in the PATENTS file in the same directory. */ -if (false) { - var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && - Symbol.for && - Symbol.for('react.element')) || - 0xeac7; + if (false) { + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; - var isValidElement = function(object) { - return typeof object === 'object' && - object !== null && - object.$$typeof === REACT_ELEMENT_TYPE; - }; + var isValidElement = function(object) { + return ( + typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE + ); + }; - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); -} else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(712)(); -} + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = require('./factoryWithTypeCheckers')( + isValidElement, + throwOnDirectAccess + ); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__(712)(); + } - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 2 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -209,9 +249,7 @@ if (false) { * */ - - -/** + /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments @@ -222,59 +260,89 @@ if (false) { * will remain to ensure logic does not differ in production. */ -var validateFormat = function validateFormat(format) {}; + var validateFormat = function validateFormat(format) {}; -if (false) { - validateFormat = function validateFormat(format) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - }; -} + if (false) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } -function invariant(condition, format, a, b, c, d, e, f) { - validateFormat(format); + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); - if (!condition) { - var error; - if (format === undefined) { - error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error(format.replace(/%s/g, function () { - return args[argIndex++]; - })); - error.name = 'Invariant Violation'; - } + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { + return args[argIndex++]; + }) + ); + error.name = 'Invariant Violation'; + } - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -} + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } -module.exports = invariant; + module.exports = invariant; -/***/ }), -/* 3 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /***/ + }, + /* 3 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function(process) { + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'b', + function() { + return css; + } + ); + /* unused harmony export keyframes */ + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'c', + function() { + return injectGlobal; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'd', + function() { + return ThemeProvider; + } + ); + /* unused harmony export withTheme */ + /* unused harmony export ServerStyleSheet */ + /* unused harmony export StyleSheetManager */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_stylis__ = __webpack_require__( + 1016 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_stylis___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_stylis__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__( + 0 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__ + ); -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return css; }); -/* unused harmony export keyframes */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return injectGlobal; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ThemeProvider; }); -/* unused harmony export withTheme */ -/* unused harmony export ServerStyleSheet */ -/* unused harmony export StyleSheetManager */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_stylis__ = __webpack_require__(1016); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_stylis___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_stylis__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); - - - -/** + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -285,9 +353,9 @@ module.exports = invariant; * @typechecks */ -var _uppercasePattern = /([A-Z])/g; + var _uppercasePattern = /([A-Z])/g; -/** + /** * Hyphenates a camelcased string, for example: * * > hyphenate('backgroundColor') @@ -299,17 +367,17 @@ var _uppercasePattern = /([A-Z])/g; * @param {string} string * @return {string} */ -function hyphenate$2(string) { - return string.replace(_uppercasePattern, '-$1').toLowerCase(); -} + function hyphenate$2(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); + } -var hyphenate_1 = hyphenate$2; + var hyphenate_1 = hyphenate$2; -var hyphenate = hyphenate_1; + var hyphenate = hyphenate_1; -var msPattern = /^ms-/; + var msPattern = /^ms-/; -/** + /** * Hyphenates a camelcased CSS property name, for example: * * > hyphenateStyleName('backgroundColor') @@ -325,255 +393,303 @@ var msPattern = /^ms-/; * @param {string} string * @return {string} */ -function hyphenateStyleName(string) { - return hyphenate(string).replace(msPattern, '-ms-'); -} + function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); + } -var hyphenateStyleName_1 = hyphenateStyleName; + var hyphenateStyleName_1 = hyphenateStyleName; -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; + var _typeof = typeof Symbol === 'function' && + typeof Symbol.iterator === 'symbol' + ? function(obj) { + return typeof obj; + } + : function(obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + var classCallCheck = function(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + }; + var createClass = (function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + var _extends = + Object.assign || + function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + var inherits = function(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + } + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + }; + var objectWithoutProperties = function(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } -var classCallCheck = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; + return target; + }; -var createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } + var possibleConstructorReturn = function(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + } - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; -}(); + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + }; - - - - - - -var _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; -}; - - - -var inherits = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; -}; - - - - - - - - - -var objectWithoutProperties = function (obj, keys) { - var target = {}; - - for (var i in obj) { - if (keys.indexOf(i) >= 0) continue; - if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; - target[i] = obj[i]; - } - - return target; -}; - -var possibleConstructorReturn = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; -}; - -/*! + /*! * isobject * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ -var index$1 = function isObject(val) { - return val != null && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && !Array.isArray(val); -}; + var index$1 = function isObject(val) { + return ( + val != null && + (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === + 'object' && + !Array.isArray(val) + ); + }; -var isObject$1 = index$1; + var isObject$1 = index$1; -function isObjectObject(o) { - return isObject$1(o) === true && Object.prototype.toString.call(o) === '[object Object]'; -} + function isObjectObject(o) { + return ( + isObject$1(o) === true && + Object.prototype.toString.call(o) === '[object Object]' + ); + } -var index = function isPlainObject(o) { - var ctor, prot; + var index = function isPlainObject(o) { + var ctor, prot; - if (isObjectObject(o) === false) return false; + if (isObjectObject(o) === false) return false; - // If has modified constructor - ctor = o.constructor; - if (typeof ctor !== 'function') return false; + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; - // If has modified prototype - prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } - // Most likely a plain Object - return true; -}; + // Most likely a plain Object + return true; + }; -// -var objToCss = function objToCss(obj, prevKey) { - var css = Object.keys(obj).map(function (key) { - if (index(obj[key])) return objToCss(obj[key], key); - return hyphenateStyleName_1(key) + ': ' + obj[key] + ';'; - }).join(' '); - return prevKey ? prevKey + ' {\n ' + css + '\n}' : css; -}; + // + var objToCss = function objToCss(obj, prevKey) { + var css = Object.keys(obj) + .map(function(key) { + if (index(obj[key])) return objToCss(obj[key], key); + return hyphenateStyleName_1(key) + ': ' + obj[key] + ';'; + }) + .join(' '); + return prevKey ? prevKey + ' {\n ' + css + '\n}' : css; + }; -var flatten = function flatten(chunks, executionContext) { - return chunks.reduce(function (ruleSet, chunk) { - /* Remove falsey values */ - if (chunk === undefined || chunk === null || chunk === false || chunk === '') return ruleSet; - /* Flatten ruleSet */ - if (Array.isArray(chunk)) return [].concat(ruleSet, flatten(chunk, executionContext)); + var flatten = function flatten(chunks, executionContext) { + return chunks.reduce(function(ruleSet, chunk) { + /* Remove falsey values */ + if ( + chunk === undefined || + chunk === null || + chunk === false || + chunk === '' + ) + return ruleSet; + /* Flatten ruleSet */ + if (Array.isArray(chunk)) + return [].concat(ruleSet, flatten(chunk, executionContext)); - /* Handle other components */ - // $FlowFixMe not sure how to make this pass - if (chunk.hasOwnProperty('styledComponentId')) return [].concat(ruleSet, ['.' + chunk.styledComponentId]); + /* Handle other components */ + // $FlowFixMe not sure how to make this pass + if (chunk.hasOwnProperty('styledComponentId')) + return [].concat(ruleSet, ['.' + chunk.styledComponentId]); - /* Either execute or defer the function */ - if (typeof chunk === 'function') { - return executionContext ? ruleSet.concat.apply(ruleSet, flatten([chunk(executionContext)], executionContext)) : ruleSet.concat(chunk); - } + /* Either execute or defer the function */ + if (typeof chunk === 'function') { + return executionContext + ? ruleSet.concat.apply( + ruleSet, + flatten([chunk(executionContext)], executionContext) + ) + : ruleSet.concat(chunk); + } - /* Handle objects */ - // $FlowFixMe have to add %checks somehow to isPlainObject - return ruleSet.concat(index(chunk) ? objToCss(chunk) : chunk.toString()); - }, []); -}; + /* Handle objects */ + // $FlowFixMe have to add %checks somehow to isPlainObject + return ruleSet.concat( + index(chunk) ? objToCss(chunk) : chunk.toString() + ); + }, []); + }; -// -var stringifyRules = function stringifyRules(rules, selector, prefix) { - var flatCSS = rules.join('').replace(/^\s*\/\/.*$/gm, ''); // replace JS comments + // + var stringifyRules = function stringifyRules(rules, selector, prefix) { + var flatCSS = rules.join('').replace(/^\s*\/\/.*$/gm, ''); // replace JS comments - var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS; + var cssStr = selector && prefix + ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' + : flatCSS; - var css = __WEBPACK_IMPORTED_MODULE_0_stylis___default()(prefix || !selector ? '' : selector, cssStr, false, false); + var css = __WEBPACK_IMPORTED_MODULE_0_stylis___default()( + prefix || !selector ? '' : selector, + cssStr, + false, + false + ); - return css; -}; + return css; + }; -// -var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); -var charsLength = chars.length; + // + var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split( + '' + ); + var charsLength = chars.length; -/* Some high number, usually 9-digit base-10. Map it to base-😎 */ -var generateAlphabeticName = function generateAlphabeticName(code) { - var name = ''; - var x = void 0; + /* Some high number, usually 9-digit base-10. Map it to base-😎 */ + var generateAlphabeticName = function generateAlphabeticName(code) { + var name = ''; + var x = void 0; - for (x = code; x > charsLength; x = Math.floor(x / chars.length)) { - name = chars[x % charsLength] + name; - } + for (x = code; x > charsLength; x = Math.floor(x / chars.length)) { + name = chars[x % charsLength] + name; + } - return chars[x % charsLength] + name; -}; + return chars[x % charsLength] + name; + }; -// + // + var interleave = function(strings, interpolations) { + return interpolations.reduce( + function(array, interp, i) { + return array.concat(interp, strings[i + 1]); + }, + [strings[0]] + ); + }; -var interleave = (function (strings, interpolations) { - return interpolations.reduce(function (array, interp, i) { - return array.concat(interp, strings[i + 1]); - }, [strings[0]]); -}); + // + var css = function(strings) { + for ( + var _len = arguments.length, + interpolations = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + interpolations[_key - 1] = arguments[_key]; + } -// -var css = (function (strings) { - for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - interpolations[_key - 1] = arguments[_key]; - } + return flatten(interleave(strings, interpolations)); + }; - return flatten(interleave(strings, interpolations)); -}); + // + var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s+(\S+)\s+\*\//gm; -// -var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s+(\S+)\s+\*\//mg; + var extractCompsFromCSS = function(maybeCSS) { + var css = '' + (maybeCSS || ''); // Definitely a string, and a clone + var existingComponents = []; + css.replace(SC_COMPONENT_ID, function( + match, + componentId, + matchIndex + ) { + existingComponents.push({ + componentId: componentId, + matchIndex: matchIndex + }); + return match; + }); + return existingComponents.map(function(_ref, i) { + var componentId = _ref.componentId, matchIndex = _ref.matchIndex; -var extractCompsFromCSS = (function (maybeCSS) { - var css = '' + (maybeCSS || ''); // Definitely a string, and a clone - var existingComponents = []; - css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) { - existingComponents.push({ componentId: componentId, matchIndex: matchIndex }); - return match; - }); - return existingComponents.map(function (_ref, i) { - var componentId = _ref.componentId, - matchIndex = _ref.matchIndex; + var nextComp = existingComponents[i + 1]; + var cssFromDOM = nextComp + ? css.slice(matchIndex, nextComp.matchIndex) + : css.slice(matchIndex); + return { componentId: componentId, cssFromDOM: cssFromDOM }; + }); + }; - var nextComp = existingComponents[i + 1]; - var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex); - return { componentId: componentId, cssFromDOM: cssFromDOM }; - }); -}); - -// -/* + // + /* * Browser Style Sheet with Rehydration * * '; - }; + return ( + '' + ); + }; - ServerTag.prototype.toReactElement = function toReactElement(key) { - var _attributes, - _this2 = this; + ServerTag.prototype.toReactElement = function toReactElement(key) { + var _attributes, _this2 = this; - var attributes = (_attributes = {}, _attributes[SC_ATTR] = this.names.join(' '), _attributes[LOCAL_ATTR] = this.isLocal.toString(), _attributes); - var css = Object.keys(this.components).map(function (k) { - return _this2.components[k].css; - }).join(''); + var attributes = ((_attributes = {}), (_attributes[ + SC_ATTR + ] = this.names.join(' ')), (_attributes[ + LOCAL_ATTR + ] = this.isLocal.toString()), _attributes); + var css = Object.keys(this.components) + .map(function(k) { + return _this2.components[k].css; + }) + .join(''); - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('style', _extends({ - key: key, type: 'text/css' }, attributes, { - dangerouslySetInnerHTML: { __html: css } - })); - }; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'style', + _extends( + { + key: key, + type: 'text/css' + }, + attributes, + { + dangerouslySetInnerHTML: { __html: css } + } + ) + ); + }; - ServerTag.prototype.clone = function clone() { - var _this3 = this; + ServerTag.prototype.clone = function clone() { + var _this3 = this; - var copy = new ServerTag(this.isLocal); - copy.names = [].concat(this.names); - copy.size = this.size; - copy.components = Object.keys(this.components).reduce(function (acc, key) { - acc[key] = _extends({}, _this3.components[key]); // eslint-disable-line no-param-reassign - return acc; - }, {}); + var copy = new ServerTag(this.isLocal); + copy.names = [].concat(this.names); + copy.size = this.size; + copy.components = Object.keys(this.components).reduce(function( + acc, + key + ) { + acc[key] = _extends({}, _this3.components[key]); // eslint-disable-line no-param-reassign + return acc; + }, {}); - return copy; - }; + return copy; + }; - return ServerTag; -}(); + return ServerTag; + })(); -var ServerStyleSheet = function () { - function ServerStyleSheet() { - classCallCheck(this, ServerStyleSheet); + var ServerStyleSheet = (function() { + function ServerStyleSheet() { + classCallCheck(this, ServerStyleSheet); - this.instance = StyleSheet.clone(StyleSheet.instance); - } + this.instance = StyleSheet.clone(StyleSheet.instance); + } - ServerStyleSheet.prototype.collectStyles = function collectStyles(children) { - if (this.closed) throw new Error("Can't collect styles once you've called getStyleTags!"); - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( - StyleSheetManager, - { sheet: this.instance }, - children - ); - }; + ServerStyleSheet.prototype.collectStyles = function collectStyles( + children + ) { + if (this.closed) + throw new Error( + "Can't collect styles once you've called getStyleTags!" + ); + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + StyleSheetManager, + { sheet: this.instance }, + children + ); + }; - ServerStyleSheet.prototype.getStyleTags = function getStyleTags() { - if (!this.closed) { - clones.splice(clones.indexOf(this.instance), 1); - this.closed = true; - } + ServerStyleSheet.prototype.getStyleTags = function getStyleTags() { + if (!this.closed) { + clones.splice(clones.indexOf(this.instance), 1); + this.closed = true; + } - return this.instance.toHTML(); - }; + return this.instance.toHTML(); + }; - ServerStyleSheet.prototype.getStyleElement = function getStyleElement() { - if (!this.closed) { - clones.splice(clones.indexOf(this.instance), 1); - this.closed = true; - } + ServerStyleSheet.prototype.getStyleElement = function getStyleElement() { + if (!this.closed) { + clones.splice(clones.indexOf(this.instance), 1); + this.closed = true; + } - return this.instance.toReactElements(); - }; + return this.instance.toReactElements(); + }; - ServerStyleSheet.create = function create() { - return new StyleSheet(function (isLocal) { - return new ServerTag(isLocal); - }); - }; + ServerStyleSheet.create = function create() { + return new StyleSheet(function(isLocal) { + return new ServerTag(isLocal); + }); + }; - return ServerStyleSheet; -}(); + return ServerStyleSheet; + })(); -// + // -var LIMIT = 200; + var LIMIT = 200; -var createWarnTooManyClasses = (function (displayName) { - var generatedClasses = {}; - var warningSeen = false; + var createWarnTooManyClasses = function(displayName) { + var generatedClasses = {}; + var warningSeen = false; - return function (className) { - if (!warningSeen) { - generatedClasses[className] = true; - if (Object.keys(generatedClasses).length >= LIMIT) { - // Unable to find latestRule in test environment. - /* eslint-disable no-console, prefer-template */ - console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. ' + 'Consider using style property for frequently changed styles.\n' + 'Example:\n' + ' const StyledComp = styled.div`width: 100%;`\n' + ' '); - warningSeen = true; - generatedClasses = {}; - } - } - }; -}); + return function(className) { + if (!warningSeen) { + generatedClasses[className] = true; + if (Object.keys(generatedClasses).length >= LIMIT) { + // Unable to find latestRule in test environment. + /* eslint-disable no-console, prefer-template */ + console.warn( + 'Over ' + + LIMIT + + ' classes were generated for component ' + + displayName + + '. ' + + 'Consider using style property for frequently changed styles.\n' + + 'Example:\n' + + ' const StyledComp = styled.div`width: 100%;`\n' + + ' ' + ); + warningSeen = true; + generatedClasses = {}; + } + } + }; + }; -// -/* Trying to avoid the unknown-prop errors on styled components + // + /* Trying to avoid the unknown-prop errors on styled components by filtering by React's attribute whitelist. */ -/* Logic copied from ReactDOMUnknownPropertyHook */ -var reactProps = { - children: true, - dangerouslySetInnerHTML: true, - key: true, - ref: true, - autoFocus: true, - defaultValue: true, - valueLink: true, - defaultChecked: true, - checkedLink: true, - innerHTML: true, - suppressContentEditableWarning: true, - onFocusIn: true, - onFocusOut: true, - className: true, + /* Logic copied from ReactDOMUnknownPropertyHook */ + var reactProps = { + children: true, + dangerouslySetInnerHTML: true, + key: true, + ref: true, + autoFocus: true, + defaultValue: true, + valueLink: true, + defaultChecked: true, + checkedLink: true, + innerHTML: true, + suppressContentEditableWarning: true, + onFocusIn: true, + onFocusOut: true, + className: true, - /* List copied from https://facebook.github.io/react/docs/events.html */ - onCopy: true, - onCut: true, - onPaste: true, - onCompositionEnd: true, - onCompositionStart: true, - onCompositionUpdate: true, - onKeyDown: true, - onKeyPress: true, - onKeyUp: true, - onFocus: true, - onBlur: true, - onChange: true, - onInput: true, - onSubmit: true, - onClick: true, - onContextMenu: true, - onDoubleClick: true, - onDrag: true, - onDragEnd: true, - onDragEnter: true, - onDragExit: true, - onDragLeave: true, - onDragOver: true, - onDragStart: true, - onDrop: true, - onMouseDown: true, - onMouseEnter: true, - onMouseLeave: true, - onMouseMove: true, - onMouseOut: true, - onMouseOver: true, - onMouseUp: true, - onSelect: true, - onTouchCancel: true, - onTouchEnd: true, - onTouchMove: true, - onTouchStart: true, - onScroll: true, - onWheel: true, - onAbort: true, - onCanPlay: true, - onCanPlayThrough: true, - onDurationChange: true, - onEmptied: true, - onEncrypted: true, - onEnded: true, - onError: true, - onLoadedData: true, - onLoadedMetadata: true, - onLoadStart: true, - onPause: true, - onPlay: true, - onPlaying: true, - onProgress: true, - onRateChange: true, - onSeeked: true, - onSeeking: true, - onStalled: true, - onSuspend: true, - onTimeUpdate: true, - onVolumeChange: true, - onWaiting: true, - onLoad: true, - onAnimationStart: true, - onAnimationEnd: true, - onAnimationIteration: true, - onTransitionEnd: true, + /* List copied from https://facebook.github.io/react/docs/events.html */ + onCopy: true, + onCut: true, + onPaste: true, + onCompositionEnd: true, + onCompositionStart: true, + onCompositionUpdate: true, + onKeyDown: true, + onKeyPress: true, + onKeyUp: true, + onFocus: true, + onBlur: true, + onChange: true, + onInput: true, + onSubmit: true, + onClick: true, + onContextMenu: true, + onDoubleClick: true, + onDrag: true, + onDragEnd: true, + onDragEnter: true, + onDragExit: true, + onDragLeave: true, + onDragOver: true, + onDragStart: true, + onDrop: true, + onMouseDown: true, + onMouseEnter: true, + onMouseLeave: true, + onMouseMove: true, + onMouseOut: true, + onMouseOver: true, + onMouseUp: true, + onSelect: true, + onTouchCancel: true, + onTouchEnd: true, + onTouchMove: true, + onTouchStart: true, + onScroll: true, + onWheel: true, + onAbort: true, + onCanPlay: true, + onCanPlayThrough: true, + onDurationChange: true, + onEmptied: true, + onEncrypted: true, + onEnded: true, + onError: true, + onLoadedData: true, + onLoadedMetadata: true, + onLoadStart: true, + onPause: true, + onPlay: true, + onPlaying: true, + onProgress: true, + onRateChange: true, + onSeeked: true, + onSeeking: true, + onStalled: true, + onSuspend: true, + onTimeUpdate: true, + onVolumeChange: true, + onWaiting: true, + onLoad: true, + onAnimationStart: true, + onAnimationEnd: true, + onAnimationIteration: true, + onTransitionEnd: true, - onCopyCapture: true, - onCutCapture: true, - onPasteCapture: true, - onCompositionEndCapture: true, - onCompositionStartCapture: true, - onCompositionUpdateCapture: true, - onKeyDownCapture: true, - onKeyPressCapture: true, - onKeyUpCapture: true, - onFocusCapture: true, - onBlurCapture: true, - onChangeCapture: true, - onInputCapture: true, - onSubmitCapture: true, - onClickCapture: true, - onContextMenuCapture: true, - onDoubleClickCapture: true, - onDragCapture: true, - onDragEndCapture: true, - onDragEnterCapture: true, - onDragExitCapture: true, - onDragLeaveCapture: true, - onDragOverCapture: true, - onDragStartCapture: true, - onDropCapture: true, - onMouseDownCapture: true, - onMouseEnterCapture: true, - onMouseLeaveCapture: true, - onMouseMoveCapture: true, - onMouseOutCapture: true, - onMouseOverCapture: true, - onMouseUpCapture: true, - onSelectCapture: true, - onTouchCancelCapture: true, - onTouchEndCapture: true, - onTouchMoveCapture: true, - onTouchStartCapture: true, - onScrollCapture: true, - onWheelCapture: true, - onAbortCapture: true, - onCanPlayCapture: true, - onCanPlayThroughCapture: true, - onDurationChangeCapture: true, - onEmptiedCapture: true, - onEncryptedCapture: true, - onEndedCapture: true, - onErrorCapture: true, - onLoadedDataCapture: true, - onLoadedMetadataCapture: true, - onLoadStartCapture: true, - onPauseCapture: true, - onPlayCapture: true, - onPlayingCapture: true, - onProgressCapture: true, - onRateChangeCapture: true, - onSeekedCapture: true, - onSeekingCapture: true, - onStalledCapture: true, - onSuspendCapture: true, - onTimeUpdateCapture: true, - onVolumeChangeCapture: true, - onWaitingCapture: true, - onLoadCapture: true, - onAnimationStartCapture: true, - onAnimationEndCapture: true, - onAnimationIterationCapture: true, - onTransitionEndCapture: true -}; + onCopyCapture: true, + onCutCapture: true, + onPasteCapture: true, + onCompositionEndCapture: true, + onCompositionStartCapture: true, + onCompositionUpdateCapture: true, + onKeyDownCapture: true, + onKeyPressCapture: true, + onKeyUpCapture: true, + onFocusCapture: true, + onBlurCapture: true, + onChangeCapture: true, + onInputCapture: true, + onSubmitCapture: true, + onClickCapture: true, + onContextMenuCapture: true, + onDoubleClickCapture: true, + onDragCapture: true, + onDragEndCapture: true, + onDragEnterCapture: true, + onDragExitCapture: true, + onDragLeaveCapture: true, + onDragOverCapture: true, + onDragStartCapture: true, + onDropCapture: true, + onMouseDownCapture: true, + onMouseEnterCapture: true, + onMouseLeaveCapture: true, + onMouseMoveCapture: true, + onMouseOutCapture: true, + onMouseOverCapture: true, + onMouseUpCapture: true, + onSelectCapture: true, + onTouchCancelCapture: true, + onTouchEndCapture: true, + onTouchMoveCapture: true, + onTouchStartCapture: true, + onScrollCapture: true, + onWheelCapture: true, + onAbortCapture: true, + onCanPlayCapture: true, + onCanPlayThroughCapture: true, + onDurationChangeCapture: true, + onEmptiedCapture: true, + onEncryptedCapture: true, + onEndedCapture: true, + onErrorCapture: true, + onLoadedDataCapture: true, + onLoadedMetadataCapture: true, + onLoadStartCapture: true, + onPauseCapture: true, + onPlayCapture: true, + onPlayingCapture: true, + onProgressCapture: true, + onRateChangeCapture: true, + onSeekedCapture: true, + onSeekingCapture: true, + onStalledCapture: true, + onSuspendCapture: true, + onTimeUpdateCapture: true, + onVolumeChangeCapture: true, + onWaitingCapture: true, + onLoadCapture: true, + onAnimationStartCapture: true, + onAnimationEndCapture: true, + onAnimationIterationCapture: true, + onTransitionEndCapture: true + }; -/* From HTMLDOMPropertyConfig */ -var htmlProps = { - /** + /* From HTMLDOMPropertyConfig */ + var htmlProps = { + /** * Standard Properties */ - accept: true, - acceptCharset: true, - accessKey: true, - action: true, - allowFullScreen: true, - allowTransparency: true, - alt: true, - // specifies target context for links with `preload` type - as: true, - async: true, - autoComplete: true, - // autoFocus is polyfilled/normalized by AutoFocusUtils - // autoFocus: true, - autoPlay: true, - capture: true, - cellPadding: true, - cellSpacing: true, - charSet: true, - challenge: true, - checked: true, - cite: true, - classID: true, - className: true, - cols: true, - colSpan: true, - content: true, - contentEditable: true, - contextMenu: true, - controls: true, - coords: true, - crossOrigin: true, - data: true, // For `` acts as `src`. - dateTime: true, - default: true, - defer: true, - dir: true, - disabled: true, - download: true, - draggable: true, - encType: true, - form: true, - formAction: true, - formEncType: true, - formMethod: true, - formNoValidate: true, - formTarget: true, - frameBorder: true, - headers: true, - height: true, - hidden: true, - high: true, - href: true, - hrefLang: true, - htmlFor: true, - httpEquiv: true, - icon: true, - id: true, - inputMode: true, - integrity: true, - is: true, - keyParams: true, - keyType: true, - kind: true, - label: true, - lang: true, - list: true, - loop: true, - low: true, - manifest: true, - marginHeight: true, - marginWidth: true, - max: true, - maxLength: true, - media: true, - mediaGroup: true, - method: true, - min: true, - minLength: true, - // Caution; `option.selected` is not updated if `select.multiple` is - // disabled with `removeAttribute`. - multiple: true, - muted: true, - name: true, - nonce: true, - noValidate: true, - open: true, - optimum: true, - pattern: true, - placeholder: true, - playsInline: true, - poster: true, - preload: true, - profile: true, - radioGroup: true, - readOnly: true, - referrerPolicy: true, - rel: true, - required: true, - reversed: true, - role: true, - rows: true, - rowSpan: true, - sandbox: true, - scope: true, - scoped: true, - scrolling: true, - seamless: true, - selected: true, - shape: true, - size: true, - sizes: true, - span: true, - spellCheck: true, - src: true, - srcDoc: true, - srcLang: true, - srcSet: true, - start: true, - step: true, - style: true, - summary: true, - tabIndex: true, - target: true, - title: true, - // Setting .type throws on non- tags - type: true, - useMap: true, - value: true, - width: true, - wmode: true, - wrap: true, + accept: true, + acceptCharset: true, + accessKey: true, + action: true, + allowFullScreen: true, + allowTransparency: true, + alt: true, + // specifies target context for links with `preload` type + as: true, + async: true, + autoComplete: true, + // autoFocus is polyfilled/normalized by AutoFocusUtils + // autoFocus: true, + autoPlay: true, + capture: true, + cellPadding: true, + cellSpacing: true, + charSet: true, + challenge: true, + checked: true, + cite: true, + classID: true, + className: true, + cols: true, + colSpan: true, + content: true, + contentEditable: true, + contextMenu: true, + controls: true, + coords: true, + crossOrigin: true, + data: true, // For `` acts as `src`. + dateTime: true, + default: true, + defer: true, + dir: true, + disabled: true, + download: true, + draggable: true, + encType: true, + form: true, + formAction: true, + formEncType: true, + formMethod: true, + formNoValidate: true, + formTarget: true, + frameBorder: true, + headers: true, + height: true, + hidden: true, + high: true, + href: true, + hrefLang: true, + htmlFor: true, + httpEquiv: true, + icon: true, + id: true, + inputMode: true, + integrity: true, + is: true, + keyParams: true, + keyType: true, + kind: true, + label: true, + lang: true, + list: true, + loop: true, + low: true, + manifest: true, + marginHeight: true, + marginWidth: true, + max: true, + maxLength: true, + media: true, + mediaGroup: true, + method: true, + min: true, + minLength: true, + // Caution; `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. + multiple: true, + muted: true, + name: true, + nonce: true, + noValidate: true, + open: true, + optimum: true, + pattern: true, + placeholder: true, + playsInline: true, + poster: true, + preload: true, + profile: true, + radioGroup: true, + readOnly: true, + referrerPolicy: true, + rel: true, + required: true, + reversed: true, + role: true, + rows: true, + rowSpan: true, + sandbox: true, + scope: true, + scoped: true, + scrolling: true, + seamless: true, + selected: true, + shape: true, + size: true, + sizes: true, + span: true, + spellCheck: true, + src: true, + srcDoc: true, + srcLang: true, + srcSet: true, + start: true, + step: true, + style: true, + summary: true, + tabIndex: true, + target: true, + title: true, + // Setting .type throws on non- tags + type: true, + useMap: true, + value: true, + width: true, + wmode: true, + wrap: true, - /** + /** * RDFa Properties */ - about: true, - datatype: true, - inlist: true, - prefix: true, - // property is also supported for OpenGraph in meta tags. - property: true, - resource: true, - typeof: true, - vocab: true, + about: true, + datatype: true, + inlist: true, + prefix: true, + // property is also supported for OpenGraph in meta tags. + property: true, + resource: true, + typeof: true, + vocab: true, - /** + /** * Non-standard Properties */ - // autoCapitalize and autoCorrect are supported in Mobile Safari for - // keyboard hints. - autoCapitalize: true, - autoCorrect: true, - // autoSave allows WebKit/Blink to persist values of input fields on page reloads - autoSave: true, - // color is for Safari mask-icon link - color: true, - // itemProp, itemScope, itemType are for - // Microdata support. See http://schema.org/docs/gs.html - itemProp: true, - itemScope: true, - itemType: true, - // itemID and itemRef are for Microdata support as well but - // only specified in the WHATWG spec document. See - // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api - itemID: true, - itemRef: true, - // results show looking glass icon and recent searches on input - // search fields in WebKit/Blink - results: true, - // IE-only attribute that specifies security restrictions on an iframe - // as an alternative to the sandbox attribute on IE<10 - security: true, - // IE-only attribute that controls focus behavior - unselectable: 0 -}; + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: true, + autoCorrect: true, + // autoSave allows WebKit/Blink to persist values of input fields on page reloads + autoSave: true, + // color is for Safari mask-icon link + color: true, + // itemProp, itemScope, itemType are for + // Microdata support. See http://schema.org/docs/gs.html + itemProp: true, + itemScope: true, + itemType: true, + // itemID and itemRef are for Microdata support as well but + // only specified in the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: true, + itemRef: true, + // results show looking glass icon and recent searches on input + // search fields in WebKit/Blink + results: true, + // IE-only attribute that specifies security restrictions on an iframe + // as an alternative to the sandbox attribute on IE<10 + security: true, + // IE-only attribute that controls focus behavior + unselectable: 0 + }; -var svgProps = { - accentHeight: true, - accumulate: true, - additive: true, - alignmentBaseline: true, - allowReorder: true, - alphabetic: true, - amplitude: true, - arabicForm: true, - ascent: true, - attributeName: true, - attributeType: true, - autoReverse: true, - azimuth: true, - baseFrequency: true, - baseProfile: true, - baselineShift: true, - bbox: true, - begin: true, - bias: true, - by: true, - calcMode: true, - capHeight: true, - clip: true, - clipPath: true, - clipRule: true, - clipPathUnits: true, - colorInterpolation: true, - colorInterpolationFilters: true, - colorProfile: true, - colorRendering: true, - contentScriptType: true, - contentStyleType: true, - cursor: true, - cx: true, - cy: true, - d: true, - decelerate: true, - descent: true, - diffuseConstant: true, - direction: true, - display: true, - divisor: true, - dominantBaseline: true, - dur: true, - dx: true, - dy: true, - edgeMode: true, - elevation: true, - enableBackground: true, - end: true, - exponent: true, - externalResourcesRequired: true, - fill: true, - fillOpacity: true, - fillRule: true, - filter: true, - filterRes: true, - filterUnits: true, - floodColor: true, - floodOpacity: true, - focusable: true, - fontFamily: true, - fontSize: true, - fontSizeAdjust: true, - fontStretch: true, - fontStyle: true, - fontVariant: true, - fontWeight: true, - format: true, - from: true, - fx: true, - fy: true, - g1: true, - g2: true, - glyphName: true, - glyphOrientationHorizontal: true, - glyphOrientationVertical: true, - glyphRef: true, - gradientTransform: true, - gradientUnits: true, - hanging: true, - horizAdvX: true, - horizOriginX: true, - ideographic: true, - imageRendering: true, - in: true, - in2: true, - intercept: true, - k: true, - k1: true, - k2: true, - k3: true, - k4: true, - kernelMatrix: true, - kernelUnitLength: true, - kerning: true, - keyPoints: true, - keySplines: true, - keyTimes: true, - lengthAdjust: true, - letterSpacing: true, - lightingColor: true, - limitingConeAngle: true, - local: true, - markerEnd: true, - markerMid: true, - markerStart: true, - markerHeight: true, - markerUnits: true, - markerWidth: true, - mask: true, - maskContentUnits: true, - maskUnits: true, - mathematical: true, - mode: true, - numOctaves: true, - offset: true, - opacity: true, - operator: true, - order: true, - orient: true, - orientation: true, - origin: true, - overflow: true, - overlinePosition: true, - overlineThickness: true, - paintOrder: true, - panose1: true, - pathLength: true, - patternContentUnits: true, - patternTransform: true, - patternUnits: true, - pointerEvents: true, - points: true, - pointsAtX: true, - pointsAtY: true, - pointsAtZ: true, - preserveAlpha: true, - preserveAspectRatio: true, - primitiveUnits: true, - r: true, - radius: true, - refX: true, - refY: true, - renderingIntent: true, - repeatCount: true, - repeatDur: true, - requiredExtensions: true, - requiredFeatures: true, - restart: true, - result: true, - rotate: true, - rx: true, - ry: true, - scale: true, - seed: true, - shapeRendering: true, - slope: true, - spacing: true, - specularConstant: true, - specularExponent: true, - speed: true, - spreadMethod: true, - startOffset: true, - stdDeviation: true, - stemh: true, - stemv: true, - stitchTiles: true, - stopColor: true, - stopOpacity: true, - strikethroughPosition: true, - strikethroughThickness: true, - string: true, - stroke: true, - strokeDasharray: true, - strokeDashoffset: true, - strokeLinecap: true, - strokeLinejoin: true, - strokeMiterlimit: true, - strokeOpacity: true, - strokeWidth: true, - surfaceScale: true, - systemLanguage: true, - tableValues: true, - targetX: true, - targetY: true, - textAnchor: true, - textDecoration: true, - textRendering: true, - textLength: true, - to: true, - transform: true, - u1: true, - u2: true, - underlinePosition: true, - underlineThickness: true, - unicode: true, - unicodeBidi: true, - unicodeRange: true, - unitsPerEm: true, - vAlphabetic: true, - vHanging: true, - vIdeographic: true, - vMathematical: true, - values: true, - vectorEffect: true, - version: true, - vertAdvY: true, - vertOriginX: true, - vertOriginY: true, - viewBox: true, - viewTarget: true, - visibility: true, - widths: true, - wordSpacing: true, - writingMode: true, - x: true, - xHeight: true, - x1: true, - x2: true, - xChannelSelector: true, - xlinkActuate: true, - xlinkArcrole: true, - xlinkHref: true, - xlinkRole: true, - xlinkShow: true, - xlinkTitle: true, - xlinkType: true, - xmlBase: true, - xmlns: true, - xmlnsXlink: true, - xmlLang: true, - xmlSpace: true, - y: true, - y1: true, - y2: true, - yChannelSelector: true, - z: true, - zoomAndPan: true -}; + var svgProps = { + accentHeight: true, + accumulate: true, + additive: true, + alignmentBaseline: true, + allowReorder: true, + alphabetic: true, + amplitude: true, + arabicForm: true, + ascent: true, + attributeName: true, + attributeType: true, + autoReverse: true, + azimuth: true, + baseFrequency: true, + baseProfile: true, + baselineShift: true, + bbox: true, + begin: true, + bias: true, + by: true, + calcMode: true, + capHeight: true, + clip: true, + clipPath: true, + clipRule: true, + clipPathUnits: true, + colorInterpolation: true, + colorInterpolationFilters: true, + colorProfile: true, + colorRendering: true, + contentScriptType: true, + contentStyleType: true, + cursor: true, + cx: true, + cy: true, + d: true, + decelerate: true, + descent: true, + diffuseConstant: true, + direction: true, + display: true, + divisor: true, + dominantBaseline: true, + dur: true, + dx: true, + dy: true, + edgeMode: true, + elevation: true, + enableBackground: true, + end: true, + exponent: true, + externalResourcesRequired: true, + fill: true, + fillOpacity: true, + fillRule: true, + filter: true, + filterRes: true, + filterUnits: true, + floodColor: true, + floodOpacity: true, + focusable: true, + fontFamily: true, + fontSize: true, + fontSizeAdjust: true, + fontStretch: true, + fontStyle: true, + fontVariant: true, + fontWeight: true, + format: true, + from: true, + fx: true, + fy: true, + g1: true, + g2: true, + glyphName: true, + glyphOrientationHorizontal: true, + glyphOrientationVertical: true, + glyphRef: true, + gradientTransform: true, + gradientUnits: true, + hanging: true, + horizAdvX: true, + horizOriginX: true, + ideographic: true, + imageRendering: true, + in: true, + in2: true, + intercept: true, + k: true, + k1: true, + k2: true, + k3: true, + k4: true, + kernelMatrix: true, + kernelUnitLength: true, + kerning: true, + keyPoints: true, + keySplines: true, + keyTimes: true, + lengthAdjust: true, + letterSpacing: true, + lightingColor: true, + limitingConeAngle: true, + local: true, + markerEnd: true, + markerMid: true, + markerStart: true, + markerHeight: true, + markerUnits: true, + markerWidth: true, + mask: true, + maskContentUnits: true, + maskUnits: true, + mathematical: true, + mode: true, + numOctaves: true, + offset: true, + opacity: true, + operator: true, + order: true, + orient: true, + orientation: true, + origin: true, + overflow: true, + overlinePosition: true, + overlineThickness: true, + paintOrder: true, + panose1: true, + pathLength: true, + patternContentUnits: true, + patternTransform: true, + patternUnits: true, + pointerEvents: true, + points: true, + pointsAtX: true, + pointsAtY: true, + pointsAtZ: true, + preserveAlpha: true, + preserveAspectRatio: true, + primitiveUnits: true, + r: true, + radius: true, + refX: true, + refY: true, + renderingIntent: true, + repeatCount: true, + repeatDur: true, + requiredExtensions: true, + requiredFeatures: true, + restart: true, + result: true, + rotate: true, + rx: true, + ry: true, + scale: true, + seed: true, + shapeRendering: true, + slope: true, + spacing: true, + specularConstant: true, + specularExponent: true, + speed: true, + spreadMethod: true, + startOffset: true, + stdDeviation: true, + stemh: true, + stemv: true, + stitchTiles: true, + stopColor: true, + stopOpacity: true, + strikethroughPosition: true, + strikethroughThickness: true, + string: true, + stroke: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeLinecap: true, + strokeLinejoin: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + surfaceScale: true, + systemLanguage: true, + tableValues: true, + targetX: true, + targetY: true, + textAnchor: true, + textDecoration: true, + textRendering: true, + textLength: true, + to: true, + transform: true, + u1: true, + u2: true, + underlinePosition: true, + underlineThickness: true, + unicode: true, + unicodeBidi: true, + unicodeRange: true, + unitsPerEm: true, + vAlphabetic: true, + vHanging: true, + vIdeographic: true, + vMathematical: true, + values: true, + vectorEffect: true, + version: true, + vertAdvY: true, + vertOriginX: true, + vertOriginY: true, + viewBox: true, + viewTarget: true, + visibility: true, + widths: true, + wordSpacing: true, + writingMode: true, + x: true, + xHeight: true, + x1: true, + x2: true, + xChannelSelector: true, + xlinkActuate: true, + xlinkArcrole: true, + xlinkHref: true, + xlinkRole: true, + xlinkShow: true, + xlinkTitle: true, + xlinkType: true, + xmlBase: true, + xmlns: true, + xmlnsXlink: true, + xmlLang: true, + xmlSpace: true, + y: true, + y1: true, + y2: true, + yChannelSelector: true, + z: true, + zoomAndPan: true + }; -/* From DOMProperty */ -var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; -var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; -var isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$')); + /* From DOMProperty */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + var ATTRIBUTE_NAME_CHAR = + ATTRIBUTE_NAME_START_CHAR + + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; + var isCustomAttribute = RegExp.prototype.test.bind( + new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$') + ); -var hasOwnProperty = {}.hasOwnProperty; -var validAttr = (function (name) { - return hasOwnProperty.call(htmlProps, name) || hasOwnProperty.call(svgProps, name) || isCustomAttribute(name.toLowerCase()) || hasOwnProperty.call(reactProps, name); -}); + var hasOwnProperty = {}.hasOwnProperty; + var validAttr = function(name) { + return ( + hasOwnProperty.call(htmlProps, name) || + hasOwnProperty.call(svgProps, name) || + isCustomAttribute(name.toLowerCase()) || + hasOwnProperty.call(reactProps, name) + ); + }; -// + // + function isTag(target) /* : %checks */ { + return typeof target === 'string'; + } -function isTag(target) /* : %checks */{ - return typeof target === 'string'; -} + // -// + function isStyledComponent(target) /* : %checks */ { + return ( + typeof target === 'function' && + typeof target.styledComponentId === 'string' + ); + } + // -function isStyledComponent(target) /* : %checks */{ - return typeof target === 'function' && typeof target.styledComponentId === 'string'; -} + /* eslint-disable no-undef */ + function getComponentName(target) { + return target.displayName || target.name || 'Component'; + } -// + var index$4 = isFunction; -/* eslint-disable no-undef */ -function getComponentName(target) { - return target.displayName || target.name || 'Component'; -} + var toString = Object.prototype.toString; -var index$4 = isFunction; + function isFunction(fn) { + var string = toString.call(fn); + return ( + string === '[object Function]' || + (typeof fn === 'function' && string !== '[object RegExp]') || + (typeof window !== 'undefined' && + // IE8 and below + (fn === window.setTimeout || + fn === window.alert || + fn === window.confirm || + fn === window.prompt)) + ); + } -var toString = Object.prototype.toString; - -function isFunction(fn) { - var string = toString.call(fn); - return string === '[object Function]' || typeof fn === 'function' && string !== '[object RegExp]' || typeof window !== 'undefined' && ( - // IE8 and below - fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt); -} - -// -/** + // + /** * Creates a broadcast that can be listened to, i.e. simple event emitter * * @see https://github.com/ReactTraining/react-broadcast */ -var createBroadcast = function createBroadcast(initialValue) { - var listeners = []; - var currentValue = initialValue; + var createBroadcast = function createBroadcast(initialValue) { + var listeners = []; + var currentValue = initialValue; - return { - publish: function publish(value) { - currentValue = value; - listeners.forEach(function (listener) { - return listener(currentValue); - }); - }, - subscribe: function subscribe(listener) { - listeners.push(listener); + return { + publish: function publish(value) { + currentValue = value; + listeners.forEach(function(listener) { + return listener(currentValue); + }); + }, + subscribe: function subscribe(listener) { + listeners.push(listener); - // Publish to this subscriber once immediately. - listener(currentValue); + // Publish to this subscriber once immediately. + listener(currentValue); - return function () { - listeners = listeners.filter(function (item) { - return item !== listener; - }); - }; - } - }; -}; + return function() { + listeners = listeners.filter(function(item) { + return item !== listener; + }); + }; + } + }; + }; -var _ThemeProvider$childC; -var _ThemeProvider$contex; + var _ThemeProvider$childC; + var _ThemeProvider$contex; -// -/* globals React$Element */ -// NOTE: DO NOT CHANGE, changing this is a semver major change! -var CHANNEL = '__styled-components__'; + // + /* globals React$Element */ + // NOTE: DO NOT CHANGE, changing this is a semver major change! + var CHANNEL = '__styled-components__'; -/** + /** * Provide a theme to an entire react component tree via context and event listeners (have to do * both context and event emitter as pure components block context updates) */ -var ThemeProvider = function (_Component) { - inherits(ThemeProvider, _Component); + var ThemeProvider = (function(_Component) { + inherits(ThemeProvider, _Component); - function ThemeProvider() { - classCallCheck(this, ThemeProvider); + function ThemeProvider() { + classCallCheck(this, ThemeProvider); - var _this = possibleConstructorReturn(this, _Component.call(this)); + var _this = possibleConstructorReturn(this, _Component.call(this)); - _this.getTheme = _this.getTheme.bind(_this); - return _this; - } + _this.getTheme = _this.getTheme.bind(_this); + return _this; + } - ThemeProvider.prototype.componentWillMount = function componentWillMount() { - var _this2 = this; + ThemeProvider.prototype.componentWillMount = function componentWillMount() { + var _this2 = this; - // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme - // with the outer theme - if (this.context[CHANNEL]) { - var subscribe = this.context[CHANNEL]; - this.unsubscribeToOuter = subscribe(function (theme) { - _this2.outerTheme = theme; - }); - } - this.broadcast = createBroadcast(this.getTheme()); - }; + // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme + // with the outer theme + if (this.context[CHANNEL]) { + var subscribe = this.context[CHANNEL]; + this.unsubscribeToOuter = subscribe(function(theme) { + _this2.outerTheme = theme; + }); + } + this.broadcast = createBroadcast(this.getTheme()); + }; - ThemeProvider.prototype.getChildContext = function getChildContext() { - var _babelHelpers$extends; + ThemeProvider.prototype.getChildContext = function getChildContext() { + var _babelHelpers$extends; - return _extends({}, this.context, (_babelHelpers$extends = {}, _babelHelpers$extends[CHANNEL] = this.broadcast.subscribe, _babelHelpers$extends)); - }; + return _extends( + {}, + this.context, + ((_babelHelpers$extends = {}), (_babelHelpers$extends[ + CHANNEL + ] = this.broadcast.subscribe), _babelHelpers$extends) + ); + }; - ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - if (this.props.theme !== nextProps.theme) this.broadcast.publish(this.getTheme(nextProps.theme)); - }; + ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps( + nextProps + ) { + if (this.props.theme !== nextProps.theme) + this.broadcast.publish(this.getTheme(nextProps.theme)); + }; - ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() { - if (this.context[CHANNEL]) { - this.unsubscribeToOuter(); - } - }; + ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() { + if (this.context[CHANNEL]) { + this.unsubscribeToOuter(); + } + }; - // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation + // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation + ThemeProvider.prototype.getTheme = function getTheme(passedTheme) { + var theme = passedTheme || this.props.theme; + if (index$4(theme)) { + var mergedTheme = theme(this.outerTheme); + if (!index(mergedTheme)) { + throw new Error( + '[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!' + ); + } + return mergedTheme; + } + if (!index(theme)) { + throw new Error( + '[ThemeProvider] Please make your theme prop a plain object' + ); + } + return _extends({}, this.outerTheme, theme); + }; - ThemeProvider.prototype.getTheme = function getTheme(passedTheme) { - var theme = passedTheme || this.props.theme; - if (index$4(theme)) { - var mergedTheme = theme(this.outerTheme); - if (!index(mergedTheme)) { - throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!'); - } - return mergedTheme; - } - if (!index(theme)) { - throw new Error('[ThemeProvider] Please make your theme prop a plain object'); - } - return _extends({}, this.outerTheme, theme); - }; + ThemeProvider.prototype.render = function render() { + if (!this.props.children) { + return null; + } + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.Children.only( + this.props.children + ); + }; - ThemeProvider.prototype.render = function render() { - if (!this.props.children) { - return null; - } - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.Children.only(this.props.children); - }; + return ThemeProvider; + })(__WEBPACK_IMPORTED_MODULE_1_react__['Component']); - return ThemeProvider; -}(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); + ThemeProvider.childContextTypes = ((_ThemeProvider$childC = {}), (_ThemeProvider$childC[ + CHANNEL + ] = + index$3.func.isRequired), _ThemeProvider$childC); + ThemeProvider.contextTypes = ((_ThemeProvider$contex = {}), (_ThemeProvider$contex[ + CHANNEL + ] = + index$3.func), _ThemeProvider$contex); -ThemeProvider.childContextTypes = (_ThemeProvider$childC = {}, _ThemeProvider$childC[CHANNEL] = index$3.func.isRequired, _ThemeProvider$childC); -ThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL] = index$3.func, _ThemeProvider$contex); + var _AbstractStyledCompon; -var _AbstractStyledCompon; + // + var AbstractStyledComponent = (function(_Component) { + inherits(AbstractStyledComponent, _Component); -// -var AbstractStyledComponent = function (_Component) { - inherits(AbstractStyledComponent, _Component); + function AbstractStyledComponent() { + classCallCheck(this, AbstractStyledComponent); + return possibleConstructorReturn( + this, + _Component.apply(this, arguments) + ); + } - function AbstractStyledComponent() { - classCallCheck(this, AbstractStyledComponent); - return possibleConstructorReturn(this, _Component.apply(this, arguments)); - } + return AbstractStyledComponent; + })(__WEBPACK_IMPORTED_MODULE_1_react__['Component']); - return AbstractStyledComponent; -}(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); + AbstractStyledComponent.contextTypes = ((_AbstractStyledCompon = {}), (_AbstractStyledCompon[ + CHANNEL + ] = + index$3.func), (_AbstractStyledCompon[ + CONTEXT_KEY + ] = index$3.instanceOf(StyleSheet)), _AbstractStyledCompon); -AbstractStyledComponent.contextTypes = (_AbstractStyledCompon = {}, _AbstractStyledCompon[CHANNEL] = index$3.func, _AbstractStyledCompon[CONTEXT_KEY] = index$3.instanceOf(StyleSheet), _AbstractStyledCompon); + // -// + var escapeRegex = /[[\].#*$><+~=|^:(),"'`]/g; + var multiDashRegex = /--+/g; -var escapeRegex = /[[\].#*$><+~=|^:(),"'`]/g; -var multiDashRegex = /--+/g; + var _StyledComponent = function(ComponentStyle, constructWithOptions) { + /* We depend on components having unique IDs */ + var identifiers = {}; + var generateId = function generateId(_displayName) { + var displayName = typeof _displayName !== 'string' + ? 'sc' + : _displayName + .replace(escapeRegex, '-') // Replace all possible CSS selectors + .replace(multiDashRegex, '-'); // Replace multiple -- with single - -var _StyledComponent = (function (ComponentStyle, constructWithOptions) { - /* We depend on components having unique IDs */ - var identifiers = {}; - var generateId = function generateId(_displayName) { - var displayName = typeof _displayName !== 'string' ? 'sc' : _displayName.replace(escapeRegex, '-') // Replace all possible CSS selectors - .replace(multiDashRegex, '-'); // Replace multiple -- with single - + var nr = (identifiers[displayName] || 0) + 1; + identifiers[displayName] = nr; - var nr = (identifiers[displayName] || 0) + 1; - identifiers[displayName] = nr; + var hash = ComponentStyle.generateName(displayName + nr); + return displayName + '-' + hash; + }; - var hash = ComponentStyle.generateName(displayName + nr); - return displayName + '-' + hash; - }; + var BaseStyledComponent = (function(_AbstractStyledCompon) { + inherits(BaseStyledComponent, _AbstractStyledCompon); - var BaseStyledComponent = function (_AbstractStyledCompon) { - inherits(BaseStyledComponent, _AbstractStyledCompon); + function BaseStyledComponent() { + var _temp, _this, _ret; - function BaseStyledComponent() { - var _temp, _this, _ret; + classCallCheck(this, BaseStyledComponent); - classCallCheck(this, BaseStyledComponent); + for ( + var _len = arguments.length, args = Array(_len), _key = 0; + _key < _len; + _key++ + ) { + args[_key] = arguments[_key]; + } - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + return (_ret = ((_temp = ((_this = possibleConstructorReturn( + this, + _AbstractStyledCompon.call.apply( + _AbstractStyledCompon, + [this].concat(args) + ) + )), _this)), (_this.attrs = {}), (_this.state = { + theme: null, + generatedClassName: '' + }), _temp)), possibleConstructorReturn(_this, _ret); + } - return _ret = (_temp = (_this = possibleConstructorReturn(this, _AbstractStyledCompon.call.apply(_AbstractStyledCompon, [this].concat(args))), _this), _this.attrs = {}, _this.state = { - theme: null, - generatedClassName: '' - }, _temp), possibleConstructorReturn(_this, _ret); - } + BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext( + theme, + props + ) { + var attrs = this.constructor.attrs; - BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props) { - var attrs = this.constructor.attrs; + var context = _extends({}, props, { theme: theme }); + if (attrs === undefined) { + return context; + } - var context = _extends({}, props, { theme: theme }); - if (attrs === undefined) { - return context; - } + this.attrs = Object.keys(attrs).reduce(function(acc, key) { + var attr = attrs[key]; + // eslint-disable-next-line no-param-reassign + acc[key] = typeof attr === 'function' ? attr(context) : attr; + return acc; + }, {}); - this.attrs = Object.keys(attrs).reduce(function (acc, key) { - var attr = attrs[key]; - // eslint-disable-next-line no-param-reassign - acc[key] = typeof attr === 'function' ? attr(context) : attr; - return acc; - }, {}); + return _extends({}, context, this.attrs); + }; - return _extends({}, context, this.attrs); - }; + BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles( + theme, + props + ) { + var _constructor = this.constructor, + componentStyle = _constructor.componentStyle, + warnTooManyClasses = _constructor.warnTooManyClasses; - BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) { - var _constructor = this.constructor, - componentStyle = _constructor.componentStyle, - warnTooManyClasses = _constructor.warnTooManyClasses; + var executionContext = this.buildExecutionContext(theme, props); + var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.instance; + var className = componentStyle.generateAndInjectStyles( + executionContext, + styleSheet + ); - var executionContext = this.buildExecutionContext(theme, props); - var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.instance; - var className = componentStyle.generateAndInjectStyles(executionContext, styleSheet); + if (warnTooManyClasses !== undefined) + warnTooManyClasses(className); - if (warnTooManyClasses !== undefined) warnTooManyClasses(className); + return className; + }; - return className; - }; + BaseStyledComponent.prototype.componentWillMount = function componentWillMount() { + var _this2 = this; - BaseStyledComponent.prototype.componentWillMount = function componentWillMount() { - var _this2 = this; + // If there is a theme in the context, subscribe to the event emitter. This + // is necessary due to pure components blocking context updates, this circumvents + // that by updating when an event is emitted + if (this.context[CHANNEL]) { + var subscribe = this.context[CHANNEL]; + this.unsubscribe = subscribe(function(nextTheme) { + // This will be called once immediately - // If there is a theme in the context, subscribe to the event emitter. This - // is necessary due to pure components blocking context updates, this circumvents - // that by updating when an event is emitted - if (this.context[CHANNEL]) { - var subscribe = this.context[CHANNEL]; - this.unsubscribe = subscribe(function (nextTheme) { - // This will be called once immediately + // Props should take precedence over ThemeProvider, which should take precedence over + // defaultProps, but React automatically puts defaultProps on props. + var defaultProps = _this2.constructor.defaultProps; - // Props should take precedence over ThemeProvider, which should take precedence over - // defaultProps, but React automatically puts defaultProps on props. - var defaultProps = _this2.constructor.defaultProps; + var isDefaultTheme = + defaultProps && _this2.props.theme === defaultProps.theme; + var theme = _this2.props.theme && !isDefaultTheme + ? _this2.props.theme + : nextTheme; + var generatedClassName = _this2.generateAndInjectStyles( + theme, + _this2.props + ); + _this2.setState({ + theme: theme, + generatedClassName: generatedClassName + }); + }); + } else { + var theme = this.props.theme || {}; + var generatedClassName = this.generateAndInjectStyles( + theme, + this.props + ); + this.setState({ + theme: theme, + generatedClassName: generatedClassName + }); + } + }; - var isDefaultTheme = defaultProps && _this2.props.theme === defaultProps.theme; - var theme = _this2.props.theme && !isDefaultTheme ? _this2.props.theme : nextTheme; - var generatedClassName = _this2.generateAndInjectStyles(theme, _this2.props); - _this2.setState({ theme: theme, generatedClassName: generatedClassName }); - }); - } else { - var theme = this.props.theme || {}; - var generatedClassName = this.generateAndInjectStyles(theme, this.props); - this.setState({ theme: theme, generatedClassName: generatedClassName }); - } - }; + BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps( + nextProps + ) { + var _this3 = this; - BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - var _this3 = this; + this.setState(function(oldState) { + // Props should take precedence over ThemeProvider, which should take precedence over + // defaultProps, but React automatically puts defaultProps on props. + var defaultProps = _this3.constructor.defaultProps; - this.setState(function (oldState) { - // Props should take precedence over ThemeProvider, which should take precedence over - // defaultProps, but React automatically puts defaultProps on props. - var defaultProps = _this3.constructor.defaultProps; + var isDefaultTheme = + defaultProps && nextProps.theme === defaultProps.theme; + var theme = nextProps.theme && !isDefaultTheme + ? nextProps.theme + : oldState.theme; + var generatedClassName = _this3.generateAndInjectStyles( + theme, + nextProps + ); - var isDefaultTheme = defaultProps && nextProps.theme === defaultProps.theme; - var theme = nextProps.theme && !isDefaultTheme ? nextProps.theme : oldState.theme; - var generatedClassName = _this3.generateAndInjectStyles(theme, nextProps); + return { theme: theme, generatedClassName: generatedClassName }; + }); + }; - return { theme: theme, generatedClassName: generatedClassName }; - }); - }; + BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() { + if (this.unsubscribe) { + this.unsubscribe(); + } + }; - BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() { - if (this.unsubscribe) { - this.unsubscribe(); - } - }; + BaseStyledComponent.prototype.render = function render() { + var _this4 = this; - BaseStyledComponent.prototype.render = function render() { - var _this4 = this; + var innerRef = this.props.innerRef; + var generatedClassName = this.state.generatedClassName; + var _constructor2 = this.constructor, + styledComponentId = _constructor2.styledComponentId, + target = _constructor2.target; - var innerRef = this.props.innerRef; - var generatedClassName = this.state.generatedClassName; - var _constructor2 = this.constructor, - styledComponentId = _constructor2.styledComponentId, - target = _constructor2.target; + var isTargetTag = isTag(target); + var className = [ + this.props.className, + styledComponentId, + this.attrs.className, + generatedClassName + ] + .filter(Boolean) + .join(' '); - var isTargetTag = isTag(target); + var baseProps = _extends({}, this.attrs, { + className: className + }); - var className = [this.props.className, styledComponentId, this.attrs.className, generatedClassName].filter(Boolean).join(' '); + if (isStyledComponent(target)) { + baseProps.innerRef = innerRef; + } else { + baseProps.ref = innerRef; + } - var baseProps = _extends({}, this.attrs, { - className: className - }); + var propsForElement = Object.keys(this.props).reduce(function( + acc, + propName + ) { + // Don't pass through non HTML tags through to HTML elements + // always omit innerRef + if ( + propName !== 'innerRef' && + propName !== 'className' && + (!isTargetTag || validAttr(propName)) + ) { + // eslint-disable-next-line no-param-reassign + acc[propName] = _this4.props[propName]; + } - if (isStyledComponent(target)) { - baseProps.innerRef = innerRef; - } else { - baseProps.ref = innerRef; - } + return acc; + }, baseProps); - var propsForElement = Object.keys(this.props).reduce(function (acc, propName) { - // Don't pass through non HTML tags through to HTML elements - // always omit innerRef - if (propName !== 'innerRef' && propName !== 'className' && (!isTargetTag || validAttr(propName))) { - // eslint-disable-next-line no-param-reassign - acc[propName] = _this4.props[propName]; + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react__['createElement'] + )(target, propsForElement); + }; + + return BaseStyledComponent; + })(AbstractStyledComponent); + + var createStyledComponent = function createStyledComponent( + target, + options, + rules + ) { + var _StyledComponent$cont; + + var _options$displayName = options.displayName, + displayName = _options$displayName === undefined + ? isTag(target) + ? 'styled.' + target + : 'Styled(' + getComponentName(target) + ')' + : _options$displayName, + _options$componentId = options.componentId, + componentId = _options$componentId === undefined + ? generateId(options.displayName) + : _options$componentId, + _options$ParentCompon = options.ParentComponent, + ParentComponent = _options$ParentCompon === undefined + ? BaseStyledComponent + : _options$ParentCompon, + extendingRules = options.rules, + attrs = options.attrs; + + var styledComponentId = options.displayName && options.componentId + ? options.displayName + '-' + options.componentId + : componentId; + + var warnTooManyClasses = void 0; + if ( + typeof process !== 'undefined' && + 'development' !== 'production' + ) { + warnTooManyClasses = createWarnTooManyClasses(displayName); + } + + var componentStyle = new ComponentStyle( + extendingRules === undefined + ? rules + : extendingRules.concat(rules), + styledComponentId + ); + + var StyledComponent = (function(_ParentComponent) { + inherits(StyledComponent, _ParentComponent); + + function StyledComponent() { + classCallCheck(this, StyledComponent); + return possibleConstructorReturn( + this, + _ParentComponent.apply(this, arguments) + ); + } + + StyledComponent.withComponent = function withComponent(tag) { + var _ = options.displayName, + __ = options.componentId, + optionsToCopy = objectWithoutProperties(options, [ + 'displayName', + 'componentId' + ]); + + var newOptions = _extends({}, optionsToCopy, { + ParentComponent: StyledComponent + }); + return createStyledComponent(tag, newOptions, rules); + }; + + createClass(StyledComponent, null, [ + { + key: 'extend', + get: function get() { + var _ = options.displayName, + __ = options.componentId, + optionsToCopy = objectWithoutProperties(options, [ + 'displayName', + 'componentId' + ]); + + var newOptions = _extends({}, optionsToCopy, { + rules: rules, + ParentComponent: StyledComponent + }); + return constructWithOptions( + createStyledComponent, + target, + newOptions + ); + } + } + ]); + return StyledComponent; + })(ParentComponent); + + StyledComponent.contextTypes = ((_StyledComponent$cont = {}), (_StyledComponent$cont[ + CHANNEL + ] = + index$3.func), (_StyledComponent$cont[ + CONTEXT_KEY + ] = index$3.instanceOf(StyleSheet)), _StyledComponent$cont); + StyledComponent.displayName = displayName; + StyledComponent.styledComponentId = styledComponentId; + StyledComponent.attrs = attrs; + StyledComponent.componentStyle = componentStyle; + StyledComponent.warnTooManyClasses = warnTooManyClasses; + StyledComponent.target = target; + + return StyledComponent; + }; + + return createStyledComponent; + }; + + // murmurhash2 via https://gist.github.com/raycmorgan/588423 + + function doHash(str, seed) { + var m = 0x5bd1e995; + var r = 24; + var h = seed ^ str.length; + var length = str.length; + var currentIndex = 0; + + while (length >= 4) { + var k = UInt32(str, currentIndex); + + k = Umul32(k, m); + k ^= k >>> r; + k = Umul32(k, m); + + h = Umul32(h, m); + h ^= k; + + currentIndex += 4; + length -= 4; + } + + switch (length) { + case 3: + h ^= UInt16(str, currentIndex); + h ^= str.charCodeAt(currentIndex + 2) << 16; + h = Umul32(h, m); + break; + + case 2: + h ^= UInt16(str, currentIndex); + h = Umul32(h, m); + break; + + case 1: + h ^= str.charCodeAt(currentIndex); + h = Umul32(h, m); + break; + } + + h ^= h >>> 13; + h = Umul32(h, m); + h ^= h >>> 15; + + return h >>> 0; } - return acc; - }, baseProps); - - return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react__["createElement"])(target, propsForElement); - }; - - return BaseStyledComponent; - }(AbstractStyledComponent); - - var createStyledComponent = function createStyledComponent(target, options, rules) { - var _StyledComponent$cont; - - var _options$displayName = options.displayName, - displayName = _options$displayName === undefined ? isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')' : _options$displayName, - _options$componentId = options.componentId, - componentId = _options$componentId === undefined ? generateId(options.displayName) : _options$componentId, - _options$ParentCompon = options.ParentComponent, - ParentComponent = _options$ParentCompon === undefined ? BaseStyledComponent : _options$ParentCompon, - extendingRules = options.rules, - attrs = options.attrs; - - - var styledComponentId = options.displayName && options.componentId ? options.displayName + '-' + options.componentId : componentId; - - var warnTooManyClasses = void 0; - if (typeof process !== 'undefined' && "development" !== 'production') { - warnTooManyClasses = createWarnTooManyClasses(displayName); - } - - var componentStyle = new ComponentStyle(extendingRules === undefined ? rules : extendingRules.concat(rules), styledComponentId); - - var StyledComponent = function (_ParentComponent) { - inherits(StyledComponent, _ParentComponent); - - function StyledComponent() { - classCallCheck(this, StyledComponent); - return possibleConstructorReturn(this, _ParentComponent.apply(this, arguments)); - } - - StyledComponent.withComponent = function withComponent(tag) { - var _ = options.displayName, - __ = options.componentId, - optionsToCopy = objectWithoutProperties(options, ['displayName', 'componentId']); - - var newOptions = _extends({}, optionsToCopy, { ParentComponent: StyledComponent }); - return createStyledComponent(tag, newOptions, rules); - }; - - createClass(StyledComponent, null, [{ - key: 'extend', - get: function get() { - var _ = options.displayName, - __ = options.componentId, - optionsToCopy = objectWithoutProperties(options, ['displayName', 'componentId']); - - var newOptions = _extends({}, optionsToCopy, { rules: rules, ParentComponent: StyledComponent }); - return constructWithOptions(createStyledComponent, target, newOptions); + function UInt32(str, pos) { + return ( + str.charCodeAt(pos++) + + (str.charCodeAt(pos++) << 8) + + (str.charCodeAt(pos++) << 16) + + (str.charCodeAt(pos) << 24) + ); } - }]); - return StyledComponent; - }(ParentComponent); - StyledComponent.contextTypes = (_StyledComponent$cont = {}, _StyledComponent$cont[CHANNEL] = index$3.func, _StyledComponent$cont[CONTEXT_KEY] = index$3.instanceOf(StyleSheet), _StyledComponent$cont); - StyledComponent.displayName = displayName; - StyledComponent.styledComponentId = styledComponentId; - StyledComponent.attrs = attrs; - StyledComponent.componentStyle = componentStyle; - StyledComponent.warnTooManyClasses = warnTooManyClasses; - StyledComponent.target = target; + function UInt16(str, pos) { + return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8); + } + function Umul32(n, m) { + n = n | 0; + m = m | 0; + var nlo = n & 0xffff; + var nhi = n >>> 16; + var res = (nlo * m + (((nhi * m) & 0xffff) << 16)) | 0; + return res; + } - return StyledComponent; - }; - - return createStyledComponent; -}); - -// murmurhash2 via https://gist.github.com/raycmorgan/588423 - -function doHash(str, seed) { - var m = 0x5bd1e995; - var r = 24; - var h = seed ^ str.length; - var length = str.length; - var currentIndex = 0; - - while (length >= 4) { - var k = UInt32(str, currentIndex); - - k = Umul32(k, m); - k ^= k >>> r; - k = Umul32(k, m); - - h = Umul32(h, m); - h ^= k; - - currentIndex += 4; - length -= 4; - } - - switch (length) { - case 3: - h ^= UInt16(str, currentIndex); - h ^= str.charCodeAt(currentIndex + 2) << 16; - h = Umul32(h, m); - break; - - case 2: - h ^= UInt16(str, currentIndex); - h = Umul32(h, m); - break; - - case 1: - h ^= str.charCodeAt(currentIndex); - h = Umul32(h, m); - break; - } - - h ^= h >>> 13; - h = Umul32(h, m); - h ^= h >>> 15; - - return h >>> 0; -} - -function UInt32(str, pos) { - return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8) + (str.charCodeAt(pos++) << 16) + (str.charCodeAt(pos) << 24); -} - -function UInt16(str, pos) { - return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8); -} - -function Umul32(n, m) { - n = n | 0; - m = m | 0; - var nlo = n & 0xffff; - var nhi = n >>> 16; - var res = nlo * m + ((nhi * m & 0xffff) << 16) | 0; - return res; -} - -// -/* + // + /* ComponentStyle is all the CSS-specific stuff, not the React-specific stuff. */ -var _ComponentStyle = (function (nameGenerator, flatten, stringifyRules) { - var ComponentStyle = function () { - function ComponentStyle(rules, componentId) { - classCallCheck(this, ComponentStyle); + var _ComponentStyle = function(nameGenerator, flatten, stringifyRules) { + var ComponentStyle = (function() { + function ComponentStyle(rules, componentId) { + classCallCheck(this, ComponentStyle); - this.rules = rules; - this.componentId = componentId; - if (!StyleSheet.instance.hasInjectedComponent(this.componentId)) { - var placeholder = '.' + componentId + ' {}'; - StyleSheet.instance.deferredInject(componentId, true, placeholder); - } - } + this.rules = rules; + this.componentId = componentId; + if (!StyleSheet.instance.hasInjectedComponent(this.componentId)) { + var placeholder = '.' + componentId + ' {}'; + StyleSheet.instance.deferredInject( + componentId, + true, + placeholder + ); + } + } - /* + /* * Flattens a rule set into valid CSS * Hashes it, wraps the whole chunk in a .hash1234 {} * Returns the hash to be injected on render() * */ + ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles( + executionContext, + styleSheet + ) { + var flatCSS = flatten(this.rules, executionContext); + var hash = doHash(this.componentId + flatCSS.join('')); - ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) { - var flatCSS = flatten(this.rules, executionContext); - var hash = doHash(this.componentId + flatCSS.join('')); + var existingName = styleSheet.getName(hash); + if (existingName) return existingName; - var existingName = styleSheet.getName(hash); - if (existingName) return existingName; + var name = nameGenerator(hash); + if (styleSheet.alreadyInjected(hash, name)) return name; - var name = nameGenerator(hash); - if (styleSheet.alreadyInjected(hash, name)) return name; + var css = '\n' + stringifyRules(flatCSS, '.' + name); + styleSheet.inject(this.componentId, true, css, hash, name); + return name; + }; - var css = '\n' + stringifyRules(flatCSS, '.' + name); - styleSheet.inject(this.componentId, true, css, hash, name); - return name; - }; + ComponentStyle.generateName = function generateName(str) { + return nameGenerator(doHash(str)); + }; - ComponentStyle.generateName = function generateName(str) { - return nameGenerator(doHash(str)); - }; + return ComponentStyle; + })(); - return ComponentStyle; - }(); + return ComponentStyle; + }; - return ComponentStyle; -}); + // + // Thanks to ReactDOMFactories for this handy list! -// -// Thanks to ReactDOMFactories for this handy list! + var domElements = [ + 'a', + 'abbr', + 'address', + 'area', + 'article', + 'aside', + 'audio', + 'b', + 'base', + 'bdi', + 'bdo', + 'big', + 'blockquote', + 'body', + 'br', + 'button', + 'canvas', + 'caption', + 'cite', + 'code', + 'col', + 'colgroup', + 'data', + 'datalist', + 'dd', + 'del', + 'details', + 'dfn', + 'dialog', + 'div', + 'dl', + 'dt', + 'em', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'i', + 'iframe', + 'img', + 'input', + 'ins', + 'kbd', + 'keygen', + 'label', + 'legend', + 'li', + 'link', + 'main', + 'map', + 'mark', + 'menu', + 'menuitem', + 'meta', + 'meter', + 'nav', + 'noscript', + 'object', + 'ol', + 'optgroup', + 'option', + 'output', + 'p', + 'param', + 'picture', + 'pre', + 'progress', + 'q', + 'rp', + 'rt', + 'ruby', + 's', + 'samp', + 'script', + 'section', + 'select', + 'small', + 'source', + 'span', + 'strong', + 'style', + 'sub', + 'summary', + 'sup', + 'table', + 'tbody', + 'td', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'time', + 'title', + 'tr', + 'track', + 'u', + 'ul', + 'var', + 'video', + 'wbr', -var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', + // SVG + 'circle', + 'clipPath', + 'defs', + 'ellipse', + 'g', + 'image', + 'line', + 'linearGradient', + 'mask', + 'path', + 'pattern', + 'polygon', + 'polyline', + 'radialGradient', + 'rect', + 'stop', + 'svg', + 'text', + 'tspan' + ]; -// SVG -'circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; + // -// + var _styled = function(styledComponent, constructWithOptions) { + var styled = function styled(tag) { + return constructWithOptions(styledComponent, tag); + }; -var _styled = (function (styledComponent, constructWithOptions) { - var styled = function styled(tag) { - return constructWithOptions(styledComponent, tag); - }; + // Shorthands for all valid HTML Elements + domElements.forEach(function(domElement) { + styled[domElement] = styled(domElement); + }); - // Shorthands for all valid HTML Elements - domElements.forEach(function (domElement) { - styled[domElement] = styled(domElement); - }); + return styled; + }; - return styled; -}); + // + var replaceWhitespace = function replaceWhitespace(str) { + return str.replace(/\s|\\n/g, ''); + }; -// -var replaceWhitespace = function replaceWhitespace(str) { - return str.replace(/\s|\\n/g, ''); -}; + var _keyframes = function(nameGenerator, stringifyRules, css) { + return function(strings) { + for ( + var _len = arguments.length, + interpolations = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + interpolations[_key - 1] = arguments[_key]; + } -var _keyframes = (function (nameGenerator, stringifyRules, css) { - return function (strings) { - for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - interpolations[_key - 1] = arguments[_key]; - } + var rules = css.apply(undefined, [strings].concat(interpolations)); + var hash = doHash(replaceWhitespace(JSON.stringify(rules))); - var rules = css.apply(undefined, [strings].concat(interpolations)); - var hash = doHash(replaceWhitespace(JSON.stringify(rules))); + var existingName = StyleSheet.instance.getName(hash); + if (existingName) return existingName; - var existingName = StyleSheet.instance.getName(hash); - if (existingName) return existingName; + var name = nameGenerator(hash); + if (StyleSheet.instance.alreadyInjected(hash, name)) return name; - var name = nameGenerator(hash); - if (StyleSheet.instance.alreadyInjected(hash, name)) return name; + var generatedCSS = stringifyRules(rules, name, '@keyframes'); + StyleSheet.instance.inject( + 'sc-keyframes-' + name, + true, + generatedCSS, + hash, + name + ); + return name; + }; + }; - var generatedCSS = stringifyRules(rules, name, '@keyframes'); - StyleSheet.instance.inject('sc-keyframes-' + name, true, generatedCSS, hash, name); - return name; - }; -}); + // + var _injectGlobal = function(stringifyRules, css) { + var injectGlobal = function injectGlobal(strings) { + for ( + var _len = arguments.length, + interpolations = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + interpolations[_key - 1] = arguments[_key]; + } -// -var _injectGlobal = (function (stringifyRules, css) { - var injectGlobal = function injectGlobal(strings) { - for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - interpolations[_key - 1] = arguments[_key]; - } + var rules = css.apply(undefined, [strings].concat(interpolations)); + var hash = doHash(JSON.stringify(rules)); - var rules = css.apply(undefined, [strings].concat(interpolations)); - var hash = doHash(JSON.stringify(rules)); + var componentId = 'sc-global-' + hash; + if (StyleSheet.instance.hasInjectedComponent(componentId)) return; - var componentId = 'sc-global-' + hash; - if (StyleSheet.instance.hasInjectedComponent(componentId)) return; + StyleSheet.instance.inject( + componentId, + false, + stringifyRules(rules) + ); + }; - StyleSheet.instance.inject(componentId, false, stringifyRules(rules)); - }; + return injectGlobal; + }; - return injectGlobal; -}); + // -// + var _constructWithOptions = function(css) { + var constructWithOptions = function constructWithOptions( + componentConstructor, + tag + ) { + var options = arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : {}; + if (typeof tag !== 'string' && typeof tag !== 'function') { + // $FlowInvalidInputTest + throw new Error( + 'Cannot create styled-component for component: ' + tag + ); + } -var _constructWithOptions = (function (css) { - var constructWithOptions = function constructWithOptions(componentConstructor, tag) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + /* This is callable directly as a template function */ + var templateFunction = function templateFunction(strings) { + for ( + var _len = arguments.length, + interpolations = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + interpolations[_key - 1] = arguments[_key]; + } - if (typeof tag !== 'string' && typeof tag !== 'function') { - // $FlowInvalidInputTest - throw new Error('Cannot create styled-component for component: ' + tag); - } + return componentConstructor( + tag, + options, + css.apply(undefined, [strings].concat(interpolations)) + ); + }; - /* This is callable directly as a template function */ - var templateFunction = function templateFunction(strings) { - for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - interpolations[_key - 1] = arguments[_key]; - } + /* If config methods are called, wrap up a new template function and merge options */ + templateFunction.withConfig = function(config) { + return constructWithOptions( + componentConstructor, + tag, + _extends({}, options, config) + ); + }; + templateFunction.attrs = function(attrs) { + return constructWithOptions( + componentConstructor, + tag, + _extends({}, options, { + attrs: _extends({}, options.attrs || {}, attrs) + }) + ); + }; - return componentConstructor(tag, options, css.apply(undefined, [strings].concat(interpolations))); - }; + return templateFunction; + }; - /* If config methods are called, wrap up a new template function and merge options */ - templateFunction.withConfig = function (config) { - return constructWithOptions(componentConstructor, tag, _extends({}, options, config)); - }; - templateFunction.attrs = function (attrs) { - return constructWithOptions(componentConstructor, tag, _extends({}, options, { - attrs: _extends({}, options.attrs || {}, attrs) })); - }; + return constructWithOptions; + }; - return templateFunction; - }; - - return constructWithOptions; -}); - -/** + /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ -var REACT_STATICS = { - childContextTypes: true, - contextTypes: true, - defaultProps: true, - displayName: true, - getDefaultProps: true, - mixins: true, - propTypes: true, - type: true -}; + var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true + }; -var KNOWN_STATICS = { - name: true, - length: true, - prototype: true, - caller: true, - arguments: true, - arity: true -}; + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true + }; -var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + var isGetOwnPropertySymbolsAvailable = + typeof Object.getOwnPropertySymbols === 'function'; -var index$5 = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { - if (typeof sourceComponent !== 'string') { - // don't hoist over string (html) components - var keys = Object.getOwnPropertyNames(sourceComponent); + var index$5 = function hoistNonReactStatics( + targetComponent, + sourceComponent, + customStatics + ) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); - /* istanbul ignore else */ - if (isGetOwnPropertySymbolsAvailable) { - keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); - } - - for (var i = 0; i < keys.length; ++i) { - if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) { - try { - targetComponent[keys[i]] = sourceComponent[keys[i]]; - } catch (error) {} + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); } + + for (var i = 0; i < keys.length; ++i) { + if ( + !REACT_STATICS[keys[i]] && + !KNOWN_STATICS[keys[i]] && + (!customStatics || !customStatics[keys[i]]) + ) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) {} + } + } + } + + return targetComponent; + }; + + // + /* globals ReactClass */ + + var wrapWithTheme = function wrapWithTheme(Component$$1) { + var _WithTheme$contextTyp; + + var componentName = + Component$$1.displayName || Component$$1.name || 'Component'; + + var isStyledComponent$$1 = isStyledComponent(Component$$1); + + var WithTheme = (function(_React$Component) { + inherits(WithTheme, _React$Component); + + function WithTheme() { + var _temp, _this, _ret; + + classCallCheck(this, WithTheme); + + for ( + var _len = arguments.length, args = Array(_len), _key = 0; + _key < _len; + _key++ + ) { + args[_key] = arguments[_key]; + } + + return (_ret = ((_temp = ((_this = possibleConstructorReturn( + this, + _React$Component.call.apply( + _React$Component, + [this].concat(args) + ) + )), _this)), (_this.state = {}), _temp)), possibleConstructorReturn( + _this, + _ret + ); + } + + // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping + + WithTheme.prototype.componentWillMount = function componentWillMount() { + var _this2 = this; + + if (!this.context[CHANNEL]) { + throw new Error( + '[withTheme] Please use ThemeProvider to be able to use withTheme' + ); + } + + var subscribe = this.context[CHANNEL]; + this.unsubscribe = subscribe(function(theme) { + _this2.setState({ theme: theme }); + }); + }; + + WithTheme.prototype.componentWillUnmount = function componentWillUnmount() { + if (typeof this.unsubscribe === 'function') this.unsubscribe(); + }; + + WithTheme.prototype.render = function render() { + // eslint-disable-next-line react/prop-types + var innerRef = this.props.innerRef; + var theme = this.state.theme; + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + Component$$1, + _extends( + { + theme: theme + }, + this.props, + { + innerRef: isStyledComponent$$1 ? innerRef : undefined, + ref: isStyledComponent$$1 ? undefined : innerRef + } + ) + ); + }; + + return WithTheme; + })(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + + WithTheme.displayName = 'WithTheme(' + componentName + ')'; + WithTheme.styledComponentId = 'withTheme'; + WithTheme.contextTypes = ((_WithTheme$contextTyp = {}), (_WithTheme$contextTyp[ + CHANNEL + ] = + index$3.func), _WithTheme$contextTyp); + + return index$5(WithTheme, Component$$1); + }; + + // + + /* Import singletons */ + /* Import singleton constructors */ + /* Import components */ + /* Import Higher Order Components */ + /* Instantiate singletons */ + var ComponentStyle = _ComponentStyle( + generateAlphabeticName, + flatten, + stringifyRules + ); + var constructWithOptions = _constructWithOptions(css); + var StyledComponent = _StyledComponent( + ComponentStyle, + constructWithOptions + ); + + /* Instantiate exported singletons */ + var keyframes = _keyframes(generateAlphabeticName, stringifyRules, css); + var injectGlobal = _injectGlobal(stringifyRules, css); + var styled = _styled(StyledComponent, constructWithOptions); + + /* harmony default export */ __webpack_exports__['a'] = styled; + + /* WEBPACK VAR INJECTION */ + }.call(__webpack_exports__, __webpack_require__(45))); + + /***/ + }, + /* 4 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_unitcalc__ = __webpack_require__( + 193 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_unitcalc___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_unitcalc__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_components__ = __webpack_require__( + 3 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_camel_case__ = __webpack_require__( + 418 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_camel_case___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_camel_case__ + ); + var _templateObject = _taggedTemplateLiteral(['', ''], ['', '']); + + function _taggedTemplateLiteral(strings, raw) { + return Object.freeze( + Object.defineProperties(strings, { + raw: { value: Object.freeze(raw) } + }) + ); + } + + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + return arr2; + } else { + return Array.from(arr); } - } - - return targetComponent; -}; - -// -/* globals ReactClass */ - -var wrapWithTheme = function wrapWithTheme(Component$$1) { - var _WithTheme$contextTyp; - - var componentName = Component$$1.displayName || Component$$1.name || 'Component'; - - var isStyledComponent$$1 = isStyledComponent(Component$$1); - - var WithTheme = function (_React$Component) { - inherits(WithTheme, _React$Component); - - function WithTheme() { - var _temp, _this, _ret; - - classCallCheck(this, WithTheme); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {}, _temp), possibleConstructorReturn(_this, _ret); - } + var sides = ['top', 'right', 'bottom', 'left']; - // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping + var unitProps = (function() { + var sided = function sided(rule) { + return sides.map(function(side) { + return rule + '-' + side; + }); + }; + var measures = ['margin', 'padding'].reduce(function(props, rule) { + return [].concat( + _toConsumableArray(props), + [rule], + _toConsumableArray(sided(rule)) + ); + }, []); - WithTheme.prototype.componentWillMount = function componentWillMount() { - var _this2 = this; + return sides.reduce(function(acc, side) { + return [].concat(_toConsumableArray(acc), [ + 'border-' + side + '-width' + ]); + }, ['border'].concat(_toConsumableArray(measures))); + })(); - if (!this.context[CHANNEL]) { - throw new Error('[withTheme] Please use ThemeProvider to be able to use withTheme'); - } + var unitsFromProps = function unitsFromProps(props) { + return unitProps + .filter(function(measure) { + return props[ + __WEBPACK_IMPORTED_MODULE_2_camel_case___default()(measure) + ]; + }) + .map(function(measure) { + return ( + '\n ' + + measure + + ': ' + + __WEBPACK_IMPORTED_MODULE_0_unitcalc___default()( + props[ + __WEBPACK_IMPORTED_MODULE_2_camel_case___default()(measure) + ] + ) + + ';\n ' + ); + }) + .join(';\n'); + }; - var subscribe = this.context[CHANNEL]; - this.unsubscribe = subscribe(function (theme) { - _this2.setState({ theme: theme }); - }); - }; + /* harmony default export */ __webpack_exports__['a'] = function( + Component + ) { + return Component.extend + ? Component.extend(_templateObject, unitsFromProps) + : __webpack_require__ + .i( + __WEBPACK_IMPORTED_MODULE_1_styled_components__[ + 'a' /* default */ + ] + )(Component) + .withConfig({ + displayName: 'baseline' + })(['', ''], unitsFromProps); + }; - WithTheme.prototype.componentWillUnmount = function componentWillUnmount() { - if (typeof this.unsubscribe === 'function') this.unsubscribe(); - }; - - WithTheme.prototype.render = function render() { - // eslint-disable-next-line react/prop-types - var innerRef = this.props.innerRef; - var theme = this.state.theme; - - - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(Component$$1, _extends({ - theme: theme - }, this.props, { - innerRef: isStyledComponent$$1 ? innerRef : undefined, - ref: isStyledComponent$$1 ? undefined : innerRef - })); - }; - - return WithTheme; - }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); - - WithTheme.displayName = 'WithTheme(' + componentName + ')'; - WithTheme.styledComponentId = 'withTheme'; - WithTheme.contextTypes = (_WithTheme$contextTyp = {}, _WithTheme$contextTyp[CHANNEL] = index$3.func, _WithTheme$contextTyp); - - - return index$5(WithTheme, Component$$1); -}; - -// - -/* Import singletons */ -/* Import singleton constructors */ -/* Import components */ -/* Import Higher Order Components */ -/* Instantiate singletons */ -var ComponentStyle = _ComponentStyle(generateAlphabeticName, flatten, stringifyRules); -var constructWithOptions = _constructWithOptions(css); -var StyledComponent = _StyledComponent(ComponentStyle, constructWithOptions); - -/* Instantiate exported singletons */ -var keyframes = _keyframes(generateAlphabeticName, stringifyRules, css); -var injectGlobal = _injectGlobal(stringifyRules, css); -var styled = _styled(StyledComponent, constructWithOptions); - -/* harmony default export */ __webpack_exports__["a"] = (styled); - -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(45))) - -/***/ }), -/* 4 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_unitcalc__ = __webpack_require__(193); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_unitcalc___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_unitcalc__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_components__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_camel_case__ = __webpack_require__(418); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_camel_case___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_camel_case__); -var _templateObject = _taggedTemplateLiteral(['', ''], ['', '']); - -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - - - - -var sides = ['top', 'right', 'bottom', 'left']; - -var unitProps = function () { - var sided = function sided(rule) { - return sides.map(function (side) { - return rule + '-' + side; - }); - }; - - var measures = ['margin', 'padding'].reduce(function (props, rule) { - return [].concat(_toConsumableArray(props), [rule], _toConsumableArray(sided(rule))); - }, []); - - return sides.reduce(function (acc, side) { - return [].concat(_toConsumableArray(acc), ['border-' + side + '-width']); - }, ['border'].concat(_toConsumableArray(measures))); -}(); - -var unitsFromProps = function unitsFromProps(props) { - return unitProps.filter(function (measure) { - return props[__WEBPACK_IMPORTED_MODULE_2_camel_case___default()(measure)]; - }).map(function (measure) { - return '\n ' + measure + ': ' + __WEBPACK_IMPORTED_MODULE_0_unitcalc___default()(props[__WEBPACK_IMPORTED_MODULE_2_camel_case___default()(measure)]) + ';\n '; - }).join(';\n'); -}; - -/* harmony default export */ __webpack_exports__["a"] = (function (Component) { - return Component.extend ? Component.extend(_templateObject, unitsFromProps) : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_components__["a" /* default */])(Component).withConfig({ - displayName: 'baseline' - })(['', ''], unitsFromProps); -}); - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 5 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * @@ -3156,110 +4167,131 @@ var unitsFromProps = function unitsFromProps(props) { * */ + var emptyFunction = __webpack_require__(17); - -var emptyFunction = __webpack_require__(17); - -/** + /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ -var warning = emptyFunction; + var warning = emptyFunction; -if (false) { - (function () { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; + if (false) { + (function() { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, + args = Array(_len2 > 2 ? _len2 - 2 : 0), + _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); } - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; + module.exports = warning; - warning = function warning(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } + /***/ + }, + /* 6 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__( + 963 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__( + 960 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__( + 962 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__( + 958 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__( + 959 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__( + 961 + ); - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } - - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; + var structure = { + allowsArrayErrors: true, + empty: {}, + emptyList: [], + getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__['a' /* default */], + setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__['a' /* default */], + deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__['a' /* default */], + deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__['a' /* default */], + fromJS: function fromJS(value) { + return value; + }, + keys: __WEBPACK_IMPORTED_MODULE_5__keys__['a' /* default */], + size: function size(array) { + return array ? array.length : 0; + }, + splice: __WEBPACK_IMPORTED_MODULE_0__splice__['a' /* default */], + toJS: function toJS(value) { + return value; } + }; - printWarning.apply(undefined, [format].concat(args)); - } - }; - })(); -} + /* harmony default export */ __webpack_exports__['a'] = structure; -module.exports = warning; - -/***/ }), -/* 6 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(963); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(960); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(962); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(958); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(959); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(961); - - - - - - - -var structure = { - allowsArrayErrors: true, - empty: {}, - emptyList: [], - getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */], - setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */], - deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */], - deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */], - fromJS: function fromJS(value) { - return value; - }, - keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */], - size: function size(array) { - return array ? array.length : 0; - }, - splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */], - toJS: function toJS(value) { - return value; - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (structure); - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 7 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -3270,176 +4302,185 @@ var structure = { * */ - -/** + /** * WARNING: DO NOT manually require this module. * This is a replacement for `invariant(...)` used by the error code system * and will _only_ be required by the corresponding babel pass. * It always throws. */ -function reactProdInvariant(code) { - var argCount = arguments.length - 1; + function reactProdInvariant(code) { + var argCount = arguments.length - 1; - var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + var message = + 'Minified React error #' + + code + + '; visit ' + + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + + code; - for (var argIdx = 0; argIdx < argCount; argIdx++) { - message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); - } + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } - message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + message += + ' for the full message or use the non-minified dev environment' + + ' for full errors and additional helpful warnings.'; - var error = new Error(message); - error.name = 'Invariant Violation'; - error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame - throw error; -} + throw error; + } -module.exports = reactProdInvariant; + module.exports = reactProdInvariant; -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ + }, + /* 8 */ + /***/ function(module, exports, __webpack_require__) { + const flatten = __webpack_require__(354); -const flatten = __webpack_require__(354); + const BASE = 16; -const BASE = 16; + const calc = (base, ...values) => + flatten(values.map(value => String(value).split(/\s/gim))) + .map(value => `${Number(value.replace('px', '')) / base}rem`) + .join(' '); -const calc = (base, ...values) => - flatten(values.map(value => String(value).split(/\s/gim))) - .map(value => `${Number(value.replace('px', '')) / base}rem`) - .join(' '); + module.exports = (...values) => calc(BASE, ...values); + module.exports.withBase = calc; -module.exports = (...values) => calc(BASE, ...values); -module.exports.withBase = calc; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* + /***/ + }, + /* 9 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /* object-assign (c) Sindre Sorhus @license MIT */ + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError( + 'Object.assign cannot be called with null or undefined' + ); + } -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } + return Object(val); + } - return Object(val); -} + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } + // Detect buggy property enumeration order in older V8 versions. - // Detect buggy property enumeration order in older V8 versions. + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function(letter) { + test3[letter] = letter; + }); + if ( + Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst' + ) { + return false; + } - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} + module.exports = shouldUseNative() + ? Object.assign + : function(target, source) { + var from; + var to = toObject(target); + var symbols; -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } + return to; + }; - return to; -}; + /***/ + }, + /* 10 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + Object.defineProperty(exports, '__esModule', { + value: true + }); + var _Styled = __webpack_require__(849); -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { + Object.defineProperty(exports, 'default', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Styled).default; + } + }); -"use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _Styled = __webpack_require__(849); - -Object.defineProperty(exports, 'default', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_Styled).default; - } -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 11 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -3449,61 +4490,67 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * */ + var _prodInvariant = __webpack_require__(7); + var DOMProperty = __webpack_require__(57); + var ReactDOMComponentFlags = __webpack_require__(272); -var _prodInvariant = __webpack_require__(7); + var invariant = __webpack_require__(2); -var DOMProperty = __webpack_require__(57); -var ReactDOMComponentFlags = __webpack_require__(272); + var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; + var Flags = ReactDOMComponentFlags; -var invariant = __webpack_require__(2); + var internalInstanceKey = + '__reactInternalInstance$' + Math.random().toString(36).slice(2); -var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; -var Flags = ReactDOMComponentFlags; - -var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); - -/** + /** * Check if a given node should be cached. */ -function shouldPrecacheNode(node, nodeID) { - return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' '; -} + function shouldPrecacheNode(node, nodeID) { + return ( + (node.nodeType === 1 && + node.getAttribute(ATTR_NAME) === String(nodeID)) || + (node.nodeType === 8 && + node.nodeValue === ' react-text: ' + nodeID + ' ') || + (node.nodeType === 8 && + node.nodeValue === ' react-empty: ' + nodeID + ' ') + ); + } -/** + /** * Drill down (through composites and empty components) until we get a host or * host text component. * * This is pretty polymorphic but unavoidable with the current structure we have * for `_renderedChildren`. */ -function getRenderedHostOrTextFromComponent(component) { - var rendered; - while (rendered = component._renderedComponent) { - component = rendered; - } - return component; -} + function getRenderedHostOrTextFromComponent(component) { + var rendered; + while ((rendered = component._renderedComponent)) { + component = rendered; + } + return component; + } -/** + /** * Populate `_hostNode` on the rendered host/text component with the given * DOM node. The passed `inst` can be a composite. */ -function precacheNode(inst, node) { - var hostInst = getRenderedHostOrTextFromComponent(inst); - hostInst._hostNode = node; - node[internalInstanceKey] = hostInst; -} + function precacheNode(inst, node) { + var hostInst = getRenderedHostOrTextFromComponent(inst); + hostInst._hostNode = node; + node[internalInstanceKey] = hostInst; + } -function uncacheNode(inst) { - var node = inst._hostNode; - if (node) { - delete node[internalInstanceKey]; - inst._hostNode = null; - } -} + function uncacheNode(inst) { + var node = inst._hostNode; + if (node) { + delete node[internalInstanceKey]; + inst._hostNode = null; + } + } -/** + /** * Populate `_hostNode` on each child of `inst`, assuming that the children * match up with the DOM (element) children of `node`. * @@ -3517,205 +4564,277 @@ function uncacheNode(inst) { * `prepareToManageChildren` before we change `_renderedChildren`, at which * time the container's child nodes are always cached (until it unmounts). */ -function precacheChildNodes(inst, node) { - if (inst._flags & Flags.hasCachedChildNodes) { - return; - } - var children = inst._renderedChildren; - var childNode = node.firstChild; - outer: for (var name in children) { - if (!children.hasOwnProperty(name)) { - continue; - } - var childInst = children[name]; - var childID = getRenderedHostOrTextFromComponent(childInst)._domID; - if (childID === 0) { - // We're currently unmounting this child in ReactMultiChild; skip it. - continue; - } - // We assume the child nodes are in the same order as the child instances. - for (; childNode !== null; childNode = childNode.nextSibling) { - if (shouldPrecacheNode(childNode, childID)) { - precacheNode(childInst, childNode); - continue outer; + function precacheChildNodes(inst, node) { + if (inst._flags & Flags.hasCachedChildNodes) { + return; + } + var children = inst._renderedChildren; + var childNode = node.firstChild; + outer: for (var name in children) { + if (!children.hasOwnProperty(name)) { + continue; + } + var childInst = children[name]; + var childID = getRenderedHostOrTextFromComponent(childInst)._domID; + if (childID === 0) { + // We're currently unmounting this child in ReactMultiChild; skip it. + continue; + } + // We assume the child nodes are in the same order as the child instances. + for (; childNode !== null; childNode = childNode.nextSibling) { + if (shouldPrecacheNode(childNode, childID)) { + precacheNode(childInst, childNode); + continue outer; + } + } + // We reached the end of the DOM children without finding an ID match. + true + ? false + ? invariant( + false, + 'Unable to find element with ID %s.', + childID + ) + : _prodInvariant('32', childID) + : void 0; + } + inst._flags |= Flags.hasCachedChildNodes; } - } - // We reached the end of the DOM children without finding an ID match. - true ? false ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0; - } - inst._flags |= Flags.hasCachedChildNodes; -} -/** + /** * Given a DOM node, return the closest ReactDOMComponent or * ReactDOMTextComponent instance ancestor. */ -function getClosestInstanceFromNode(node) { - if (node[internalInstanceKey]) { - return node[internalInstanceKey]; - } + function getClosestInstanceFromNode(node) { + if (node[internalInstanceKey]) { + return node[internalInstanceKey]; + } - // Walk up the tree until we find an ancestor whose instance we have cached. - var parents = []; - while (!node[internalInstanceKey]) { - parents.push(node); - if (node.parentNode) { - node = node.parentNode; - } else { - // Top of the tree. This node must not be part of a React tree (or is - // unmounted, potentially). - return null; - } - } + // Walk up the tree until we find an ancestor whose instance we have cached. + var parents = []; + while (!node[internalInstanceKey]) { + parents.push(node); + if (node.parentNode) { + node = node.parentNode; + } else { + // Top of the tree. This node must not be part of a React tree (or is + // unmounted, potentially). + return null; + } + } - var closest; - var inst; - for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { - closest = inst; - if (parents.length) { - precacheChildNodes(inst, node); - } - } + var closest; + var inst; + for ( + ; + node && (inst = node[internalInstanceKey]); + node = parents.pop() + ) { + closest = inst; + if (parents.length) { + precacheChildNodes(inst, node); + } + } - return closest; -} + return closest; + } -/** + /** * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent * instance, or null if the node was not rendered by this React. */ -function getInstanceFromNode(node) { - var inst = getClosestInstanceFromNode(node); - if (inst != null && inst._hostNode === node) { - return inst; - } else { - return null; - } -} + function getInstanceFromNode(node) { + var inst = getClosestInstanceFromNode(node); + if (inst != null && inst._hostNode === node) { + return inst; + } else { + return null; + } + } -/** + /** * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node. */ -function getNodeFromInstance(inst) { - // Without this first invariant, passing a non-DOM-component triggers the next - // invariant for a missing parent, which is super confusing. - !(inst._hostNode !== undefined) ? false ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + function getNodeFromInstance(inst) { + // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + !(inst._hostNode !== undefined) + ? false + ? invariant(false, 'getNodeFromInstance: Invalid argument.') + : _prodInvariant('33') + : void 0; - if (inst._hostNode) { - return inst._hostNode; - } + if (inst._hostNode) { + return inst._hostNode; + } - // Walk up the tree until we find an ancestor whose DOM node we have cached. - var parents = []; - while (!inst._hostNode) { - parents.push(inst); - !inst._hostParent ? false ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0; - inst = inst._hostParent; - } + // Walk up the tree until we find an ancestor whose DOM node we have cached. + var parents = []; + while (!inst._hostNode) { + parents.push(inst); + !inst._hostParent + ? false + ? invariant( + false, + 'React DOM tree root should always have a node reference.' + ) + : _prodInvariant('34') + : void 0; + inst = inst._hostParent; + } - // Now parents contains each ancestor that does *not* have a cached native - // node, and `inst` is the deepest ancestor that does. - for (; parents.length; inst = parents.pop()) { - precacheChildNodes(inst, inst._hostNode); - } + // Now parents contains each ancestor that does *not* have a cached native + // node, and `inst` is the deepest ancestor that does. + for (; parents.length; inst = parents.pop()) { + precacheChildNodes(inst, inst._hostNode); + } - return inst._hostNode; -} + return inst._hostNode; + } -var ReactDOMComponentTree = { - getClosestInstanceFromNode: getClosestInstanceFromNode, - getInstanceFromNode: getInstanceFromNode, - getNodeFromInstance: getNodeFromInstance, - precacheChildNodes: precacheChildNodes, - precacheNode: precacheNode, - uncacheNode: uncacheNode -}; + var ReactDOMComponentTree = { + getClosestInstanceFromNode: getClosestInstanceFromNode, + getInstanceFromNode: getInstanceFromNode, + getNodeFromInstance: getNodeFromInstance, + precacheChildNodes: precacheChildNodes, + precacheNode: precacheNode, + uncacheNode: uncacheNode + }; -module.exports = ReactDOMComponentTree; + module.exports = ReactDOMComponentTree; -/***/ }), -/* 12 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /***/ + }, + /* 12 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'b', + function() { + return isNot; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'c', + function() { + return isOr; + } + ); + /* unused harmony export isSomeNot */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__( + 381 + ); -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isNot; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isOr; }); -/* unused harmony export isSomeNot */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__(381); + var index = (...names) => (...args) => props => + names.every(name => props[name]) + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['a' /* css */] + )(...args) + : __WEBPACK_IMPORTED_MODULE_0_styled_components__['a' /* css */]``; + const isNot = (...names) => (...args) => props => + names.every(name => !props[name]) + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['a' /* css */] + )(...args) + : __WEBPACK_IMPORTED_MODULE_0_styled_components__['a' /* css */]``; -var index = ((...names) => (...args) => props => names.every(name => props[name]) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* css */])(...args) : __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* css */]``); + const isOr = (...names) => (...args) => props => + names.some(name => props[name]) + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['a' /* css */] + )(...args) + : __WEBPACK_IMPORTED_MODULE_0_styled_components__['a' /* css */]``; -const isNot = (...names) => (...args) => props => names.every(name => !props[name]) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* css */])(...args) : __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* css */]``; + const isSomeNot = (...names) => (...args) => props => + names.some(name => !props[name]) + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['a' /* css */] + )(...args) + : __WEBPACK_IMPORTED_MODULE_0_styled_components__['a' /* css */]``; -const isOr = (...names) => (...args) => props => names.some(name => props[name]) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* css */])(...args) : __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* css */]``; + /* harmony default export */ __webpack_exports__['a'] = index; -const isSomeNot = (...names) => (...args) => props => names.some(name => !props[name]) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* css */])(...args) : __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* css */]``; + /***/ + }, + /* 13 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export fontFamily */ + /* unused harmony export semibold */ + /* unused harmony export medium */ + /* unused harmony export normal */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__( + 3 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fonts__ = __webpack_require__( + 413 + ); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'b', + function() { + return __WEBPACK_IMPORTED_MODULE_1__fonts__['a']; + } + ); -/* harmony default export */ __webpack_exports__["a"] = (index); + var fontFamily = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['b' /* css */] + )([ + 'font-family:"Libre Franklin",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica,sans-serif;' + ]); + var semibold = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['b' /* css */] + )(['font-weight: 600;']); -/***/ }), -/* 13 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var medium = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['b' /* css */] + )(['font-weight: 500;']); -"use strict"; -/* unused harmony export fontFamily */ -/* unused harmony export semibold */ -/* unused harmony export medium */ -/* unused harmony export normal */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fonts__ = __webpack_require__(413); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__fonts__["a"]; }); + var normal = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['b' /* css */] + )(['font-weight: 400;']); + /* harmony default export */ __webpack_exports__['a'] = { + fontFamily: fontFamily, + semibold: semibold, + medium: medium, + normal: normal + }; -var fontFamily = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["b" /* css */])(['font-family:"Libre Franklin",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica,sans-serif;']); + /***/ + }, + /* 14 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + exports.__esModule = true; + exports.Subscriber = exports.Broadcast = undefined; -var semibold = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["b" /* css */])(['font-weight: 600;']); + var _Broadcast2 = __webpack_require__(714); -var medium = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["b" /* css */])(['font-weight: 500;']); + var _Broadcast3 = _interopRequireDefault(_Broadcast2); -var normal = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["b" /* css */])(['font-weight: 400;']); + var _Subscriber2 = __webpack_require__(715); -/* harmony default export */ __webpack_exports__["a"] = ({ - fontFamily: fontFamily, - semibold: semibold, - medium: medium, - normal: normal -}); + var _Subscriber3 = _interopRequireDefault(_Subscriber2); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + exports.Broadcast = _Broadcast3.default; + exports.Subscriber = _Subscriber3.default; -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; -exports.Subscriber = exports.Broadcast = undefined; - -var _Broadcast2 = __webpack_require__(714); - -var _Broadcast3 = _interopRequireDefault(_Broadcast2); - -var _Subscriber2 = __webpack_require__(715); - -var _Subscriber3 = _interopRequireDefault(_Subscriber2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.Broadcast = _Broadcast3.default; -exports.Subscriber = _Subscriber3.default; - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 15 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -3725,67 +4844,62 @@ exports.Subscriber = _Subscriber3.default; * */ + var canUseDOM = !!(typeof window !== 'undefined' && + window.document && + window.document.createElement); - -var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - -/** + /** * Simple, lightweight module assisting with the detection and context of * Worker. Helps avoid circular dependencies and allows code to reason about * whether or not they are in a Worker, even if they never include the main * `ReactWorker` dependency. */ -var ExecutionEnvironment = { + var ExecutionEnvironment = { + canUseDOM: canUseDOM, - canUseDOM: canUseDOM, + canUseWorkers: typeof Worker !== 'undefined', - canUseWorkers: typeof Worker !== 'undefined', + canUseEventListeners: canUseDOM && + !!(window.addEventListener || window.attachEvent), - canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + canUseViewport: canUseDOM && !!window.screen, - canUseViewport: canUseDOM && !!window.screen, + isInWorker: !canUseDOM // For now, this is true - might change in the future. + }; - isInWorker: !canUseDOM // For now, this is true - might change in the future. + module.exports = ExecutionEnvironment; -}; + /***/ + }, + /* 16 */ + /***/ function(module, exports) { + var g; -module.exports = ExecutionEnvironment; + // This works in non-strict mode + g = (function() { + return this; + })(); -/***/ }), -/* 16 */ -/***/ (function(module, exports) { + try { + // This works if eval is allowed (see CSP) + g = g || Function('return this')() || (1, eval)('this'); + } catch (e) { + // This works if the window reference is available + if (typeof window === 'object') g = window; + } -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; + // g can still be undefined, but nothing to do about it... + // We return undefined, instead of nothing here, so it's + // easier to handle this case. if(!global) { ...} + module.exports = g; -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** + /***/ + }, + /* 17 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -3796,100 +4910,110 @@ module.exports = g; * */ -function makeEmptyFunction(arg) { - return function () { - return arg; - }; -} + function makeEmptyFunction(arg) { + return function() { + return arg; + }; + } -/** + /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ -var emptyFunction = function emptyFunction() {}; + var emptyFunction = function emptyFunction() {}; -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; -}; + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function() { + return this; + }; + emptyFunction.thatReturnsArgument = function(arg) { + return arg; + }; -module.exports = emptyFunction; + module.exports = emptyFunction; -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ + }, + /* 18 */ + /***/ function(module, exports, __webpack_require__) { + var freeGlobal = __webpack_require__(256); -var freeGlobal = __webpack_require__(256); + /** Detect free variable `self`. */ + var freeSelf = + typeof self == 'object' && self && self.Object === Object && self; -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); + module.exports = root; -module.exports = root; + /***/ + }, + /* 19 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__( + 800 + ); + /* unused harmony reexport MemoryRouter */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__( + 801 + ); + /* unused harmony reexport Prompt */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__( + 802 + ); + /* unused harmony reexport Redirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__( + 296 + ); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'a', + function() { + return __WEBPACK_IMPORTED_MODULE_3__Route__['a']; + } + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__( + 178 + ); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'b', + function() { + return __WEBPACK_IMPORTED_MODULE_4__Router__['a']; + } + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__( + 803 + ); + /* unused harmony reexport StaticRouter */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__( + 804 + ); + /* unused harmony reexport Switch */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__matchPath__ = __webpack_require__( + 179 + ); + /* unused harmony reexport matchPath */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__withRouter__ = __webpack_require__( + 805 + ); + /* unused harmony reexport withRouter */ + /***/ + }, + /* 20 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + // WARNING: This function’s source is returned by a loader without transpilation. + // Do not use any unsupported by IE11+ features. -/***/ }), -/* 19 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__(800); -/* unused harmony reexport MemoryRouter */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__(801); -/* unused harmony reexport Prompt */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__(802); -/* unused harmony reexport Redirect */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(296); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_3__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(178); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_4__Router__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__(803); -/* unused harmony reexport StaticRouter */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__(804); -/* unused harmony reexport Switch */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__matchPath__ = __webpack_require__(179); -/* unused harmony reexport matchPath */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__withRouter__ = __webpack_require__(805); -/* unused harmony reexport withRouter */ - - - - - - - - - - - - - - - - - - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// WARNING: This function’s source is returned by a loader without transpilation. -// Do not use any unsupported by IE11+ features. - -/** + /** * Eval example code in a custom context: * - `require()` that allows you to require modules from Markdown examples (won’t work dinamically becasue we need * to know all required modules in advance to be able to bundle them with the code). @@ -3903,31 +5027,28 @@ module.exports = root; * @param {string} code * @return {Function} */ -module.exports = function evalInContext(header, require, code) { - var func = new Function( // eslint-disable-line no-new-func - 'require', - 'state', - 'setState', - '__setInitialState', - header + code - ); + module.exports = function evalInContext(header, require, code) { + var func = new Function( // eslint-disable-line no-new-func + 'require', + 'state', + 'setState', + '__setInitialState', + header + code + ); - // Bind the `require` function, other context arguments will be passed from the frontend - return func.bind(null, require); -}; + // Bind the `require` function, other context arguments will be passed from the frontend + return func.bind(null, require); + }; + /***/ + }, + /* 21 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + // WARNING: This function’s source is returned by a loader without transpilation. + // Do not use any unsupported by IE11+ features. -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// WARNING: This function’s source is returned by a loader without transpilation. -// Do not use any unsupported by IE11+ features. - -/** + /** * Return module from a given map (like {react: require('react')}) or throw. * We alllow to require modules only from Markdown examples (won’t work dinamically becasue we need to know all required * modules in advance to be able to bundle them with the code). @@ -3936,22 +5057,23 @@ module.exports = function evalInContext(header, require, code) { * @param {string} filepath * @return {object} */ -module.exports = function requireInRuntime(requireMap, filepath) { - if (!(filepath in requireMap)) { - throw new Error( - 'require() statements can be added only by editing a Markdown example file: require("' + filepath + '")' - ); - } - return requireMap[filepath]; -}; + module.exports = function requireInRuntime(requireMap, filepath) { + if (!(filepath in requireMap)) { + throw new Error( + 'require() statements can be added only by editing a Markdown example file: require("' + + filepath + + '")' + ); + } + return requireMap[filepath]; + }; - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 22 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * @@ -3960,65 +5082,64 @@ module.exports = function requireInRuntime(requireMap, filepath) { * of patent rights can be found in the PATENTS file in the same directory. */ - - -/** + /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ -var warning = function() {}; + var warning = function() {}; -if (false) { - warning = function(condition, format, args) { - var len = arguments.length; - args = new Array(len > 2 ? len - 2 : 0); - for (var key = 2; key < len; key++) { - args[key - 2] = arguments[key]; - } - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); - } + if (false) { + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } - if (format.length < 10 || (/^[s\W]*$/).test(format)) { - throw new Error( - 'The warning format should be able to uniquely identify this ' + - 'warning. Please, use a more descriptive format than: ' + format - ); - } + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + + format + ); + } - if (!condition) { - var argIndex = 0; - var message = 'Warning: ' + - format.replace(/%s/g, function() { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); + if (!condition) { + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + } + }; } - try { - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch(x) {} - } - }; -} -module.exports = warning; + module.exports = warning; - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 23 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * @@ -4027,9 +5148,7 @@ module.exports = warning; * of patent rights can be found in the PATENTS file in the same directory. */ - - -/** + /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments @@ -4040,43 +5159,44 @@ module.exports = warning; * will remain to ensure logic does not differ in production. */ -var invariant = function(condition, format, a, b, c, d, e, f) { - if (false) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } + var invariant = function(condition, format, a, b, c, d, e, f) { + if (false) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - error.name = 'Invariant Violation'; - } + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { + return args[argIndex++]; + }) + ); + error.name = 'Invariant Violation'; + } - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -}; + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; -module.exports = invariant; + module.exports = invariant; - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 24 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * @author Titus Wormer * @copyright 2016 Titus Wormer * @license MIT @@ -4084,39 +5204,38 @@ module.exports = invariant; * @fileoverview Check if a character is a whitespace character. */ + /* eslint-env commonjs */ + /* Expose. */ + module.exports = whitespace; -/* eslint-env commonjs */ + /* Methods. */ + var fromCode = String.fromCharCode; -/* Expose. */ -module.exports = whitespace; + /* Constants. */ + var re = /\s/; -/* Methods. */ -var fromCode = String.fromCharCode; - -/* Constants. */ -var re = /\s/; - -/** + /** * Check whether the given character code, or the character * code at the first character, is a whitespace character. * * @param {string|number} character * @return {boolean} - Whether `character` is a whitespaces character. */ -function whitespace(character) { - return re.test( - typeof character === 'number' ? fromCode(character) : character.charAt(0) - ); -} + function whitespace(character) { + return re.test( + typeof character === 'number' + ? fromCode(character) + : character.charAt(0) + ); + } - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 25 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2016-present, Facebook, Inc. * All rights reserved. * @@ -4127,256 +5246,441 @@ function whitespace(character) { * */ + // Trust the developer to only use ReactInstrumentation with a __DEV__ check + var debugTool = null; -// Trust the developer to only use ReactInstrumentation with a __DEV__ check + if (false) { + var ReactDebugTool = require('./ReactDebugTool'); + debugTool = ReactDebugTool; + } -var debugTool = null; + module.exports = { debugTool: debugTool }; -if (false) { - var ReactDebugTool = require('./ReactDebugTool'); - debugTool = ReactDebugTool; -} + /***/ + }, + /* 26 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export Article */ + /* unused harmony export Aside */ + /* unused harmony export Footer */ + /* unused harmony export Header */ + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'f', + function() { + return Nav; + } + ); + /* unused harmony export Section */ + /* unused harmony export FigCaption */ + /* unused harmony export Figure */ + /* unused harmony export Main */ + /* unused harmony export H1 */ + /* unused harmony export Hr */ + /* unused harmony export Pre */ + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'h', + function() { + return A; + } + ); + /* unused harmony export Abbr */ + /* unused harmony export B */ + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'i', + function() { + return Strong; + } + ); + /* unused harmony export Code */ + /* unused harmony export Kbd */ + /* unused harmony export Samp */ + /* unused harmony export Dfn */ + /* unused harmony export Mark */ + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'e', + function() { + return Small; + } + ); + /* unused harmony export Sub */ + /* unused harmony export Sup */ + /* unused harmony export Audio */ + /* unused harmony export Video */ + /* unused harmony export Img */ + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'a', + function() { + return Svg; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'g', + function() { + return Button; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'd', + function() { + return Input; + } + ); + /* unused harmony export Optgroup */ + /* unused harmony export Select */ + /* unused harmony export Textarea */ + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'c', + function() { + return Fieldset; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'b', + function() { + return Legend; + } + ); + /* unused harmony export Progress */ + /* unused harmony export Details */ + /* unused harmony export Menu */ + /* unused harmony export Summary */ + /* unused harmony export Canvas */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__( + 352 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc__ = __webpack_require__( + 8 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_remcalc__ + ); -module.exports = { debugTool: debugTool }; + const Article = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].article.withConfig({ + displayName: 'src__Article' + })(['display: block;']); -/***/ }), -/* 26 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + const Aside = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].aside.withConfig({ + displayName: 'src__Aside' + })(['display: block;']); -"use strict"; -/* unused harmony export Article */ -/* unused harmony export Aside */ -/* unused harmony export Footer */ -/* unused harmony export Header */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return Nav; }); -/* unused harmony export Section */ -/* unused harmony export FigCaption */ -/* unused harmony export Figure */ -/* unused harmony export Main */ -/* unused harmony export H1 */ -/* unused harmony export Hr */ -/* unused harmony export Pre */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return A; }); -/* unused harmony export Abbr */ -/* unused harmony export B */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return Strong; }); -/* unused harmony export Code */ -/* unused harmony export Kbd */ -/* unused harmony export Samp */ -/* unused harmony export Dfn */ -/* unused harmony export Mark */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Small; }); -/* unused harmony export Sub */ -/* unused harmony export Sup */ -/* unused harmony export Audio */ -/* unused harmony export Video */ -/* unused harmony export Img */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Svg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return Button; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return Input; }); -/* unused harmony export Optgroup */ -/* unused harmony export Select */ -/* unused harmony export Textarea */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Fieldset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Legend; }); -/* unused harmony export Progress */ -/* unused harmony export Details */ -/* unused harmony export Menu */ -/* unused harmony export Summary */ -/* unused harmony export Canvas */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__(352); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc__ = __webpack_require__(8); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_remcalc__); + const Footer = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].footer.withConfig({ + displayName: 'src__Footer' + })(['display: block;']); + const Header = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].header.withConfig({ + displayName: 'src__Header' + })(['display: block;']); + const Nav = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].nav.withConfig({ + displayName: 'src__Nav' + })(['display: block;']); -const Article = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].article.withConfig({ - displayName: 'src__Article' -})(['display: block;']); + const Section = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].section.withConfig({ + displayName: 'src__Section' + })(['display: block;']); -const Aside = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].aside.withConfig({ - displayName: 'src__Aside' -})(['display: block;']); + const FigCaption = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].figcaption.withConfig({ + displayName: 'src__FigCaption' + })(['display: block;']); -const Footer = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].footer.withConfig({ - displayName: 'src__Footer' -})(['display: block;']); + const Figure = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].figure.withConfig({ + displayName: 'src__Figure' + })( + ['display: block;margin: ', ' ', ';'], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16), + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(40) + ); -const Header = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].header.withConfig({ - displayName: 'src__Header' -})(['display: block;']); + const Main = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].main.withConfig({ + displayName: 'src__Main' + })(['display: block;']); -const Nav = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].nav.withConfig({ - displayName: 'src__Nav' -})(['display: block;']); + const H1 = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].h1.withConfig({ + displayName: 'src__H1' + })( + ['font-size: ', ';margin: ', ' 0;'], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(32), + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(10) + ); -const Section = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].section.withConfig({ - displayName: 'src__Section' -})(['display: block;']); + const Hr = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].hr.withConfig({ + displayName: 'src__Hr' + })(['box-sizing: content-box;height: 0;overflow: visible;']); -const FigCaption = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].figcaption.withConfig({ - displayName: 'src__FigCaption' -})(['display: block;']); + const Pre = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].pre.withConfig({ + displayName: 'src__Pre' + })( + ['font-family: monospace, monospace;font-size: ', ';'], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16) + ); -const Figure = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].figure.withConfig({ - displayName: 'src__Figure' -})(['display: block;margin: ', ' ', ';'], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16), __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(40)); + const A = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].a.withConfig({ + displayName: 'src__A' + })(['background-color: transparent;text-decoration-skip: objects;']); -const Main = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].main.withConfig({ - displayName: 'src__Main' -})(['display: block;']); + const Abbr = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].abbr.withConfig({ + displayName: 'src__Abbr' + })([ + '&[title] {border-bottom: none;text-decoration: underline;text-decoration: underline dotted;}' + ]); -const H1 = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].h1.withConfig({ - displayName: 'src__H1' -})(['font-size: ', ';margin: ', ' 0;'], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(32), __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(10)); + const B = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].b.withConfig({ + displayName: 'src__B' + })(['font-weight: bolder;']); -const Hr = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].hr.withConfig({ - displayName: 'src__Hr' -})(['box-sizing: content-box;height: 0;overflow: visible;']); + const Strong = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].strong.withConfig({ + displayName: 'src__Strong' + })(['font-weight: bolder;']); -const Pre = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].pre.withConfig({ - displayName: 'src__Pre' -})(['font-family: monospace, monospace;font-size: ', ';'], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16)); + const Code = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].code.withConfig({ + displayName: 'src__Code' + })( + ['font-family: monospace, monospace;font-size: ', ';'], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16) + ); -const A = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].a.withConfig({ - displayName: 'src__A' -})(['background-color: transparent;text-decoration-skip: objects;']); + const Kbd = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].kbd.withConfig({ + displayName: 'src__Kbd' + })( + ['font-family: monospace, monospace;font-size: ', ';'], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16) + ); -const Abbr = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].abbr.withConfig({ - displayName: 'src__Abbr' -})(['&[title] {border-bottom: none;text-decoration: underline;text-decoration: underline dotted;}']); + const Samp = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].samp.withConfig({ + displayName: 'src__Samp' + })( + ['font-family: monospace, monospace;font-size: ', ';'], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16) + ); -const B = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].b.withConfig({ - displayName: 'src__B' -})(['font-weight: bolder;']); + const Dfn = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].dfn.withConfig({ + displayName: 'src__Dfn' + })(['font-style: italic;']); -const Strong = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].strong.withConfig({ - displayName: 'src__Strong' -})(['font-weight: bolder;']); + const Mark = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].mark.withConfig({ + displayName: 'src__Mark' + })(['background-color: #ff0;color: #000;']); -const Code = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].code.withConfig({ - displayName: 'src__Code' -})(['font-family: monospace, monospace;font-size: ', ';'], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16)); + const Small = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].small.withConfig({ + displayName: 'src__Small' + })(['font-size: 80%;']); -const Kbd = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].kbd.withConfig({ - displayName: 'src__Kbd' -})(['font-family: monospace, monospace;font-size: ', ';'], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16)); + const Sub = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].sub.withConfig({ + displayName: 'src__Sub' + })([ + 'font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;bottom: -0.25em;' + ]); -const Samp = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].samp.withConfig({ - displayName: 'src__Samp' -})(['font-family: monospace, monospace;font-size: ', ';'], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(16)); + const Sup = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].sup.withConfig({ + displayName: 'src__Sup' + })([ + 'font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;top: -0.5em;' + ]); -const Dfn = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].dfn.withConfig({ - displayName: 'src__Dfn' -})(['font-style: italic;']); + const Audio = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].audio.withConfig({ + displayName: 'src__Audio' + })([ + 'display: inline-block;&:not([controls]) {display: none;height: 0;}' + ]); -const Mark = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].mark.withConfig({ - displayName: 'src__Mark' -})(['background-color: #ff0;color: #000;']); + const Video = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].video.withConfig({ + displayName: 'src__Video' + })(['display: inline-block;']); -const Small = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].small.withConfig({ - displayName: 'src__Small' -})(['font-size: 80%;']); + const Img = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].img.withConfig({ + displayName: 'src__Img' + })(['border-style: none;']); -const Sub = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].sub.withConfig({ - displayName: 'src__Sub' -})(['font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;bottom: -0.25em;']); + const Svg = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].svg.withConfig({ + displayName: 'src__Svg' + })(['&:not(:root) {overflow: hidden;}']); -const Sup = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].sup.withConfig({ - displayName: 'src__Sup' -})(['font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;top: -0.5em;']); + const Button = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].button.withConfig({ + displayName: 'src__Button' + })( + [ + 'font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;overflow: visible;text-transform: none;appearance: button;&::-moz-focus-inner,&[type="button"]::-moz-focus-inner,&[type="reset"]::-moz-focus-inner,&[type="submit"]::-moz-focus-inner {border-style: none;padding: 0;}&:-moz-focusring,&[type="button"]:-moz-focusring,&[type="reset"]:-moz-focusring,&[type="submit"]:-moz-focusring {outline: ', + ' dotted ButtonText;}' + ], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1) + ); -const Audio = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].audio.withConfig({ - displayName: 'src__Audio' -})(['display: inline-block;&:not([controls]) {display: none;height: 0;}']); + const Input = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].input.withConfig({ + displayName: 'src__Input' + })( + [ + 'font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;overflow: visible;&[type="checkbox"],&[type="radio"] {box-sizing: border-box;padding: 0;}&[type="number"]::-webkit-inner-spin-button,&[type="number"]::-webkit-outer-spin-button {height: auto;}&[type="search"] {appearance: textfield;outline-offset: ', + ';}&[type="search"]::-webkit-search-cancel-button,&[type="search"]::-webkit-search-decoration {appearance: none;}&::-webkit-file-upload-button {appearance: button;font: inherit;}' + ], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(-2) + ); -const Video = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].video.withConfig({ - displayName: 'src__Video' -})(['display: inline-block;']); + const Optgroup = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].optgroup.withConfig({ + displayName: 'src__Optgroup' + })([ + 'font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;' + ]); -const Img = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].img.withConfig({ - displayName: 'src__Img' -})(['border-style: none;']); + const Select = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].select.withConfig({ + displayName: 'src__Select' + })([ + 'font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;text-transform: none;' + ]); -const Svg = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].svg.withConfig({ - displayName: 'src__Svg' -})(['&:not(:root) {overflow: hidden;}']); + const Textarea = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].textarea.withConfig({ + displayName: 'src__Textarea' + })([ + 'font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;overflow: auto;' + ]); -const Button = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].button.withConfig({ - displayName: 'src__Button' -})(['font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;overflow: visible;text-transform: none;appearance: button;&::-moz-focus-inner,&[type="button"]::-moz-focus-inner,&[type="reset"]::-moz-focus-inner,&[type="submit"]::-moz-focus-inner {border-style: none;padding: 0;}&:-moz-focusring,&[type="button"]:-moz-focusring,&[type="reset"]:-moz-focusring,&[type="submit"]:-moz-focusring {outline: ', ' dotted ButtonText;}'], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1)); + const Fieldset = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].fieldset.withConfig({ + displayName: 'src__Fieldset' + })(['padding: 0.35em 0.75em 0.625em;']); -const Input = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].input.withConfig({ - displayName: 'src__Input' -})(['font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;overflow: visible;&[type="checkbox"],&[type="radio"] {box-sizing: border-box;padding: 0;}&[type="number"]::-webkit-inner-spin-button,&[type="number"]::-webkit-outer-spin-button {height: auto;}&[type="search"] {appearance: textfield;outline-offset: ', ';}&[type="search"]::-webkit-search-cancel-button,&[type="search"]::-webkit-search-decoration {appearance: none;}&::-webkit-file-upload-button {appearance: button;font: inherit;}'], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(-2)); + const Legend = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].legend.withConfig({ + displayName: 'src__Legend' + })([ + 'box-sizing: border-box;color: inherit;display: table;max-width: 100%;padding: 0;white-space: normal;' + ]); -const Optgroup = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].optgroup.withConfig({ - displayName: 'src__Optgroup' -})(['font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;']); + const Progress = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].progress.withConfig({ + displayName: 'src__Progress' + })(['display: inline-block;vertical-align: baseline;']); -const Select = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].select.withConfig({ - displayName: 'src__Select' -})(['font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;text-transform: none;']); + const Details = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].details.withConfig({ + displayName: 'src__Details' + })(['display: block;']); -const Textarea = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].textarea.withConfig({ - displayName: 'src__Textarea' -})(['font-family: sans-serif;font-size: 100%;line-height: 1.15;margin: 0;overflow: auto;']); + const Menu = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].menu.withConfig({ + displayName: 'src__Menu' + })(['display: block;']); -const Fieldset = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].fieldset.withConfig({ - displayName: 'src__Fieldset' -})(['padding: 0.35em 0.75em 0.625em;']); + const Summary = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].summary.withConfig({ + displayName: 'src__Summary' + })(['display: list-item;']); -const Legend = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].legend.withConfig({ - displayName: 'src__Legend' -})(['box-sizing: border-box;color: inherit;display: table;max-width: 100%;padding: 0;white-space: normal;']); + const Canvas = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].canvas.withConfig({ + displayName: 'src__Canvas' + })(['display: inline-block;']); -const Progress = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].progress.withConfig({ - displayName: 'src__Progress' -})(['display: inline-block;vertical-align: baseline;']); + /***/ + }, + /* 27 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__( + 233 + ); -const Details = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].details.withConfig({ - displayName: 'src__Details' -})(['display: block;']); + /** Detect free variable `self`. */ + var freeSelf = + typeof self == 'object' && self && self.Object === Object && self; -const Menu = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].menu.withConfig({ - displayName: 'src__Menu' -})(['display: block;']); + /** Used as a reference to the global object. */ + var root = + __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__['a' /* default */] || + freeSelf || + Function('return this')(); -const Summary = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].summary.withConfig({ - displayName: 'src__Summary' -})(['display: list-item;']); + /* harmony default export */ __webpack_exports__['a'] = root; -const Canvas = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].canvas.withConfig({ - displayName: 'src__Canvas' -})(['display: inline-block;']); - - - - -/***/ }), -/* 27 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(233); - - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')(); - -/* harmony default export */ __webpack_exports__["a"] = (root); - - -/***/ }), -/* 28 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 28 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** * Checks if `value` is classified as an `Array` object. * * @static @@ -4399,16 +5703,15 @@ var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || fr * _.isArray(_.noop); * // => false */ -var isArray = Array.isArray; + var isArray = Array.isArray; -/* harmony default export */ __webpack_exports__["a"] = (isArray); + /* harmony default export */ __webpack_exports__['a'] = isArray; - -/***/ }), -/* 29 */ -/***/ (function(module, exports) { - -/** + /***/ + }, + /* 29 */ + /***/ function(module, exports) { + /** * Checks if `value` is classified as an `Array` object. * * @static @@ -4431,16 +5734,15 @@ var isArray = Array.isArray; * _.isArray(_.noop); * // => false */ -var isArray = Array.isArray; + var isArray = Array.isArray; -module.exports = isArray; + module.exports = isArray; - -/***/ }), -/* 30 */ -/***/ (function(module, exports) { - -/** + /***/ + }, + /* 30 */ + /***/ function(module, exports) { + /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) @@ -4465,20 +5767,19 @@ module.exports = isArray; * _.isObject(null); * // => false */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } -module.exports = isObject; + module.exports = isObject; - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 31 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -4488,253 +5789,319 @@ module.exports = isObject; * */ + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + var CallbackQueue = __webpack_require__(270); + var PooledClass = __webpack_require__(46); + var ReactFeatureFlags = __webpack_require__(275); + var ReactReconciler = __webpack_require__(58); + var Transaction = __webpack_require__(106); -var _prodInvariant = __webpack_require__(7), - _assign = __webpack_require__(9); + var invariant = __webpack_require__(2); -var CallbackQueue = __webpack_require__(270); -var PooledClass = __webpack_require__(46); -var ReactFeatureFlags = __webpack_require__(275); -var ReactReconciler = __webpack_require__(58); -var Transaction = __webpack_require__(106); + var dirtyComponents = []; + var updateBatchNumber = 0; + var asapCallbackQueue = CallbackQueue.getPooled(); + var asapEnqueued = false; -var invariant = __webpack_require__(2); + var batchingStrategy = null; -var dirtyComponents = []; -var updateBatchNumber = 0; -var asapCallbackQueue = CallbackQueue.getPooled(); -var asapEnqueued = false; + function ensureInjected() { + !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) + ? false + ? invariant( + false, + 'ReactUpdates: must inject a reconcile transaction class and batching strategy' + ) + : _prodInvariant('123') + : void 0; + } -var batchingStrategy = null; + var NESTED_UPDATES = { + initialize: function() { + this.dirtyComponentsLength = dirtyComponents.length; + }, + close: function() { + if (this.dirtyComponentsLength !== dirtyComponents.length) { + // Additional updates were enqueued by componentDidUpdate handlers or + // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run + // these new updates so that if A's componentDidUpdate calls setState on + // B, B will update before the callback A's updater provided when calling + // setState. + dirtyComponents.splice(0, this.dirtyComponentsLength); + flushBatchedUpdates(); + } else { + dirtyComponents.length = 0; + } + } + }; -function ensureInjected() { - !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? false ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0; -} + var UPDATE_QUEUEING = { + initialize: function() { + this.callbackQueue.reset(); + }, + close: function() { + this.callbackQueue.notifyAll(); + } + }; -var NESTED_UPDATES = { - initialize: function () { - this.dirtyComponentsLength = dirtyComponents.length; - }, - close: function () { - if (this.dirtyComponentsLength !== dirtyComponents.length) { - // Additional updates were enqueued by componentDidUpdate handlers or - // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run - // these new updates so that if A's componentDidUpdate calls setState on - // B, B will update before the callback A's updater provided when calling - // setState. - dirtyComponents.splice(0, this.dirtyComponentsLength); - flushBatchedUpdates(); - } else { - dirtyComponents.length = 0; - } - } -}; + var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; -var UPDATE_QUEUEING = { - initialize: function () { - this.callbackQueue.reset(); - }, - close: function () { - this.callbackQueue.notifyAll(); - } -}; + function ReactUpdatesFlushTransaction() { + this.reinitializeTransaction(); + this.dirtyComponentsLength = null; + this.callbackQueue = CallbackQueue.getPooled(); + this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */ true + ); + } -var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; + _assign(ReactUpdatesFlushTransaction.prototype, Transaction, { + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, -function ReactUpdatesFlushTransaction() { - this.reinitializeTransaction(); - this.dirtyComponentsLength = null; - this.callbackQueue = CallbackQueue.getPooled(); - this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( - /* useCreateElement */true); -} + destructor: function() { + this.dirtyComponentsLength = null; + CallbackQueue.release(this.callbackQueue); + this.callbackQueue = null; + ReactUpdates.ReactReconcileTransaction.release( + this.reconcileTransaction + ); + this.reconcileTransaction = null; + }, -_assign(ReactUpdatesFlushTransaction.prototype, Transaction, { - getTransactionWrappers: function () { - return TRANSACTION_WRAPPERS; - }, + perform: function(method, scope, a) { + // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` + // with this transaction's wrappers around it. + return Transaction.perform.call( + this, + this.reconcileTransaction.perform, + this.reconcileTransaction, + method, + scope, + a + ); + } + }); - destructor: function () { - this.dirtyComponentsLength = null; - CallbackQueue.release(this.callbackQueue); - this.callbackQueue = null; - ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); - this.reconcileTransaction = null; - }, + PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); - perform: function (method, scope, a) { - // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` - // with this transaction's wrappers around it. - return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); - } -}); + function batchedUpdates(callback, a, b, c, d, e) { + ensureInjected(); + return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); + } -PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); - -function batchedUpdates(callback, a, b, c, d, e) { - ensureInjected(); - return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); -} - -/** + /** * Array comparator for ReactComponents by mount ordering. * * @param {ReactComponent} c1 first component you're comparing * @param {ReactComponent} c2 second component you're comparing * @return {number} Return value usable by Array.prototype.sort(). */ -function mountOrderComparator(c1, c2) { - return c1._mountOrder - c2._mountOrder; -} - -function runBatchedUpdates(transaction) { - var len = transaction.dirtyComponentsLength; - !(len === dirtyComponents.length) ? false ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0; - - // Since reconciling a component higher in the owner hierarchy usually (not - // always -- see shouldComponentUpdate()) will reconcile children, reconcile - // them before their children by sorting the array. - dirtyComponents.sort(mountOrderComparator); - - // Any updates enqueued while reconciling must be performed after this entire - // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and - // C, B could update twice in a single batch if C's render enqueues an update - // to B (since B would have already updated, we should skip it, and the only - // way we can know to do so is by checking the batch counter). - updateBatchNumber++; - - for (var i = 0; i < len; i++) { - // If a component is unmounted before pending changes apply, it will still - // be here, but we assume that it has cleared its _pendingCallbacks and - // that performUpdateIfNecessary is a noop. - var component = dirtyComponents[i]; - - // If performUpdateIfNecessary happens to enqueue any new updates, we - // shouldn't execute the callbacks until the next render happens, so - // stash the callbacks first - var callbacks = component._pendingCallbacks; - component._pendingCallbacks = null; - - var markerName; - if (ReactFeatureFlags.logTopLevelRenders) { - var namedComponent = component; - // Duck type TopLevelWrapper. This is probably always true. - if (component._currentElement.type.isReactTopLevelWrapper) { - namedComponent = component._renderedComponent; + function mountOrderComparator(c1, c2) { + return c1._mountOrder - c2._mountOrder; } - markerName = 'React update: ' + namedComponent.getName(); - console.time(markerName); - } - ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber); + function runBatchedUpdates(transaction) { + var len = transaction.dirtyComponentsLength; + !(len === dirtyComponents.length) + ? false + ? invariant( + false, + "Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).", + len, + dirtyComponents.length + ) + : _prodInvariant('124', len, dirtyComponents.length) + : void 0; - if (markerName) { - console.timeEnd(markerName); - } + // Since reconciling a component higher in the owner hierarchy usually (not + // always -- see shouldComponentUpdate()) will reconcile children, reconcile + // them before their children by sorting the array. + dirtyComponents.sort(mountOrderComparator); - if (callbacks) { - for (var j = 0; j < callbacks.length; j++) { - transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); + // Any updates enqueued while reconciling must be performed after this entire + // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and + // C, B could update twice in a single batch if C's render enqueues an update + // to B (since B would have already updated, we should skip it, and the only + // way we can know to do so is by checking the batch counter). + updateBatchNumber++; + + for (var i = 0; i < len; i++) { + // If a component is unmounted before pending changes apply, it will still + // be here, but we assume that it has cleared its _pendingCallbacks and + // that performUpdateIfNecessary is a noop. + var component = dirtyComponents[i]; + + // If performUpdateIfNecessary happens to enqueue any new updates, we + // shouldn't execute the callbacks until the next render happens, so + // stash the callbacks first + var callbacks = component._pendingCallbacks; + component._pendingCallbacks = null; + + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var namedComponent = component; + // Duck type TopLevelWrapper. This is probably always true. + if (component._currentElement.type.isReactTopLevelWrapper) { + namedComponent = component._renderedComponent; + } + markerName = 'React update: ' + namedComponent.getName(); + console.time(markerName); + } + + ReactReconciler.performUpdateIfNecessary( + component, + transaction.reconcileTransaction, + updateBatchNumber + ); + + if (markerName) { + console.timeEnd(markerName); + } + + if (callbacks) { + for (var j = 0; j < callbacks.length; j++) { + transaction.callbackQueue.enqueue( + callbacks[j], + component.getPublicInstance() + ); + } + } + } } - } - } -} -var flushBatchedUpdates = function () { - // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents - // array and perform any updates enqueued by mount-ready handlers (i.e., - // componentDidUpdate) but we need to check here too in order to catch - // updates enqueued by setState callbacks and asap calls. - while (dirtyComponents.length || asapEnqueued) { - if (dirtyComponents.length) { - var transaction = ReactUpdatesFlushTransaction.getPooled(); - transaction.perform(runBatchedUpdates, null, transaction); - ReactUpdatesFlushTransaction.release(transaction); - } + var flushBatchedUpdates = function() { + // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents + // array and perform any updates enqueued by mount-ready handlers (i.e., + // componentDidUpdate) but we need to check here too in order to catch + // updates enqueued by setState callbacks and asap calls. + while (dirtyComponents.length || asapEnqueued) { + if (dirtyComponents.length) { + var transaction = ReactUpdatesFlushTransaction.getPooled(); + transaction.perform(runBatchedUpdates, null, transaction); + ReactUpdatesFlushTransaction.release(transaction); + } - if (asapEnqueued) { - asapEnqueued = false; - var queue = asapCallbackQueue; - asapCallbackQueue = CallbackQueue.getPooled(); - queue.notifyAll(); - CallbackQueue.release(queue); - } - } -}; + if (asapEnqueued) { + asapEnqueued = false; + var queue = asapCallbackQueue; + asapCallbackQueue = CallbackQueue.getPooled(); + queue.notifyAll(); + CallbackQueue.release(queue); + } + } + }; -/** + /** * Mark a component as needing a rerender, adding an optional callback to a * list of functions which will be executed once the rerender occurs. */ -function enqueueUpdate(component) { - ensureInjected(); + function enqueueUpdate(component) { + ensureInjected(); - // Various parts of our code (such as ReactCompositeComponent's - // _renderValidatedComponent) assume that calls to render aren't nested; - // verify that that's the case. (This is called by each top-level update - // function, like setState, forceUpdate, etc.; creation and - // destruction of top-level components is guarded in ReactMount.) + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (This is called by each top-level update + // function, like setState, forceUpdate, etc.; creation and + // destruction of top-level components is guarded in ReactMount.) - if (!batchingStrategy.isBatchingUpdates) { - batchingStrategy.batchedUpdates(enqueueUpdate, component); - return; - } + if (!batchingStrategy.isBatchingUpdates) { + batchingStrategy.batchedUpdates(enqueueUpdate, component); + return; + } - dirtyComponents.push(component); - if (component._updateBatchNumber == null) { - component._updateBatchNumber = updateBatchNumber + 1; - } -} + dirtyComponents.push(component); + if (component._updateBatchNumber == null) { + component._updateBatchNumber = updateBatchNumber + 1; + } + } -/** + /** * Enqueue a callback to be run at the end of the current batching cycle. Throws * if no updates are currently being performed. */ -function asap(callback, context) { - !batchingStrategy.isBatchingUpdates ? false ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0; - asapCallbackQueue.enqueue(callback, context); - asapEnqueued = true; -} + function asap(callback, context) { + !batchingStrategy.isBatchingUpdates + ? false + ? invariant( + false, + "ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched." + ) + : _prodInvariant('125') + : void 0; + asapCallbackQueue.enqueue(callback, context); + asapEnqueued = true; + } -var ReactUpdatesInjection = { - injectReconcileTransaction: function (ReconcileTransaction) { - !ReconcileTransaction ? false ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0; - ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; - }, + var ReactUpdatesInjection = { + injectReconcileTransaction: function(ReconcileTransaction) { + !ReconcileTransaction + ? false + ? invariant( + false, + 'ReactUpdates: must provide a reconcile transaction class' + ) + : _prodInvariant('126') + : void 0; + ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; + }, - injectBatchingStrategy: function (_batchingStrategy) { - !_batchingStrategy ? false ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0; - !(typeof _batchingStrategy.batchedUpdates === 'function') ? false ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0; - !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? false ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0; - batchingStrategy = _batchingStrategy; - } -}; + injectBatchingStrategy: function(_batchingStrategy) { + !_batchingStrategy + ? false + ? invariant( + false, + 'ReactUpdates: must provide a batching strategy' + ) + : _prodInvariant('127') + : void 0; + !(typeof _batchingStrategy.batchedUpdates === 'function') + ? false + ? invariant( + false, + 'ReactUpdates: must provide a batchedUpdates() function' + ) + : _prodInvariant('128') + : void 0; + !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') + ? false + ? invariant( + false, + 'ReactUpdates: must provide an isBatchingUpdates boolean attribute' + ) + : _prodInvariant('129') + : void 0; + batchingStrategy = _batchingStrategy; + } + }; -var ReactUpdates = { - /** + var ReactUpdates = { + /** * React references `ReactReconcileTransaction` using this property in order * to allow dependency injection. * * @internal */ - ReactReconcileTransaction: null, + ReactReconcileTransaction: null, - batchedUpdates: batchedUpdates, - enqueueUpdate: enqueueUpdate, - flushBatchedUpdates: flushBatchedUpdates, - injection: ReactUpdatesInjection, - asap: asap -}; + batchedUpdates: batchedUpdates, + enqueueUpdate: enqueueUpdate, + flushBatchedUpdates: flushBatchedUpdates, + injection: ReactUpdatesInjection, + asap: asap + }; -module.exports = ReactUpdates; + module.exports = ReactUpdates; -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 32 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -4744,40 +6111,46 @@ module.exports = ReactUpdates; * */ + var _assign = __webpack_require__(9); + var PooledClass = __webpack_require__(46); -var _assign = __webpack_require__(9); + var emptyFunction = __webpack_require__(17); + var warning = __webpack_require__(5); -var PooledClass = __webpack_require__(46); + var didWarnForAddedNewProperty = false; + var isProxySupported = typeof Proxy === 'function'; -var emptyFunction = __webpack_require__(17); -var warning = __webpack_require__(5); + var shouldBeReleasedProperties = [ + 'dispatchConfig', + '_targetInst', + 'nativeEvent', + 'isDefaultPrevented', + 'isPropagationStopped', + '_dispatchListeners', + '_dispatchInstances' + ]; -var didWarnForAddedNewProperty = false; -var isProxySupported = typeof Proxy === 'function'; - -var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances']; - -/** + /** * @interface Event * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ -var EventInterface = { - type: null, - target: null, - // currentTarget is set when dispatching; no use in copying it here - currentTarget: emptyFunction.thatReturnsNull, - eventPhase: null, - bubbles: null, - cancelable: null, - timeStamp: function (event) { - return event.timeStamp || Date.now(); - }, - defaultPrevented: null, - isTrusted: null -}; + var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function(event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null + }; -/** + /** * Synthetic events are dispatched by event plugins, typically in response to a * top-level event delegation handler. * @@ -4795,219 +6168,278 @@ var EventInterface = { * @param {object} nativeEvent Native browser event. * @param {DOMEventTarget} nativeEventTarget Target node. */ -function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { - if (false) { - // these have a getter/setter for warnings - delete this.nativeEvent; - delete this.preventDefault; - delete this.stopPropagation; - } + function SyntheticEvent( + dispatchConfig, + targetInst, + nativeEvent, + nativeEventTarget + ) { + if (false) { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + } - this.dispatchConfig = dispatchConfig; - this._targetInst = targetInst; - this.nativeEvent = nativeEvent; + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; - var Interface = this.constructor.Interface; - for (var propName in Interface) { - if (!Interface.hasOwnProperty(propName)) { - continue; - } - if (false) { - delete this[propName]; // this has a getter/setter for warnings - } - var normalize = Interface[propName]; - if (normalize) { - this[propName] = normalize(nativeEvent); - } else { - if (propName === 'target') { - this.target = nativeEventTarget; - } else { - this[propName] = nativeEvent[propName]; + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + if (false) { + delete this[propName]; // this has a getter/setter for warnings + } + var normalize = Interface[propName]; + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = nativeEvent.defaultPrevented != null + ? nativeEvent.defaultPrevented + : nativeEvent.returnValue === false; + if (defaultPrevented) { + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + } else { + this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + } + this.isPropagationStopped = emptyFunction.thatReturnsFalse; + return this; } - } - } - var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; - if (defaultPrevented) { - this.isDefaultPrevented = emptyFunction.thatReturnsTrue; - } else { - this.isDefaultPrevented = emptyFunction.thatReturnsFalse; - } - this.isPropagationStopped = emptyFunction.thatReturnsFalse; - return this; -} + _assign(SyntheticEvent.prototype, { + preventDefault: function() { + this.defaultPrevented = true; + var event = this.nativeEvent; + if (!event) { + return; + } -_assign(SyntheticEvent.prototype, { + if (event.preventDefault) { + event.preventDefault(); + } else if (typeof event.returnValue !== 'unknown') { + // eslint-disable-line valid-typeof + event.returnValue = false; + } + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + }, - preventDefault: function () { - this.defaultPrevented = true; - var event = this.nativeEvent; - if (!event) { - return; - } + stopPropagation: function() { + var event = this.nativeEvent; + if (!event) { + return; + } - if (event.preventDefault) { - event.preventDefault(); - } else if (typeof event.returnValue !== 'unknown') { - // eslint-disable-line valid-typeof - event.returnValue = false; - } - this.isDefaultPrevented = emptyFunction.thatReturnsTrue; - }, + if (event.stopPropagation) { + event.stopPropagation(); + } else if (typeof event.cancelBubble !== 'unknown') { + // eslint-disable-line valid-typeof + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } - stopPropagation: function () { - var event = this.nativeEvent; - if (!event) { - return; - } + this.isPropagationStopped = emptyFunction.thatReturnsTrue; + }, - if (event.stopPropagation) { - event.stopPropagation(); - } else if (typeof event.cancelBubble !== 'unknown') { - // eslint-disable-line valid-typeof - // The ChangeEventPlugin registers a "propertychange" event for - // IE. This event does not support bubbling or cancelling, and - // any references to cancelBubble throw "Member not found". A - // typeof check of "unknown" circumvents this issue (and is also - // IE specific). - event.cancelBubble = true; - } - - this.isPropagationStopped = emptyFunction.thatReturnsTrue; - }, - - /** + /** * We release all dispatched `SyntheticEvent`s after each event loop, adding * them back into the pool. This allows a way to hold onto a reference that * won't be added back into the pool. */ - persist: function () { - this.isPersistent = emptyFunction.thatReturnsTrue; - }, + persist: function() { + this.isPersistent = emptyFunction.thatReturnsTrue; + }, - /** + /** * Checks if this event should be released back into the pool. * * @return {boolean} True if this should not be released, false otherwise. */ - isPersistent: emptyFunction.thatReturnsFalse, + isPersistent: emptyFunction.thatReturnsFalse, - /** + /** * `PooledClass` looks for `destructor` on each instance it releases. */ - destructor: function () { - var Interface = this.constructor.Interface; - for (var propName in Interface) { - if (false) { - Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName])); - } else { - this[propName] = null; - } - } - for (var i = 0; i < shouldBeReleasedProperties.length; i++) { - this[shouldBeReleasedProperties[i]] = null; - } - if (false) { - Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); - Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); - Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); - } - } - -}); - -SyntheticEvent.Interface = EventInterface; - -if (false) { - if (isProxySupported) { - /*eslint-disable no-func-assign */ - SyntheticEvent = new Proxy(SyntheticEvent, { - construct: function (target, args) { - return this.apply(target, Object.create(target.prototype), args); - }, - apply: function (constructor, that, args) { - return new Proxy(constructor.apply(that, args), { - set: function (target, prop, value) { - if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) { - process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0; - didWarnForAddedNewProperty = true; + destructor: function() { + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (false) { + Object.defineProperty( + this, + propName, + getPooledWarningPropertyDefinition( + propName, + Interface[propName] + ) + ); + } else { + this[propName] = null; } - target[prop] = value; - return true; } - }); + for (var i = 0; i < shouldBeReleasedProperties.length; i++) { + this[shouldBeReleasedProperties[i]] = null; + } + if (false) { + Object.defineProperty( + this, + 'nativeEvent', + getPooledWarningPropertyDefinition('nativeEvent', null) + ); + Object.defineProperty( + this, + 'preventDefault', + getPooledWarningPropertyDefinition( + 'preventDefault', + emptyFunction + ) + ); + Object.defineProperty( + this, + 'stopPropagation', + getPooledWarningPropertyDefinition( + 'stopPropagation', + emptyFunction + ) + ); + } + } + }); + + SyntheticEvent.Interface = EventInterface; + + if (false) { + if (isProxySupported) { + /*eslint-disable no-func-assign */ + SyntheticEvent = new Proxy(SyntheticEvent, { + construct: function(target, args) { + return this.apply(target, Object.create(target.prototype), args); + }, + apply: function(constructor, that, args) { + return new Proxy(constructor.apply(that, args), { + set: function(target, prop, value) { + if ( + prop !== 'isPersistent' && + !target.constructor.Interface.hasOwnProperty(prop) && + shouldBeReleasedProperties.indexOf(prop) === -1 + ) { + process.env.NODE_ENV !== 'production' + ? warning( + didWarnForAddedNewProperty || target.isPersistent(), + "This synthetic event is reused for performance reasons. If you're " + + "seeing this, you're adding a new property in the synthetic event object. " + + 'The property is never released. See ' + + 'https://fb.me/react-event-pooling for more information.' + ) + : void 0; + didWarnForAddedNewProperty = true; + } + target[prop] = value; + return true; + } + }); + } + }); + /*eslint-enable no-func-assign */ + } } - }); - /*eslint-enable no-func-assign */ - } -} -/** + /** * Helper to reduce boilerplate when creating subclasses. * * @param {function} Class * @param {?object} Interface */ -SyntheticEvent.augmentClass = function (Class, Interface) { - var Super = this; + SyntheticEvent.augmentClass = function(Class, Interface) { + var Super = this; - var E = function () {}; - E.prototype = Super.prototype; - var prototype = new E(); + var E = function() {}; + E.prototype = Super.prototype; + var prototype = new E(); - _assign(prototype, Class.prototype); - Class.prototype = prototype; - Class.prototype.constructor = Class; + _assign(prototype, Class.prototype); + Class.prototype = prototype; + Class.prototype.constructor = Class; - Class.Interface = _assign({}, Super.Interface, Interface); - Class.augmentClass = Super.augmentClass; + Class.Interface = _assign({}, Super.Interface, Interface); + Class.augmentClass = Super.augmentClass; - PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); -}; + PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); + }; -PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); + PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); -module.exports = SyntheticEvent; + module.exports = SyntheticEvent; -/** + /** * Helper to nullify syntheticEvent instance properties when destructing * * @param {object} SyntheticEvent * @param {String} propName * @return {object} defineProperty object */ -function getPooledWarningPropertyDefinition(propName, getVal) { - var isFunction = typeof getVal === 'function'; - return { - configurable: true, - set: set, - get: get - }; + function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get + }; - function set(val) { - var action = isFunction ? 'setting the method' : 'setting the property'; - warn(action, 'This is effectively a no-op'); - return val; - } + function set(val) { + var action = isFunction + ? 'setting the method' + : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } - function get() { - var action = isFunction ? 'accessing the method' : 'accessing the property'; - var result = isFunction ? 'This is a no-op function' : 'This is set to null'; - warn(action, result); - return getVal; - } + function get() { + var action = isFunction + ? 'accessing the method' + : 'accessing the property'; + var result = isFunction + ? 'This is a no-op function' + : 'This is set to null'; + warn(action, result); + return getVal; + } - function warn(action, result) { - var warningCondition = false; - false ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; - } -} + function warn(action, result) { + var warningCondition = false; + false + ? warning( + warningCondition, + "This synthetic event is reused for performance reasons. If you're seeing this, " + + "you're %s `%s` on a released/nullified synthetic event. %s. " + + 'If you must keep the original synthetic event around, use event.persist(). ' + + 'See https://fb.me/react-event-pooling for more information.', + action, + propName, + result + ) + : void 0; + } + } -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 33 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -5018,32 +6450,28 @@ function getPooledWarningPropertyDefinition(propName, getVal) { * */ - - -/** + /** * Keeps track of the current owner. * * The current owner is the component who should own any components that are * currently being constructed. */ -var ReactCurrentOwner = { - - /** + var ReactCurrentOwner = { + /** * @internal * @type {ReactComponent} */ - current: null + current: null + }; -}; + module.exports = ReactCurrentOwner; -module.exports = ReactCurrentOwner; - -/***/ }), -/* 34 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 34 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) @@ -5068,19 +6496,18 @@ module.exports = ReactCurrentOwner; * _.isObject(null); * // => false */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } -/* harmony default export */ __webpack_exports__["a"] = (isObject); + /* harmony default export */ __webpack_exports__['a'] = isObject; - -/***/ }), -/* 35 */ -/***/ (function(module, exports) { - -/** + /***/ + }, + /* 35 */ + /***/ function(module, exports) { + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * @@ -5104,96 +6531,97 @@ function isObject(value) { * _.isObjectLike(null); * // => false */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } -module.exports = isObjectLike; + module.exports = isObjectLike; + /***/ + }, + /* 36 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + Object.defineProperty(exports, '__esModule', { + value: true + }); -/***/ }), -/* 36 */ -/***/ (function(module, exports, __webpack_require__) { + var _Markdown = __webpack_require__(824); -"use strict"; + Object.defineProperty(exports, 'default', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Markdown).default; + } + }); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _Markdown = __webpack_require__(824); - -Object.defineProperty(exports, 'default', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_Markdown).default; - } -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + /***/ + }, + /* 37 */ + /***/ function(module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_ARRAY__, + __WEBPACK_AMD_DEFINE_RESULT__; /*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -/* global define */ + /* global define */ -(function () { - 'use strict'; + (function() { + 'use strict'; + var hasOwn = {}.hasOwnProperty; - var hasOwn = {}.hasOwnProperty; + function classNames() { + var classes = []; - function classNames () { - var classes = []; + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (!arg) continue; - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; + var argType = typeof arg; - var argType = typeof arg; + if (argType === 'string' || argType === 'number') { + classes.push(arg); + } else if (Array.isArray(arg)) { + classes.push(classNames.apply(null, arg)); + } else if (argType === 'object') { + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes.push(key); + } + } + } + } - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg)) { - classes.push(classNames.apply(null, arg)); - } else if (argType === 'object') { - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } - } + return classes.join(' '); + } - return classes.join(' '); - } + if (typeof module !== 'undefined' && module.exports) { + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !((__WEBPACK_AMD_DEFINE_ARRAY__ = []), (__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return classNames; + }.apply( + exports, + __WEBPACK_AMD_DEFINE_ARRAY__ + )), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && + (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { + window.classNames = classNames; + } + })(); - if (typeof module !== 'undefined' && module.exports) { - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () { - return classNames; - }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else { - window.classNames = classNames; - } -}()); - - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 38 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * @@ -5203,69 +6631,84 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * */ + var emptyFunction = __webpack_require__(112); - -var emptyFunction = __webpack_require__(112); - -/** + /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ -var warning = emptyFunction; + var warning = emptyFunction; -if (false) { - (function () { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; + if (false) { + (function() { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, + args = Array(_len2 > 2 ? _len2 - 2 : 0), + _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); } - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; + module.exports = warning; - warning = function warning(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } - - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } - - printWarning.apply(undefined, [format].concat(args)); - } - }; - })(); -} - -module.exports = warning; - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 39 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * @@ -5275,149 +6718,172 @@ module.exports = warning; * */ + var emptyFunction = __webpack_require__(117); - -var emptyFunction = __webpack_require__(117); - -/** + /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ -var warning = emptyFunction; + var warning = emptyFunction; -if (false) { - (function () { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; + if (false) { + (function() { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, + args = Array(_len2 > 2 ? _len2 - 2 : 0), + _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); } - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; + module.exports = warning; - warning = function warning(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } + /***/ + }, + /* 40 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + var Lengths = { + paddingLeft: 18, + nodeWidth: 180 + }; - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } - - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; + var Sizes = { + buttonSize: { + width: 40, + height: 48 + }, + contentSize: { + width: Lengths.nodeWidth, + height: 101 // This is the height w/o info comp + }, + nodeSize: { + width: Lengths.nodeWidth, + height: 156 + }, + nodeSizeWithChildren: { + width: Lengths.nodeWidth, + height: 276 } + }; - printWarning.apply(undefined, [format].concat(args)); - } - }; - })(); -} + var Points = { + buttonPosition: { + x: Lengths.nodeWidth - Sizes.buttonSize.width, + y: 0 + }, + contentPosition: { + x: 0, + y: Sizes.buttonSize.height + }, + infoPosition: { + x: Lengths.paddingLeft, + y: 11 + }, + metricsPosition: { + x: Lengths.paddingLeft, + y: 41 + }, + subtitlePosition: { + x: Lengths.paddingLeft, + y: 23 + } + }; -module.exports = warning; + var Rects = { + // X, y, width, height + buttonRect: Object.assign({}, Sizes.buttonSize, Points.buttonPosition), + contentRect: Object.assign( + {}, + Sizes.contentSize, + Points.contentPosition + ), + // Top, bottom, left, right - from 'centre' + nodeRect: { + left: -Sizes.nodeSize.width / 2, + right: Sizes.nodeSize.width / 2, + top: -Sizes.nodeSize.height / 2, + bottom: Sizes.nodeSize.height / 2 + }, + nodeRectWithChildren: { + left: -Sizes.nodeSizeWithChildren.width / 2, + right: Sizes.nodeSizeWithChildren.width / 2, + top: -Sizes.nodeSizeWithChildren.height / 2 + + Sizes.contentSize.height / 3, + bottom: Sizes.nodeSizeWithChildren.height / 2 + + Sizes.contentSize.height / 3 + } + }; -/***/ }), -/* 40 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var Constants = Object.assign({}, Lengths, Sizes, Points, Rects); -"use strict"; -var Lengths = { - paddingLeft: 18, - nodeWidth: 180 -}; + /* harmony default export */ __webpack_exports__['a'] = Constants; -var Sizes = { - buttonSize: { - width: 40, - height: 48 - }, - contentSize: { - width: Lengths.nodeWidth, - height: 101 // This is the height w/o info comp - }, - nodeSize: { - width: Lengths.nodeWidth, - height: 156 - }, - nodeSizeWithChildren: { - width: Lengths.nodeWidth, - height: 276 - } -}; + /***/ + }, + /* 41 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__( + 512 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__( + 543 + ); -var Points = { - buttonPosition: { - x: Lengths.nodeWidth - Sizes.buttonSize.width, - y: 0 - }, - contentPosition: { - x: 0, - y: Sizes.buttonSize.height - }, - infoPosition: { - x: Lengths.paddingLeft, - y: 11 - }, - metricsPosition: { - x: Lengths.paddingLeft, - y: 41 - }, - subtitlePosition: { - x: Lengths.paddingLeft, - y: 23 - } -}; - -var Rects = { - // X, y, width, height - buttonRect: Object.assign({}, Sizes.buttonSize, Points.buttonPosition), - contentRect: Object.assign({}, Sizes.contentSize, Points.contentPosition), - // Top, bottom, left, right - from 'centre' - nodeRect: { - left: -Sizes.nodeSize.width / 2, - right: Sizes.nodeSize.width / 2, - top: -Sizes.nodeSize.height / 2, - bottom: Sizes.nodeSize.height / 2 - }, - nodeRectWithChildren: { - left: -Sizes.nodeSizeWithChildren.width / 2, - right: Sizes.nodeSizeWithChildren.width / 2, - top: -Sizes.nodeSizeWithChildren.height / 2 + Sizes.contentSize.height / 3, - bottom: Sizes.nodeSizeWithChildren.height / 2 + Sizes.contentSize.height / 3 - } -}; - -var Constants = Object.assign({}, Lengths, Sizes, Points, Rects); - -/* harmony default export */ __webpack_exports__["a"] = (Constants); - -/***/ }), -/* 41 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(512); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(543); - - - -/** + /** * Gets the native function at `key` of `object`. * * @private @@ -5425,20 +6891,25 @@ var Constants = Object.assign({}, Lengths, Sizes, Points, Rects); * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ -function getNative(object, key) { - var value = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */])(object, key); - return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */])(value) ? value : undefined; -} + function getNative(object, key) { + var value = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__getValue_js__['a' /* default */] + )(object, key); + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__['a' /* default */] + )(value) + ? value + : undefined; + } -/* harmony default export */ __webpack_exports__["a"] = (getNative); + /* harmony default export */ __webpack_exports__['a'] = getNative; - -/***/ }), -/* 42 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 42 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * @@ -5462,55 +6933,52 @@ function getNative(object, key) { * _.isObjectLike(null); * // => false */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } -/* harmony default export */ __webpack_exports__["a"] = (isObjectLike); + /* harmony default export */ __webpack_exports__['a'] = isObjectLike; + /***/ + }, + /* 43 */ + /***/ function(module, exports, __webpack_require__) { + var Symbol = __webpack_require__(97), + getRawTag = __webpack_require__(641), + objectToString = __webpack_require__(670); -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { + /** `Object#toString` result references. */ + var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; -var Symbol = __webpack_require__(97), - getRawTag = __webpack_require__(641), - objectToString = __webpack_require__(670); + /** Built-in value references. */ + var symToStringTag = Symbol ? Symbol.toStringTag : undefined; -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** + /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? getRawTag(value) + : objectToString(value); + } -module.exports = baseGetTag; + module.exports = baseGetTag; + /***/ + }, + /* 44 */ + /***/ function(module, exports, __webpack_require__) { + var baseIsNative = __webpack_require__(611), + getValue = __webpack_require__(644); -/***/ }), -/* 44 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseIsNative = __webpack_require__(611), - getValue = __webpack_require__(644); - -/** + /** * Gets the native function at `key` of `object`. * * @private @@ -5518,210 +6986,215 @@ var baseIsNative = __webpack_require__(611), * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } -module.exports = getNative; + module.exports = getNative; + /***/ + }, + /* 45 */ + /***/ function(module, exports) { + // shim for using process in browser + var process = (module.exports = {}); -/***/ }), -/* 45 */ -/***/ (function(module, exports) { + // cached from whatever global is present so that test runners that stub it + // don't break things. But we need to wrap it in a try catch in case it is + // wrapped in strict mode code which doesn't define any globals. It's inside a + // function because try/catches deoptimize in certain engines. -// shim for using process in browser -var process = module.exports = {}; + var cachedSetTimeout; + var cachedClearTimeout; -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); + } + (function() { try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } + })(); + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ( + (cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && + setTimeout + ) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); - } catch(e){ + } catch (e) { // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); + } + } + } + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ( + (cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && + clearTimeout + ) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); - } catch (e){ + } catch (e) { // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); + } } - } + } + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } + } + function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { + var len = queue.length; + while (len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { if (currentQueue) { - currentQueue[queueIndex].run(); + currentQueue[queueIndex].run(); } + } + queueIndex = -1; + len = queue.length; } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} + currentQueue = null; + draining = false; + runClearTimeout(timeout); + } -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { + process.nextTick = function(fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; + } } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } + }; -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; + // v8 likes predictible objects + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function() { + this.fun.apply(null, this.array); + }; + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; -function noop() {} + function noop() {} -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + process.prependListener = noop; + process.prependOnceListener = noop; -process.listeners = function (name) { return [] } + process.listeners = function(name) { + return []; + }; -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; + process.binding = function(name) { + throw new Error('process.binding is not supported'); + }; -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; + process.cwd = function() { + return '/'; + }; + process.chdir = function(dir) { + throw new Error('process.chdir is not supported'); + }; + process.umask = function() { + return 0; + }; - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 46 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -5732,76 +7205,81 @@ process.umask = function() { return 0; }; * */ + var _prodInvariant = __webpack_require__(7); + var invariant = __webpack_require__(2); -var _prodInvariant = __webpack_require__(7); - -var invariant = __webpack_require__(2); - -/** + /** * Static poolers. Several custom versions for each potential number of * arguments. A completely generic pooler is easy to implement, but would * require accessing the `arguments` object. In each of these, `this` refers to * the Class itself, not an instance. If any others are needed, simply add them * here, or in their own files. */ -var oneArgumentPooler = function (copyFieldsFrom) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, copyFieldsFrom); - return instance; - } else { - return new Klass(copyFieldsFrom); - } -}; + var oneArgumentPooler = function(copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } + }; -var twoArgumentPooler = function (a1, a2) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2); - return instance; - } else { - return new Klass(a1, a2); - } -}; + var twoArgumentPooler = function(a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } + }; -var threeArgumentPooler = function (a1, a2, a3) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3); - return instance; - } else { - return new Klass(a1, a2, a3); - } -}; + var threeArgumentPooler = function(a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } + }; -var fourArgumentPooler = function (a1, a2, a3, a4) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3, a4); - return instance; - } else { - return new Klass(a1, a2, a3, a4); - } -}; + var fourArgumentPooler = function(a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } + }; -var standardReleaser = function (instance) { - var Klass = this; - !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; - instance.destructor(); - if (Klass.instancePool.length < Klass.poolSize) { - Klass.instancePool.push(instance); - } -}; + var standardReleaser = function(instance) { + var Klass = this; + !(instance instanceof Klass) + ? false + ? invariant( + false, + 'Trying to release an instance into a pool of a different type.' + ) + : _prodInvariant('25') + : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } + }; -var DEFAULT_POOL_SIZE = 10; -var DEFAULT_POOLER = oneArgumentPooler; + var DEFAULT_POOL_SIZE = 10; + var DEFAULT_POOLER = oneArgumentPooler; -/** + /** * Augments `CopyConstructor` to be a poolable class, augmenting only the class * itself (statically) not adding any prototypical fields. Any CopyConstructor * you give this may have a `poolSize` property, and will look for a @@ -5810,35 +7288,35 @@ var DEFAULT_POOLER = oneArgumentPooler; * @param {Function} CopyConstructor Constructor that can be used to reset. * @param {Function} pooler Customizable pooler. */ -var addPoolingTo = function (CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared - var NewKlass = CopyConstructor; - NewKlass.instancePool = []; - NewKlass.getPooled = pooler || DEFAULT_POOLER; - if (!NewKlass.poolSize) { - NewKlass.poolSize = DEFAULT_POOL_SIZE; - } - NewKlass.release = standardReleaser; - return NewKlass; -}; + var addPoolingTo = function(CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; + }; -var PooledClass = { - addPoolingTo: addPoolingTo, - oneArgumentPooler: oneArgumentPooler, - twoArgumentPooler: twoArgumentPooler, - threeArgumentPooler: threeArgumentPooler, - fourArgumentPooler: fourArgumentPooler -}; + var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler + }; -module.exports = PooledClass; + module.exports = PooledClass; -/***/ }), -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 47 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -5848,9 +7326,7 @@ module.exports = PooledClass; * */ - - -/** + /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments @@ -5861,45 +7337,50 @@ module.exports = PooledClass; * will remain to ensure logic does not differ in production. */ -var validateFormat = function validateFormat(format) {}; + var validateFormat = function validateFormat(format) {}; -if (false) { - validateFormat = function validateFormat(format) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - }; -} + if (false) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } -function invariant(condition, format, a, b, c, d, e, f) { - validateFormat(format); + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); - if (!condition) { - var error; - if (format === undefined) { - error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error(format.replace(/%s/g, function () { - return args[argIndex++]; - })); - error.name = 'Invariant Violation'; - } + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { + return args[argIndex++]; + }) + ); + error.name = 'Invariant Violation'; + } - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -} + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } -module.exports = invariant; + module.exports = invariant; -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 48 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2014-present, Facebook, Inc. * All rights reserved. * @@ -5909,80 +7390,96 @@ module.exports = invariant; * */ + var _assign = __webpack_require__(79); + var ReactCurrentOwner = __webpack_require__(195); -var _assign = __webpack_require__(79); + var warning = __webpack_require__(38); + var canDefineProperty = __webpack_require__(197); + var hasOwnProperty = Object.prototype.hasOwnProperty; -var ReactCurrentOwner = __webpack_require__(195); + var REACT_ELEMENT_TYPE = __webpack_require__(196); -var warning = __webpack_require__(38); -var canDefineProperty = __webpack_require__(197); -var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; -var REACT_ELEMENT_TYPE = __webpack_require__(196); + var specialPropKeyWarningShown, specialPropRefWarningShown; -var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true -}; - -var specialPropKeyWarningShown, specialPropRefWarningShown; - -function hasValidRef(config) { - if (false) { - if (hasOwnProperty.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - if (getter && getter.isReactWarning) { - return false; + function hasValidRef(config) { + if (false) { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== undefined; } - } - } - return config.ref !== undefined; -} -function hasValidKey(config) { - if (false) { - if (hasOwnProperty.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - if (getter && getter.isReactWarning) { - return false; + function hasValidKey(config) { + if (false) { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== undefined; } - } - } - return config.key !== undefined; -} -function defineKeyPropWarningGetter(props, displayName) { - var warnAboutAccessingKey = function () { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - false ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); -} + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function() { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + false + ? warning( + false, + '%s: `key` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName + ) + : void 0; + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true + }); + } -function defineRefPropWarningGetter(props, displayName) { - var warnAboutAccessingRef = function () { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - false ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); -} + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function() { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + false + ? warning( + false, + '%s: `ref` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName + ) + : void 0; + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true + }); + } -/** + /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, no instanceof check * will work. Instead test $$typeof field against Symbol.for('react.element') to check @@ -6002,250 +7499,284 @@ function defineRefPropWarningGetter(props, displayName) { * @param {*} props * @internal */ -var ReactElement = function (type, key, ref, self, source, owner, props) { - var element = { - // This tag allow us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, + var ReactElement = function(type, key, ref, self, source, owner, props) { + var element = { + // This tag allow us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type: type, - key: key, - ref: ref, - props: props, + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, - // Record the component responsible for creating this element. - _owner: owner - }; + // Record the component responsible for creating this element. + _owner: owner + }; - if (false) { - // The validation flag is currently mutative. We put it on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - element._store = {}; + if (false) { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; - // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. - if (canDefineProperty) { - Object.defineProperty(element._store, 'validated', { - configurable: false, - enumerable: false, - writable: true, - value: false - }); - // self and source are DEV only properties. - Object.defineProperty(element, '_self', { - configurable: false, - enumerable: false, - writable: false, - value: self - }); - // Two elements created in two different places should be considered - // equal for testing purposes and therefore we hide it from enumeration. - Object.defineProperty(element, '_source', { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - } else { - element._store.validated = false; - element._self = self; - element._source = source; - } - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + if (canDefineProperty) { + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self + }); + // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + } else { + element._store.validated = false; + element._self = self; + element._source = source; + } + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } - return element; -}; + return element; + }; -/** + /** * Create and return a new ReactElement of the given type. * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement */ -ReactElement.createElement = function (type, config, children) { - var propName; + ReactElement.createElement = function(type, config, children) { + var propName; - // Reserved names are extracted - var props = {}; + // Reserved names are extracted + var props = {}; - var key = null; - var ref = null; - var self = null; - var source = null; + var key = null; + var ref = null; + var self = null; + var source = null; - if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - } - if (hasValidKey(config)) { - key = '' + config.key; - } + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + if (hasValidKey(config)) { + key = '' + config.key; + } - self = config.__self === undefined ? null : config.__self; - source = config.__source === undefined ? null : config.__source; - // Remaining properties are added to a new props object - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } - - // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - if (false) { - if (Object.freeze) { - Object.freeze(childArray); - } - } - props.children = childArray; - } - - // Resolve default props - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - for (propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - } - if (false) { - if (key || ref) { - if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; + // Remaining properties are added to a new props object + for (propName in config) { + if ( + hasOwnProperty.call(config, propName) && + !RESERVED_PROPS.hasOwnProperty(propName) + ) { + props[propName] = config[propName]; + } + } } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - } - } - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); -}; -/** + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + if (false) { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + if (false) { + if (key || ref) { + if ( + typeof props.$$typeof === 'undefined' || + props.$$typeof !== REACT_ELEMENT_TYPE + ) { + var displayName = typeof type === 'function' + ? type.displayName || type.name || 'Unknown' + : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + } + return ReactElement( + type, + key, + ref, + self, + source, + ReactCurrentOwner.current, + props + ); + }; + + /** * Return a function that produces ReactElements of a given type. * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory */ -ReactElement.createFactory = function (type) { - var factory = ReactElement.createElement.bind(null, type); - // Expose the type on the factory and the prototype so that it can be - // easily accessed on elements. E.g. `.type === Foo`. - // This should not be named `constructor` since this may not be the function - // that created the element, and it may not even be a constructor. - // Legacy hook TODO: Warn if this is accessed - factory.type = type; - return factory; -}; + ReactElement.createFactory = function(type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. `.type === Foo`. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; + }; -ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { - var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + ReactElement.cloneAndReplaceKey = function(oldElement, newKey) { + var newElement = ReactElement( + oldElement.type, + newKey, + oldElement.ref, + oldElement._self, + oldElement._source, + oldElement._owner, + oldElement.props + ); - return newElement; -}; + return newElement; + }; -/** + /** * Clone and return a new ReactElement using element as the starting point. * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement */ -ReactElement.cloneElement = function (element, config, children) { - var propName; + ReactElement.cloneElement = function(element, config, children) { + var propName; - // Original props are copied - var props = _assign({}, element.props); + // Original props are copied + var props = _assign({}, element.props); - // Reserved names are extracted - var key = element.key; - var ref = element.ref; - // Self is preserved since the owner is preserved. - var self = element._self; - // Source is preserved since cloneElement is unlikely to be targeted by a - // transpiler, and the original source is probably a better indicator of the - // true owner. - var source = element._source; + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + // Self is preserved since the owner is preserved. + var self = element._self; + // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + var source = element._source; - // Owner will be preserved, unless ref is overridden - var owner = element._owner; + // Owner will be preserved, unless ref is overridden + var owner = element._owner; - if (config != null) { - if (hasValidRef(config)) { - // Silently steal the ref from the parent. - ref = config.ref; - owner = ReactCurrentOwner.current; - } - if (hasValidKey(config)) { - key = '' + config.key; - } + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = '' + config.key; + } - // Remaining properties override existing props - var defaultProps; - if (element.type && element.type.defaultProps) { - defaultProps = element.type.defaultProps; - } - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - if (config[propName] === undefined && defaultProps !== undefined) { - // Resolve default props - props[propName] = defaultProps[propName]; - } else { - props[propName] = config[propName]; + // Remaining properties override existing props + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if ( + hasOwnProperty.call(config, propName) && + !RESERVED_PROPS.hasOwnProperty(propName) + ) { + if ( + config[propName] === undefined && + defaultProps !== undefined + ) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } } - } - } - } - // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - props.children = childArray; - } + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } - return ReactElement(element.type, key, ref, self, source, owner, props); -}; + return ReactElement(element.type, key, ref, self, source, owner, props); + }; -/** + /** * Verifies the object is a ReactElement. * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement * @param {?object} object * @return {boolean} True if `object` is a valid component. * @final */ -ReactElement.isValidElement = function (object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; -}; + ReactElement.isValidElement = function(object) { + return ( + typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE + ); + }; -module.exports = ReactElement; + module.exports = ReactElement; -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 49 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -6255,9 +7786,7 @@ module.exports = ReactElement; * */ - - -/** + /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments @@ -6268,45 +7797,50 @@ module.exports = ReactElement; * will remain to ensure logic does not differ in production. */ -var validateFormat = function validateFormat(format) {}; + var validateFormat = function validateFormat(format) {}; -if (false) { - validateFormat = function validateFormat(format) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - }; -} + if (false) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } -function invariant(condition, format, a, b, c, d, e, f) { - validateFormat(format); + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); - if (!condition) { - var error; - if (format === undefined) { - error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error(format.replace(/%s/g, function () { - return args[argIndex++]; - })); - error.name = 'Invariant Violation'; - } + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { + return args[argIndex++]; + }) + ); + error.name = 'Invariant Violation'; + } - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -} + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } -module.exports = invariant; + module.exports = invariant; -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 50 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2014-present, Facebook, Inc. * All rights reserved. * @@ -6316,80 +7850,96 @@ module.exports = invariant; * */ + var _assign = __webpack_require__(80); + var ReactCurrentOwner = __webpack_require__(199); -var _assign = __webpack_require__(80); + var warning = __webpack_require__(39); + var canDefineProperty = __webpack_require__(201); + var hasOwnProperty = Object.prototype.hasOwnProperty; -var ReactCurrentOwner = __webpack_require__(199); + var REACT_ELEMENT_TYPE = __webpack_require__(200); -var warning = __webpack_require__(39); -var canDefineProperty = __webpack_require__(201); -var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; -var REACT_ELEMENT_TYPE = __webpack_require__(200); + var specialPropKeyWarningShown, specialPropRefWarningShown; -var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true -}; - -var specialPropKeyWarningShown, specialPropRefWarningShown; - -function hasValidRef(config) { - if (false) { - if (hasOwnProperty.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - if (getter && getter.isReactWarning) { - return false; + function hasValidRef(config) { + if (false) { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== undefined; } - } - } - return config.ref !== undefined; -} -function hasValidKey(config) { - if (false) { - if (hasOwnProperty.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - if (getter && getter.isReactWarning) { - return false; + function hasValidKey(config) { + if (false) { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== undefined; } - } - } - return config.key !== undefined; -} -function defineKeyPropWarningGetter(props, displayName) { - var warnAboutAccessingKey = function () { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - false ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); -} + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function() { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + false + ? warning( + false, + '%s: `key` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName + ) + : void 0; + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true + }); + } -function defineRefPropWarningGetter(props, displayName) { - var warnAboutAccessingRef = function () { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - false ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); -} + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function() { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + false + ? warning( + false, + '%s: `ref` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName + ) + : void 0; + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true + }); + } -/** + /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, no instanceof check * will work. Instead test $$typeof field against Symbol.for('react.element') to check @@ -6409,534 +7959,893 @@ function defineRefPropWarningGetter(props, displayName) { * @param {*} props * @internal */ -var ReactElement = function (type, key, ref, self, source, owner, props) { - var element = { - // This tag allow us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, + var ReactElement = function(type, key, ref, self, source, owner, props) { + var element = { + // This tag allow us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type: type, - key: key, - ref: ref, - props: props, + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, - // Record the component responsible for creating this element. - _owner: owner - }; + // Record the component responsible for creating this element. + _owner: owner + }; - if (false) { - // The validation flag is currently mutative. We put it on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - element._store = {}; + if (false) { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; - // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. - if (canDefineProperty) { - Object.defineProperty(element._store, 'validated', { - configurable: false, - enumerable: false, - writable: true, - value: false - }); - // self and source are DEV only properties. - Object.defineProperty(element, '_self', { - configurable: false, - enumerable: false, - writable: false, - value: self - }); - // Two elements created in two different places should be considered - // equal for testing purposes and therefore we hide it from enumeration. - Object.defineProperty(element, '_source', { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - } else { - element._store.validated = false; - element._self = self; - element._source = source; - } - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + if (canDefineProperty) { + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self + }); + // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + } else { + element._store.validated = false; + element._self = self; + element._source = source; + } + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } - return element; -}; + return element; + }; -/** + /** * Create and return a new ReactElement of the given type. * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement */ -ReactElement.createElement = function (type, config, children) { - var propName; + ReactElement.createElement = function(type, config, children) { + var propName; - // Reserved names are extracted - var props = {}; + // Reserved names are extracted + var props = {}; - var key = null; - var ref = null; - var self = null; - var source = null; + var key = null; + var ref = null; + var self = null; + var source = null; - if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - } - if (hasValidKey(config)) { - key = '' + config.key; - } + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + if (hasValidKey(config)) { + key = '' + config.key; + } - self = config.__self === undefined ? null : config.__self; - source = config.__source === undefined ? null : config.__source; - // Remaining properties are added to a new props object - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } - - // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - if (false) { - if (Object.freeze) { - Object.freeze(childArray); - } - } - props.children = childArray; - } - - // Resolve default props - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - for (propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - } - if (false) { - if (key || ref) { - if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; + // Remaining properties are added to a new props object + for (propName in config) { + if ( + hasOwnProperty.call(config, propName) && + !RESERVED_PROPS.hasOwnProperty(propName) + ) { + props[propName] = config[propName]; + } + } } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - } - } - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); -}; -/** + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + if (false) { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + if (false) { + if (key || ref) { + if ( + typeof props.$$typeof === 'undefined' || + props.$$typeof !== REACT_ELEMENT_TYPE + ) { + var displayName = typeof type === 'function' + ? type.displayName || type.name || 'Unknown' + : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + } + return ReactElement( + type, + key, + ref, + self, + source, + ReactCurrentOwner.current, + props + ); + }; + + /** * Return a function that produces ReactElements of a given type. * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory */ -ReactElement.createFactory = function (type) { - var factory = ReactElement.createElement.bind(null, type); - // Expose the type on the factory and the prototype so that it can be - // easily accessed on elements. E.g. `.type === Foo`. - // This should not be named `constructor` since this may not be the function - // that created the element, and it may not even be a constructor. - // Legacy hook TODO: Warn if this is accessed - factory.type = type; - return factory; -}; + ReactElement.createFactory = function(type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. `.type === Foo`. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; + }; -ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { - var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + ReactElement.cloneAndReplaceKey = function(oldElement, newKey) { + var newElement = ReactElement( + oldElement.type, + newKey, + oldElement.ref, + oldElement._self, + oldElement._source, + oldElement._owner, + oldElement.props + ); - return newElement; -}; + return newElement; + }; -/** + /** * Clone and return a new ReactElement using element as the starting point. * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement */ -ReactElement.cloneElement = function (element, config, children) { - var propName; + ReactElement.cloneElement = function(element, config, children) { + var propName; - // Original props are copied - var props = _assign({}, element.props); + // Original props are copied + var props = _assign({}, element.props); - // Reserved names are extracted - var key = element.key; - var ref = element.ref; - // Self is preserved since the owner is preserved. - var self = element._self; - // Source is preserved since cloneElement is unlikely to be targeted by a - // transpiler, and the original source is probably a better indicator of the - // true owner. - var source = element._source; + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + // Self is preserved since the owner is preserved. + var self = element._self; + // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + var source = element._source; - // Owner will be preserved, unless ref is overridden - var owner = element._owner; + // Owner will be preserved, unless ref is overridden + var owner = element._owner; - if (config != null) { - if (hasValidRef(config)) { - // Silently steal the ref from the parent. - ref = config.ref; - owner = ReactCurrentOwner.current; - } - if (hasValidKey(config)) { - key = '' + config.key; - } + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = '' + config.key; + } - // Remaining properties override existing props - var defaultProps; - if (element.type && element.type.defaultProps) { - defaultProps = element.type.defaultProps; - } - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - if (config[propName] === undefined && defaultProps !== undefined) { - // Resolve default props - props[propName] = defaultProps[propName]; - } else { - props[propName] = config[propName]; + // Remaining properties override existing props + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if ( + hasOwnProperty.call(config, propName) && + !RESERVED_PROPS.hasOwnProperty(propName) + ) { + if ( + config[propName] === undefined && + defaultProps !== undefined + ) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } } - } - } - } - // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - props.children = childArray; - } + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } - return ReactElement(element.type, key, ref, self, source, owner, props); -}; + return ReactElement(element.type, key, ref, self, source, owner, props); + }; -/** + /** * Verifies the object is a ReactElement. * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement * @param {?object} object * @return {boolean} True if `object` is a valid component. * @final */ -ReactElement.isValidElement = function (object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; -}; + ReactElement.isValidElement = function(object) { + return ( + typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE + ); + }; -module.exports = ReactElement; + module.exports = ReactElement; -/***/ }), -/* 51 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /***/ + }, + /* 51 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'c', + function() { + return borderRadius; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'a', + function() { + return bottomShaddow; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'e', + function() { + return bottomShaddowDarker; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'd', + function() { + return insetShaddow; + } + ); + /* unused harmony export tooltipShadow */ + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'b', + function() { + return border; + } + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__( + 3 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc__ = __webpack_require__( + 8 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_remcalc__ + ); -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return borderRadius; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bottomShaddow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return bottomShaddowDarker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return insetShaddow; }); -/* unused harmony export tooltipShadow */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return border; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc__ = __webpack_require__(8); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_remcalc__); + var borderRadius = __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(4); + var bottomShaddow = + '0 ' + + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(2) + + ' 0 0 rgba(0, 0, 0, 0.05)'; + var bottomShaddowDarker = + '0 ' + + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(2) + + ' 0 0 rgba(0, 0, 0, 0.1)'; + var insetShaddow = + 'inset 0 ' + + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(3) + + ' 0 0 rgba(0, 0, 0, 0.05)'; + var tooltipShadow = + '0 ' + + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(2) + + ' ' + + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(6) + + ' ' + + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1) + + ' rgba(0, 0, 0, 0.1)'; + var border = { + checked: __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['b' /* css */] + )( + ['', ' solid ', ''], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), + function(props) { + return props.theme.primary; + } + ), + unchecked: __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['b' /* css */] + )( + ['', ' solid ', ''], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), + function(props) { + return props.theme.grey; + } + ), + confirmed: __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['b' /* css */] + )( + ['', ' solid ', ''], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), + function(props) { + return props.theme.grey; + } + ), + error: __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_styled_components__['b' /* css */] + )( + ['', ' solid ', ''], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), + function(props) { + return props.theme.red; + } + ) + }; + /***/ + }, + /* 52 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'b', + function() { + return Stylable; + } + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__( + 0 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__typography__ = __webpack_require__( + 13 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__boxes__ = __webpack_require__( + 51 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_broadcast__ = __webpack_require__( + 14 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_broadcast___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_react_broadcast__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_styled_components__ = __webpack_require__( + 3 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_remcalc__ = __webpack_require__( + 8 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_remcalc___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_5_remcalc__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__( + 1 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_6_prop_types__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_styled_is__ = __webpack_require__( + 12 + ); + var _templateObject = _taggedTemplateLiteral( + ['\n border-color: ', '\n '], + ['\n border-color: ', '\n '] + ), + _templateObject2 = _taggedTemplateLiteral( + ['\n ', '\n '], + ['\n ', '\n '] + ); -var borderRadius = __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(4); -var bottomShaddow = '0 ' + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(2) + ' 0 0 rgba(0, 0, 0, 0.05)'; -var bottomShaddowDarker = '0 ' + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(2) + ' 0 0 rgba(0, 0, 0, 0.1)'; -var insetShaddow = 'inset 0 ' + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(3) + ' 0 0 rgba(0, 0, 0, 0.05)'; -var tooltipShadow = '0 ' + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(2) + ' ' + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(6) + ' ' + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1) + ' rgba(0, 0, 0, 0.1)'; + function _taggedTemplateLiteral(strings, raw) { + return Object.freeze( + Object.defineProperties(strings, { + raw: { value: Object.freeze(raw) } + }) + ); + } -var border = { - checked: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["b" /* css */])(['', ' solid ', ''], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), function (props) { - return props.theme.primary; - }), - unchecked: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["b" /* css */])(['', ' solid ', ''], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), function (props) { - return props.theme.grey; - }), - confirmed: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["b" /* css */])(['', ' solid ', ''], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), function (props) { - return props.theme.grey; - }), - error: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_styled_components__["b" /* css */])(['', ' solid ', ''], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), function (props) { - return props.theme.red; - }) -}; + var colorWithDisabled = function colorWithDisabled(props) { + return props.disabled ? props.theme.disabled : props.theme.text; + }; -/***/ }), -/* 52 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var colorWithDefaultValue = function colorWithDefaultValue(props) { + return props.value === props.defaultValue + ? props.theme.disabled + : colorWithDisabled(props); + }; -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Stylable; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__typography__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__boxes__ = __webpack_require__(51); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_broadcast__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_broadcast___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_broadcast__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_styled_components__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_remcalc__ = __webpack_require__(8); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_remcalc___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_remcalc__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_styled_is__ = __webpack_require__(12); -var _templateObject = _taggedTemplateLiteral(['\n border-color: ', '\n '], ['\n border-color: ', '\n ']), - _templateObject2 = _taggedTemplateLiteral(['\n ', '\n '], ['\n ', '\n ']); + var color = function color(props) { + return props.defaultValue + ? colorWithDefaultValue(props) + : colorWithDisabled(props); + }; -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + var height = function height(props) { + return props.multiple + ? 'auto' + : __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(48); + }; + var paddingTop = function paddingTop(props) { + return props.multiple + ? __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(20) + : __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(13); + }; + var style = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4_styled_components__['b' /* css */] + )( + [ + 'box-sizing: border-box;width: 100%;height: ', + ';margin-bottom: ', + ';margin-top: ', + ';padding: ', + ' ', + ';border-radius: ', + ';background-color: ', + ';box-shadow: ', + ';border: ', + ';', + ';', + ';', + ';font-size: ', + ';line-height: normal !important;', + ';font-style: normal;font-stretch: normal;color: ', + ';appearance: none;outline: 0;&:focus {border-color: ', + ';outline: 0;}' + ], + height, + __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(8), + __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(8), + paddingTop, + __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(18), + __WEBPACK_IMPORTED_MODULE_2__boxes__['c' /* borderRadius */], + function(props) { + return props.theme.white; + }, + __WEBPACK_IMPORTED_MODULE_2__boxes__['d' /* insetShaddow */], + __WEBPACK_IMPORTED_MODULE_2__boxes__['b' /* border */].unchecked, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_7_styled_is__['a' /* default */] + )('error')(_templateObject, function(props) { + return props.theme.red; + }), + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_7_styled_is__['a' /* default */] + )('warning')(_templateObject, function(props) { + return props.theme.orange; + }), + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_7_styled_is__['a' /* default */] + )('success')(_templateObject, function(props) { + return props.theme.green; + }), + __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(15), + __WEBPACK_IMPORTED_MODULE_1__typography__['a' /* default */].normal, + color, + function(props) { + return props.theme.primary; + } + ); + var BaseInput = function BaseInput(Component) { + return function(props) { + var render = function render(value) { + var _value = value || {}; + var _value$input = _value.input, + input = _value$input === undefined ? {} : _value$input, + _value$meta = _value.meta, + meta = _value$meta === undefined ? {} : _value$meta, + _value$id = _value.id, + id = _value$id === undefined ? '' : _value$id; + var hasError = Boolean(props.error || _value.error || meta.error); + var hasWarning = Boolean( + props.warning || _value.warning || meta.warning + ); + var hasSuccess = Boolean( + props.success || _value.success || meta.success + ); + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + Component, + Object.assign({}, props, input, { + id: id, + error: hasError, + warning: hasWarning, + success: hasSuccess + }) + ); + }; + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3_react_broadcast__['Subscriber'], + { channel: 'input-group' }, + render + ); + }; + }; + BaseInput.propTypes = { + error: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, + warning: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool + }; + /* harmony default export */ __webpack_exports__['a'] = BaseInput; + var Stylable = function Stylable(Component) { + var stylable = typeof Component === 'string' + ? __WEBPACK_IMPORTED_MODULE_4_styled_components__['a' /* default */][ + Component + ] + : __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4_styled_components__['a' /* default */] + )(Component); -var colorWithDisabled = function colorWithDisabled(props) { - return props.disabled ? props.theme.disabled : props.theme.text; -}; + return stylable(_templateObject2, style); + }; -var colorWithDefaultValue = function colorWithDefaultValue(props) { - return props.value === props.defaultValue ? props.theme.disabled : colorWithDisabled(props); -}; + /***/ + }, + /* 53 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'd', + function() { + return GraphLine; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'b', + function() { + return GraphNodeRect; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'a', + function() { + return GraphShadowRect; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'f', + function() { + return GraphTitle; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'h', + function() { + return GraphSubtitle; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'i', + function() { + return GraphText; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'e', + function() { + return GraphButtonRect; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'c', + function() { + return GraphButtonCircle; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'g', + function() { + return GraphHealthyCircle; + } + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__( + 3 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_is__ = __webpack_require__( + 12 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__typography__ = __webpack_require__( + 13 + ); + var _templateObject = _taggedTemplateLiteral( + ['\n stroke: ', ';\n '], + ['\n stroke: ', ';\n '] + ), + _templateObject2 = _taggedTemplateLiteral( + ['\n stroke: ', ';\n fill: ', ';\n '], + ['\n stroke: ', ';\n fill: ', ';\n '] + ), + _templateObject3 = _taggedTemplateLiteral( + ['\n fill: ', ';\n '], + ['\n fill: ', ';\n '] + ); -var color = function color(props) { - return props.defaultValue ? colorWithDefaultValue(props) : colorWithDisabled(props); -}; + function _taggedTemplateLiteral(strings, raw) { + return Object.freeze( + Object.defineProperties(strings, { + raw: { value: Object.freeze(raw) } + }) + ); + } -var height = function height(props) { - return props.multiple ? 'auto' : __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(48); -}; + var GraphLine = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].line.withConfig({ + displayName: 'shapes__GraphLine' + })( + ['stroke: ', ';stroke-width: 1.5;', ';'], + function(props) { + return props.theme.grey; + }, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('connected')(_templateObject, function(props) { + return props.theme.secondaryActive; + }) + ); -var paddingTop = function paddingTop(props) { - return props.multiple ? __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(20) : __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(13); -}; + var GraphNodeRect = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].rect.withConfig({ + displayName: 'shapes__GraphNodeRect' + })( + ['stroke: ', ';fill: ', ';stroke-width: 1.5;rx: 4;ry: 4;', ';'], + function(props) { + return props.theme.grey; + }, + function(props) { + return props.theme.white; + }, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('connected')( + _templateObject2, + function(props) { + return props.theme.secondaryActive; + }, + function(props) { + return props.theme.secondary; + } + ) + ); -var style = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4_styled_components__["b" /* css */])(['box-sizing: border-box;width: 100%;height: ', ';margin-bottom: ', ';margin-top: ', ';padding: ', ' ', ';border-radius: ', ';background-color: ', ';box-shadow: ', ';border: ', ';', ';', ';', ';font-size: ', ';line-height: normal !important;', ';font-style: normal;font-stretch: normal;color: ', ';appearance: none;outline: 0;&:focus {border-color: ', ';outline: 0;}'], height, __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(8), __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(8), paddingTop, __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(18), __WEBPACK_IMPORTED_MODULE_2__boxes__["c" /* borderRadius */], function (props) { - return props.theme.white; -}, __WEBPACK_IMPORTED_MODULE_2__boxes__["d" /* insetShaddow */], __WEBPACK_IMPORTED_MODULE_2__boxes__["b" /* border */].unchecked, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_styled_is__["a" /* default */])('error')(_templateObject, function (props) { - return props.theme.red; -}), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_styled_is__["a" /* default */])('warning')(_templateObject, function (props) { - return props.theme.orange; -}), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_styled_is__["a" /* default */])('success')(_templateObject, function (props) { - return props.theme.green; -}), __WEBPACK_IMPORTED_MODULE_5_remcalc___default()(15), __WEBPACK_IMPORTED_MODULE_1__typography__["a" /* default */].normal, color, function (props) { - return props.theme.primary; -}); + var GraphShadowRect = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].rect.withConfig({ + displayName: 'shapes__GraphShadowRect' + })( + ['fill: ', ';opacity: 0.33;rx: 4;ry: 4;', ';'], + function(props) { + return props.theme.grey; + }, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('connected')(_templateObject3, function(props) { + return props.theme.secondary; + }) + ); -var BaseInput = function BaseInput(Component) { - return function (props) { - var render = function render(value) { - var _value = value || {}; - var _value$input = _value.input, - input = _value$input === undefined ? {} : _value$input, - _value$meta = _value.meta, - meta = _value$meta === undefined ? {} : _value$meta, - _value$id = _value.id, - id = _value$id === undefined ? '' : _value$id; + var GraphTitle = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].text.withConfig({ + displayName: 'shapes__GraphTitle' + })( + ['', ';', ';fill: ', ';font-size: 16px;font-weight: 600;', ';'], + __WEBPACK_IMPORTED_MODULE_2__typography__['a' /* default */].fontFamily, + __WEBPACK_IMPORTED_MODULE_2__typography__['a' /* default */].normal, + function(props) { + return props.theme.secondary; + }, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('connected')(_templateObject3, function(props) { + return props.theme.white; + }) + ); + var GraphSubtitle = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].text.withConfig({ + displayName: 'shapes__GraphSubtitle' + })( + ['', ';', ';fill: ', ';font-size: 12px;font-weight: 600;', ';'], + __WEBPACK_IMPORTED_MODULE_2__typography__['a' /* default */].fontFamily, + __WEBPACK_IMPORTED_MODULE_2__typography__['a' /* default */].normal, + function(props) { + return props.theme.secondary; + }, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('connected')(_templateObject3, function(props) { + return props.theme.white; + }) + ); - var hasError = Boolean(props.error || _value.error || meta.error); - var hasWarning = Boolean(props.warning || _value.warning || meta.warning); - var hasSuccess = Boolean(props.success || _value.success || meta.success); + var GraphText = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].text.withConfig({ + displayName: 'shapes__GraphText' + })( + ['', ';', ';fill: ', ';font-size: 12px;opacity: 0.8;', ';'], + __WEBPACK_IMPORTED_MODULE_2__typography__['a' /* default */].fontFamily, + __WEBPACK_IMPORTED_MODULE_2__typography__['a' /* default */].normal, + function(props) { + return props.theme.secondary; + }, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('connected')(_templateObject3, function(props) { + return props.theme.white; + }) + ); - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, Object.assign({}, props, input, { - id: id, - error: hasError, - warning: hasWarning, - success: hasSuccess - })); - }; + var GraphButtonRect = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].rect.withConfig({ + displayName: 'shapes__GraphButtonRect' + })(['opacity: 0;cursor: pointer;']); - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( - __WEBPACK_IMPORTED_MODULE_3_react_broadcast__["Subscriber"], - { channel: 'input-group' }, - render - ); - }; -}; + var GraphButtonCircle = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].circle.withConfig({ + displayName: 'shapes__GraphButtonCircle' + })( + ['fill: ', ';', ';'], + function(props) { + return props.theme.secondary; + }, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('connected')(_templateObject3, function(props) { + return props.theme.white; + }) + ); -BaseInput.propTypes = { - error: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, - warning: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool -}; + var GraphHealthyCircle = __WEBPACK_IMPORTED_MODULE_0_styled_components__[ + 'a' /* default */ + ].circle.withConfig({ + displayName: 'shapes__GraphHealthyCircle' + })(['fill: ', ';'], function(props) { + return props.theme.green; + }); -/* harmony default export */ __webpack_exports__["a"] = (BaseInput); + /***/ + }, + /* 54 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__( + 87 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__( + 540 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__( + 569 + ); -var Stylable = function Stylable(Component) { - var stylable = typeof Component === 'string' ? __WEBPACK_IMPORTED_MODULE_4_styled_components__["a" /* default */][Component] : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4_styled_components__["a" /* default */])(Component); + /** `Object#toString` result references. */ + var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; - return stylable(_templateObject2, style); -}; + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[ + 'a' /* default */ + ] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + .toStringTag + : undefined; -/***/ }), -/* 53 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return GraphLine; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return GraphNodeRect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GraphShadowRect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return GraphTitle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return GraphSubtitle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return GraphText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return GraphButtonRect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return GraphButtonCircle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return GraphHealthyCircle; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_styled_components__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_is__ = __webpack_require__(12); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__typography__ = __webpack_require__(13); -var _templateObject = _taggedTemplateLiteral(['\n stroke: ', ';\n '], ['\n stroke: ', ';\n ']), - _templateObject2 = _taggedTemplateLiteral(['\n stroke: ', ';\n fill: ', ';\n '], ['\n stroke: ', ';\n fill: ', ';\n ']), - _templateObject3 = _taggedTemplateLiteral(['\n fill: ', ';\n '], ['\n fill: ', ';\n ']); - -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - - - - - -var GraphLine = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].line.withConfig({ - displayName: 'shapes__GraphLine' -})(['stroke: ', ';stroke-width: 1.5;', ';'], function (props) { - return props.theme.grey; -}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('connected')(_templateObject, function (props) { - return props.theme.secondaryActive; -})); - -var GraphNodeRect = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].rect.withConfig({ - displayName: 'shapes__GraphNodeRect' -})(['stroke: ', ';fill: ', ';stroke-width: 1.5;rx: 4;ry: 4;', ';'], function (props) { - return props.theme.grey; -}, function (props) { - return props.theme.white; -}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('connected')(_templateObject2, function (props) { - return props.theme.secondaryActive; -}, function (props) { - return props.theme.secondary; -})); - -var GraphShadowRect = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].rect.withConfig({ - displayName: 'shapes__GraphShadowRect' -})(['fill: ', ';opacity: 0.33;rx: 4;ry: 4;', ';'], function (props) { - return props.theme.grey; -}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('connected')(_templateObject3, function (props) { - return props.theme.secondary; -})); - -var GraphTitle = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].text.withConfig({ - displayName: 'shapes__GraphTitle' -})(['', ';', ';fill: ', ';font-size: 16px;font-weight: 600;', ';'], __WEBPACK_IMPORTED_MODULE_2__typography__["a" /* default */].fontFamily, __WEBPACK_IMPORTED_MODULE_2__typography__["a" /* default */].normal, function (props) { - return props.theme.secondary; -}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('connected')(_templateObject3, function (props) { - return props.theme.white; -})); - -var GraphSubtitle = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].text.withConfig({ - displayName: 'shapes__GraphSubtitle' -})(['', ';', ';fill: ', ';font-size: 12px;font-weight: 600;', ';'], __WEBPACK_IMPORTED_MODULE_2__typography__["a" /* default */].fontFamily, __WEBPACK_IMPORTED_MODULE_2__typography__["a" /* default */].normal, function (props) { - return props.theme.secondary; -}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('connected')(_templateObject3, function (props) { - return props.theme.white; -})); - -var GraphText = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].text.withConfig({ - displayName: 'shapes__GraphText' -})(['', ';', ';fill: ', ';font-size: 12px;opacity: 0.8;', ';'], __WEBPACK_IMPORTED_MODULE_2__typography__["a" /* default */].fontFamily, __WEBPACK_IMPORTED_MODULE_2__typography__["a" /* default */].normal, function (props) { - return props.theme.secondary; -}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('connected')(_templateObject3, function (props) { - return props.theme.white; -})); - -var GraphButtonRect = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].rect.withConfig({ - displayName: 'shapes__GraphButtonRect' -})(['opacity: 0;cursor: pointer;']); - -var GraphButtonCircle = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].circle.withConfig({ - displayName: 'shapes__GraphButtonCircle' -})(['fill: ', ';', ';'], function (props) { - return props.theme.secondary; -}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('connected')(_templateObject3, function (props) { - return props.theme.white; -})); - -var GraphHealthyCircle = __WEBPACK_IMPORTED_MODULE_0_styled_components__["a" /* default */].circle.withConfig({ - displayName: 'shapes__GraphHealthyCircle' -})(['fill: ', ';'], function (props) { - return props.theme.green; -}); - -/***/ }), -/* 54 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(87); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(540); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(569); - - - - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; - -/** + /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value) - : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value); -} + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__['a' /* default */] + )(value) + : __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__objectToString_js__[ + 'a' /* default */ + ] + )(value); + } -/* harmony default export */ __webpack_exports__["a"] = (baseGetTag); + /* harmony default export */ __webpack_exports__['a'] = baseGetTag; + /***/ + }, + /* 55 */ + /***/ function(module, exports, __webpack_require__) { + var isFunction = __webpack_require__(156), + isLength = __webpack_require__(157); -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -var isFunction = __webpack_require__(156), - isLength = __webpack_require__(157); - -/** + /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. @@ -6961,19 +8870,18 @@ var isFunction = __webpack_require__(156), * _.isArrayLike(_.noop); * // => false */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } -module.exports = isArrayLike; + module.exports = isArrayLike; - -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 56 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2015-present, Facebook, Inc. * All rights reserved. * @@ -6983,18 +8891,16 @@ module.exports = isArrayLike; * */ + var DOMNamespaces = __webpack_require__(162); + var setInnerHTML = __webpack_require__(108); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(170); + var setTextContent = __webpack_require__(287); -var DOMNamespaces = __webpack_require__(162); -var setInnerHTML = __webpack_require__(108); + var ELEMENT_NODE_TYPE = 1; + var DOCUMENT_FRAGMENT_NODE_TYPE = 11; -var createMicrosoftUnsafeLocalFunction = __webpack_require__(170); -var setTextContent = __webpack_require__(287); - -var ELEMENT_NODE_TYPE = 1; -var DOCUMENT_FRAGMENT_NODE_TYPE = 11; - -/** + /** * In IE (8-11) and Edge, appending nodes with no children is dramatically * faster than appending a full subtree, so we essentially queue up the * .appendChild calls here and apply them so each node is added to its parent @@ -7005,98 +8911,113 @@ var DOCUMENT_FRAGMENT_NODE_TYPE = 11; * * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. */ -var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent); + var enableLazy = + (typeof document !== 'undefined' && + typeof document.documentMode === 'number') || + (typeof navigator !== 'undefined' && + typeof navigator.userAgent === 'string' && + /\bEdge\/\d/.test(navigator.userAgent)); -function insertTreeChildren(tree) { - if (!enableLazy) { - return; - } - var node = tree.node; - var children = tree.children; - if (children.length) { - for (var i = 0; i < children.length; i++) { - insertTreeBefore(node, children[i], null); - } - } else if (tree.html != null) { - setInnerHTML(node, tree.html); - } else if (tree.text != null) { - setTextContent(node, tree.text); - } -} + function insertTreeChildren(tree) { + if (!enableLazy) { + return; + } + var node = tree.node; + var children = tree.children; + if (children.length) { + for (var i = 0; i < children.length; i++) { + insertTreeBefore(node, children[i], null); + } + } else if (tree.html != null) { + setInnerHTML(node, tree.html); + } else if (tree.text != null) { + setTextContent(node, tree.text); + } + } -var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { - // DocumentFragments aren't actually part of the DOM after insertion so - // appending children won't update the DOM. We need to ensure the fragment - // is properly populated first, breaking out of our lazy approach for just - // this level. Also, some plugins (like Flash Player) will read - // nodes immediately upon insertion into the DOM, so - // must also be populated prior to insertion into the DOM. - if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) { - insertTreeChildren(tree); - parentNode.insertBefore(tree.node, referenceNode); - } else { - parentNode.insertBefore(tree.node, referenceNode); - insertTreeChildren(tree); - } -}); + var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function( + parentNode, + tree, + referenceNode + ) { + // DocumentFragments aren't actually part of the DOM after insertion so + // appending children won't update the DOM. We need to ensure the fragment + // is properly populated first, breaking out of our lazy approach for just + // this level. Also, some plugins (like Flash Player) will read + // nodes immediately upon insertion into the DOM, so + // must also be populated prior to insertion into the DOM. + if ( + tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || + (tree.node.nodeType === ELEMENT_NODE_TYPE && + tree.node.nodeName.toLowerCase() === 'object' && + (tree.node.namespaceURI == null || + tree.node.namespaceURI === DOMNamespaces.html)) + ) { + insertTreeChildren(tree); + parentNode.insertBefore(tree.node, referenceNode); + } else { + parentNode.insertBefore(tree.node, referenceNode); + insertTreeChildren(tree); + } + }); -function replaceChildWithTree(oldNode, newTree) { - oldNode.parentNode.replaceChild(newTree.node, oldNode); - insertTreeChildren(newTree); -} + function replaceChildWithTree(oldNode, newTree) { + oldNode.parentNode.replaceChild(newTree.node, oldNode); + insertTreeChildren(newTree); + } -function queueChild(parentTree, childTree) { - if (enableLazy) { - parentTree.children.push(childTree); - } else { - parentTree.node.appendChild(childTree.node); - } -} + function queueChild(parentTree, childTree) { + if (enableLazy) { + parentTree.children.push(childTree); + } else { + parentTree.node.appendChild(childTree.node); + } + } -function queueHTML(tree, html) { - if (enableLazy) { - tree.html = html; - } else { - setInnerHTML(tree.node, html); - } -} + function queueHTML(tree, html) { + if (enableLazy) { + tree.html = html; + } else { + setInnerHTML(tree.node, html); + } + } -function queueText(tree, text) { - if (enableLazy) { - tree.text = text; - } else { - setTextContent(tree.node, text); - } -} + function queueText(tree, text) { + if (enableLazy) { + tree.text = text; + } else { + setTextContent(tree.node, text); + } + } -function toString() { - return this.node.nodeName; -} + function toString() { + return this.node.nodeName; + } -function DOMLazyTree(node) { - return { - node: node, - children: [], - html: null, - text: null, - toString: toString - }; -} + function DOMLazyTree(node) { + return { + node: node, + children: [], + html: null, + text: null, + toString: toString + }; + } -DOMLazyTree.insertTreeBefore = insertTreeBefore; -DOMLazyTree.replaceChildWithTree = replaceChildWithTree; -DOMLazyTree.queueChild = queueChild; -DOMLazyTree.queueHTML = queueHTML; -DOMLazyTree.queueText = queueText; + DOMLazyTree.insertTreeBefore = insertTreeBefore; + DOMLazyTree.replaceChildWithTree = replaceChildWithTree; + DOMLazyTree.queueChild = queueChild; + DOMLazyTree.queueHTML = queueHTML; + DOMLazyTree.queueText = queueText; -module.exports = DOMLazyTree; + module.exports = DOMLazyTree; -/***/ }), -/* 57 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 57 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -7106,28 +9027,26 @@ module.exports = DOMLazyTree; * */ + var _prodInvariant = __webpack_require__(7); + var invariant = __webpack_require__(2); -var _prodInvariant = __webpack_require__(7); + function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; + } -var invariant = __webpack_require__(2); - -function checkMask(value, bitmask) { - return (value & bitmask) === bitmask; -} - -var DOMPropertyInjection = { - /** + var DOMPropertyInjection = { + /** * Mapping from normalized, camelcased property names to a configuration that * specifies how the associated DOM property should be accessed or rendered. */ - MUST_USE_PROPERTY: 0x1, - HAS_BOOLEAN_VALUE: 0x4, - HAS_NUMERIC_VALUE: 0x8, - HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, - HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, + MUST_USE_PROPERTY: 0x1, + HAS_BOOLEAN_VALUE: 0x4, + HAS_NUMERIC_VALUE: 0x8, + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, - /** + /** * Inject some specialized knowledge about the DOM. This takes a config object * with the following properties: * @@ -7155,72 +9074,110 @@ var DOMPropertyInjection = { * * @param {object} domPropertyConfig the config as described above. */ - injectDOMPropertyConfig: function (domPropertyConfig) { - var Injection = DOMPropertyInjection; - var Properties = domPropertyConfig.Properties || {}; - var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; - var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; - var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; - var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + injectDOMPropertyConfig: function(domPropertyConfig) { + var Injection = DOMPropertyInjection; + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; - if (domPropertyConfig.isCustomAttribute) { - DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); - } + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push( + domPropertyConfig.isCustomAttribute + ); + } - for (var propName in Properties) { - !!DOMProperty.properties.hasOwnProperty(propName) ? false ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; + for (var propName in Properties) { + !!DOMProperty.properties.hasOwnProperty(propName) + ? false + ? invariant( + false, + "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.", + propName + ) + : _prodInvariant('48', propName) + : void 0; - var lowerCased = propName.toLowerCase(); - var propConfig = Properties[propName]; + var lowerCased = propName.toLowerCase(); + var propConfig = Properties[propName]; - var propertyInfo = { - attributeName: lowerCased, - attributeNamespace: null, - propertyName: propName, - mutationMethod: null, + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, - mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), - hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), - hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), - hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), - hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) - }; - !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? false ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; + mustUseProperty: checkMask( + propConfig, + Injection.MUST_USE_PROPERTY + ), + hasBooleanValue: checkMask( + propConfig, + Injection.HAS_BOOLEAN_VALUE + ), + hasNumericValue: checkMask( + propConfig, + Injection.HAS_NUMERIC_VALUE + ), + hasPositiveNumericValue: checkMask( + propConfig, + Injection.HAS_POSITIVE_NUMERIC_VALUE + ), + hasOverloadedBooleanValue: checkMask( + propConfig, + Injection.HAS_OVERLOADED_BOOLEAN_VALUE + ) + }; + !(propertyInfo.hasBooleanValue + + propertyInfo.hasNumericValue + + propertyInfo.hasOverloadedBooleanValue <= + 1) + ? false + ? invariant( + false, + 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', + propName + ) + : _prodInvariant('50', propName) + : void 0; - if (false) { - DOMProperty.getPossibleStandardName[lowerCased] = propName; - } + if (false) { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } - if (DOMAttributeNames.hasOwnProperty(propName)) { - var attributeName = DOMAttributeNames[propName]; - propertyInfo.attributeName = attributeName; - if (false) { - DOMProperty.getPossibleStandardName[attributeName] = propName; + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + if (false) { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } + } + + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = + DOMAttributeNamespaces[propName]; + } + + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } + + if (DOMMutationMethods.hasOwnProperty(propName)) { + propertyInfo.mutationMethod = DOMMutationMethods[propName]; + } + + DOMProperty.properties[propName] = propertyInfo; + } } - } + }; - if (DOMAttributeNamespaces.hasOwnProperty(propName)) { - propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; - } + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ - if (DOMPropertyNames.hasOwnProperty(propName)) { - propertyInfo.propertyName = DOMPropertyNames[propName]; - } - - if (DOMMutationMethods.hasOwnProperty(propName)) { - propertyInfo.mutationMethod = DOMMutationMethods[propName]; - } - - DOMProperty.properties[propName] = propertyInfo; - } - } -}; - -/* eslint-disable max-len */ -var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; -/* eslint-enable max-len */ - -/** + /** * DOMProperty exports lookup objects that can be used like functions: * * > DOMProperty.isValid['id'] @@ -7233,15 +9190,15 @@ var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\ * @see http://jsperf.com/key-exists * @see http://jsperf.com/key-missing */ -var DOMProperty = { + var DOMProperty = { + ID_ATTRIBUTE_NAME: 'data-reactid', + ROOT_ATTRIBUTE_NAME: 'data-reactroot', - ID_ATTRIBUTE_NAME: 'data-reactid', - ROOT_ATTRIBUTE_NAME: 'data-reactroot', + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', - ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, - ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', - - /** + /** * Map from property "standard name" to an object with info about how to set * the property in the DOM. Each object contains: * @@ -7269,9 +9226,9 @@ var DOMProperty = { * Removed when strictly equal to false; present without a value when * strictly equal to true; present with a value otherwise. */ - properties: {}, + properties: {}, - /** + /** * Mapping from lowercase property names to the properly cased version, used * to warn in the case of missing properties. Available only in __DEV__. * @@ -7280,38 +9237,43 @@ var DOMProperty = { * * @type {Object} */ - getPossibleStandardName: false ? { autofocus: 'autoFocus' } : null, + getPossibleStandardName: false ? { autofocus: 'autoFocus' } : null, - /** + /** * All of the isCustomAttribute() functions that have been injected. */ - _isCustomAttributeFunctions: [], + _isCustomAttributeFunctions: [], - /** + /** * Checks whether a property name is a custom attribute. * @method */ - isCustomAttribute: function (attributeName) { - for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { - var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; - if (isCustomAttributeFn(attributeName)) { - return true; - } - } - return false; - }, + isCustomAttribute: function(attributeName) { + for ( + var i = 0; + i < DOMProperty._isCustomAttributeFunctions.length; + i++ + ) { + var isCustomAttributeFn = + DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, - injection: DOMPropertyInjection -}; + injection: DOMPropertyInjection + }; -module.exports = DOMProperty; + module.exports = DOMProperty; -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 58 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -7321,24 +9283,21 @@ module.exports = DOMProperty; * */ + var ReactRef = __webpack_require__(752); + var ReactInstrumentation = __webpack_require__(25); + var warning = __webpack_require__(5); -var ReactRef = __webpack_require__(752); -var ReactInstrumentation = __webpack_require__(25); - -var warning = __webpack_require__(5); - -/** + /** * Helper to call ReactRef.attachRefs with this composite component, split out * to avoid allocations in the transaction mount-ready queue. */ -function attachRefs() { - ReactRef.attachRefs(this, this._currentElement); -} + function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); + } -var ReactReconciler = { - - /** + var ReactReconciler = { + /** * Initializes the component, renders markup, and registers event listeners. * * @param {ReactComponent} internalInstance @@ -7349,55 +9308,85 @@ var ReactReconciler = { * @final * @internal */ - mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots - ) { - if (false) { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); - } - } - var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); - if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { - transaction.getReactMountReady().enqueue(attachRefs, internalInstance); - } - if (false) { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); - } - } - return markup; - }, + mountComponent: function( + internalInstance, + transaction, + hostParent, + hostContainerInfo, + context, + parentDebugID // 0 in production and for roots + ) { + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeMountComponent( + internalInstance._debugID, + internalInstance._currentElement, + parentDebugID + ); + } + } + var markup = internalInstance.mountComponent( + transaction, + hostParent, + hostContainerInfo, + context, + parentDebugID + ); + if ( + internalInstance._currentElement && + internalInstance._currentElement.ref != null + ) { + transaction + .getReactMountReady() + .enqueue(attachRefs, internalInstance); + } + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onMountComponent( + internalInstance._debugID + ); + } + } + return markup; + }, - /** + /** * Returns a value that can be passed to * ReactComponentEnvironment.replaceNodeWithMarkup. */ - getHostNode: function (internalInstance) { - return internalInstance.getHostNode(); - }, + getHostNode: function(internalInstance) { + return internalInstance.getHostNode(); + }, - /** + /** * Releases any resources allocated by `mountComponent`. * * @final * @internal */ - unmountComponent: function (internalInstance, safely) { - if (false) { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); - } - } - ReactRef.detachRefs(internalInstance, internalInstance._currentElement); - internalInstance.unmountComponent(safely); - if (false) { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); - } - } - }, + unmountComponent: function(internalInstance, safely) { + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUnmountComponent( + internalInstance._debugID + ); + } + } + ReactRef.detachRefs( + internalInstance, + internalInstance._currentElement + ); + internalInstance.unmountComponent(safely); + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUnmountComponent( + internalInstance._debugID + ); + } + } + }, - /** + /** * Update a component using a new element. * * @param {ReactComponent} internalInstance @@ -7406,100 +9395,168 @@ var ReactReconciler = { * @param {object} context * @internal */ - receiveComponent: function (internalInstance, nextElement, transaction, context) { - var prevElement = internalInstance._currentElement; + receiveComponent: function( + internalInstance, + nextElement, + transaction, + context + ) { + var prevElement = internalInstance._currentElement; - if (nextElement === prevElement && context === internalInstance._context) { - // Since elements are immutable after the owner is rendered, - // we can do a cheap identity compare here to determine if this is a - // superfluous reconcile. It's possible for state to be mutable but such - // change should trigger an update of the owner which would recreate - // the element. We explicitly check for the existence of an owner since - // it's possible for an element created outside a composite to be - // deeply mutated and reused. + if ( + nextElement === prevElement && + context === internalInstance._context + ) { + // Since elements are immutable after the owner is rendered, + // we can do a cheap identity compare here to determine if this is a + // superfluous reconcile. It's possible for state to be mutable but such + // change should trigger an update of the owner which would recreate + // the element. We explicitly check for the existence of an owner since + // it's possible for an element created outside a composite to be + // deeply mutated and reused. - // TODO: Bailing out early is just a perf optimization right? - // TODO: Removing the return statement should affect correctness? - return; - } + // TODO: Bailing out early is just a perf optimization right? + // TODO: Removing the return statement should affect correctness? + return; + } - if (false) { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); - } - } + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent( + internalInstance._debugID, + nextElement + ); + } + } - var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); - if (refsChanged) { - ReactRef.detachRefs(internalInstance, prevElement); - } + if (refsChanged) { + ReactRef.detachRefs(internalInstance, prevElement); + } - internalInstance.receiveComponent(nextElement, transaction, context); + internalInstance.receiveComponent(nextElement, transaction, context); - if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) { - transaction.getReactMountReady().enqueue(attachRefs, internalInstance); - } + if ( + refsChanged && + internalInstance._currentElement && + internalInstance._currentElement.ref != null + ) { + transaction + .getReactMountReady() + .enqueue(attachRefs, internalInstance); + } - if (false) { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); - } - } - }, + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent( + internalInstance._debugID + ); + } + } + }, - /** + /** * Flush any dirty changes in a component. * * @param {ReactComponent} internalInstance * @param {ReactReconcileTransaction} transaction * @internal */ - performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { - if (internalInstance._updateBatchNumber !== updateBatchNumber) { - // The component's enqueued batch number should always be the current - // batch or the following one. - false ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0; - return; - } - if (false) { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); + performUpdateIfNecessary: function( + internalInstance, + transaction, + updateBatchNumber + ) { + if (internalInstance._updateBatchNumber !== updateBatchNumber) { + // The component's enqueued batch number should always be the current + // batch or the following one. + false + ? warning( + internalInstance._updateBatchNumber == null || + internalInstance._updateBatchNumber === + updateBatchNumber + 1, + 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + + 'pending %s)', + updateBatchNumber, + internalInstance._updateBatchNumber + ) + : void 0; + return; + } + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent( + internalInstance._debugID, + internalInstance._currentElement + ); + } + } + internalInstance.performUpdateIfNecessary(transaction); + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent( + internalInstance._debugID + ); + } + } + } + }; + + module.exports = ReactReconciler; + + /***/ + }, + /* 59 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'Grid', + function() { + return Grid$1; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'Row', + function() { + return Row$1; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'Col', + function() { + return Col$1; + } + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'BASE_CONF', + function() { + return BASE_CONF; + } + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__( + 0 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_components__ = __webpack_require__( + 3 + ); + + function createCommonjsModule(fn, module) { + return (module = { exports: {} }), fn( + module, + module.exports + ), module.exports; } - } - internalInstance.performUpdateIfNecessary(transaction); - if (false) { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); - } - } - } -}; - -module.exports = ReactReconciler; - -/***/ }), -/* 59 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return Grid$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return Row$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Col", function() { return Col$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BASE_CONF", function() { return BASE_CONF; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_components__ = __webpack_require__(3); - - - -function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; -} - -/** + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -7510,33 +9567,33 @@ function createCommonjsModule(fn, module) { * */ -function makeEmptyFunction(arg) { - return function () { - return arg; - }; -} + function makeEmptyFunction(arg) { + return function() { + return arg; + }; + } -/** + /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ -var emptyFunction = function emptyFunction() {}; + var emptyFunction = function emptyFunction() {}; -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; -}; + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function() { + return this; + }; + emptyFunction.thatReturnsArgument = function(arg) { + return arg; + }; -var emptyFunction_1 = emptyFunction; + var emptyFunction_1 = emptyFunction; -/** + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -7546,7 +9603,7 @@ var emptyFunction_1 = emptyFunction; * */ -/** + /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments @@ -7557,93 +9614,115 @@ var emptyFunction_1 = emptyFunction; * will remain to ensure logic does not differ in production. */ -var validateFormat = function validateFormat(format) {}; + var validateFormat = function validateFormat(format) {}; -if (false) { - validateFormat = function validateFormat(format) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - }; -} + if (false) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } -function invariant(condition, format, a, b, c, d, e, f) { - validateFormat(format); + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); - if (!condition) { - var error; - if (format === undefined) { - error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error(format.replace(/%s/g, function () { - return args[argIndex++]; - })); - error.name = 'Invariant Violation'; - } + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { + return args[argIndex++]; + }) + ); + error.name = 'Invariant Violation'; + } - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -} + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } -var invariant_1 = invariant; + var invariant_1 = invariant; -/** + /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ -var warning = emptyFunction_1; + var warning = emptyFunction_1; -if (false) { - (function () { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; + if (false) { + (function() { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, + args = Array(_len2 > 2 ? _len2 - 2 : 0), + _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); } - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; + var warning_1 = warning; - warning = function warning(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } - - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } - - printWarning.apply(undefined, [format].concat(args)); - } - }; - })(); -} - -var warning_1 = warning; - -/** + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -7652,90 +9731,58 @@ var warning_1 = warning; * of patent rights can be found in the PATENTS file in the same directory. */ -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -var ReactPropTypesSecret_1 = ReactPropTypesSecret; + var ReactPropTypesSecret_1 = ReactPropTypesSecret; -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; + var _typeof = typeof Symbol === 'function' && + typeof Symbol.iterator === 'symbol' + ? function(obj) { + return typeof obj; + } + : function(obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + var _extends = + Object.assign || + function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + var taggedTemplateLiteral = function(strings, raw) { + return Object.freeze( + Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + }) + ); + }; - - - - - - - - - - - - - - - - -var _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; + if (false) { + var invariant$1 = invariant_1; + var warning$1 = warning_1; + var ReactPropTypesSecret$1 = ReactPropTypesSecret_1; + var loggedTypeFailures = {}; } - } - } - return target; -}; - - - - - - - - - - - - - - - - - - - - - - - - - -var taggedTemplateLiteral = function (strings, raw) { - return Object.freeze(Object.defineProperties(strings, { - raw: { - value: Object.freeze(raw) - } - })); -}; - -if (false) { - var invariant$1 = invariant_1; - var warning$1 = warning_1; - var ReactPropTypesSecret$1 = ReactPropTypesSecret_1; - var loggedTypeFailures = {}; -} - -/** + /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * @@ -7746,45 +9793,88 @@ if (false) { * @param {?Function} getStack Returns the component stack. * @private */ -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { - if (false) { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - invariant$1(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1); - } catch (ex) { - error = ex; - } - warning$1(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error === 'undefined' ? 'undefined' : _typeof(error)); - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; + function checkPropTypes( + typeSpecs, + values, + location, + componentName, + getStack + ) { + if (false) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant$1( + typeof typeSpecs[typeSpecName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + componentName || 'React class', + location, + typeSpecName + ); + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret$1 + ); + } catch (ex) { + error = ex; + } + warning$1( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + location, + typeSpecName, + typeof error === 'undefined' ? 'undefined' : _typeof(error) + ); + if ( + error instanceof Error && + !(error.message in loggedTypeFailures) + ) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; - var stack = getStack ? getStack() : ''; + var stack = getStack ? getStack() : ''; - warning$1(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + warning$1( + false, + 'Failed %s type: %s%s', + location, + error.message, + stack != null ? stack : '' + ); + } + } + } } } - } - } -} -var checkPropTypes_1 = checkPropTypes; + var checkPropTypes_1 = checkPropTypes; -var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, throwOnDirectAccess) { - /* global Symbol */ - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + var factoryWithTypeCheckers = function factoryWithTypeCheckers( + isValidElement, + throwOnDirectAccess + ) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. - /** + /** * Returns the iterator method function contained on the iterable object. * * Be sure to invoke the function with the iterable as context: @@ -7798,14 +9888,17 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t * @param {?object} maybeIterable * @return {?function} */ - function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } - } + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } - /** + /** * Collection of methods that allow declaration and validation of props that are * supplied to React components. Example usage: * @@ -7852,416 +9945,670 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t * @internal */ - var ANONYMOUS = '<>'; + var ANONYMOUS = '<>'; - // Important! - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. - var ReactPropTypes = { - array: createPrimitiveTypeChecker('array'), - bool: createPrimitiveTypeChecker('boolean'), - func: createPrimitiveTypeChecker('function'), - number: createPrimitiveTypeChecker('number'), - object: createPrimitiveTypeChecker('object'), - string: createPrimitiveTypeChecker('string'), - symbol: createPrimitiveTypeChecker('symbol'), + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker - }; + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker + }; - /** + /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ - /*eslint-disable no-self-compare*/ - function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } - } - /*eslint-enable no-self-compare*/ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ - /** + /** * We use an Error-like object for backward compatibility as people may call * PropTypes directly and inspect their output. However, we don't use real * Errors anymore. We don't inspect their stack anyway, and creating them * is prohibitively expensive if they are created too often, such as what * happens in oneOfType() for any type before the one that matched. */ - function PropTypeError(message) { - this.message = message; - this.stack = ''; - } - // Make `instanceof Error` still work for returned errors. - PropTypeError.prototype = Error.prototype; + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; - function createChainableTypeChecker(validate) { - if (false) { - var manualPropTypeCallCache = {}; - var manualPropTypeWarningCount = 0; - } - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - componentName = componentName || ANONYMOUS; - propFullName = propFullName || propName; - - if (secret !== ReactPropTypesSecret_1) { - if (throwOnDirectAccess) { - // New behavior only for users of `prop-types` package - invariant_1(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); - } else if (false) { - // Old behavior for people using React.PropTypes - var cacheKey = componentName + ':' + propName; - if (!manualPropTypeCallCache[cacheKey] && - // Avoid spamming the console because they are often not actionable except for lib authors - manualPropTypeWarningCount < 3) { - warning_1(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName); - manualPropTypeCallCache[cacheKey] = true; - manualPropTypeWarningCount++; + function createChainableTypeChecker(validate) { + if (false) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; } - } - } - if (props[propName] == null) { - if (isRequired) { - if (props[propName] === null) { - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); - } - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); - } - return null; - } else { - return validate(props, propName, componentName, location, propFullName); - } - } + function checkType( + isRequired, + props, + propName, + componentName, + location, + propFullName, + secret + ) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); - - return chainedCheckType; - } - - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== expectedType) { - // `propValue` being instance of, say, date/regexp, pass the 'object' - // check, but we can offer a more precise error message here rather than - // 'of type `object`'. - var preciseType = getPreciseType(propValue); - - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunction_1.thatReturnsNull); - } - - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); - } - var propValue = props[propName]; - if (!Array.isArray(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); - } - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1); - if (error instanceof Error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!isValidElement(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var expectedClassName = expectedClass.name || ANONYMOUS; - var actualClassName = getClassName(props[propName]); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) { - false ? warning_1(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; - return emptyFunction_1.thatReturnsNull; - } - - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - for (var i = 0; i < expectedValues.length; i++) { - if (is(propValue, expectedValues[i])) { - return null; - } - } - - var valuesString = JSON.stringify(expectedValues); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); - } - return createChainableTypeChecker(validate); - } - - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); - } - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); - } - for (var key in propValue) { - if (propValue.hasOwnProperty(key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); - if (error instanceof Error) { - return error; - } - } - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) { - false ? warning_1(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; - return emptyFunction_1.thatReturnsNull; - } - - function validate(props, propName, componentName, location, propFullName) { - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) { - return null; - } - } - - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); - } - return createChainableTypeChecker(validate); - } - - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - if (!isNode(props[propName])) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - if (!checker) { - continue; - } - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); - if (error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); - } - - function isNode(propValue) { - switch (typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue)) { - case 'number': - case 'string': - case 'undefined': - return true; - case 'boolean': - return !propValue; - case 'object': - if (Array.isArray(propValue)) { - return propValue.every(isNode); - } - if (propValue === null || isValidElement(propValue)) { - return true; - } - - var iteratorFn = getIteratorFn(propValue); - if (iteratorFn) { - var iterator = iteratorFn.call(propValue); - var step; - if (iteratorFn !== propValue.entries) { - while (!(step = iterator.next()).done) { - if (!isNode(step.value)) { - return false; - } - } - } else { - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - if (!isNode(entry[1])) { - return false; + if (secret !== ReactPropTypesSecret_1) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant_1( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + } else if (false) { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning_1( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + propFullName, + componentName + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; } } } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.') + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.') + ); + } + return null; + } else { + return validate( + props, + propName, + componentName, + location, + propFullName + ); + } } - } else { + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate( + props, + propName, + componentName, + location, + propFullName, + secret + ) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + preciseType + + '` supplied to `' + + componentName + + '`, expected ') + + ('`' + expectedType + '`.') + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction_1.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate( + props, + propName, + componentName, + location, + propFullName + ) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.' + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + propType + + '` supplied to `' + + componentName + + '`, expected an array.') + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret_1 + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate( + props, + propName, + componentName, + location, + propFullName + ) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + propType + + '` supplied to `' + + componentName + + '`, expected a single ReactElement.') + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate( + props, + propName, + componentName, + location, + propFullName + ) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + actualClassName + + '` supplied to `' + + componentName + + '`, expected ') + + ('instance of `' + expectedClassName + '`.') + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + false + ? warning_1( + false, + 'Invalid argument supplied to oneOf, expected an instance of array.' + ) + : void 0; + return emptyFunction_1.thatReturnsNull; + } + + function validate( + props, + propName, + componentName, + location, + propFullName + ) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + propValue + + '` ' + + ('supplied to `' + + componentName + + '`, expected one of ' + + valuesString + + '.') + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate( + props, + propName, + componentName, + location, + propFullName + ) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.' + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + propType + + '` supplied to `' + + componentName + + '`, expected an object.') + ); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret_1 + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + false + ? warning_1( + false, + 'Invalid argument supplied to oneOfType, expected an instance of array.' + ) + : void 0; + return emptyFunction_1.thatReturnsNull; + } + + function validate( + props, + propName, + componentName, + location, + propFullName + ) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker( + props, + propName, + componentName, + location, + propFullName, + ReactPropTypesSecret_1 + ) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`.') + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate( + props, + propName, + componentName, + location, + propFullName + ) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.') + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate( + props, + propName, + componentName, + location, + propFullName + ) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.') + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret_1 + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue === 'undefined' + ? 'undefined' + : _typeof(propValue)) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + return false; } - return true; - default: - return false; - } - } + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue === 'undefined' + ? 'undefined' + : _typeof(propValue); + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } - function isSymbol(propType, propValue) { - // Native Symbol. - if (propType === 'symbol') { - return true; - } + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } - // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' - if (propValue['@@toStringTag'] === 'Symbol') { - return true; - } + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } - // Fallback for non-spec compliant Symbols which are polyfilled. - if (typeof Symbol === 'function' && propValue instanceof Symbol) { - return true; - } + ReactPropTypes.checkPropTypes = checkPropTypes_1; + ReactPropTypes.PropTypes = ReactPropTypes; - return false; - } + return ReactPropTypes; + }; - // Equivalent of `typeof` but with special handling for array and regexp. - function getPropType(propValue) { - var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue); - if (Array.isArray(propValue)) { - return 'array'; - } - if (propValue instanceof RegExp) { - // Old webkits (at least until Android 4.0) return 'function' rather than - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ - // passes PropTypes.object. - return 'object'; - } - if (isSymbol(propType, propValue)) { - return 'symbol'; - } - return propType; - } + var factoryWithThrowingShims = function factoryWithThrowingShims() { + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + function shim() { + invariant_1( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + } + shim.isRequired = shim; + function getShim() { + return shim; + } + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, - // This handles more types than `getPropType`. Only used for error messages. - // See `createPrimitiveTypeChecker`. - function getPreciseType(propValue) { - var propType = getPropType(propValue); - if (propType === 'object') { - if (propValue instanceof Date) { - return 'date'; - } else if (propValue instanceof RegExp) { - return 'regexp'; - } - } - return propType; - } + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim + }; - // Returns class name of the object, if any. - function getClassName(propValue) { - if (!propValue.constructor || !propValue.constructor.name) { - return ANONYMOUS; - } - return propValue.constructor.name; - } + ReactPropTypes.checkPropTypes = emptyFunction_1; + ReactPropTypes.PropTypes = ReactPropTypes; - ReactPropTypes.checkPropTypes = checkPropTypes_1; - ReactPropTypes.PropTypes = ReactPropTypes; + return ReactPropTypes; + }; - return ReactPropTypes; -}; - -var factoryWithThrowingShims = function factoryWithThrowingShims() { - // Important! - // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. - function shim() { - invariant_1(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); - } - shim.isRequired = shim; - function getShim() { - return shim; - } - var ReactPropTypes = { - array: shim, - bool: shim, - func: shim, - number: shim, - object: shim, - string: shim, - symbol: shim, - - any: shim, - arrayOf: getShim, - element: shim, - instanceOf: getShim, - node: shim, - objectOf: getShim, - oneOf: getShim, - oneOfType: getShim, - shape: getShim - }; - - ReactPropTypes.checkPropTypes = emptyFunction_1; - ReactPropTypes.PropTypes = ReactPropTypes; - - return ReactPropTypes; -}; - -var index = createCommonjsModule(function (module) { - /** + var index = createCommonjsModule(function(module) { + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -8270,259 +10617,466 @@ var index = createCommonjsModule(function (module) { * of patent rights can be found in the PATENTS file in the same directory. */ - if (false) { - var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element') || 0xeac7; + if (false) { + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; - var isValidElement = function isValidElement(object) { - return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - }; + var isValidElement = function isValidElement(object) { + return ( + (typeof object === 'undefined' + ? 'undefined' + : _typeof(object)) === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE + ); + }; - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = factoryWithTypeCheckers(isValidElement, throwOnDirectAccess); - } else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = factoryWithThrowingShims(); - } -}); + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = factoryWithTypeCheckers( + isValidElement, + throwOnDirectAccess + ); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = factoryWithThrowingShims(); + } + }); -function createProps(propTypes, props) { - var newProps = {}; + function createProps(propTypes, props) { + var newProps = {}; - Object.keys(props).filter(function (key) { - return ~['children'].indexOf(key) || !propTypes[key]; - }).forEach(function (key) { - return newProps[key] = props[key]; - }); + Object.keys(props) + .filter(function(key) { + return ~['children'].indexOf(key) || !propTypes[key]; + }) + .forEach(function(key) { + return (newProps[key] = props[key]); + }); - return newProps; -} + return newProps; + } -var _templateObject$1 = taggedTemplateLiteral(['\n @media ', ' {\n ', '\n }\n '], ['\n @media ', ' {\n ', '\n }\n ']); + var _templateObject$1 = taggedTemplateLiteral( + ['\n @media ', ' {\n ', '\n }\n '], + ['\n @media ', ' {\n ', '\n }\n '] + ); -var THEME_CONF = 'flexboxgrid'; -var BASE_CONF = { - gridSize: 12, - gutterWidth: 1, - outerMargin: 2, - container: { - sm: 46, - md: 61, - lg: 76 - }, - breakpoints: { - xs: 0, - sm: 48, - md: 64, - lg: 75 - } -}; + var THEME_CONF = 'flexboxgrid'; + var BASE_CONF = { + gridSize: 12, + gutterWidth: 1, + outerMargin: 2, + container: { + sm: 46, + md: 61, + lg: 76 + }, + breakpoints: { + xs: 0, + sm: 48, + md: 64, + lg: 75 + } + }; -var configCache = []; -var makeCacheId = function makeCacheId(props) { - return JSON.stringify(props.theme && props.theme[THEME_CONF] || {}); -}; -var resolveConfig = function resolveConfig(props) { - var themeConf = props.theme && props.theme[THEME_CONF] || {}; + var configCache = []; + var makeCacheId = function makeCacheId(props) { + return JSON.stringify((props.theme && props.theme[THEME_CONF]) || {}); + }; + var resolveConfig = function resolveConfig(props) { + var themeConf = (props.theme && props.theme[THEME_CONF]) || {}; - var conf = _extends({}, BASE_CONF, themeConf, { - container: _extends({}, BASE_CONF.container, themeConf.container), - breakpoints: _extends({}, BASE_CONF.breakpoints, themeConf.breakpoints) - }); + var conf = _extends({}, BASE_CONF, themeConf, { + container: _extends({}, BASE_CONF.container, themeConf.container), + breakpoints: _extends( + {}, + BASE_CONF.breakpoints, + themeConf.breakpoints + ) + }); - conf.media = Object.keys(conf.breakpoints).reduce(function (media, breakpoint) { - var breakpointWidth = conf.breakpoints[breakpoint]; - media[breakpoint] = makeMedia('only screen' + (breakpoint === 0 ? '' : ' and (min-width: ' + breakpointWidth + 'em)')); - return media; - }, {}); + conf.media = Object.keys(conf.breakpoints).reduce(function( + media, + breakpoint + ) { + var breakpointWidth = conf.breakpoints[breakpoint]; + media[breakpoint] = makeMedia( + 'only screen' + + (breakpoint === 0 + ? '' + : ' and (min-width: ' + breakpointWidth + 'em)') + ); + return media; + }, {}); - return conf; -}; + return conf; + }; -var DIMENSION_NAMES = ['xs', 'sm', 'md', 'lg']; + var DIMENSION_NAMES = ['xs', 'sm', 'md', 'lg']; -function config(props) { - var cacheId = makeCacheId(props); - if (configCache[0] === cacheId) { - return configCache[1]; - } + function config(props) { + var cacheId = makeCacheId(props); + if (configCache[0] === cacheId) { + return configCache[1]; + } - var conf = resolveConfig(props); + var conf = resolveConfig(props); - configCache[0] = cacheId; - configCache[1] = conf; + configCache[0] = cacheId; + configCache[1] = conf; - return conf; -} + return conf; + } -function makeMedia(media) { - return function () { - return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_components__["b" /* css */])(_templateObject$1, media, __WEBPACK_IMPORTED_MODULE_1_styled_components__["b" /* css */].apply(undefined, arguments)); - }; -} + function makeMedia(media) { + return function() { + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_components__['b' /* css */] + )( + _templateObject$1, + media, + __WEBPACK_IMPORTED_MODULE_1_styled_components__[ + 'b' /* css */ + ].apply(undefined, arguments) + ); + }; + } -var _templateObject = taggedTemplateLiteral(['\n margin-right: auto;\n margin-left: auto;\n\n ', '\n\n ', '\n'], ['\n margin-right: auto;\n margin-left: auto;\n\n ', '\n\n ', '\n']); -var _templateObject2 = taggedTemplateLiteral(['\n padding-right: ', ';\n padding-left: ', ';\n '], ['\n padding-right: ', ';\n padding-left: ', ';\n ']); -var _templateObject3 = taggedTemplateLiteral(['\n ', '\n '], ['\n ', '\n ']); -var _templateObject4 = taggedTemplateLiteral(['\n width: ', 'rem;\n '], ['\n width: ', 'rem;\n ']); + var _templateObject = taggedTemplateLiteral( + ['\n margin-right: auto;\n margin-left: auto;\n\n ', '\n\n ', '\n'], + ['\n margin-right: auto;\n margin-left: auto;\n\n ', '\n\n ', '\n'] + ); + var _templateObject2 = taggedTemplateLiteral( + ['\n padding-right: ', ';\n padding-left: ', ';\n '], + ['\n padding-right: ', ';\n padding-left: ', ';\n '] + ); + var _templateObject3 = taggedTemplateLiteral( + ['\n ', '\n '], + ['\n ', '\n '] + ); + var _templateObject4 = taggedTemplateLiteral( + ['\n width: ', 'rem;\n '], + ['\n width: ', 'rem;\n '] + ); -var Grid = function Grid(props) { - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(props.tagName || 'div', createProps(Grid.propTypes, props)); -}; + var Grid = function Grid(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + props.tagName || 'div', + createProps(Grid.propTypes, props) + ); + }; -Grid.displayName = 'Grid'; + Grid.displayName = 'Grid'; -Grid.propTypes = { - fluid: index.bool, - tagName: index.string, - children: index.node -}; + Grid.propTypes = { + fluid: index.bool, + tagName: index.string, + children: index.node + }; -var Grid$1 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_components__["a" /* default */])(Grid)(_templateObject, function (p) { - return p.fluid && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_components__["b" /* css */])(_templateObject2, function (p) { - return config(p).outerMargin + 'rem'; - }, function (p) { - return config(p).outerMargin + 'rem'; - }); -}, function (p) { - return !p.fluid && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_components__["b" /* css */])(_templateObject3, DIMENSION_NAMES.map(function (t) { - return config(p).container[t] && config(p).media[t](_templateObject4, function (p) { - return config(p).container[t]; - }); - })); -}); + var Grid$1 = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_components__['a' /* default */] + )(Grid)( + _templateObject, + function(p) { + return ( + p.fluid && + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_components__['b' /* css */] + )( + _templateObject2, + function(p) { + return config(p).outerMargin + 'rem'; + }, + function(p) { + return config(p).outerMargin + 'rem'; + } + ) + ); + }, + function(p) { + return ( + !p.fluid && + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_components__['b' /* css */] + )( + _templateObject3, + DIMENSION_NAMES.map(function(t) { + return ( + config(p).container[t] && + config(p).media[t](_templateObject4, function(p) { + return config(p).container[t]; + }) + ); + }) + ) + ); + } + ); -var _templateObject$2 = taggedTemplateLiteral(['\n box-sizing: border-box;\n display: flex;\n flex: 0 1 auto;\n flex-direction: row;\n flex-wrap: wrap;\n margin-right: ', 'rem;\n margin-left: ', 'rem;\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n'], ['\n box-sizing: border-box;\n display: flex;\n flex: 0 1 auto;\n flex-direction: row;\n flex-wrap: wrap;\n margin-right: ', 'rem;\n margin-left: ', 'rem;\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n\n ', '\n']); -var _templateObject2$1 = taggedTemplateLiteral(['\n justify-content: flex-start;\n text-align: start;\n '], ['\n justify-content: flex-start;\n text-align: start;\n ']); -var _templateObject3$1 = taggedTemplateLiteral(['\n justify-content: center;\n text-align: center;\n '], ['\n justify-content: center;\n text-align: center;\n ']); -var _templateObject4$1 = taggedTemplateLiteral(['\n justify-content: flex-end;\n text-align: end;\n '], ['\n justify-content: flex-end;\n text-align: end;\n ']); -var _templateObject5 = taggedTemplateLiteral(['\n align-items: flex-start;\n '], ['\n align-items: flex-start;\n ']); -var _templateObject6 = taggedTemplateLiteral(['\n align-items: center;\n '], ['\n align-items: center;\n ']); -var _templateObject7 = taggedTemplateLiteral(['\n align-items: flex-end;\n '], ['\n align-items: flex-end;\n ']); -var _templateObject8 = taggedTemplateLiteral(['\n justify-content: space-around;\n '], ['\n justify-content: space-around;\n ']); -var _templateObject9 = taggedTemplateLiteral(['\n justify-content: space-between;\n '], ['\n justify-content: space-between;\n ']); -var _templateObject10 = taggedTemplateLiteral(['\n order: -1;\n '], ['\n order: -1;\n ']); -var _templateObject11 = taggedTemplateLiteral(['\n order: 1;\n '], ['\n order: 1;\n ']); + var _templateObject$2 = taggedTemplateLiteral( + [ + '\n box-sizing: border-box;\n display: flex;\n flex: 0 1 auto;\n flex-direction: row;\n flex-wrap: wrap;\n margin-right: ', + 'rem;\n margin-left: ', + 'rem;\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n' + ], + [ + '\n box-sizing: border-box;\n display: flex;\n flex: 0 1 auto;\n flex-direction: row;\n flex-wrap: wrap;\n margin-right: ', + 'rem;\n margin-left: ', + 'rem;\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n\n ', + '\n' + ] + ); + var _templateObject2$1 = taggedTemplateLiteral( + ['\n justify-content: flex-start;\n text-align: start;\n '], + ['\n justify-content: flex-start;\n text-align: start;\n '] + ); + var _templateObject3$1 = taggedTemplateLiteral( + ['\n justify-content: center;\n text-align: center;\n '], + ['\n justify-content: center;\n text-align: center;\n '] + ); + var _templateObject4$1 = taggedTemplateLiteral( + ['\n justify-content: flex-end;\n text-align: end;\n '], + ['\n justify-content: flex-end;\n text-align: end;\n '] + ); + var _templateObject5 = taggedTemplateLiteral( + ['\n align-items: flex-start;\n '], + ['\n align-items: flex-start;\n '] + ); + var _templateObject6 = taggedTemplateLiteral( + ['\n align-items: center;\n '], + ['\n align-items: center;\n '] + ); + var _templateObject7 = taggedTemplateLiteral( + ['\n align-items: flex-end;\n '], + ['\n align-items: flex-end;\n '] + ); + var _templateObject8 = taggedTemplateLiteral( + ['\n justify-content: space-around;\n '], + ['\n justify-content: space-around;\n '] + ); + var _templateObject9 = taggedTemplateLiteral( + ['\n justify-content: space-between;\n '], + ['\n justify-content: space-between;\n '] + ); + var _templateObject10 = taggedTemplateLiteral( + ['\n order: -1;\n '], + ['\n order: -1;\n '] + ); + var _templateObject11 = taggedTemplateLiteral( + ['\n order: 1;\n '], + ['\n order: 1;\n '] + ); -var ModificatorType = index.oneOf(DIMENSION_NAMES); + var ModificatorType = index.oneOf(DIMENSION_NAMES); -var Row = function Row(props) { - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(props.tagName || 'div', createProps(Row.propTypes, props)); -}; + var Row = function Row(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + props.tagName || 'div', + createProps(Row.propTypes, props) + ); + }; -Row.displayName = 'Row'; + Row.displayName = 'Row'; -Row.propTypes = { - reverse: index.bool, - start: ModificatorType, - center: ModificatorType, - end: ModificatorType, - top: ModificatorType, - middle: ModificatorType, - bottom: ModificatorType, - around: ModificatorType, - between: ModificatorType, - first: ModificatorType, - last: ModificatorType, - tagName: index.string, - children: index.node -}; + Row.propTypes = { + reverse: index.bool, + start: ModificatorType, + center: ModificatorType, + end: ModificatorType, + top: ModificatorType, + middle: ModificatorType, + bottom: ModificatorType, + around: ModificatorType, + between: ModificatorType, + first: ModificatorType, + last: ModificatorType, + tagName: index.string, + children: index.node + }; -var Row$1 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_components__["a" /* default */])(Row)(_templateObject$2, function (p) { - return config(p).gutterWidth / 2 * -1; -}, function (p) { - return config(p).gutterWidth / 2 * -1; -}, function (p) { - return p.reverse && '\n flex-direction: row-reverse;\n '; -}, function (p) { - return p.start && config(p).media[p.start](_templateObject2$1); -}, function (p) { - return p.center && config(p).media[p.center](_templateObject3$1); -}, function (p) { - return p.end && config(p).media[p.end](_templateObject4$1); -}, function (p) { - return p.top && config(p).media[p.top](_templateObject5); -}, function (p) { - return p.middle && config(p).media[p.middle](_templateObject6); -}, function (p) { - return p.bottom && config(p).media[p.bottom](_templateObject7); -}, function (p) { - return p.around && config(p).media[p.around](_templateObject8); -}, function (p) { - return p.between && config(p).media[p.between](_templateObject9); -}, function (p) { - return p.first && config(p).media[p.first](_templateObject10); -}, function (p) { - return p.last && config(p).media[p.last](_templateObject11); -}); + var Row$1 = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_components__['a' /* default */] + )(Row)( + _templateObject$2, + function(p) { + return config(p).gutterWidth / 2 * -1; + }, + function(p) { + return config(p).gutterWidth / 2 * -1; + }, + function(p) { + return p.reverse && '\n flex-direction: row-reverse;\n '; + }, + function(p) { + return p.start && config(p).media[p.start](_templateObject2$1); + }, + function(p) { + return p.center && config(p).media[p.center](_templateObject3$1); + }, + function(p) { + return p.end && config(p).media[p.end](_templateObject4$1); + }, + function(p) { + return p.top && config(p).media[p.top](_templateObject5); + }, + function(p) { + return p.middle && config(p).media[p.middle](_templateObject6); + }, + function(p) { + return p.bottom && config(p).media[p.bottom](_templateObject7); + }, + function(p) { + return p.around && config(p).media[p.around](_templateObject8); + }, + function(p) { + return p.between && config(p).media[p.between](_templateObject9); + }, + function(p) { + return p.first && config(p).media[p.first](_templateObject10); + }, + function(p) { + return p.last && config(p).media[p.last](_templateObject11); + } + ); -var _templateObject$3 = taggedTemplateLiteral(['\n box-sizing: border-box;\n flex: 0 0 auto;\n padding-right: ', 'rem;\n padding-left: ', 'rem;\n\n ', '\n\n ', '\n\n ', '\n'], ['\n box-sizing: border-box;\n flex: 0 0 auto;\n padding-right: ', 'rem;\n padding-left: ', 'rem;\n\n ', '\n\n ', '\n\n ', '\n']); -var _templateObject2$2 = taggedTemplateLiteral(['', ''], ['', '']); -var _templateObject3$2 = taggedTemplateLiteral(['\n margin-left: ', '%;\n '], ['\n margin-left: ', '%;\n ']); + var _templateObject$3 = taggedTemplateLiteral( + [ + '\n box-sizing: border-box;\n flex: 0 0 auto;\n padding-right: ', + 'rem;\n padding-left: ', + 'rem;\n\n ', + '\n\n ', + '\n\n ', + '\n' + ], + [ + '\n box-sizing: border-box;\n flex: 0 0 auto;\n padding-right: ', + 'rem;\n padding-left: ', + 'rem;\n\n ', + '\n\n ', + '\n\n ', + '\n' + ] + ); + var _templateObject2$2 = taggedTemplateLiteral(['', ''], ['', '']); + var _templateObject3$2 = taggedTemplateLiteral( + ['\n margin-left: ', '%;\n '], + ['\n margin-left: ', '%;\n '] + ); -var ModificatorType$1 = index.oneOfType([index.number, index.bool]); + var ModificatorType$1 = index.oneOfType([index.number, index.bool]); -var offsetProps = DIMENSION_NAMES.map(function (d) { - return d + 'Offset'; -}); -var DimensionPropTypes = DIMENSION_NAMES.reduce(function (propTypes, dimension) { - propTypes[dimension] = ModificatorType$1; - propTypes[dimension + 'Offset'] = index.number; - return propTypes; -}, {}); + var offsetProps = DIMENSION_NAMES.map(function(d) { + return d + 'Offset'; + }); + var DimensionPropTypes = DIMENSION_NAMES.reduce(function( + propTypes, + dimension + ) { + propTypes[dimension] = ModificatorType$1; + propTypes[dimension + 'Offset'] = index.number; + return propTypes; + }, {}); -var Col = function Col(props) { - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(props.tagName || 'div', createProps(Col.propTypes, props)); -}; + var Col = function Col(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + props.tagName || 'div', + createProps(Col.propTypes, props) + ); + }; -Col.propTypes = _extends({}, DimensionPropTypes, { - reverse: index.bool, - tagName: index.string, - children: index.node -}); + Col.propTypes = _extends({}, DimensionPropTypes, { + reverse: index.bool, + tagName: index.string, + children: index.node + }); -Col.displayName = 'Col'; + Col.displayName = 'Col'; -var Col$1 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_components__["a" /* default */])(Col)(_templateObject$3, function (p) { - return config(p).gutterWidth / 2; -}, function (p) { - return config(p).gutterWidth / 2; -}, function (p) { - return p.reverse && '\n flex-direction: column-reverse;\n '; -}, function (p) { - return Object.keys(p).filter(function (k) { - return ~DIMENSION_NAMES.indexOf(k); - }).map(function (k) { - return config(p).media[k](_templateObject2$2, Number.isInteger(p[k]) + var Col$1 = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_components__['a' /* default */] + )(Col)( + _templateObject$3, + function(p) { + return config(p).gutterWidth / 2; + }, + function(p) { + return config(p).gutterWidth / 2; + }, + function(p) { + return p.reverse && '\n flex-direction: column-reverse;\n '; + }, + function(p) { + return Object.keys(p) + .filter(function(k) { + return ~DIMENSION_NAMES.indexOf(k); + }) + .map(function(k) { + return config(p).media[k]( + _templateObject2$2, + Number.isInteger(p[k]) + ? // Integer value + '\n flex-basis: ' + + 100 / config(p).gridSize * p[k] + + '%;\n max-width: ' + + 100 / config(p).gridSize * p[k] + + '%;\n display: block;\n ' + : // Boolean + p[k] + ? // Auto-width + '\n flex-grow: 1;\n flex-basis: 0;\n max-width: 100%;\n display: block;\n ' + : // Hide element + 'display: none;' + ); + }); + }, + function(p) { + return Object.keys(p) + .filter(function(k) { + return ~offsetProps.indexOf(k); + }) + .map(function(k) { + return config(p).media[k.replace(/Offset$/, '')]( + _templateObject3$2, + 100 / config(p).gridSize * p[k] + ); + }); + } + ); - // Integer value - ? '\n flex-basis: ' + 100 / config(p).gridSize * p[k] + '%;\n max-width: ' + 100 / config(p).gridSize * p[k] + '%;\n display: block;\n ' - // Boolean - : p[k] - // Auto-width - ? '\n flex-grow: 1;\n flex-basis: 0;\n max-width: 100%;\n display: block;\n ' - // Hide element - : 'display: none;'); - }); -}, function (p) { - return Object.keys(p).filter(function (k) { - return ~offsetProps.indexOf(k); - }).map(function (k) { - return config(p).media[k.replace(/Offset$/, '')](_templateObject3$2, 100 / config(p).gridSize * p[k]); - }); -}); - - - - -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 60 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -8532,106 +11086,117 @@ var Col$1 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_components_ * */ + var _assign = __webpack_require__(9); + var ReactChildren = __webpack_require__(890); + var ReactComponent = __webpack_require__(183); + var ReactPureComponent = __webpack_require__(895); + var ReactClass = __webpack_require__(891); + var ReactDOMFactories = __webpack_require__(892); + var ReactElement = __webpack_require__(61); + var ReactPropTypes = __webpack_require__(894); + var ReactVersion = __webpack_require__(896); -var _assign = __webpack_require__(9); + var onlyChild = __webpack_require__(899); + var warning = __webpack_require__(5); -var ReactChildren = __webpack_require__(890); -var ReactComponent = __webpack_require__(183); -var ReactPureComponent = __webpack_require__(895); -var ReactClass = __webpack_require__(891); -var ReactDOMFactories = __webpack_require__(892); -var ReactElement = __webpack_require__(61); -var ReactPropTypes = __webpack_require__(894); -var ReactVersion = __webpack_require__(896); + var createElement = ReactElement.createElement; + var createFactory = ReactElement.createFactory; + var cloneElement = ReactElement.cloneElement; -var onlyChild = __webpack_require__(899); -var warning = __webpack_require__(5); - -var createElement = ReactElement.createElement; -var createFactory = ReactElement.createFactory; -var cloneElement = ReactElement.cloneElement; - -if (false) { - var canDefineProperty = require('./canDefineProperty'); - var ReactElementValidator = require('./ReactElementValidator'); - var didWarnPropTypesDeprecated = false; - createElement = ReactElementValidator.createElement; - createFactory = ReactElementValidator.createFactory; - cloneElement = ReactElementValidator.cloneElement; -} - -var __spread = _assign; - -if (false) { - var warned = false; - __spread = function () { - process.env.NODE_ENV !== 'production' ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0; - warned = true; - return _assign.apply(null, arguments); - }; -} - -var React = { - - // Modern - - Children: { - map: ReactChildren.map, - forEach: ReactChildren.forEach, - count: ReactChildren.count, - toArray: ReactChildren.toArray, - only: onlyChild - }, - - Component: ReactComponent, - PureComponent: ReactPureComponent, - - createElement: createElement, - cloneElement: cloneElement, - isValidElement: ReactElement.isValidElement, - - // Classic - - PropTypes: ReactPropTypes, - createClass: ReactClass.createClass, - createFactory: createFactory, - createMixin: function (mixin) { - // Currently a noop. Will be used to validate and trace mixins. - return mixin; - }, - - // This looks DOM specific but these are actually isomorphic helpers - // since they are just generating DOM strings. - DOM: ReactDOMFactories, - - version: ReactVersion, - - // Deprecated hook for JSX spread, don't use this for anything. - __spread: __spread -}; - -// TODO: Fix tests so that this deprecation warning doesn't cause failures. -if (false) { - if (canDefineProperty) { - Object.defineProperty(React, 'PropTypes', { - get: function () { - process.env.NODE_ENV !== 'production' ? warning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated. Use ' + 'the prop-types package from npm instead.') : void 0; - didWarnPropTypesDeprecated = true; - return ReactPropTypes; + if (false) { + var canDefineProperty = require('./canDefineProperty'); + var ReactElementValidator = require('./ReactElementValidator'); + var didWarnPropTypesDeprecated = false; + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; } - }); - } -} -module.exports = React; + var __spread = _assign; -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { + if (false) { + var warned = false; + __spread = function() { + process.env.NODE_ENV !== 'production' + ? warning( + warned, + 'React.__spread is deprecated and should not be used. Use ' + + 'Object.assign directly or another helper function with similar ' + + 'semantics. You may be seeing this warning due to your compiler. ' + + 'See https://fb.me/react-spread-deprecation for more details.' + ) + : void 0; + warned = true; + return _assign.apply(null, arguments); + }; + } -"use strict"; -/** + var React = { + // Modern + + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + toArray: ReactChildren.toArray, + only: onlyChild + }, + + Component: ReactComponent, + PureComponent: ReactPureComponent, + + createElement: createElement, + cloneElement: cloneElement, + isValidElement: ReactElement.isValidElement, + + // Classic + + PropTypes: ReactPropTypes, + createClass: ReactClass.createClass, + createFactory: createFactory, + createMixin: function(mixin) { + // Currently a noop. Will be used to validate and trace mixins. + return mixin; + }, + + // This looks DOM specific but these are actually isomorphic helpers + // since they are just generating DOM strings. + DOM: ReactDOMFactories, + + version: ReactVersion, + + // Deprecated hook for JSX spread, don't use this for anything. + __spread: __spread + }; + + // TODO: Fix tests so that this deprecation warning doesn't cause failures. + if (false) { + if (canDefineProperty) { + Object.defineProperty(React, 'PropTypes', { + get: function() { + process.env.NODE_ENV !== 'production' + ? warning( + didWarnPropTypesDeprecated, + 'Accessing PropTypes via the main React package is deprecated. Use ' + + 'the prop-types package from npm instead.' + ) + : void 0; + didWarnPropTypesDeprecated = true; + return ReactPropTypes; + } + }); + } + } + + module.exports = React; + + /***/ + }, + /* 61 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2014-present, Facebook, Inc. * All rights reserved. * @@ -8641,80 +11206,96 @@ module.exports = React; * */ + var _assign = __webpack_require__(9); + var ReactCurrentOwner = __webpack_require__(33); -var _assign = __webpack_require__(9); + var warning = __webpack_require__(5); + var canDefineProperty = __webpack_require__(308); + var hasOwnProperty = Object.prototype.hasOwnProperty; -var ReactCurrentOwner = __webpack_require__(33); + var REACT_ELEMENT_TYPE = __webpack_require__(307); -var warning = __webpack_require__(5); -var canDefineProperty = __webpack_require__(308); -var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; -var REACT_ELEMENT_TYPE = __webpack_require__(307); + var specialPropKeyWarningShown, specialPropRefWarningShown; -var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true -}; - -var specialPropKeyWarningShown, specialPropRefWarningShown; - -function hasValidRef(config) { - if (false) { - if (hasOwnProperty.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - if (getter && getter.isReactWarning) { - return false; + function hasValidRef(config) { + if (false) { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== undefined; } - } - } - return config.ref !== undefined; -} -function hasValidKey(config) { - if (false) { - if (hasOwnProperty.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - if (getter && getter.isReactWarning) { - return false; + function hasValidKey(config) { + if (false) { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== undefined; } - } - } - return config.key !== undefined; -} -function defineKeyPropWarningGetter(props, displayName) { - var warnAboutAccessingKey = function () { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - false ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); -} + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function() { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + false + ? warning( + false, + '%s: `key` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName + ) + : void 0; + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true + }); + } -function defineRefPropWarningGetter(props, displayName) { - var warnAboutAccessingRef = function () { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - false ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); -} + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function() { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + false + ? warning( + false, + '%s: `ref` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName + ) + : void 0; + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true + }); + } -/** + /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, no instanceof check * will work. Instead test $$typeof field against Symbol.for('react.element') to check @@ -8734,250 +11315,284 @@ function defineRefPropWarningGetter(props, displayName) { * @param {*} props * @internal */ -var ReactElement = function (type, key, ref, self, source, owner, props) { - var element = { - // This tag allow us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, + var ReactElement = function(type, key, ref, self, source, owner, props) { + var element = { + // This tag allow us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type: type, - key: key, - ref: ref, - props: props, + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, - // Record the component responsible for creating this element. - _owner: owner - }; + // Record the component responsible for creating this element. + _owner: owner + }; - if (false) { - // The validation flag is currently mutative. We put it on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - element._store = {}; + if (false) { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; - // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. - if (canDefineProperty) { - Object.defineProperty(element._store, 'validated', { - configurable: false, - enumerable: false, - writable: true, - value: false - }); - // self and source are DEV only properties. - Object.defineProperty(element, '_self', { - configurable: false, - enumerable: false, - writable: false, - value: self - }); - // Two elements created in two different places should be considered - // equal for testing purposes and therefore we hide it from enumeration. - Object.defineProperty(element, '_source', { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - } else { - element._store.validated = false; - element._self = self; - element._source = source; - } - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + if (canDefineProperty) { + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self + }); + // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + } else { + element._store.validated = false; + element._self = self; + element._source = source; + } + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } - return element; -}; + return element; + }; -/** + /** * Create and return a new ReactElement of the given type. * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement */ -ReactElement.createElement = function (type, config, children) { - var propName; + ReactElement.createElement = function(type, config, children) { + var propName; - // Reserved names are extracted - var props = {}; + // Reserved names are extracted + var props = {}; - var key = null; - var ref = null; - var self = null; - var source = null; + var key = null; + var ref = null; + var self = null; + var source = null; - if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - } - if (hasValidKey(config)) { - key = '' + config.key; - } + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + if (hasValidKey(config)) { + key = '' + config.key; + } - self = config.__self === undefined ? null : config.__self; - source = config.__source === undefined ? null : config.__source; - // Remaining properties are added to a new props object - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } - - // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - if (false) { - if (Object.freeze) { - Object.freeze(childArray); - } - } - props.children = childArray; - } - - // Resolve default props - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - for (propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - } - if (false) { - if (key || ref) { - if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; + // Remaining properties are added to a new props object + for (propName in config) { + if ( + hasOwnProperty.call(config, propName) && + !RESERVED_PROPS.hasOwnProperty(propName) + ) { + props[propName] = config[propName]; + } + } } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - } - } - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); -}; -/** + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + if (false) { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + if (false) { + if (key || ref) { + if ( + typeof props.$$typeof === 'undefined' || + props.$$typeof !== REACT_ELEMENT_TYPE + ) { + var displayName = typeof type === 'function' + ? type.displayName || type.name || 'Unknown' + : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + } + return ReactElement( + type, + key, + ref, + self, + source, + ReactCurrentOwner.current, + props + ); + }; + + /** * Return a function that produces ReactElements of a given type. * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory */ -ReactElement.createFactory = function (type) { - var factory = ReactElement.createElement.bind(null, type); - // Expose the type on the factory and the prototype so that it can be - // easily accessed on elements. E.g. `.type === Foo`. - // This should not be named `constructor` since this may not be the function - // that created the element, and it may not even be a constructor. - // Legacy hook TODO: Warn if this is accessed - factory.type = type; - return factory; -}; + ReactElement.createFactory = function(type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. `.type === Foo`. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; + }; -ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { - var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + ReactElement.cloneAndReplaceKey = function(oldElement, newKey) { + var newElement = ReactElement( + oldElement.type, + newKey, + oldElement.ref, + oldElement._self, + oldElement._source, + oldElement._owner, + oldElement.props + ); - return newElement; -}; + return newElement; + }; -/** + /** * Clone and return a new ReactElement using element as the starting point. * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement */ -ReactElement.cloneElement = function (element, config, children) { - var propName; + ReactElement.cloneElement = function(element, config, children) { + var propName; - // Original props are copied - var props = _assign({}, element.props); + // Original props are copied + var props = _assign({}, element.props); - // Reserved names are extracted - var key = element.key; - var ref = element.ref; - // Self is preserved since the owner is preserved. - var self = element._self; - // Source is preserved since cloneElement is unlikely to be targeted by a - // transpiler, and the original source is probably a better indicator of the - // true owner. - var source = element._source; + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + // Self is preserved since the owner is preserved. + var self = element._self; + // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + var source = element._source; - // Owner will be preserved, unless ref is overridden - var owner = element._owner; + // Owner will be preserved, unless ref is overridden + var owner = element._owner; - if (config != null) { - if (hasValidRef(config)) { - // Silently steal the ref from the parent. - ref = config.ref; - owner = ReactCurrentOwner.current; - } - if (hasValidKey(config)) { - key = '' + config.key; - } + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = '' + config.key; + } - // Remaining properties override existing props - var defaultProps; - if (element.type && element.type.defaultProps) { - defaultProps = element.type.defaultProps; - } - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - if (config[propName] === undefined && defaultProps !== undefined) { - // Resolve default props - props[propName] = defaultProps[propName]; - } else { - props[propName] = config[propName]; + // Remaining properties override existing props + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if ( + hasOwnProperty.call(config, propName) && + !RESERVED_PROPS.hasOwnProperty(propName) + ) { + if ( + config[propName] === undefined && + defaultProps !== undefined + ) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } } - } - } - } - // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - props.children = childArray; - } + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } - return ReactElement(element.type, key, ref, self, source, owner, props); -}; + return ReactElement(element.type, key, ref, self, source, owner, props); + }; -/** + /** * Verifies the object is a ReactElement. * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement * @param {?object} object * @return {boolean} True if `object` is a valid component. * @final */ -ReactElement.isValidElement = function (object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; -}; + ReactElement.isValidElement = function(object) { + return ( + typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE + ); + }; -module.exports = ReactElement; + module.exports = ReactElement; -/***/ }), -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 62 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -8988,262 +11603,372 @@ module.exports = ReactElement; * */ - -/** + /** * WARNING: DO NOT manually require this module. * This is a replacement for `invariant(...)` used by the error code system * and will _only_ be required by the corresponding babel pass. * It always throws. */ -function reactProdInvariant(code) { - var argCount = arguments.length - 1; + function reactProdInvariant(code) { + var argCount = arguments.length - 1; - var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + var message = + 'Minified React error #' + + code + + '; visit ' + + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + + code; - for (var argIdx = 0; argIdx < argCount; argIdx++) { - message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); - } + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } - message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + message += + ' for the full message or use the non-minified dev environment' + + ' for full errors and additional helpful warnings.'; - var error = new Error(message); - error.name = 'Invariant Violation'; - error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame - throw error; -} - -module.exports = reactProdInvariant; - -/***/ }), -/* 63 */ -/***/ (function(module, exports) { - - -exports = module.exports = trim; - -function trim(str){ - return str.replace(/^\s*|\s*$/g, ''); -} - -exports.left = function(str){ - return str.replace(/^\s*/, ''); -}; - -exports.right = function(str){ - return str.replace(/\s*$/, ''); -}; - - -/***/ }), -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - -/** - * WARNING: DO NOT manually require this module. - * This is a replacement for `invariant(...)` used by the error code system - * and will _only_ be required by the corresponding babel pass. - * It always throws. - */ - -function reactProdInvariant(code) { - var argCount = arguments.length - 1; - - var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; - - for (var argIdx = 0; argIdx < argCount; argIdx++) { - message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); - } - - message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; - - var error = new Error(message); - error.name = 'Invariant Violation'; - error.framesToPop = 1; // we don't care about reactProdInvariant's own frame - - throw error; -} - -module.exports = reactProdInvariant; - -/***/ }), -/* 65 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - -/** - * WARNING: DO NOT manually require this module. - * This is a replacement for `invariant(...)` used by the error code system - * and will _only_ be required by the corresponding babel pass. - * It always throws. - */ - -function reactProdInvariant(code) { - var argCount = arguments.length - 1; - - var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; - - for (var argIdx = 0; argIdx < argCount; argIdx++) { - message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); - } - - message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; - - var error = new Error(message); - error.name = 'Invariant Violation'; - error.framesToPop = 1; // we don't care about reactProdInvariant's own frame - - throw error; -} - -module.exports = reactProdInvariant; - -/***/ }), -/* 66 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_broadcast__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_broadcast___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_broadcast__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_redux_form__ = __webpack_require__(935); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fieldset__ = __webpack_require__(396); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__baseline__ = __webpack_require__(4); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rnd_id__ = __webpack_require__(116); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rnd_id___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_rnd_id__); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - - - - - - - - -var FormGroup = function (_Component) { - _inherits(FormGroup, _Component); - - function FormGroup(props) { - _classCallCheck(this, FormGroup); - - var _this = _possibleConstructorReturn(this, (FormGroup.__proto__ || Object.getPrototypeOf(FormGroup)).call(this, props)); - - _this.renderGroup = _this.renderGroup.bind(_this); - return _this; - } - - _createClass(FormGroup, [{ - key: 'renderGroup', - value: function renderGroup(inputProps) { - var _props = this.props, - className = _props.className, - style = _props.style, - children = _props.children, - rest = _objectWithoutProperties(_props, ['className', 'style', 'children']); - - var value = Object.assign({ - id: __WEBPACK_IMPORTED_MODULE_6_rnd_id___default()() - }, rest, inputProps); - - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( - __WEBPACK_IMPORTED_MODULE_3__fieldset__["a" /* default */], - { className: className, style: style }, - __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( - __WEBPACK_IMPORTED_MODULE_1_react_broadcast__["Broadcast"], - { channel: 'input-group', value: value }, - __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( - 'div', - null, - children - ) - ) - ); - } - }, { - key: 'render', - value: function render() { - var _props2 = this.props, - _props2$name = _props2.name, - name = _props2$name === undefined ? __WEBPACK_IMPORTED_MODULE_6_rnd_id___default()() : _props2$name, - defaultValue = _props2.defaultValue, - normalize = _props2.normalize, - _props2$reduxForm = _props2.reduxForm, - reduxForm = _props2$reduxForm === undefined ? false : _props2$reduxForm; - - - if (!reduxForm) { - return this.renderGroup({}); + throw error; } - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_redux_form__["a" /* Field */], { - name: name, - defaultValue: defaultValue, - component: this.renderGroup, - normalize: normalize - }); - } - }]); + module.exports = reactProdInvariant; - return FormGroup; -}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + /***/ + }, + /* 63 */ + /***/ function(module, exports) { + exports = module.exports = trim; -FormGroup.propTypes = { - children: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node, - className: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, - defaultValue: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, - name: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, - normalize: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, - reduxForm: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, - style: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object -}; + function trim(str) { + return str.replace(/^\s*|\s*$/g, ''); + } -/* harmony default export */ __webpack_exports__["default"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__baseline__["a" /* default */])(FormGroup)); + exports.left = function(str) { + return str.replace(/^\s*/, ''); + }; -/***/ }), -/* 67 */ -/***/ (function(module, exports, __webpack_require__) { + exports.right = function(str) { + return str.replace(/\s*$/, ''); + }; -"use strict"; -/** + /***/ + }, + /* 64 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + + function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = + 'Minified React error #' + + code + + '; visit ' + + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += + ' for the full message or use the non-minified dev environment' + + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; + } + + module.exports = reactProdInvariant; + + /***/ + }, + /* 65 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + + function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = + 'Minified React error #' + + code + + '; visit ' + + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += + ' for the full message or use the non-minified dev environment' + + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; + } + + module.exports = reactProdInvariant; + + /***/ + }, + /* 66 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__( + 0 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_broadcast__ = __webpack_require__( + 14 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_broadcast___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_broadcast__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_redux_form__ = __webpack_require__( + 935 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fieldset__ = __webpack_require__( + 396 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__baseline__ = __webpack_require__( + 4 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__( + 1 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_5_prop_types__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rnd_id__ = __webpack_require__( + 116 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rnd_id___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_6_rnd_id__ + ); + var _createClass = (function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + } + return call && (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var FormGroup = (function(_Component) { + _inherits(FormGroup, _Component); + + function FormGroup(props) { + _classCallCheck(this, FormGroup); + + var _this = _possibleConstructorReturn( + this, + (FormGroup.__proto__ || Object.getPrototypeOf(FormGroup)) + .call(this, props) + ); + + _this.renderGroup = _this.renderGroup.bind(_this); + return _this; + } + + _createClass(FormGroup, [ + { + key: 'renderGroup', + value: function renderGroup(inputProps) { + var _props = this.props, + className = _props.className, + style = _props.style, + children = _props.children, + rest = _objectWithoutProperties(_props, [ + 'className', + 'style', + 'children' + ]); + + var value = Object.assign( + { + id: __WEBPACK_IMPORTED_MODULE_6_rnd_id___default()() + }, + rest, + inputProps + ); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3__fieldset__['a' /* default */], + { className: className, style: style }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_broadcast__['Broadcast'], + { channel: 'input-group', value: value }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + children + ) + ) + ); + } + }, + { + key: 'render', + value: function render() { + var _props2 = this.props, + _props2$name = _props2.name, + name = _props2$name === undefined + ? __WEBPACK_IMPORTED_MODULE_6_rnd_id___default()() + : _props2$name, + defaultValue = _props2.defaultValue, + normalize = _props2.normalize, + _props2$reduxForm = _props2.reduxForm, + reduxForm = _props2$reduxForm === undefined + ? false + : _props2$reduxForm; + + if (!reduxForm) { + return this.renderGroup({}); + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_redux_form__['a' /* Field */], + { + name: name, + defaultValue: defaultValue, + component: this.renderGroup, + normalize: normalize + } + ); + } + } + ]); + + return FormGroup; + })(__WEBPACK_IMPORTED_MODULE_0_react__['Component']); + + FormGroup.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node, + className: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, + defaultValue: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, + name: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, + normalize: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, + reduxForm: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, + style: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object + }; + + /* harmony default export */ __webpack_exports__[ + 'default' + ] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4__baseline__['a' /* default */] + )(FormGroup); + + /***/ + }, + /* 67 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -9253,125 +11978,138 @@ FormGroup.propTypes = { * */ + var emptyObject = {}; + if (false) { + Object.freeze(emptyObject); + } -var emptyObject = {}; + module.exports = emptyObject; -if (false) { - Object.freeze(emptyObject); -} + /***/ + }, + /* 68 */ + /***/ function(module, exports, __webpack_require__) { + var bind = __webpack_require__(456); -module.exports = emptyObject; + module.exports = bind.call( + Function.call, + Object.prototype.hasOwnProperty + ); -/***/ }), -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ + }, + /* 69 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + exports.__esModule = true; + var addLeadingSlash = (exports.addLeadingSlash = function addLeadingSlash( + path + ) { + return path.charAt(0) === '/' ? path : '/' + path; + }); -var bind = __webpack_require__(456); + var stripLeadingSlash = (exports.stripLeadingSlash = function stripLeadingSlash( + path + ) { + return path.charAt(0) === '/' ? path.substr(1) : path; + }); -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + var stripPrefix = (exports.stripPrefix = function stripPrefix( + path, + prefix + ) { + return path.indexOf(prefix) === 0 ? path.substr(prefix.length) : path; + }); + var stripTrailingSlash = (exports.stripTrailingSlash = function stripTrailingSlash( + path + ) { + return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; + }); -/***/ }), -/* 69 */ -/***/ (function(module, exports, __webpack_require__) { + var parsePath = (exports.parsePath = function parsePath(path) { + var pathname = path || '/'; + var search = ''; + var hash = ''; -"use strict"; + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substr(hashIndex); + pathname = pathname.substr(0, hashIndex); + } + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substr(searchIndex); + pathname = pathname.substr(0, searchIndex); + } -exports.__esModule = true; -var addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) { - return path.charAt(0) === '/' ? path : '/' + path; -}; + pathname = decodeURI(pathname); -var stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) { - return path.charAt(0) === '/' ? path.substr(1) : path; -}; + return { + pathname: pathname, + search: search === '?' ? '' : search, + hash: hash === '#' ? '' : hash + }; + }); -var stripPrefix = exports.stripPrefix = function stripPrefix(path, prefix) { - return path.indexOf(prefix) === 0 ? path.substr(prefix.length) : path; -}; + var createPath = (exports.createPath = function createPath(location) { + var pathname = location.pathname, + search = location.search, + hash = location.hash; -var stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) { - return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; -}; + var path = encodeURI(pathname || '/'); -var parsePath = exports.parsePath = function parsePath(path) { - var pathname = path || '/'; - var search = ''; - var hash = ''; + if (search && search !== '?') + path += search.charAt(0) === '?' ? search : '?' + search; - var hashIndex = pathname.indexOf('#'); - if (hashIndex !== -1) { - hash = pathname.substr(hashIndex); - pathname = pathname.substr(0, hashIndex); - } + if (hash && hash !== '#') + path += hash.charAt(0) === '#' ? hash : '#' + hash; - var searchIndex = pathname.indexOf('?'); - if (searchIndex !== -1) { - search = pathname.substr(searchIndex); - pathname = pathname.substr(0, searchIndex); - } + return path; + }); - pathname = decodeURI(pathname); + /***/ + }, + /* 70 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__( + 94 + ); - return { - pathname: pathname, - search: search === '?' ? '' : search, - hash: hash === '#' ? '' : hash - }; -}; + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; -var createPath = exports.createPath = function createPath(location) { - var pathname = location.pathname, - search = location.search, - hash = location.hash; - - - var path = encodeURI(pathname || '/'); - - if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search; - - if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash; - - return path; -}; - -/***/ }), -/* 70 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(94); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** + /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ -function toKey(value) { - if (typeof value == 'string' || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */])(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} + function toKey(value) { + if ( + typeof value == 'string' || + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__['a' /* default */] + )(value) + ) { + return value; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } -/* harmony default export */ __webpack_exports__["a"] = (toKey); + /* harmony default export */ __webpack_exports__['a'] = toKey; - -/***/ }), -/* 71 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 71 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. @@ -9403,18 +12141,17 @@ function toKey(value) { * _.eq(NaN, NaN); * // => true */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} + function eq(value, other) { + return value === other || (value !== value && other !== other); + } -/* harmony default export */ __webpack_exports__["a"] = (eq); + /* harmony default export */ __webpack_exports__['a'] = eq; - -/***/ }), -/* 72 */ -/***/ (function(module, exports) { - -/** + /***/ + }, + /* 72 */ + /***/ function(module, exports) { + /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. @@ -9446,19 +12183,18 @@ function eq(value, other) { * _.eq(NaN, NaN); * // => true */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} + function eq(value, other) { + return value === other || (value !== value && other !== other); + } -module.exports = eq; + module.exports = eq; - -/***/ }), -/* 73 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 73 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -9468,81 +12204,84 @@ module.exports = eq; * */ + var _prodInvariant = __webpack_require__(7); + var EventPluginRegistry = __webpack_require__(163); + var EventPluginUtils = __webpack_require__(164); + var ReactErrorUtils = __webpack_require__(168); -var _prodInvariant = __webpack_require__(7); + var accumulateInto = __webpack_require__(281); + var forEachAccumulated = __webpack_require__(282); + var invariant = __webpack_require__(2); -var EventPluginRegistry = __webpack_require__(163); -var EventPluginUtils = __webpack_require__(164); -var ReactErrorUtils = __webpack_require__(168); - -var accumulateInto = __webpack_require__(281); -var forEachAccumulated = __webpack_require__(282); -var invariant = __webpack_require__(2); - -/** + /** * Internal store for event listeners */ -var listenerBank = {}; + var listenerBank = {}; -/** + /** * Internal queue of events that have accumulated their dispatches and are * waiting to have their dispatches executed. */ -var eventQueue = null; + var eventQueue = null; -/** + /** * Dispatches an event and releases it back into the pool, unless persistent. * * @param {?object} event Synthetic event to be dispatched. * @param {boolean} simulated If the event is simulated (changes exn behavior) * @private */ -var executeDispatchesAndRelease = function (event, simulated) { - if (event) { - EventPluginUtils.executeDispatchesInOrder(event, simulated); + var executeDispatchesAndRelease = function(event, simulated) { + if (event) { + EventPluginUtils.executeDispatchesInOrder(event, simulated); - if (!event.isPersistent()) { - event.constructor.release(event); - } - } -}; -var executeDispatchesAndReleaseSimulated = function (e) { - return executeDispatchesAndRelease(e, true); -}; -var executeDispatchesAndReleaseTopLevel = function (e) { - return executeDispatchesAndRelease(e, false); -}; + if (!event.isPersistent()) { + event.constructor.release(event); + } + } + }; + var executeDispatchesAndReleaseSimulated = function(e) { + return executeDispatchesAndRelease(e, true); + }; + var executeDispatchesAndReleaseTopLevel = function(e) { + return executeDispatchesAndRelease(e, false); + }; -var getDictionaryKey = function (inst) { - // Prevents V8 performance issue: - // https://github.com/facebook/react/pull/7232 - return '.' + inst._rootNodeID; -}; + var getDictionaryKey = function(inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; + }; -function isInteractive(tag) { - return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; -} + function isInteractive(tag) { + return ( + tag === 'button' || + tag === 'input' || + tag === 'select' || + tag === 'textarea' + ); + } -function shouldPreventMouseEvent(name, type, props) { - switch (name) { - case 'onClick': - case 'onClickCapture': - case 'onDoubleClick': - case 'onDoubleClickCapture': - case 'onMouseDown': - case 'onMouseDownCapture': - case 'onMouseMove': - case 'onMouseMoveCapture': - case 'onMouseUp': - case 'onMouseUpCapture': - return !!(props.disabled && isInteractive(type)); - default: - return false; - } -} + function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + default: + return false; + } + } -/** + /** * This is a unified interface for event plugins to be installed and configured. * * Event plugins can implement the following properties: @@ -9564,184 +12303,223 @@ function shouldPreventMouseEvent(name, type, props) { * * @public */ -var EventPluginHub = { - - /** + var EventPluginHub = { + /** * Methods for injecting dependencies. */ - injection: { - - /** + injection: { + /** * @param {array} InjectedEventPluginOrder * @public */ - injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, - /** + /** * @param {object} injectedNamesToPlugins Map from names to plugin modules. */ - injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + }, - }, - - /** + /** * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent. * * @param {object} inst The instance, which is the source of events. * @param {string} registrationName Name of listener (e.g. `onClick`). * @param {function} listener The callback to store. */ - putListener: function (inst, registrationName, listener) { - !(typeof listener === 'function') ? false ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0; + putListener: function(inst, registrationName, listener) { + !(typeof listener === 'function') + ? false + ? invariant( + false, + 'Expected %s listener to be a function, instead got type %s', + registrationName, + typeof listener + ) + : _prodInvariant('94', registrationName, typeof listener) + : void 0; - var key = getDictionaryKey(inst); - var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); - bankForRegistrationName[key] = listener; + var key = getDictionaryKey(inst); + var bankForRegistrationName = + listenerBank[registrationName] || + (listenerBank[registrationName] = {}); + bankForRegistrationName[key] = listener; - var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; - if (PluginModule && PluginModule.didPutListener) { - PluginModule.didPutListener(inst, registrationName, listener); - } - }, + var PluginModule = + EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.didPutListener) { + PluginModule.didPutListener(inst, registrationName, listener); + } + }, - /** + /** * @param {object} inst The instance, which is the source of events. * @param {string} registrationName Name of listener (e.g. `onClick`). * @return {?function} The stored callback. */ - getListener: function (inst, registrationName) { - // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not - // live here; needs to be moved to a better place soon - var bankForRegistrationName = listenerBank[registrationName]; - if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) { - return null; - } - var key = getDictionaryKey(inst); - return bankForRegistrationName && bankForRegistrationName[key]; - }, + getListener: function(inst, registrationName) { + // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + var bankForRegistrationName = listenerBank[registrationName]; + if ( + shouldPreventMouseEvent( + registrationName, + inst._currentElement.type, + inst._currentElement.props + ) + ) { + return null; + } + var key = getDictionaryKey(inst); + return bankForRegistrationName && bankForRegistrationName[key]; + }, - /** + /** * Deletes a listener from the registration bank. * * @param {object} inst The instance, which is the source of events. * @param {string} registrationName Name of listener (e.g. `onClick`). */ - deleteListener: function (inst, registrationName) { - var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; - if (PluginModule && PluginModule.willDeleteListener) { - PluginModule.willDeleteListener(inst, registrationName); - } + deleteListener: function(inst, registrationName) { + var PluginModule = + EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } - var bankForRegistrationName = listenerBank[registrationName]; - // TODO: This should never be null -- when is it? - if (bankForRegistrationName) { - var key = getDictionaryKey(inst); - delete bankForRegistrationName[key]; - } - }, + var bankForRegistrationName = listenerBank[registrationName]; + // TODO: This should never be null -- when is it? + if (bankForRegistrationName) { + var key = getDictionaryKey(inst); + delete bankForRegistrationName[key]; + } + }, - /** + /** * Deletes all listeners for the DOM element with the supplied ID. * * @param {object} inst The instance, which is the source of events. */ - deleteAllListeners: function (inst) { - var key = getDictionaryKey(inst); - for (var registrationName in listenerBank) { - if (!listenerBank.hasOwnProperty(registrationName)) { - continue; - } + deleteAllListeners: function(inst) { + var key = getDictionaryKey(inst); + for (var registrationName in listenerBank) { + if (!listenerBank.hasOwnProperty(registrationName)) { + continue; + } - if (!listenerBank[registrationName][key]) { - continue; - } + if (!listenerBank[registrationName][key]) { + continue; + } - var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; - if (PluginModule && PluginModule.willDeleteListener) { - PluginModule.willDeleteListener(inst, registrationName); - } + var PluginModule = + EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } - delete listenerBank[registrationName][key]; - } - }, + delete listenerBank[registrationName][key]; + } + }, - /** + /** * Allows registered plugins an opportunity to extract events from top-level * native browser events. * * @return {*} An accumulation of synthetic events. * @internal */ - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var events; - var plugins = EventPluginRegistry.plugins; - for (var i = 0; i < plugins.length; i++) { - // Not every plugin in the ordering may be loaded at runtime. - var possiblePlugin = plugins[i]; - if (possiblePlugin) { - var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); - if (extractedEvents) { - events = accumulateInto(events, extractedEvents); - } - } - } - return events; - }, + extractEvents: function( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ) { + var events; + var plugins = EventPluginRegistry.plugins; + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ); + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + return events; + }, - /** + /** * Enqueues a synthetic event that should be dispatched when * `processEventQueue` is invoked. * * @param {*} events An accumulation of synthetic events. * @internal */ - enqueueEvents: function (events) { - if (events) { - eventQueue = accumulateInto(eventQueue, events); - } - }, + enqueueEvents: function(events) { + if (events) { + eventQueue = accumulateInto(eventQueue, events); + } + }, - /** + /** * Dispatches all synthetic events on the event queue. * * @internal */ - processEventQueue: function (simulated) { - // Set `eventQueue` to null before processing it so that we can tell if more - // events get enqueued while processing. - var processingEventQueue = eventQueue; - eventQueue = null; - if (simulated) { - forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); - } else { - forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); - } - !!eventQueue ? false ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0; - // This would be a good time to rethrow if any of the event handlers threw. - ReactErrorUtils.rethrowCaughtError(); - }, + processEventQueue: function(simulated) { + // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + var processingEventQueue = eventQueue; + eventQueue = null; + if (simulated) { + forEachAccumulated( + processingEventQueue, + executeDispatchesAndReleaseSimulated + ); + } else { + forEachAccumulated( + processingEventQueue, + executeDispatchesAndReleaseTopLevel + ); + } + !!eventQueue + ? false + ? invariant( + false, + 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.' + ) + : _prodInvariant('95') + : void 0; + // This would be a good time to rethrow if any of the event handlers threw. + ReactErrorUtils.rethrowCaughtError(); + }, - /** + /** * These are needed for tests only. Do not use! */ - __purge: function () { - listenerBank = {}; - }, + __purge: function() { + listenerBank = {}; + }, - __getListenerBank: function () { - return listenerBank; - } + __getListenerBank: function() { + return listenerBank; + } + }; -}; + module.exports = EventPluginHub; -module.exports = EventPluginHub; - -/***/ }), -/* 74 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 74 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -9751,111 +12529,143 @@ module.exports = EventPluginHub; * */ + var EventPluginHub = __webpack_require__(73); + var EventPluginUtils = __webpack_require__(164); + var accumulateInto = __webpack_require__(281); + var forEachAccumulated = __webpack_require__(282); + var warning = __webpack_require__(5); -var EventPluginHub = __webpack_require__(73); -var EventPluginUtils = __webpack_require__(164); + var getListener = EventPluginHub.getListener; -var accumulateInto = __webpack_require__(281); -var forEachAccumulated = __webpack_require__(282); -var warning = __webpack_require__(5); - -var getListener = EventPluginHub.getListener; - -/** + /** * Some event types have a notion of different registration names for different * "phases" of propagation. This finds listeners by a given phase. */ -function listenerAtPhase(inst, event, propagationPhase) { - var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; - return getListener(inst, registrationName); -} + function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = + event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); + } -/** + /** * Tags a `SyntheticEvent` with dispatched listeners. Creating this function * here, allows us to not have to bind or create functions for each event. * Mutating the event's members allows us to not have to create a wrapping * "dispatch" object that pairs the event with the listener. */ -function accumulateDirectionalDispatches(inst, phase, event) { - if (false) { - process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0; - } - var listener = listenerAtPhase(inst, event, phase); - if (listener) { - event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); - event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); - } -} + function accumulateDirectionalDispatches(inst, phase, event) { + if (false) { + process.env.NODE_ENV !== 'production' + ? warning(inst, 'Dispatching inst must not be null') + : void 0; + } + var listener = listenerAtPhase(inst, event, phase); + if (listener) { + event._dispatchListeners = accumulateInto( + event._dispatchListeners, + listener + ); + event._dispatchInstances = accumulateInto( + event._dispatchInstances, + inst + ); + } + } -/** + /** * Collect dispatches (must be entirely collected before dispatching - see unit * tests). Lazily allocate the array to conserve memory. We must loop through * each event and perform the traversal for each one. We cannot perform a * single traversal for the entire collection of events because each event may * have a different target. */ -function accumulateTwoPhaseDispatchesSingle(event) { - if (event && event.dispatchConfig.phasedRegistrationNames) { - EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); - } -} + function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginUtils.traverseTwoPhase( + event._targetInst, + accumulateDirectionalDispatches, + event + ); + } + } -/** + /** * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. */ -function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { - if (event && event.dispatchConfig.phasedRegistrationNames) { - var targetInst = event._targetInst; - var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; - EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); - } -} + function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + var targetInst = event._targetInst; + var parentInst = targetInst + ? EventPluginUtils.getParentInstance(targetInst) + : null; + EventPluginUtils.traverseTwoPhase( + parentInst, + accumulateDirectionalDispatches, + event + ); + } + } -/** + /** * Accumulates without regard to direction, does not look for phased * registration names. Same as `accumulateDirectDispatchesSingle` but without * requiring that the `dispatchMarker` be the same as the dispatched ID. */ -function accumulateDispatches(inst, ignoredDirection, event) { - if (event && event.dispatchConfig.registrationName) { - var registrationName = event.dispatchConfig.registrationName; - var listener = getListener(inst, registrationName); - if (listener) { - event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); - event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); - } - } -} + function accumulateDispatches(inst, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + if (listener) { + event._dispatchListeners = accumulateInto( + event._dispatchListeners, + listener + ); + event._dispatchInstances = accumulateInto( + event._dispatchInstances, + inst + ); + } + } + } -/** + /** * Accumulates dispatches on an `SyntheticEvent`, but only for the * `dispatchMarker`. * @param {SyntheticEvent} event */ -function accumulateDirectDispatchesSingle(event) { - if (event && event.dispatchConfig.registrationName) { - accumulateDispatches(event._targetInst, null, event); - } -} + function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } + } -function accumulateTwoPhaseDispatches(events) { - forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); -} + function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); + } -function accumulateTwoPhaseDispatchesSkipTarget(events) { - forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); -} + function accumulateTwoPhaseDispatchesSkipTarget(events) { + forEachAccumulated( + events, + accumulateTwoPhaseDispatchesSingleSkipTarget + ); + } -function accumulateEnterLeaveDispatches(leave, enter, from, to) { - EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); -} + function accumulateEnterLeaveDispatches(leave, enter, from, to) { + EventPluginUtils.traverseEnterLeave( + from, + to, + accumulateDispatches, + leave, + enter + ); + } -function accumulateDirectDispatches(events) { - forEachAccumulated(events, accumulateDirectDispatchesSingle); -} + function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); + } -/** + /** * A small set of propagation patterns, each of which will accept a small amount * of information, and generate a set of "dispatch ready event objects" - which * are sets of events that have already been annotated with a set of dispatched @@ -9866,21 +12676,21 @@ function accumulateDirectDispatches(events) { * * @constructor EventPropagators */ -var EventPropagators = { - accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, - accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, - accumulateDirectDispatches: accumulateDirectDispatches, - accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches -}; + var EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches + }; -module.exports = EventPropagators; + module.exports = EventPropagators; -/***/ }), -/* 75 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 75 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -9890,50 +12700,46 @@ module.exports = EventPropagators; * */ - - -/** + /** * `ReactInstanceMap` maintains a mapping from a public facing stateful * instance (key) and the internal representation (value). This allows public * methods to accept the user facing instance as an argument and map them back * to internal methods. */ -// TODO: Replace this with ES6: var ReactInstanceMap = new Map(); + // TODO: Replace this with ES6: var ReactInstanceMap = new Map(); -var ReactInstanceMap = { - - /** + var ReactInstanceMap = { + /** * This API should be called `delete` but we'd have to make sure to always * transform these to strings for IE support. When this transform is fully * supported we can rename it. */ - remove: function (key) { - key._reactInternalInstance = undefined; - }, + remove: function(key) { + key._reactInternalInstance = undefined; + }, - get: function (key) { - return key._reactInternalInstance; - }, + get: function(key) { + return key._reactInternalInstance; + }, - has: function (key) { - return key._reactInternalInstance !== undefined; - }, + has: function(key) { + return key._reactInternalInstance !== undefined; + }, - set: function (key, value) { - key._reactInternalInstance = value; - } + set: function(key, value) { + key._reactInternalInstance = value; + } + }; -}; + module.exports = ReactInstanceMap; -module.exports = ReactInstanceMap; - -/***/ }), -/* 76 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 76 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -9943,423 +12749,551 @@ module.exports = ReactInstanceMap; * */ + var SyntheticEvent = __webpack_require__(32); + var getEventTarget = __webpack_require__(173); -var SyntheticEvent = __webpack_require__(32); - -var getEventTarget = __webpack_require__(173); - -/** + /** * @interface UIEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ -var UIEventInterface = { - view: function (event) { - if (event.view) { - return event.view; - } + var UIEventInterface = { + view: function(event) { + if (event.view) { + return event.view; + } - var target = getEventTarget(event); - if (target.window === target) { - // target is a window object - return target; - } + var target = getEventTarget(event); + if (target.window === target) { + // target is a window object + return target; + } - var doc = target.ownerDocument; - // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. - if (doc) { - return doc.defaultView || doc.parentWindow; - } else { - return window; - } - }, - detail: function (event) { - return event.detail || 0; - } -}; + var doc = target.ownerDocument; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + if (doc) { + return doc.defaultView || doc.parentWindow; + } else { + return window; + } + }, + detail: function(event) { + return event.detail || 0; + } + }; -/** + /** * @param {object} dispatchConfig Configuration used to dispatch this event. * @param {string} dispatchMarker Marker identifying the event target. * @param {object} nativeEvent Native browser event. * @extends {SyntheticEvent} */ -function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); -} + function SyntheticUIEvent( + dispatchConfig, + dispatchMarker, + nativeEvent, + nativeEventTarget + ) { + return SyntheticEvent.call( + this, + dispatchConfig, + dispatchMarker, + nativeEvent, + nativeEventTarget + ); + } -SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); + SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); -module.exports = SyntheticUIEvent; + module.exports = SyntheticUIEvent; -/***/ }), -/* 77 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(779); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(290); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(780); -/* unused harmony reexport Provider */ -/* unused harmony reexport createProvider */ -/* unused harmony reexport connectAdvanced */ -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__connect_connect__["a"]; }); - - - - - - -/***/ }), -/* 78 */ -/***/ (function(module, exports) { - -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } + /***/ + }, + /* 77 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__( + 779 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__( + 290 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__( + 780 + ); + /* unused harmony reexport Provider */ + /* unused harmony reexport createProvider */ + /* unused harmony reexport connectAdvanced */ + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'a', + function() { + return __WEBPACK_IMPORTED_MODULE_2__connect_connect__['a']; } - } + ); - return target -} + /***/ + }, + /* 78 */ + /***/ function(module, exports) { + module.exports = extend; + var hasOwnProperty = Object.prototype.hasOwnProperty; -/***/ }), -/* 79 */ -/***/ (function(module, exports, __webpack_require__) { + function extend() { + var target = {}; -"use strict"; -/* + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + } + + /***/ + }, + /* 79 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /* object-assign (c) Sindre Sorhus @license MIT */ + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError( + 'Object.assign cannot be called with null or undefined' + ); + } -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } + return Object(val); + } - return Object(val); -} + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } + // Detect buggy property enumeration order in older V8 versions. - // Detect buggy property enumeration order in older V8 versions. + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function(letter) { + test3[letter] = letter; + }); + if ( + Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst' + ) { + return false; + } - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} + module.exports = shouldUseNative() + ? Object.assign + : function(target, source) { + var from; + var to = toObject(target); + var symbols; -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } + return to; + }; - return to; -}; - - -/***/ }), -/* 80 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* + /***/ + }, + /* 80 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /* object-assign (c) Sindre Sorhus @license MIT */ + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError( + 'Object.assign cannot be called with null or undefined' + ); + } -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } + return Object(val); + } - return Object(val); -} + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } + // Detect buggy property enumeration order in older V8 versions. - // Detect buggy property enumeration order in older V8 versions. + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function(letter) { + test3[letter] = letter; + }); + if ( + Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst' + ) { + return false; + } - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} + module.exports = shouldUseNative() + ? Object.assign + : function(target, source) { + var from; + var to = toObject(target); + var symbols; -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } + return to; + }; - return to; -}; + /***/ + }, + /* 81 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__( + 0 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_broadcast__ = __webpack_require__( + 14 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_broadcast___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_broadcast__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_styled_components__ = __webpack_require__( + 3 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_remcalc__ = __webpack_require__( + 8 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_remcalc___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_remcalc__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__label__ = __webpack_require__( + 206 + ); + var _templateObject = _taggedTemplateLiteral( + ['\n margin-right: ', ';\n'], + ['\n margin-right: ', ';\n'] + ); + function _taggedTemplateLiteral(strings, raw) { + return Object.freeze( + Object.defineProperties(strings, { + raw: { value: Object.freeze(raw) } + }) + ); + } -/***/ }), -/* 81 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var StyledLabel = __WEBPACK_IMPORTED_MODULE_4__label__[ + 'a' /* default */ + ].extend( + _templateObject, + __WEBPACK_IMPORTED_MODULE_3_remcalc___default()(12) + ); -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_broadcast__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_broadcast___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_broadcast__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_styled_components__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_remcalc__ = __webpack_require__(8); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_remcalc___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_remcalc__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__label__ = __webpack_require__(206); -var _templateObject = _taggedTemplateLiteral(['\n margin-right: ', ';\n'], ['\n margin-right: ', ';\n']); + /* harmony default export */ __webpack_exports__['default'] = function( + props + ) { + var render = function render(value) { + var _ref = value || {}, + _ref$id = _ref.id, + id = _ref$id === undefined ? '' : _ref$id; -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + StyledLabel, + Object.assign({}, props, { htmlFor: id }) + ); + }; + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_broadcast__['Subscriber'], + { channel: 'input-group' }, + render + ); + }; + /***/ + }, + /* 82 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_broadcast__ = __webpack_require__( + 14 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_broadcast___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react_broadcast__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_is__ = __webpack_require__( + 12 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseline__ = __webpack_require__( + 4 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__breakpoints__ = __webpack_require__( + 386 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_styled_components__ = __webpack_require__( + 3 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__label__ = __webpack_require__( + 206 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__( + 1 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_6_prop_types__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__( + 0 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_7_react__ + ); + var _templateObject = _taggedTemplateLiteral( + ['\n ', ';\n\n ', ';\n\n ', ';\n\n ', ';\n\n ', ';\n'], + ['\n ', ';\n\n ', ';\n\n ', ';\n\n ', ';\n\n ', ';\n'] + ), + _templateObject2 = _taggedTemplateLiteral( + ['\n text-align: right;\n '], + ['\n text-align: right;\n '] + ), + _templateObject3 = _taggedTemplateLiteral( + ['\n float: right;\n '], + ['\n float: right;\n '] + ), + _templateObject4 = _taggedTemplateLiteral( + ['\n color: ', ';\n '], + ['\n color: ', ';\n '] + ); + function _taggedTemplateLiteral(strings, raw) { + return Object.freeze( + Object.defineProperties(strings, { + raw: { value: Object.freeze(raw) } + }) + ); + } + var StyledLabel = __WEBPACK_IMPORTED_MODULE_5__label__[ + 'a' /* default */ + ].extend( + _templateObject, + __WEBPACK_IMPORTED_MODULE_3__breakpoints__['a' /* default */].medium( + _templateObject2 + ), + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('right')(_templateObject3), + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('error')(_templateObject4, function(props) { + return props.theme.red; + }), + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('warning')(_templateObject4, function(props) { + return props.theme.orange; + }), + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_styled_is__['a' /* default */] + )('success')(_templateObject4, function(props) { + return props.theme.green; + }) + ); + var Meta = function Meta(props) { + var render = function render(value) { + var _value$meta = value.meta, + meta = _value$meta === undefined ? {} : _value$meta; + var msg = + props.children || + props.error || + props.warning || + props.success || + meta.error || + meta.warning || + meta.success || + value.error || + value.warning || + value.success; -var StyledLabel = __WEBPACK_IMPORTED_MODULE_4__label__["a" /* default */].extend(_templateObject, __WEBPACK_IMPORTED_MODULE_3_remcalc___default()(12)); + var hasError = Boolean(props.error || meta.error || value.error); + var hasWarning = Boolean( + props.warning || meta.warning || value.warning + ); + var hasSuccess = Boolean( + props.success || meta.success || value.success + ); + var isRight = !props.left; -/* harmony default export */ __webpack_exports__["default"] = (function (props) { - var render = function render(value) { - var _ref = value || {}, - _ref$id = _ref.id, - id = _ref$id === undefined ? '' : _ref$id; + return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement( + StyledLabel, + Object.assign({}, meta, props, { + error: hasError, + warning: hasWarning, + success: hasSuccess, + right: isRight + }), + msg + ); + }; - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(StyledLabel, Object.assign({}, props, { htmlFor: id })); - }; + return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_broadcast__['Subscriber'], + { channel: 'input-group' }, + render + ); + }; - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( - __WEBPACK_IMPORTED_MODULE_1_react_broadcast__["Subscriber"], - { channel: 'input-group' }, - render - ); -}); + Meta.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node, + error: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ + __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, + __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool + ]), + left: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, + success: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ + __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, + __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool + ]), + warning: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ + __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, + __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool + ]) + }; -/***/ }), -/* 82 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /* harmony default export */ __webpack_exports__[ + 'default' + ] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__baseline__['a' /* default */] + )(Meta); -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_broadcast__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_broadcast___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_broadcast__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_styled_is__ = __webpack_require__(12); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseline__ = __webpack_require__(4); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__breakpoints__ = __webpack_require__(386); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_styled_components__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__label__ = __webpack_require__(206); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__); -var _templateObject = _taggedTemplateLiteral(['\n ', ';\n\n ', ';\n\n ', ';\n\n ', ';\n\n ', ';\n'], ['\n ', ';\n\n ', ';\n\n ', ';\n\n ', ';\n\n ', ';\n']), - _templateObject2 = _taggedTemplateLiteral(['\n text-align: right;\n '], ['\n text-align: right;\n ']), - _templateObject3 = _taggedTemplateLiteral(['\n float: right;\n '], ['\n float: right;\n ']), - _templateObject4 = _taggedTemplateLiteral(['\n color: ', ';\n '], ['\n color: ', ';\n ']); - -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - - - - - - - - - - -var StyledLabel = __WEBPACK_IMPORTED_MODULE_5__label__["a" /* default */].extend(_templateObject, __WEBPACK_IMPORTED_MODULE_3__breakpoints__["a" /* default */].medium(_templateObject2), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('right')(_templateObject3), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('error')(_templateObject4, function (props) { - return props.theme.red; -}), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('warning')(_templateObject4, function (props) { - return props.theme.orange; -}), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_styled_is__["a" /* default */])('success')(_templateObject4, function (props) { - return props.theme.green; -})); - -var Meta = function Meta(props) { - var render = function render(value) { - var _value$meta = value.meta, - meta = _value$meta === undefined ? {} : _value$meta; - - - var msg = props.children || props.error || props.warning || props.success || meta.error || meta.warning || meta.success || value.error || value.warning || value.success; - - var hasError = Boolean(props.error || meta.error || value.error); - var hasWarning = Boolean(props.warning || meta.warning || value.warning); - var hasSuccess = Boolean(props.success || meta.success || value.success); - var isRight = !props.left; - - return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement( - StyledLabel, - Object.assign({}, meta, props, { - error: hasError, - warning: hasWarning, - success: hasSuccess, - right: isRight - }), - msg - ); - }; - - return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement( - __WEBPACK_IMPORTED_MODULE_0_react_broadcast__["Subscriber"], - { channel: 'input-group' }, - render - ); -}; - -Meta.propTypes = { - children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node, - error: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool]), - left: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, - success: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool]), - warning: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool]) -}; - -/* harmony default export */ __webpack_exports__["default"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__baseline__["a" /* default */])(Meta)); - -/***/ }), -/* 83 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 83 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * @author Titus Wormer * @copyright 2016 Titus Wormer * @license MIT @@ -10367,280 +13301,321 @@ Meta.propTypes = { * @fileoverview Check if a character is decimal. */ + /* eslint-env commonjs */ + /* Expose. */ + module.exports = decimal; -/* eslint-env commonjs */ - -/* Expose. */ -module.exports = decimal; - -/** + /** * Check whether the given character code, or the character * code at the first character, is decimal. * * @param {string|number} character * @return {boolean} - Whether `character` is decimal. */ -function decimal(character) { - var code = typeof character === 'string' ? - character.charCodeAt(0) : character; + function decimal(character) { + var code = typeof character === 'string' + ? character.charCodeAt(0) + : character; - return code >= 48 && code <= 57; /* 0-9 */ -} + return code >= 48 && code <= 57; /* 0-9 */ + } + /***/ + }, + /* 84 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + Object.defineProperty(exports, '__esModule', { + value: true + }); -/***/ }), -/* 84 */ -/***/ (function(module, exports, __webpack_require__) { + var _extends = + Object.assign || + function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; -"use strict"; + var _createClass = (function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + var _createRule = __webpack_require__(220); -Object.defineProperty(exports, "__esModule", { - value: true -}); + var _createRule2 = _interopRequireDefault(_createRule); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + var _updateRule = __webpack_require__(493); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + var _updateRule2 = _interopRequireDefault(_updateRule); -var _createRule = __webpack_require__(220); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } -var _createRule2 = _interopRequireDefault(_createRule); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } -var _updateRule = __webpack_require__(493); - -var _updateRule2 = _interopRequireDefault(_updateRule); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -/** + /** * Contains rules objects and allows adding/removing etc. * Is used for e.g. by `StyleSheet` or `ConditionalRule`. */ -var RulesContainer = function () { + var RulesContainer = (function() { + // Original styles object. + function RulesContainer(options) { + _classCallCheck(this, RulesContainer); - // Original styles object. - function RulesContainer(options) { - _classCallCheck(this, RulesContainer); + this.map = Object.create(null); + this.raw = Object.create(null); + this.index = []; - this.map = Object.create(null); - this.raw = Object.create(null); - this.index = []; + this.options = options; + this.classes = options.classes; + } - this.options = options; - this.classes = options.classes; - } - - /** + /** * Create and register rule. * * Will not render after Style Sheet was rendered the first time. */ + // Used to ensure correct rules order. - // Used to ensure correct rules order. + // Rules registry for access by .get() method. + // It contains the same rule registered by name and by selector. - // Rules registry for access by .get() method. - // It contains the same rule registered by name and by selector. + _createClass(RulesContainer, [ + { + key: 'add', + value: function add(name, decl, options) { + var _options = this.options, + parent = _options.parent, + sheet = _options.sheet, + jss = _options.jss, + Renderer = _options.Renderer, + generateClassName = _options.generateClassName; + options = _extends( + { + classes: this.classes, + parent: parent, + sheet: sheet, + jss: jss, + Renderer: Renderer, + generateClassName: generateClassName + }, + options + ); - _createClass(RulesContainer, [{ - key: 'add', - value: function add(name, decl, options) { - var _options = this.options, - parent = _options.parent, - sheet = _options.sheet, - jss = _options.jss, - Renderer = _options.Renderer, - generateClassName = _options.generateClassName; + if (!options.className) options.className = this.classes[name]; + this.raw[name] = decl; - options = _extends({ - classes: this.classes, - parent: parent, - sheet: sheet, - jss: jss, - Renderer: Renderer, - generateClassName: generateClassName - }, options); + var rule = (0, _createRule2['default'])(name, decl, options); + this.register(rule); - if (!options.className) options.className = this.classes[name]; + var index = options.index === undefined + ? this.index.length + : options.index; + this.index.splice(index, 0, rule); - this.raw[name] = decl; + return rule; + } - var rule = (0, _createRule2['default'])(name, decl, options); - this.register(rule); - - var index = options.index === undefined ? this.index.length : options.index; - this.index.splice(index, 0, rule); - - return rule; - } - - /** + /** * Get a rule. */ + }, + { + key: 'get', + value: function get(name) { + return this.map[name]; + } - }, { - key: 'get', - value: function get(name) { - return this.map[name]; - } - - /** + /** * Delete a rule. */ + }, + { + key: 'remove', + value: function remove(rule) { + this.unregister(rule); + this.index.splice(this.indexOf(rule), 1); + } - }, { - key: 'remove', - value: function remove(rule) { - this.unregister(rule); - this.index.splice(this.indexOf(rule), 1); - } - - /** + /** * Get index of a rule. */ + }, + { + key: 'indexOf', + value: function indexOf(rule) { + return this.index.indexOf(rule); + } - }, { - key: 'indexOf', - value: function indexOf(rule) { - return this.index.indexOf(rule); - } - - /** + /** * Run `onProcessRule()` plugins on every rule. */ + }, + { + key: 'process', + value: function process() { + var plugins = this.options.jss.plugins; + // We need to clone array because if we modify the index somewhere else during a loop + // we end up with very hard-to-track-down side effects. - }, { - key: 'process', - value: function process() { - var plugins = this.options.jss.plugins; - // We need to clone array because if we modify the index somewhere else during a loop - // we end up with very hard-to-track-down side effects. + this.index.slice(0).forEach(plugins.onProcessRule, plugins); + } - this.index.slice(0).forEach(plugins.onProcessRule, plugins); - } - - /** + /** * Register a rule in `.map` and `.classes` maps. */ + }, + { + key: 'register', + value: function register(rule) { + if (rule.name) this.map[rule.name] = rule; + if (rule.className && rule.name) + this.classes[rule.name] = rule.className; + if (rule.selector) this.map[rule.selector] = rule; + } - }, { - key: 'register', - value: function register(rule) { - if (rule.name) this.map[rule.name] = rule; - if (rule.className && rule.name) this.classes[rule.name] = rule.className; - if (rule.selector) this.map[rule.selector] = rule; - } - - /** + /** * Unregister a rule. */ + }, + { + key: 'unregister', + value: function unregister(rule) { + if (rule.name) { + delete this.map[rule.name]; + delete this.classes[rule.name]; + } + delete this.map[rule.selector]; + } - }, { - key: 'unregister', - value: function unregister(rule) { - if (rule.name) { - delete this.map[rule.name]; - delete this.classes[rule.name]; - } - delete this.map[rule.selector]; - } - - /** + /** * Update the function values with a new data. */ + }, + { + key: 'update', + value: function update(name, data) { + if (typeof name === 'string') { + (0, _updateRule2['default'])( + this.get(name), + data, + RulesContainer + ); + return; + } - }, { - key: 'update', - value: function update(name, data) { - if (typeof name === 'string') { - (0, _updateRule2['default'])(this.get(name), data, RulesContainer); - return; - } + for (var index = 0; index < this.index.length; index++) { + (0, _updateRule2['default'])( + this.index[index], + name, + RulesContainer + ); + } + } - for (var index = 0; index < this.index.length; index++) { - (0, _updateRule2['default'])(this.index[index], name, RulesContainer); - } - } - - /** + /** * Convert rules to a CSS string. */ + }, + { + key: 'toString', + value: function toString(options) { + var str = ''; - }, { - key: 'toString', - value: function toString(options) { - var str = ''; + for (var index = 0; index < this.index.length; index++) { + var rule = this.index[index]; + var css = rule.toString(options); - for (var index = 0; index < this.index.length; index++) { - var rule = this.index[index]; - var css = rule.toString(options); + // No need to render an empty rule. + if (!css) continue; - // No need to render an empty rule. - if (!css) continue; + if (str) str += '\n'; + str += css; + } - if (str) str += '\n'; - str += css; + return str; + } + } + ]); + + return RulesContainer; + })(); + + exports['default'] = RulesContainer; + + /***/ + }, + /* 85 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports.create = exports.sheets = exports.RulesContainer = exports.SheetsRegistry = exports.getDynamicStyles = undefined; + + var _Jss = __webpack_require__(477); + + var _Jss2 = _interopRequireDefault(_Jss); + + var _SheetsRegistry = __webpack_require__(219); + + var _SheetsRegistry2 = _interopRequireDefault(_SheetsRegistry); + + var _RulesContainer = __webpack_require__(84); + + var _RulesContainer2 = _interopRequireDefault(_RulesContainer); + + var _sheets = __webpack_require__(131); + + var _sheets2 = _interopRequireDefault(_sheets); + + var _getDynamicStyles = __webpack_require__(492); + + var _getDynamicStyles2 = _interopRequireDefault(_getDynamicStyles); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; } - return str; - } - }]); - - return RulesContainer; -}(); - -exports['default'] = RulesContainer; - -/***/ }), -/* 85 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.create = exports.sheets = exports.RulesContainer = exports.SheetsRegistry = exports.getDynamicStyles = undefined; - -var _Jss = __webpack_require__(477); - -var _Jss2 = _interopRequireDefault(_Jss); - -var _SheetsRegistry = __webpack_require__(219); - -var _SheetsRegistry2 = _interopRequireDefault(_SheetsRegistry); - -var _RulesContainer = __webpack_require__(84); - -var _RulesContainer2 = _interopRequireDefault(_RulesContainer); - -var _sheets = __webpack_require__(131); - -var _sheets2 = _interopRequireDefault(_sheets); - -var _getDynamicStyles = __webpack_require__(492); - -var _getDynamicStyles2 = _interopRequireDefault(_getDynamicStyles); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -/** + /** * Extracts a styles object with only rules that contain function values. */ -exports.getDynamicStyles = _getDynamicStyles2['default']; + exports.getDynamicStyles = _getDynamicStyles2['default']; -/** + /** * SheetsRegistry for SSR. */ -/** + /** * A better abstraction over CSS. * * @copyright Oleg Slobodskoi 2014-present @@ -10648,100 +13623,110 @@ exports.getDynamicStyles = _getDynamicStyles2['default']; * @license MIT */ -exports.SheetsRegistry = _SheetsRegistry2['default']; + exports.SheetsRegistry = _SheetsRegistry2['default']; -/** + /** * RulesContainer for plugins. */ -exports.RulesContainer = _RulesContainer2['default']; + exports.RulesContainer = _RulesContainer2['default']; -/** + /** * Default global SheetsRegistry instance. */ -exports.sheets = _sheets2['default']; + exports.sheets = _sheets2['default']; -/** + /** * Creates a new instance of Jss. */ -var create = exports.create = function create(options) { - return new _Jss2['default'](options); -}; + var create = (exports.create = function create(options) { + return new _Jss2['default'](options); + }); -/** + /** * A global Jss instance. */ -exports['default'] = create(); + exports['default'] = create(); -/***/ }), -/* 86 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /***/ + }, + /* 86 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__( + 554 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__( + 555 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__( + 556 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__( + 557 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__( + 558 + ); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(554); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(555); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(556); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(557); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(558); - - - - - - -/** + /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } -// Add methods to `ListCache`. -ListCache.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__["a" /* default */]; -ListCache.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__["a" /* default */]; -ListCache.prototype.get = __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__["a" /* default */]; -ListCache.prototype.has = __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__["a" /* default */]; -ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /* default */]; + // Add methods to `ListCache`. + ListCache.prototype.clear = + __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__['a' /* default */]; + ListCache.prototype['delete'] = + __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__['a' /* default */]; + ListCache.prototype.get = + __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__['a' /* default */]; + ListCache.prototype.has = + __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__['a' /* default */]; + ListCache.prototype.set = + __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__['a' /* default */]; -/* harmony default export */ __webpack_exports__["a"] = (ListCache); + /* harmony default export */ __webpack_exports__['a'] = ListCache; + /***/ + }, + /* 87 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__( + 27 + ); -/***/ }), -/* 87 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /** Built-in value references. */ + var Symbol = + __WEBPACK_IMPORTED_MODULE_0__root_js__['a' /* default */].Symbol; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(27); + /* harmony default export */ __webpack_exports__['a'] = Symbol; + /***/ + }, + /* 88 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__( + 71 + ); -/** Built-in value references. */ -var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; - -/* harmony default export */ __webpack_exports__["a"] = (Symbol); - - -/***/ }), -/* 88 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(71); - - -/** + /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private @@ -10749,28 +13734,32 @@ var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(array[length][0], key)) { - return length; - } - } - return -1; -} + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if ( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__eq_js__['a' /* default */] + )(array[length][0], key) + ) { + return length; + } + } + return -1; + } -/* harmony default export */ __webpack_exports__["a"] = (assocIndexOf); + /* harmony default export */ __webpack_exports__['a'] = assocIndexOf; + /***/ + }, + /* 89 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__( + 231 + ); -/***/ }), -/* 89 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(231); - - -/** + /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * @@ -10779,31 +13768,36 @@ function assocIndexOf(array, key) { * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */])(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } -} + function baseAssignValue(object, key, value) { + if ( + key == '__proto__' && + __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__['a' /* default */] + ) { + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__['a' /* default */] + )(object, key, { + configurable: true, + enumerable: true, + value: value, + writable: true + }); + } else { + object[key] = value; + } + } -/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue); + /* harmony default export */ __webpack_exports__['a'] = baseAssignValue; + /***/ + }, + /* 90 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__( + 552 + ); -/***/ }), -/* 90 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(552); - - -/** + /** * Gets the data for `map`. * * @private @@ -10811,41 +13805,46 @@ function baseAssignValue(object, key, value) { * @param {string} key The reference key. * @returns {*} Returns the map data. */ -function getMapData(map, key) { - var data = map.__data__; - return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */])(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} + function getMapData(map, key) { + var data = map.__data__; + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__['a' /* default */] + )(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } -/* harmony default export */ __webpack_exports__["a"] = (getMapData); + /* harmony default export */ __webpack_exports__['a'] = getMapData; + /***/ + }, + /* 91 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__( + 41 + ); -/***/ }), -/* 91 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /* Built-in method references that are verified to be native. */ + var nativeCreate = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__getNative_js__['a' /* default */] + )(Object, 'create'); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(41); + /* harmony default export */ __webpack_exports__['a'] = nativeCreate; + /***/ + }, + /* 92 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__( + 143 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__( + 144 + ); -/* Built-in method references that are verified to be native. */ -var nativeCreate = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'create'); - -/* harmony default export */ __webpack_exports__["a"] = (nativeCreate); - - -/***/ }), -/* 92 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(143); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(144); - - - -/** + /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. @@ -10870,42 +13869,51 @@ var nativeCreate = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__getNative_ * _.isArrayLike(_.noop); * // => false */ -function isArrayLike(value) { - return value != null && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value); -} + function isArrayLike(value) { + return ( + value != null && + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__isLength_js__['a' /* default */] + )(value.length) && + !__webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__isFunction_js__['a' /* default */] + )(value) + ); + } -/* harmony default export */ __webpack_exports__["a"] = (isArrayLike); + /* harmony default export */ __webpack_exports__['a'] = isArrayLike; + /***/ + }, + /* 93 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__( + 54 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__( + 234 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__( + 42 + ); -/***/ }), -/* 93 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(54); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(234); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(42); + /** Used for built-in method references. */ + var funcProto = Function.prototype, objectProto = Object.prototype; + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** + /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * @@ -10933,36 +13941,50 @@ var objectCtorString = funcToString.call(Object); * _.isPlainObject(Object.create(null)); * // => true */ -function isPlainObject(value) { - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) { - return false; - } - var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} + function isPlainObject(value) { + if ( + !__webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__['a' /* default */] + )(value) || + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__['a' /* default */] + )(value) != objectTag + ) { + return false; + } + var proto = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__['a' /* default */] + )(value); + if (proto === null) { + return true; + } + var Ctor = + hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && + Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString + ); + } -/* harmony default export */ __webpack_exports__["a"] = (isPlainObject); + /* harmony default export */ __webpack_exports__['a'] = isPlainObject; + /***/ + }, + /* 94 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__( + 54 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__( + 42 + ); -/***/ }), -/* 94 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(54); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(42); - - - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** + /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static @@ -10979,35 +14001,48 @@ var symbolTag = '[object Symbol]'; * _.isSymbol('abc'); * // => false */ -function isSymbol(value) { - return typeof value == 'symbol' || - (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == symbolTag); -} + function isSymbol(value) { + return ( + typeof value == 'symbol' || + (__webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__['a' /* default */] + )(value) && + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__['a' /* default */] + )(value) == symbolTag) + ); + } -/* harmony default export */ __webpack_exports__["a"] = (isSymbol); + /* harmony default export */ __webpack_exports__['a'] = isSymbol; + /***/ + }, + /* 95 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__( + 225 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__( + 230 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__( + 28 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__( + 94 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__( + 238 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__( + 70 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__( + 243 + ); -/***/ }), -/* 95 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(225); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(230); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(28); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(94); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(238); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(70); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(243); - - - - - - - - -/** + /** * Converts `value` to a property path array. * * @static @@ -11024,73 +14059,91 @@ function isSymbol(value) { * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] */ -function toPath(value) { - if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) { - return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]); - } - return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value) ? [value] : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */])(value))); -} + function toPath(value) { + if ( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__isArray_js__['a' /* default */] + )(value) + ) { + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__['a' /* default */] + )(value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__['a' /* default */]); + } + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__['a' /* default */] + )(value) + ? [value] + : __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__copyArray_js__['a' /* default */] + )( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__[ + 'a' /* default */ + ] + )( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_6__toString_js__['a' /* default */] + )(value) + ) + ); + } -/* harmony default export */ __webpack_exports__["a"] = (toPath); + /* harmony default export */ __webpack_exports__['a'] = toPath; + /***/ + }, + /* 96 */ + /***/ function(module, exports, __webpack_require__) { + var listCacheClear = __webpack_require__(655), + listCacheDelete = __webpack_require__(656), + listCacheGet = __webpack_require__(657), + listCacheHas = __webpack_require__(658), + listCacheSet = __webpack_require__(659); -/***/ }), -/* 96 */ -/***/ (function(module, exports, __webpack_require__) { - -var listCacheClear = __webpack_require__(655), - listCacheDelete = __webpack_require__(656), - listCacheGet = __webpack_require__(657), - listCacheHas = __webpack_require__(658), - listCacheSet = __webpack_require__(659); - -/** + /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; -module.exports = ListCache; + module.exports = ListCache; + /***/ + }, + /* 97 */ + /***/ function(module, exports, __webpack_require__) { + var root = __webpack_require__(18); -/***/ }), -/* 97 */ -/***/ (function(module, exports, __webpack_require__) { + /** Built-in value references. */ + var Symbol = root.Symbol; -var root = __webpack_require__(18); + module.exports = Symbol; -/** Built-in value references. */ -var Symbol = root.Symbol; + /***/ + }, + /* 98 */ + /***/ function(module, exports, __webpack_require__) { + var eq = __webpack_require__(72); -module.exports = Symbol; - - -/***/ }), -/* 98 */ -/***/ (function(module, exports, __webpack_require__) { - -var eq = __webpack_require__(72); - -/** + /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private @@ -11098,26 +14151,25 @@ var eq = __webpack_require__(72); * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } -module.exports = assocIndexOf; + module.exports = assocIndexOf; + /***/ + }, + /* 99 */ + /***/ function(module, exports, __webpack_require__) { + var defineProperty = __webpack_require__(254); -/***/ }), -/* 99 */ -/***/ (function(module, exports, __webpack_require__) { - -var defineProperty = __webpack_require__(254); - -/** + /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * @@ -11126,29 +14178,28 @@ var defineProperty = __webpack_require__(254); * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } -} + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + configurable: true, + enumerable: true, + value: value, + writable: true + }); + } else { + object[key] = value; + } + } -module.exports = baseAssignValue; + module.exports = baseAssignValue; + /***/ + }, + /* 100 */ + /***/ function(module, exports, __webpack_require__) { + var isKeyable = __webpack_require__(653); -/***/ }), -/* 100 */ -/***/ (function(module, exports, __webpack_require__) { - -var isKeyable = __webpack_require__(653); - -/** + /** * Gets the data for `map`. * * @private @@ -11156,66 +14207,63 @@ var isKeyable = __webpack_require__(653); * @param {string} key The reference key. * @returns {*} Returns the map data. */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } -module.exports = getMapData; + module.exports = getMapData; + /***/ + }, + /* 101 */ + /***/ function(module, exports, __webpack_require__) { + var getNative = __webpack_require__(44); -/***/ }), -/* 101 */ -/***/ (function(module, exports, __webpack_require__) { + /* Built-in method references that are verified to be native. */ + var nativeCreate = getNative(Object, 'create'); -var getNative = __webpack_require__(44); + module.exports = nativeCreate; -/* Built-in method references that are verified to be native. */ -var nativeCreate = getNative(Object, 'create'); + /***/ + }, + /* 102 */ + /***/ function(module, exports, __webpack_require__) { + var isSymbol = __webpack_require__(103); -module.exports = nativeCreate; + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; - -/***/ }), -/* 102 */ -/***/ (function(module, exports, __webpack_require__) { - -var isSymbol = __webpack_require__(103); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** + /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } -module.exports = toKey; + module.exports = toKey; + /***/ + }, + /* 103 */ + /***/ function(module, exports, __webpack_require__) { + var baseGetTag = __webpack_require__(43), + isObjectLike = __webpack_require__(35); -/***/ }), -/* 103 */ -/***/ (function(module, exports, __webpack_require__) { + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; -var baseGetTag = __webpack_require__(43), - isObjectLike = __webpack_require__(35); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** + /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static @@ -11232,20 +14280,21 @@ var symbolTag = '[object Symbol]'; * _.isSymbol('abc'); * // => false */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} + function isSymbol(value) { + return ( + typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag) + ); + } -module.exports = isSymbol; + module.exports = isSymbol; - -/***/ }), -/* 104 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 104 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -11255,18 +14304,16 @@ module.exports = isSymbol; * */ + var _assign = __webpack_require__(9); + var EventPluginRegistry = __webpack_require__(163); + var ReactEventEmitterMixin = __webpack_require__(744); + var ViewportMetrics = __webpack_require__(280); -var _assign = __webpack_require__(9); + var getVendorPrefixedEventName = __webpack_require__(776); + var isEventSupported = __webpack_require__(174); -var EventPluginRegistry = __webpack_require__(163); -var ReactEventEmitterMixin = __webpack_require__(744); -var ViewportMetrics = __webpack_require__(280); - -var getVendorPrefixedEventName = __webpack_require__(776); -var isEventSupported = __webpack_require__(174); - -/** + /** * Summary of `ReactBrowserEventEmitter` event handling: * * - Top-level delegation is used to trap most native browser events. This @@ -11321,97 +14368,103 @@ var isEventSupported = __webpack_require__(174); * React Core . General Purpose Event Plugin System */ -var hasEventPageXY; -var alreadyListeningTo = {}; -var isMonitoringScrollValue = false; -var reactTopListenersCounter = 0; + var hasEventPageXY; + var alreadyListeningTo = {}; + var isMonitoringScrollValue = false; + var reactTopListenersCounter = 0; -// For events like 'submit' which don't consistently bubble (which we trap at a -// lower node than `document`), binding at `document` would cause duplicate -// events so we don't include them here -var topEventMapping = { - topAbort: 'abort', - topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend', - topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration', - topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart', - topBlur: 'blur', - topCanPlay: 'canplay', - topCanPlayThrough: 'canplaythrough', - topChange: 'change', - topClick: 'click', - topCompositionEnd: 'compositionend', - topCompositionStart: 'compositionstart', - topCompositionUpdate: 'compositionupdate', - topContextMenu: 'contextmenu', - topCopy: 'copy', - topCut: 'cut', - topDoubleClick: 'dblclick', - topDrag: 'drag', - topDragEnd: 'dragend', - topDragEnter: 'dragenter', - topDragExit: 'dragexit', - topDragLeave: 'dragleave', - topDragOver: 'dragover', - topDragStart: 'dragstart', - topDrop: 'drop', - topDurationChange: 'durationchange', - topEmptied: 'emptied', - topEncrypted: 'encrypted', - topEnded: 'ended', - topError: 'error', - topFocus: 'focus', - topInput: 'input', - topKeyDown: 'keydown', - topKeyPress: 'keypress', - topKeyUp: 'keyup', - topLoadedData: 'loadeddata', - topLoadedMetadata: 'loadedmetadata', - topLoadStart: 'loadstart', - topMouseDown: 'mousedown', - topMouseMove: 'mousemove', - topMouseOut: 'mouseout', - topMouseOver: 'mouseover', - topMouseUp: 'mouseup', - topPaste: 'paste', - topPause: 'pause', - topPlay: 'play', - topPlaying: 'playing', - topProgress: 'progress', - topRateChange: 'ratechange', - topScroll: 'scroll', - topSeeked: 'seeked', - topSeeking: 'seeking', - topSelectionChange: 'selectionchange', - topStalled: 'stalled', - topSuspend: 'suspend', - topTextInput: 'textInput', - topTimeUpdate: 'timeupdate', - topTouchCancel: 'touchcancel', - topTouchEnd: 'touchend', - topTouchMove: 'touchmove', - topTouchStart: 'touchstart', - topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend', - topVolumeChange: 'volumechange', - topWaiting: 'waiting', - topWheel: 'wheel' -}; + // For events like 'submit' which don't consistently bubble (which we trap at a + // lower node than `document`), binding at `document` would cause duplicate + // events so we don't include them here + var topEventMapping = { + topAbort: 'abort', + topAnimationEnd: getVendorPrefixedEventName('animationend') || + 'animationend', + topAnimationIteration: getVendorPrefixedEventName( + 'animationiteration' + ) || 'animationiteration', + topAnimationStart: getVendorPrefixedEventName('animationstart') || + 'animationstart', + topBlur: 'blur', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topChange: 'change', + topClick: 'click', + topCompositionEnd: 'compositionend', + topCompositionStart: 'compositionstart', + topCompositionUpdate: 'compositionupdate', + topContextMenu: 'contextmenu', + topCopy: 'copy', + topCut: 'cut', + topDoubleClick: 'dblclick', + topDrag: 'drag', + topDragEnd: 'dragend', + topDragEnter: 'dragenter', + topDragExit: 'dragexit', + topDragLeave: 'dragleave', + topDragOver: 'dragover', + topDragStart: 'dragstart', + topDrop: 'drop', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topFocus: 'focus', + topInput: 'input', + topKeyDown: 'keydown', + topKeyPress: 'keypress', + topKeyUp: 'keyup', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topMouseDown: 'mousedown', + topMouseMove: 'mousemove', + topMouseOut: 'mouseout', + topMouseOver: 'mouseover', + topMouseUp: 'mouseup', + topPaste: 'paste', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topScroll: 'scroll', + topSeeked: 'seeked', + topSeeking: 'seeking', + topSelectionChange: 'selectionchange', + topStalled: 'stalled', + topSuspend: 'suspend', + topTextInput: 'textInput', + topTimeUpdate: 'timeupdate', + topTouchCancel: 'touchcancel', + topTouchEnd: 'touchend', + topTouchMove: 'touchmove', + topTouchStart: 'touchstart', + topTransitionEnd: getVendorPrefixedEventName('transitionend') || + 'transitionend', + topVolumeChange: 'volumechange', + topWaiting: 'waiting', + topWheel: 'wheel' + }; -/** + /** * To ensure no conflicts with other potential React instances on the page */ -var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); + var topListenersIDKey = + '_reactListenersID' + String(Math.random()).slice(2); -function getListeningForDocument(mountAt) { - // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` - // directly. - if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { - mountAt[topListenersIDKey] = reactTopListenersCounter++; - alreadyListeningTo[mountAt[topListenersIDKey]] = {}; - } - return alreadyListeningTo[mountAt[topListenersIDKey]]; -} + function getListeningForDocument(mountAt) { + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` + // directly. + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { + mountAt[topListenersIDKey] = reactTopListenersCounter++; + alreadyListeningTo[mountAt[topListenersIDKey]] = {}; + } + return alreadyListeningTo[mountAt[topListenersIDKey]]; + } -/** + /** * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For * example: * @@ -11421,42 +14474,44 @@ function getListeningForDocument(mountAt) { * * @internal */ -var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { - - /** + var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { + /** * Injectable event backend */ - ReactEventListener: null, + ReactEventListener: null, - injection: { - /** + injection: { + /** * @param {object} ReactEventListener */ - injectReactEventListener: function (ReactEventListener) { - ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); - ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; - } - }, + injectReactEventListener: function(ReactEventListener) { + ReactEventListener.setHandleTopLevel( + ReactBrowserEventEmitter.handleTopLevel + ); + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; + } + }, - /** + /** * Sets whether or not any created callbacks should be enabled. * * @param {boolean} enabled True if callbacks should be enabled. */ - setEnabled: function (enabled) { - if (ReactBrowserEventEmitter.ReactEventListener) { - ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); - } - }, + setEnabled: function(enabled) { + if (ReactBrowserEventEmitter.ReactEventListener) { + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); + } + }, - /** + /** * @return {boolean} True if callbacks are enabled. */ - isEnabled: function () { - return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()); - }, + isEnabled: function() { + return !!(ReactBrowserEventEmitter.ReactEventListener && + ReactBrowserEventEmitter.ReactEventListener.isEnabled()); + }, - /** + /** * We listen for bubbled touch events on the document object. * * Firefox v8.01 (and possibly others) exhibited strange behavior when @@ -11477,77 +14532,130 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { * @param {string} registrationName Name of listener (e.g. `onClick`). * @param {object} contentDocumentHandle Document which owns the container */ - listenTo: function (registrationName, contentDocumentHandle) { - var mountAt = contentDocumentHandle; - var isListening = getListeningForDocument(mountAt); - var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; + listenTo: function(registrationName, contentDocumentHandle) { + var mountAt = contentDocumentHandle; + var isListening = getListeningForDocument(mountAt); + var dependencies = + EventPluginRegistry.registrationNameDependencies[registrationName]; - for (var i = 0; i < dependencies.length; i++) { - var dependency = dependencies[i]; - if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { - if (dependency === 'topWheel') { - if (isEventSupported('wheel')) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt); - } else if (isEventSupported('mousewheel')) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt); - } else { - // Firefox needs to capture a different mouse scroll event. - // @see http://www.quirksmode.org/dom/events/tests/scroll.html - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt); + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + if ( + !(isListening.hasOwnProperty(dependency) && + isListening[dependency]) + ) { + if (dependency === 'topWheel') { + if (isEventSupported('wheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topWheel', + 'wheel', + mountAt + ); + } else if (isEventSupported('mousewheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topWheel', + 'mousewheel', + mountAt + ); + } else { + // Firefox needs to capture a different mouse scroll event. + // @see http://www.quirksmode.org/dom/events/tests/scroll.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topWheel', + 'DOMMouseScroll', + mountAt + ); + } + } else if (dependency === 'topScroll') { + if (isEventSupported('scroll', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + 'topScroll', + 'scroll', + mountAt + ); + } else { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topScroll', + 'scroll', + ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE + ); + } + } else if ( + dependency === 'topFocus' || + dependency === 'topBlur' + ) { + if (isEventSupported('focus', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + 'topFocus', + 'focus', + mountAt + ); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + 'topBlur', + 'blur', + mountAt + ); + } else if (isEventSupported('focusin')) { + // IE has `focusin` and `focusout` events which bubble. + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topFocus', + 'focusin', + mountAt + ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topBlur', + 'focusout', + mountAt + ); + } + + // to make sure blur and focus event listeners are only attached once + isListening.topBlur = true; + isListening.topFocus = true; + } else if (topEventMapping.hasOwnProperty(dependency)) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + dependency, + topEventMapping[dependency], + mountAt + ); + } + + isListening[dependency] = true; + } } - } else if (dependency === 'topScroll') { + }, - if (isEventSupported('scroll', true)) { - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt); - } else { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); - } - } else if (dependency === 'topFocus' || dependency === 'topBlur') { + trapBubbledEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelType, + handlerBaseName, + handle + ); + }, - if (isEventSupported('focus', true)) { - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); - } else if (isEventSupported('focusin')) { - // IE has `focusin` and `focusout` events which bubble. - // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt); - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt); - } + trapCapturedEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelType, + handlerBaseName, + handle + ); + }, - // to make sure blur and focus event listeners are only attached once - isListening.topBlur = true; - isListening.topFocus = true; - } else if (topEventMapping.hasOwnProperty(dependency)) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt); - } - - isListening[dependency] = true; - } - } - }, - - trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { - return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle); - }, - - trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { - return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle); - }, - - /** + /** * Protect against document.createEvent() returning null * Some popup blocker extensions appear to do this: * https://github.com/facebook/react/issues/6887 */ - supportsEventPageXY: function () { - if (!document.createEvent) { - return false; - } - var ev = document.createEvent('MouseEvent'); - return ev != null && 'pageX' in ev; - }, + supportsEventPageXY: function() { + if (!document.createEvent) { + return false; + } + var ev = document.createEvent('MouseEvent'); + return ev != null && 'pageX' in ev; + }, - /** + /** * Listens to window scroll and resize events. We cache scroll values so that * application code can access them without triggering reflows. * @@ -11558,27 +14666,28 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { * * @see http://www.quirksmode.org/dom/events/scroll.html */ - ensureScrollValueMonitoring: function () { - if (hasEventPageXY === undefined) { - hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY(); - } - if (!hasEventPageXY && !isMonitoringScrollValue) { - var refresh = ViewportMetrics.refreshScrollValues; - ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); - isMonitoringScrollValue = true; - } - } + ensureScrollValueMonitoring: function() { + if (hasEventPageXY === undefined) { + hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY(); + } + if (!hasEventPageXY && !isMonitoringScrollValue) { + var refresh = ViewportMetrics.refreshScrollValues; + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue( + refresh + ); + isMonitoringScrollValue = true; + } + } + }); -}); + module.exports = ReactBrowserEventEmitter; -module.exports = ReactBrowserEventEmitter; - -/***/ }), -/* 105 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 105 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -11588,74 +14697,92 @@ module.exports = ReactBrowserEventEmitter; * */ + var SyntheticUIEvent = __webpack_require__(76); + var ViewportMetrics = __webpack_require__(280); + var getEventModifierState = __webpack_require__(172); -var SyntheticUIEvent = __webpack_require__(76); -var ViewportMetrics = __webpack_require__(280); - -var getEventModifierState = __webpack_require__(172); - -/** + /** * @interface MouseEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ -var MouseEventInterface = { - screenX: null, - screenY: null, - clientX: null, - clientY: null, - ctrlKey: null, - shiftKey: null, - altKey: null, - metaKey: null, - getModifierState: getEventModifierState, - button: function (event) { - // Webkit, Firefox, IE9+ - // which: 1 2 3 - // button: 0 1 2 (standard) - var button = event.button; - if ('which' in event) { - return button; - } - // IE<9 - // which: undefined - // button: 0 0 0 - // button: 1 4 2 (onmouseup) - return button === 2 ? 2 : button === 4 ? 1 : 0; - }, - buttons: null, - relatedTarget: function (event) { - return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); - }, - // "Proprietary" Interface. - pageX: function (event) { - return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; - }, - pageY: function (event) { - return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; - } -}; + var MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function(event) { + // Webkit, Firefox, IE9+ + // which: 1 2 3 + // button: 0 1 2 (standard) + var button = event.button; + if ('which' in event) { + return button; + } + // IE<9 + // which: undefined + // button: 0 0 0 + // button: 1 4 2 (onmouseup) + return button === 2 ? 2 : button === 4 ? 1 : 0; + }, + buttons: null, + relatedTarget: function(event) { + return ( + event.relatedTarget || + (event.fromElement === event.srcElement + ? event.toElement + : event.fromElement) + ); + }, + // "Proprietary" Interface. + pageX: function(event) { + return 'pageX' in event + ? event.pageX + : event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function(event) { + return 'pageY' in event + ? event.pageY + : event.clientY + ViewportMetrics.currentScrollTop; + } + }; -/** + /** * @param {object} dispatchConfig Configuration used to dispatch this event. * @param {string} dispatchMarker Marker identifying the event target. * @param {object} nativeEvent Native browser event. * @extends {SyntheticUIEvent} */ -function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); -} + function SyntheticMouseEvent( + dispatchConfig, + dispatchMarker, + nativeEvent, + nativeEventTarget + ) { + return SyntheticUIEvent.call( + this, + dispatchConfig, + dispatchMarker, + nativeEvent, + nativeEventTarget + ); + } -SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); -module.exports = SyntheticMouseEvent; + module.exports = SyntheticMouseEvent; -/***/ }), -/* 106 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 106 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -11666,15 +14793,13 @@ module.exports = SyntheticMouseEvent; * */ + var _prodInvariant = __webpack_require__(7); + var invariant = __webpack_require__(2); -var _prodInvariant = __webpack_require__(7); + var OBSERVED_ERROR = {}; -var invariant = __webpack_require__(2); - -var OBSERVED_ERROR = {}; - -/** + /** * `Transaction` creates a black box that is able to wrap any method such that * certain invariants are maintained before and after the method is invoked * (Even if an exception is thrown while invoking the wrapped method). Whoever @@ -11735,37 +14860,37 @@ var OBSERVED_ERROR = {}; * * @class Transaction */ -var TransactionImpl = { - /** + var TransactionImpl = { + /** * Sets up this instance so that it is prepared for collecting metrics. Does * so such that this setup method may be used on an instance that is already * initialized, in a way that does not consume additional memory upon reuse. * That can be useful if you decide to make your subclass of this mixin a * "PooledClass". */ - reinitializeTransaction: function () { - this.transactionWrappers = this.getTransactionWrappers(); - if (this.wrapperInitData) { - this.wrapperInitData.length = 0; - } else { - this.wrapperInitData = []; - } - this._isInTransaction = false; - }, + reinitializeTransaction: function() { + this.transactionWrappers = this.getTransactionWrappers(); + if (this.wrapperInitData) { + this.wrapperInitData.length = 0; + } else { + this.wrapperInitData = []; + } + this._isInTransaction = false; + }, - _isInTransaction: false, + _isInTransaction: false, - /** + /** * @abstract * @return {Array} Array of transaction wrappers. */ - getTransactionWrappers: null, + getTransactionWrappers: null, - isInTransaction: function () { - return !!this._isInTransaction; - }, + isInTransaction: function() { + return !!this._isInTransaction; + }, - /** + /** * Executes the function within a safety window. Use this for the top level * methods that result in large amounts of computation/mutations that would * need to be safety checked. The optional arguments helps prevent the need @@ -11782,110 +14907,126 @@ var TransactionImpl = { * * @return {*} Return value from `method`. */ - perform: function (method, scope, a, b, c, d, e, f) { - !!this.isInTransaction() ? false ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0; - var errorThrown; - var ret; - try { - this._isInTransaction = true; - // Catching errors makes debugging more difficult, so we start with - // errorThrown set to true before setting it to false after calling - // close -- if it's still set to true in the finally block, it means - // one of these calls threw. - errorThrown = true; - this.initializeAll(0); - ret = method.call(scope, a, b, c, d, e, f); - errorThrown = false; - } finally { - try { - if (errorThrown) { - // If `method` throws, prefer to show that stack trace over any thrown - // by invoking `closeAll`. + perform: function(method, scope, a, b, c, d, e, f) { + !!this.isInTransaction() + ? false + ? invariant( + false, + 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.' + ) + : _prodInvariant('27') + : void 0; + var errorThrown; + var ret; try { - this.closeAll(0); - } catch (err) {} - } else { - // Since `method` didn't throw, we don't want to silence the exception - // here. - this.closeAll(0); - } - } finally { - this._isInTransaction = false; - } - } - return ret; - }, + this._isInTransaction = true; + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // one of these calls threw. + errorThrown = true; + this.initializeAll(0); + ret = method.call(scope, a, b, c, d, e, f); + errorThrown = false; + } finally { + try { + if (errorThrown) { + // If `method` throws, prefer to show that stack trace over any thrown + // by invoking `closeAll`. + try { + this.closeAll(0); + } catch (err) {} + } else { + // Since `method` didn't throw, we don't want to silence the exception + // here. + this.closeAll(0); + } + } finally { + this._isInTransaction = false; + } + } + return ret; + }, - initializeAll: function (startIndex) { - var transactionWrappers = this.transactionWrappers; - for (var i = startIndex; i < transactionWrappers.length; i++) { - var wrapper = transactionWrappers[i]; - try { - // Catching errors makes debugging more difficult, so we start with the - // OBSERVED_ERROR state before overwriting it with the real return value - // of initialize -- if it's still set to OBSERVED_ERROR in the finally - // block, it means wrapper.initialize threw. - this.wrapperInitData[i] = OBSERVED_ERROR; - this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; - } finally { - if (this.wrapperInitData[i] === OBSERVED_ERROR) { - // The initializer for wrapper i threw an error; initialize the - // remaining wrappers but silence any exceptions from them to ensure - // that the first error is the one to bubble up. - try { - this.initializeAll(i + 1); - } catch (err) {} - } - } - } - }, + initializeAll: function(startIndex) { + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + // Catching errors makes debugging more difficult, so we start with the + // OBSERVED_ERROR state before overwriting it with the real return value + // of initialize -- if it's still set to OBSERVED_ERROR in the finally + // block, it means wrapper.initialize threw. + this.wrapperInitData[i] = OBSERVED_ERROR; + this.wrapperInitData[i] = wrapper.initialize + ? wrapper.initialize.call(this) + : null; + } finally { + if (this.wrapperInitData[i] === OBSERVED_ERROR) { + // The initializer for wrapper i threw an error; initialize the + // remaining wrappers but silence any exceptions from them to ensure + // that the first error is the one to bubble up. + try { + this.initializeAll(i + 1); + } catch (err) {} + } + } + } + }, - /** + /** * Invokes each of `this.transactionWrappers.close[i]` functions, passing into * them the respective return values of `this.transactionWrappers.init[i]` * (`close`rs that correspond to initializers that failed will not be * invoked). */ - closeAll: function (startIndex) { - !this.isInTransaction() ? false ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0; - var transactionWrappers = this.transactionWrappers; - for (var i = startIndex; i < transactionWrappers.length; i++) { - var wrapper = transactionWrappers[i]; - var initData = this.wrapperInitData[i]; - var errorThrown; - try { - // Catching errors makes debugging more difficult, so we start with - // errorThrown set to true before setting it to false after calling - // close -- if it's still set to true in the finally block, it means - // wrapper.close threw. - errorThrown = true; - if (initData !== OBSERVED_ERROR && wrapper.close) { - wrapper.close.call(this, initData); + closeAll: function(startIndex) { + !this.isInTransaction() + ? false + ? invariant( + false, + 'Transaction.closeAll(): Cannot close transaction when none are open.' + ) + : _prodInvariant('28') + : void 0; + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + var initData = this.wrapperInitData[i]; + var errorThrown; + try { + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // wrapper.close threw. + errorThrown = true; + if (initData !== OBSERVED_ERROR && wrapper.close) { + wrapper.close.call(this, initData); + } + errorThrown = false; + } finally { + if (errorThrown) { + // The closer for wrapper i threw an error; close the remaining + // wrappers but silence any exceptions from them to ensure that the + // first error is the one to bubble up. + try { + this.closeAll(i + 1); + } catch (e) {} + } + } + } + this.wrapperInitData.length = 0; } - errorThrown = false; - } finally { - if (errorThrown) { - // The closer for wrapper i threw an error; close the remaining - // wrappers but silence any exceptions from them to ensure that the - // first error is the one to bubble up. - try { - this.closeAll(i + 1); - } catch (e) {} - } - } - } - this.wrapperInitData.length = 0; - } -}; + }; -module.exports = TransactionImpl; + module.exports = TransactionImpl; -/***/ }), -/* 107 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 107 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2016-present, Facebook, Inc. * All rights reserved. * @@ -11920,17 +15061,15 @@ module.exports = TransactionImpl; * */ - - -// code copied and modified from escape-html -/** + // code copied and modified from escape-html + /** * Module variables. * @private */ -var matchHtmlRegExp = /["'&<>]/; + var matchHtmlRegExp = /["'&<>]/; -/** + /** * Escape special characters in the given string of html. * * @param {string} string The string to escape for inserting into HTML @@ -11938,82 +15077,83 @@ var matchHtmlRegExp = /["'&<>]/; * @public */ -function escapeHtml(string) { - var str = '' + string; - var match = matchHtmlRegExp.exec(str); + function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); - if (!match) { - return str; - } + if (!match) { + return str; + } - var escape; - var html = ''; - var index = 0; - var lastIndex = 0; + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: - // " - escape = '"'; - break; - case 38: - // & - escape = '&'; - break; - case 39: - // ' - escape = '''; // modified from escape-html; used to be ''' - break; - case 60: - // < - escape = '<'; - break; - case 62: - // > - escape = '>'; - break; - default: - continue; - } + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + case 38: + // & + escape = '&'; + break; + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + break; + case 60: + // < + escape = '<'; + break; + case 62: + // > + escape = '>'; + break; + default: + continue; + } - if (lastIndex !== index) { - html += str.substring(lastIndex, index); - } + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } - lastIndex = index + 1; - html += escape; - } + lastIndex = index + 1; + html += escape; + } - return lastIndex !== index ? html + str.substring(lastIndex, index) : html; -} -// end code copied and modified from escape-html + return lastIndex !== index + ? html + str.substring(lastIndex, index) + : html; + } + // end code copied and modified from escape-html - -/** + /** * Escapes text to prevent scripting attacks. * * @param {*} text Text value to escape. * @return {string} An escaped string. */ -function escapeTextContentForBrowser(text) { - if (typeof text === 'boolean' || typeof text === 'number') { - // this shortcircuit helps perf for types that we know will never have - // special characters, especially given that this function is used often - // for numeric dom ids. - return '' + text; - } - return escapeHtml(text); -} + function escapeTextContentForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + return escapeHtml(text); + } -module.exports = escapeTextContentForBrowser; + module.exports = escapeTextContentForBrowser; -/***/ }), -/* 108 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 108 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -12023,20 +15163,18 @@ module.exports = escapeTextContentForBrowser; * */ + var ExecutionEnvironment = __webpack_require__(15); + var DOMNamespaces = __webpack_require__(162); + var WHITESPACE_TEST = /^[ \r\n\t\f]/; + var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; -var ExecutionEnvironment = __webpack_require__(15); -var DOMNamespaces = __webpack_require__(162); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(170); -var WHITESPACE_TEST = /^[ \r\n\t\f]/; -var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; + // SVG temp container for IE lacking innerHTML + var reusableSVGContainer; -var createMicrosoftUnsafeLocalFunction = __webpack_require__(170); - -// SVG temp container for IE lacking innerHTML -var reusableSVGContainer; - -/** + /** * Set the innerHTML property of a node, ensuring that whitespace is preserved * even in IE8. * @@ -12044,149 +15182,153 @@ var reusableSVGContainer; * @param {string} html * @internal */ -var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { - // IE does not have innerHTML for SVG nodes, so instead we inject the - // new markup in a temp node and then move the child nodes across into - // the target node - if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { - reusableSVGContainer = reusableSVGContainer || document.createElement('div'); - reusableSVGContainer.innerHTML = '' + html + ''; - var svgNode = reusableSVGContainer.firstChild; - while (svgNode.firstChild) { - node.appendChild(svgNode.firstChild); - } - } else { - node.innerHTML = html; - } -}); - -if (ExecutionEnvironment.canUseDOM) { - // IE8: When updating a just created node with innerHTML only leading - // whitespace is removed. When updating an existing node with innerHTML - // whitespace in root TextNodes is also collapsed. - // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html - - // Feature detection; only IE8 is known to behave improperly like this. - var testElement = document.createElement('div'); - testElement.innerHTML = ' '; - if (testElement.innerHTML === '') { - setInnerHTML = function (node, html) { - // Magic theory: IE8 supposedly differentiates between added and updated - // nodes when processing innerHTML, innerHTML on updated nodes suffers - // from worse whitespace behavior. Re-adding a node like this triggers - // the initial and more favorable whitespace behavior. - // TODO: What to do on a detached node? - if (node.parentNode) { - node.parentNode.replaceChild(node, node); - } - - // We also implement a workaround for non-visible tags disappearing into - // thin air on IE8, this only happens if there is no visible text - // in-front of the non-visible tags. Piggyback on the whitespace fix - // and simply check if any non-visible tags appear in the source. - if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) { - // Recover leading whitespace by temporarily prepending any character. - // \uFEFF has the potential advantage of being zero-width/invisible. - // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode - // in hopes that this is preserved even if "\uFEFF" is transformed to - // the actual Unicode character (by Babel, for example). - // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 - node.innerHTML = String.fromCharCode(0xFEFF) + html; - - // deleteData leaves an empty `TextNode` which offsets the index of all - // children. Definitely want to avoid this. - var textNode = node.firstChild; - if (textNode.data.length === 1) { - node.removeChild(textNode); + var setInnerHTML = createMicrosoftUnsafeLocalFunction(function( + node, + html + ) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { + reusableSVGContainer = + reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '' + html + ''; + var svgNode = reusableSVGContainer.firstChild; + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } } else { - textNode.deleteData(0, 1); + node.innerHTML = html; } - } else { - node.innerHTML = html; + }); + + if (ExecutionEnvironment.canUseDOM) { + // IE8: When updating a just created node with innerHTML only leading + // whitespace is removed. When updating an existing node with innerHTML + // whitespace in root TextNodes is also collapsed. + // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html + + // Feature detection; only IE8 is known to behave improperly like this. + var testElement = document.createElement('div'); + testElement.innerHTML = ' '; + if (testElement.innerHTML === '') { + setInnerHTML = function(node, html) { + // Magic theory: IE8 supposedly differentiates between added and updated + // nodes when processing innerHTML, innerHTML on updated nodes suffers + // from worse whitespace behavior. Re-adding a node like this triggers + // the initial and more favorable whitespace behavior. + // TODO: What to do on a detached node? + if (node.parentNode) { + node.parentNode.replaceChild(node, node); + } + + // We also implement a workaround for non-visible tags disappearing into + // thin air on IE8, this only happens if there is no visible text + // in-front of the non-visible tags. Piggyback on the whitespace fix + // and simply check if any non-visible tags appear in the source. + if ( + WHITESPACE_TEST.test(html) || + (html[0] === '<' && NONVISIBLE_TEST.test(html)) + ) { + // Recover leading whitespace by temporarily prepending any character. + // \uFEFF has the potential advantage of being zero-width/invisible. + // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode + // in hopes that this is preserved even if "\uFEFF" is transformed to + // the actual Unicode character (by Babel, for example). + // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 + node.innerHTML = String.fromCharCode(0xfeff) + html; + + // deleteData leaves an empty `TextNode` which offsets the index of all + // children. Definitely want to avoid this. + var textNode = node.firstChild; + if (textNode.data.length === 1) { + node.removeChild(textNode); + } else { + textNode.deleteData(0, 1); + } + } else { + node.innerHTML = html; + } + }; + } + testElement = null; } - }; - } - testElement = null; -} -module.exports = setInnerHTML; + module.exports = setInnerHTML; -/***/ }), -/* 109 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ + }, + /* 109 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + Object.defineProperty(exports, '__esModule', { + value: true + }); -"use strict"; + var _LinkRenderer = __webpack_require__(821); + Object.defineProperty(exports, 'default', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_LinkRenderer).default; + } + }); + Object.defineProperty(exports, 'styles', { + enumerable: true, + get: function get() { + return _LinkRenderer.styles; + } + }); -Object.defineProperty(exports, "__esModule", { - value: true -}); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } -var _LinkRenderer = __webpack_require__(821); + /***/ + }, + /* 110 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = formatName; + function formatName(context, name) { + var sectionPrefix = context._reduxForm.sectionPrefix; -Object.defineProperty(exports, 'default', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_LinkRenderer).default; - } -}); -Object.defineProperty(exports, 'styles', { - enumerable: true, - get: function get() { - return _LinkRenderer.styles; - } -}); + return !sectionPrefix ? name : sectionPrefix + '.' + name; + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + /***/ + }, + /* 111 */ + /***/ function(module, exports) { + module.exports = function(module) { + if (!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; + }; -/***/ }), -/* 110 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = formatName; -function formatName(context, name) { - var sectionPrefix = context._reduxForm.sectionPrefix; - - return !sectionPrefix ? name : sectionPrefix + "." + name; -} - -/***/ }), -/* 111 */ -/***/ (function(module, exports) { - -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - -/***/ }), -/* 112 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** + /***/ + }, + /* 112 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -12197,38 +15339,38 @@ module.exports = function(module) { * */ -function makeEmptyFunction(arg) { - return function () { - return arg; - }; -} + function makeEmptyFunction(arg) { + return function() { + return arg; + }; + } -/** + /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ -var emptyFunction = function emptyFunction() {}; + var emptyFunction = function emptyFunction() {}; -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; -}; + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function() { + return this; + }; + emptyFunction.thatReturnsArgument = function(arg) { + return arg; + }; -module.exports = emptyFunction; + module.exports = emptyFunction; -/***/ }), -/* 113 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 113 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -12238,22 +15380,20 @@ module.exports = emptyFunction; * */ + var emptyObject = {}; + if (false) { + Object.freeze(emptyObject); + } -var emptyObject = {}; + module.exports = emptyObject; -if (false) { - Object.freeze(emptyObject); -} - -module.exports = emptyObject; - -/***/ }), -/* 114 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 114 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -12263,32 +15403,30 @@ module.exports = emptyObject; * */ + var _prodInvariant = __webpack_require__(64); + var ReactNoopUpdateQueue = __webpack_require__(115); -var _prodInvariant = __webpack_require__(64); + var canDefineProperty = __webpack_require__(197); + var emptyObject = __webpack_require__(113); + var invariant = __webpack_require__(47); + var warning = __webpack_require__(38); -var ReactNoopUpdateQueue = __webpack_require__(115); - -var canDefineProperty = __webpack_require__(197); -var emptyObject = __webpack_require__(113); -var invariant = __webpack_require__(47); -var warning = __webpack_require__(38); - -/** + /** * Base class helpers for the updating state of a component. */ -function ReactComponent(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - // We initialize the default updater but the real one gets injected by the - // renderer. - this.updater = updater || ReactNoopUpdateQueue; -} + function ReactComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; + } -ReactComponent.prototype.isReactComponent = {}; + ReactComponent.prototype.isReactComponent = {}; -/** + /** * Sets a subset of the state. Always use this to mutate * state. You should treat `this.state` as immutable. * @@ -12313,15 +15451,24 @@ ReactComponent.prototype.isReactComponent = {}; * @final * @protected */ -ReactComponent.prototype.setState = function (partialState, callback) { - !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? false ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0; - this.updater.enqueueSetState(this, partialState); - if (callback) { - this.updater.enqueueCallback(this, callback, 'setState'); - } -}; + ReactComponent.prototype.setState = function(partialState, callback) { + !(typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null) + ? false + ? invariant( + false, + 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.' + ) + : _prodInvariant('85') + : void 0; + this.updater.enqueueSetState(this, partialState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'setState'); + } + }; -/** + /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * @@ -12335,48 +15482,63 @@ ReactComponent.prototype.setState = function (partialState, callback) { * @final * @protected */ -ReactComponent.prototype.forceUpdate = function (callback) { - this.updater.enqueueForceUpdate(this); - if (callback) { - this.updater.enqueueCallback(this, callback, 'forceUpdate'); - } -}; + ReactComponent.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this); + if (callback) { + this.updater.enqueueCallback(this, callback, 'forceUpdate'); + } + }; -/** + /** * Deprecated APIs. These APIs used to exist on classic React classes but since * we would like to deprecate them, we're not going to move them over to this * modern base class. Instead, we define a getter that warns if it's accessed. */ -if (false) { - var deprecatedAPIs = { - isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], - replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] - }; - var defineDeprecationWarning = function (methodName, info) { - if (canDefineProperty) { - Object.defineProperty(ReactComponent.prototype, methodName, { - get: function () { - process.env.NODE_ENV !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0; - return undefined; + if (false) { + var deprecatedAPIs = { + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.' + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).' + ] + }; + var defineDeprecationWarning = function(methodName, info) { + if (canDefineProperty) { + Object.defineProperty(ReactComponent.prototype, methodName, { + get: function() { + process.env.NODE_ENV !== 'production' + ? warning( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1] + ) + : void 0; + return undefined; + } + }); + } + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } } - }); - } - }; - for (var fnName in deprecatedAPIs) { - if (deprecatedAPIs.hasOwnProperty(fnName)) { - defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); - } - } -} + } -module.exports = ReactComponent; + module.exports = ReactComponent; -/***/ }), -/* 115 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 115 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2015-present, Facebook, Inc. * All rights reserved. * @@ -12386,34 +15548,43 @@ module.exports = ReactComponent; * */ + var warning = __webpack_require__(38); + function warnNoop(publicInstance, callerName) { + if (false) { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' + ? warning( + false, + '%s(...): Can only update a mounted or mounting component. ' + + 'This usually means you called %s() on an unmounted component. ' + + 'This is a no-op. Please check the code for the %s component.', + callerName, + callerName, + (constructor && + (constructor.displayName || constructor.name)) || + 'ReactClass' + ) + : void 0; + } + } -var warning = __webpack_require__(38); - -function warnNoop(publicInstance, callerName) { - if (false) { - var constructor = publicInstance.constructor; - process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; - } -} - -/** + /** * This is the abstract API for an update queue. */ -var ReactNoopUpdateQueue = { - - /** + var ReactNoopUpdateQueue = { + /** * Checks whether or not this composite component is mounted. * @param {ReactClass} publicInstance The instance we want to test. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ - isMounted: function (publicInstance) { - return false; - }, + isMounted: function(publicInstance) { + return false; + }, - /** + /** * Enqueue a callback that will be executed after all the pending updates * have processed. * @@ -12421,9 +15592,9 @@ var ReactNoopUpdateQueue = { * @param {?function} callback Called after state is updated. * @internal */ - enqueueCallback: function (publicInstance, callback) {}, + enqueueCallback: function(publicInstance, callback) {}, - /** + /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * @@ -12436,11 +15607,11 @@ var ReactNoopUpdateQueue = { * @param {ReactClass} publicInstance The instance that should rerender. * @internal */ - enqueueForceUpdate: function (publicInstance) { - warnNoop(publicInstance, 'forceUpdate'); - }, + enqueueForceUpdate: function(publicInstance) { + warnNoop(publicInstance, 'forceUpdate'); + }, - /** + /** * Replaces all of the state. Always use this or `setState` to mutate state. * You should treat `this.state` as immutable. * @@ -12451,11 +15622,11 @@ var ReactNoopUpdateQueue = { * @param {object} completeState Next state. * @internal */ - enqueueReplaceState: function (publicInstance, completeState) { - warnNoop(publicInstance, 'replaceState'); - }, + enqueueReplaceState: function(publicInstance, completeState) { + warnNoop(publicInstance, 'replaceState'); + }, - /** + /** * Sets a subset of the state. This only exists because _pendingState is * internal. This provides a merging strategy that is not available to deep * properties which is confusing. TODO: Expose pendingState or don't use it @@ -12465,42 +15636,41 @@ var ReactNoopUpdateQueue = { * @param {object} partialState Next partial state to be merged with state. * @internal */ - enqueueSetState: function (publicInstance, partialState) { - warnNoop(publicInstance, 'setState'); - } -}; + enqueueSetState: function(publicInstance, partialState) { + warnNoop(publicInstance, 'setState'); + } + }; -module.exports = ReactNoopUpdateQueue; + module.exports = ReactNoopUpdateQueue; -/***/ }), -/* 116 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ + }, + /* 116 */ + /***/ function(module, exports, __webpack_require__) { + const randomNatural = __webpack_require__(361); -const randomNatural = __webpack_require__(361); + // From https://github.com/styled-components/styled-components/blob/065001c725744629c7870240e4a955b924ef5337/src/utils/generateAlphabeticName.js + const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split( + '' + ); -// From https://github.com/styled-components/styled-components/blob/065001c725744629c7870240e4a955b924ef5337/src/utils/generateAlphabeticName.js -const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); + const rndId = _code => { + const code = _code ? _code : randomNatural({ min: 1000000000 }); + const lastDigit = chars[code % chars.length]; -const rndId = _code => { - const code = _code ? _code : randomNatural({ min: 1000000000 }); - const lastDigit = chars[code % chars.length]; + return code > chars.length + ? `${rndId(Math.floor(code / chars.length))}${lastDigit}` + : lastDigit; + }; - return code > chars.length - ? `${rndId(Math.floor(code / chars.length))}${lastDigit}` - : lastDigit; -}; + module.exports = rndId; -module.exports = rndId; - - -/***/ }), -/* 117 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** + /***/ + }, + /* 117 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -12511,38 +15681,38 @@ module.exports = rndId; * */ -function makeEmptyFunction(arg) { - return function () { - return arg; - }; -} + function makeEmptyFunction(arg) { + return function() { + return arg; + }; + } -/** + /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ -var emptyFunction = function emptyFunction() {}; + var emptyFunction = function emptyFunction() {}; -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; -}; + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function() { + return this; + }; + emptyFunction.thatReturnsArgument = function(arg) { + return arg; + }; -module.exports = emptyFunction; + module.exports = emptyFunction; -/***/ }), -/* 118 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 118 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * @@ -12552,22 +15722,20 @@ module.exports = emptyFunction; * */ + var emptyObject = {}; + if (false) { + Object.freeze(emptyObject); + } -var emptyObject = {}; + module.exports = emptyObject; -if (false) { - Object.freeze(emptyObject); -} - -module.exports = emptyObject; - -/***/ }), -/* 119 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 119 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -12577,32 +15745,30 @@ module.exports = emptyObject; * */ + var _prodInvariant = __webpack_require__(65); + var ReactNoopUpdateQueue = __webpack_require__(120); -var _prodInvariant = __webpack_require__(65); + var canDefineProperty = __webpack_require__(201); + var emptyObject = __webpack_require__(118); + var invariant = __webpack_require__(49); + var warning = __webpack_require__(39); -var ReactNoopUpdateQueue = __webpack_require__(120); - -var canDefineProperty = __webpack_require__(201); -var emptyObject = __webpack_require__(118); -var invariant = __webpack_require__(49); -var warning = __webpack_require__(39); - -/** + /** * Base class helpers for the updating state of a component. */ -function ReactComponent(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - // We initialize the default updater but the real one gets injected by the - // renderer. - this.updater = updater || ReactNoopUpdateQueue; -} + function ReactComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; + } -ReactComponent.prototype.isReactComponent = {}; + ReactComponent.prototype.isReactComponent = {}; -/** + /** * Sets a subset of the state. Always use this to mutate * state. You should treat `this.state` as immutable. * @@ -12627,15 +15793,24 @@ ReactComponent.prototype.isReactComponent = {}; * @final * @protected */ -ReactComponent.prototype.setState = function (partialState, callback) { - !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? false ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0; - this.updater.enqueueSetState(this, partialState); - if (callback) { - this.updater.enqueueCallback(this, callback, 'setState'); - } -}; + ReactComponent.prototype.setState = function(partialState, callback) { + !(typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null) + ? false + ? invariant( + false, + 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.' + ) + : _prodInvariant('85') + : void 0; + this.updater.enqueueSetState(this, partialState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'setState'); + } + }; -/** + /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * @@ -12649,48 +15824,63 @@ ReactComponent.prototype.setState = function (partialState, callback) { * @final * @protected */ -ReactComponent.prototype.forceUpdate = function (callback) { - this.updater.enqueueForceUpdate(this); - if (callback) { - this.updater.enqueueCallback(this, callback, 'forceUpdate'); - } -}; + ReactComponent.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this); + if (callback) { + this.updater.enqueueCallback(this, callback, 'forceUpdate'); + } + }; -/** + /** * Deprecated APIs. These APIs used to exist on classic React classes but since * we would like to deprecate them, we're not going to move them over to this * modern base class. Instead, we define a getter that warns if it's accessed. */ -if (false) { - var deprecatedAPIs = { - isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], - replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] - }; - var defineDeprecationWarning = function (methodName, info) { - if (canDefineProperty) { - Object.defineProperty(ReactComponent.prototype, methodName, { - get: function () { - process.env.NODE_ENV !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0; - return undefined; + if (false) { + var deprecatedAPIs = { + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.' + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).' + ] + }; + var defineDeprecationWarning = function(methodName, info) { + if (canDefineProperty) { + Object.defineProperty(ReactComponent.prototype, methodName, { + get: function() { + process.env.NODE_ENV !== 'production' + ? warning( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1] + ) + : void 0; + return undefined; + } + }); + } + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } } - }); - } - }; - for (var fnName in deprecatedAPIs) { - if (deprecatedAPIs.hasOwnProperty(fnName)) { - defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); - } - } -} + } -module.exports = ReactComponent; + module.exports = ReactComponent; -/***/ }), -/* 120 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** + /***/ + }, + /* 120 */ + /***/ function(module, exports, __webpack_require__) { + 'use strict'; + /** * Copyright 2015-present, Facebook, Inc. * All rights reserved. * @@ -12700,34 +15890,43 @@ module.exports = ReactComponent; * */ + var warning = __webpack_require__(39); + function warnNoop(publicInstance, callerName) { + if (false) { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' + ? warning( + false, + '%s(...): Can only update a mounted or mounting component. ' + + 'This usually means you called %s() on an unmounted component. ' + + 'This is a no-op. Please check the code for the %s component.', + callerName, + callerName, + (constructor && + (constructor.displayName || constructor.name)) || + 'ReactClass' + ) + : void 0; + } + } -var warning = __webpack_require__(39); - -function warnNoop(publicInstance, callerName) { - if (false) { - var constructor = publicInstance.constructor; - process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; - } -} - -/** + /** * This is the abstract API for an update queue. */ -var ReactNoopUpdateQueue = { - - /** + var ReactNoopUpdateQueue = { + /** * Checks whether or not this composite component is mounted. * @param {ReactClass} publicInstance The instance we want to test. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ - isMounted: function (publicInstance) { - return false; - }, + isMounted: function(publicInstance) { + return false; + }, - /** + /** * Enqueue a callback that will be executed after all the pending updates * have processed. * @@ -12735,9 +15934,9 @@ var ReactNoopUpdateQueue = { * @param {?function} callback Called after state is updated. * @internal */ - enqueueCallback: function (publicInstance, callback) {}, + enqueueCallback: function(publicInstance, callback) {}, - /** + /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * @@ -12750,11 +15949,11 @@ var ReactNoopUpdateQueue = { * @param {ReactClass} publicInstance The instance that should rerender. * @internal */ - enqueueForceUpdate: function (publicInstance) { - warnNoop(publicInstance, 'forceUpdate'); - }, + enqueueForceUpdate: function(publicInstance) { + warnNoop(publicInstance, 'forceUpdate'); + }, - /** + /** * Replaces all of the state. Always use this or `setState` to mutate state. * You should treat `this.state` as immutable. * @@ -12765,11 +15964,11 @@ var ReactNoopUpdateQueue = { * @param {object} completeState Next state. * @internal */ - enqueueReplaceState: function (publicInstance, completeState) { - warnNoop(publicInstance, 'replaceState'); - }, + enqueueReplaceState: function(publicInstance, completeState) { + warnNoop(publicInstance, 'replaceState'); + }, - /** + /** * Sets a subset of the state. This only exists because _pendingState is * internal. This provides a merging strategy that is not available to deep * properties which is confusing. TODO: Expose pendingState or don't use it @@ -12779,464 +15978,999 @@ var ReactNoopUpdateQueue = { * @param {object} partialState Next partial state to be merged with state. * @internal */ - enqueueSetState: function (publicInstance, partialState) { - warnNoop(publicInstance, 'setState'); - } -}; + enqueueSetState: function(publicInstance, partialState) { + warnNoop(publicInstance, 'setState'); + } + }; -module.exports = ReactNoopUpdateQueue; + module.exports = ReactNoopUpdateQueue; -/***/ }), -/* 121 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /***/ + }, + /* 121 */ + /***/ function(module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__( + 0 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc__ = __webpack_require__( + 8 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_remcalc__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__( + 1 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__ + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_styled_is__ = __webpack_require__( + 12 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_styled_components__ = __webpack_require__( + 3 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_normalized_styled_components__ = __webpack_require__( + 26 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_router_dom__ = __webpack_require__( + 295 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__boxes__ = __webpack_require__( + 51 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__paper_effect__ = __webpack_require__( + 209 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__typography__ = __webpack_require__( + 13 + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__baseline__ = __webpack_require__( + 4 + ); + var _templateObject = _taggedTemplateLiteral( + [ + '\n color: ', + ';\n background-color: ', + ';\n border-color: ', + ';\n\n &:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:hover {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n ' + ], + [ + '\n color: ', + ';\n background-color: ', + ';\n border-color: ', + ';\n\n &:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:hover {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n ' + ] + ), + _templateObject2 = _taggedTemplateLiteral( + [ + '\n color: ', + ';\n background-color: ', + ';\n border-color: ', + ';\n box-shadow: ', + ';\n\n &:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:hover {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', + ';\n border-color: ', + ';\n box-shadow: ', + ';\n }\n ' + ], + [ + '\n color: ', + ';\n background-color: ', + ';\n border-color: ', + ';\n box-shadow: ', + ';\n\n &:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:hover {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', + ';\n border-color: ', + ';\n box-shadow: ', + ';\n }\n ' + ] + ), + _templateObject3 = _taggedTemplateLiteral( + [ + '\n color: ', + ';\n background-color: ', + ';\n border-color: ', + ';\n box-shadow: ', + ';\n\n &:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:hover {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n ' + ], + [ + '\n color: ', + ';\n background-color: ', + ';\n border-color: ', + ';\n box-shadow: ', + ';\n\n &:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:hover {\n background-color: ', + ';\n border-color: ', + ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', + ';\n border-color: ', + ';\n }\n ' + ] + ), + _templateObject4 = _taggedTemplateLiteral( + ['\n border-radius: 0;\n '], + ['\n border-radius: 0;\n '] + ), + _templateObject5 = _taggedTemplateLiteral( + [ + '\n min-width: ', + ';\n ', + '\n\n & + button {\n margin-left: ', + ';\n }\n' + ], + [ + '\n min-width: ', + ';\n ', + '\n\n & + button {\n margin-left: ', + ';\n }\n' + ] + ), + _templateObject6 = _taggedTemplateLiteral( + ['\n display: inline-block;\n ', '\n'], + ['\n display: inline-block;\n ', '\n'] + ); -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc__ = __webpack_require__(8); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_remcalc___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_remcalc__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_styled_is__ = __webpack_require__(12); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_styled_components__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_normalized_styled_components__ = __webpack_require__(26); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_router_dom__ = __webpack_require__(295); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__boxes__ = __webpack_require__(51); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__paper_effect__ = __webpack_require__(209); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__typography__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__baseline__ = __webpack_require__(4); -var _templateObject = _taggedTemplateLiteral(['\n color: ', ';\n background-color: ', ';\n border-color: ', ';\n\n &:focus {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:hover {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', ';\n border-color: ', ';\n }\n '], ['\n color: ', ';\n background-color: ', ';\n border-color: ', ';\n\n &:focus {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:hover {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', ';\n border-color: ', ';\n }\n ']), - _templateObject2 = _taggedTemplateLiteral(['\n color: ', ';\n background-color: ', ';\n border-color: ', ';\n box-shadow: ', ';\n\n &:focus {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:hover {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', ';\n border-color: ', ';\n box-shadow: ', ';\n }\n '], ['\n color: ', ';\n background-color: ', ';\n border-color: ', ';\n box-shadow: ', ';\n\n &:focus {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:hover {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', ';\n border-color: ', ';\n box-shadow: ', ';\n }\n ']), - _templateObject3 = _taggedTemplateLiteral(['\n color: ', ';\n background-color: ', ';\n border-color: ', ';\n box-shadow: ', ';\n\n &:focus {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:hover {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', ';\n border-color: ', ';\n }\n '], ['\n color: ', ';\n background-color: ', ';\n border-color: ', ';\n box-shadow: ', ';\n\n &:focus {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:hover {\n background-color: ', ';\n border-color: ', ';\n }\n\n &:active,\n &:active:hover,\n &:active:focus {\n background-color: ', ';\n border-color: ', ';\n }\n ']), - _templateObject4 = _taggedTemplateLiteral(['\n border-radius: 0;\n '], ['\n border-radius: 0;\n ']), - _templateObject5 = _taggedTemplateLiteral(['\n min-width: ', ';\n ', '\n\n & + button {\n margin-left: ', ';\n }\n'], ['\n min-width: ', ';\n ', '\n\n & + button {\n margin-left: ', ';\n }\n']), - _templateObject6 = _taggedTemplateLiteral(['\n display: inline-block;\n ', '\n'], ['\n display: inline-block;\n ', '\n']); + function _taggedTemplateLiteral(strings, raw) { + return Object.freeze( + Object.defineProperties(strings, { + raw: { value: Object.freeze(raw) } + }) + ); + } -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + // Based on bootstrap 4 + var style = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4_styled_components__['b' /* css */] + )( + [ + 'box-sizing: border-box;display: inline-block;justify-content: center;align-items: center;margin: 0;padding: ', + ' ', + ';position: relative;', + ';', + ';font-size: ', + ';text-align: center;font-style: normal;font-stretch: normal;line-height: normal;letter-spacing: normal;text-decoration: none;white-space: nowrap;vertical-align: middle;touch-action: manipulation;cursor: pointer;color: ', + ';background-image: none;background-color: ', + ';border-radius: ', + ';border: solid ', + ' ', + ';box-shadow: ', + ';&:focus {outline: 0;text-decoration: none;background-color: ', + ';border-color: ', + ';}&:hover {background-color: ', + ';border: solid ', + ' ', + ';}&:active,&:active:hover,&:active:focus {background-image: none;outline: 0;background-color: ', + ';border-color: ', + ';}&[disabled] {cursor: not-allowed;box-shadow: none;pointer-events: none;}', + '', + '', + '', + '' + ], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(15), + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(18), + __WEBPACK_IMPORTED_MODULE_9__typography__['a' /* default */].fontFamily, + __WEBPACK_IMPORTED_MODULE_9__typography__['a' /* default */].normal, + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(15), + function(props) { + return props.theme.white; + }, + function(props) { + return props.theme.primary; + }, + __WEBPACK_IMPORTED_MODULE_7__boxes__['c' /* borderRadius */], + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), + function(props) { + return props.theme.primaryDesaturated; + }, + __WEBPACK_IMPORTED_MODULE_7__boxes__['a' /* bottomShaddow */], + function(props) { + return props.theme.primary; + }, + function(props) { + return props.theme.primaryDesaturated; + }, + function(props) { + return props.theme.primaryHover; + }, + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), + function(props) { + return props.theme.primaryDark; + }, + function(props) { + return props.theme.primaryActive; + }, + function(props) { + return props.theme.primaryDesaturatedActive; + }, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_styled_is__['a' /* default */] + )('secondary')( + _templateObject, + function(props) { + return props.theme.secondary; + }, + function(props) { + return props.theme.white; + }, + function(props) { + return props.theme.grey; + }, + function(props) { + return props.theme.white; + }, + function(props) { + return props.theme.grey; + }, + function(props) { + return props.theme.whiteHover; + }, + function(props) { + return props.theme.grey; + }, + function(props) { + return props.theme.whiteActive; + }, + function(props) { + return props.theme.grey; + } + ), + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_styled_is__['a' /* default */] + )('tertiary')( + _templateObject2, + function(props) { + return props.theme.secondary; + }, + function(props) { + return props.theme.white; + }, + function(props) { + return props.theme.grey; + }, + __WEBPACK_IMPORTED_MODULE_8__paper_effect__['a' /* default */], + function(props) { + return props.theme.white; + }, + function(props) { + return props.theme.grey; + }, + function(props) { + return props.theme.whiteHover; + }, + function(props) { + return props.theme.grey; + }, + function(props) { + return props.theme.whiteActive; + }, + function(props) { + return props.theme.grey; + }, + __WEBPACK_IMPORTED_MODULE_7__boxes__['a' /* bottomShaddow */] + ), + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_styled_is__['a' /* default */] + )('disabled')( + _templateObject3, + function(props) { + return props.theme.grey; + }, + function(props) { + return props.theme.disabled; + }, + function(props) { + return props.theme.grey; + }, + __WEBPACK_IMPORTED_MODULE_7__boxes__['a' /* bottomShaddow */], + function(props) { + return props.theme.disabled; + }, + function(props) { + return props.theme.grey; + }, + function(props) { + return props.theme.disabled; + }, + function(props) { + return props.theme.disabled; + }, + function(props) { + return props.theme.disabled; + }, + function(props) { + return props.theme.disabled; + } + ), + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_styled_is__['c' /* isOr */] + )('rect', 'tertiary')(_templateObject4) + ); + var StyledButton = __WEBPACK_IMPORTED_MODULE_5_normalized_styled_components__[ + 'g' /* Button */ + ].extend( + _templateObject5, + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(120), + style, + __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(20) + ); + var StyledAnchor = __WEBPACK_IMPORTED_MODULE_5_normalized_styled_components__[ + 'h' /* A */ + ].extend(_templateObject6, style); + var StyledLink = __webpack_require__ + .i(__WEBPACK_IMPORTED_MODULE_4_styled_components__['a' /* default */])( + __WEBPACK_IMPORTED_MODULE_6_react_router_dom__['a' /* Link */] + ) + .withConfig({ + displayName: 'button__StyledLink' + })(['display: inline-block;', ''], style); - - - - - - - - - -// Based on bootstrap 4 -var style = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4_styled_components__["b" /* css */])(['box-sizing: border-box;display: inline-block;justify-content: center;align-items: center;margin: 0;padding: ', ' ', ';position: relative;', ';', ';font-size: ', ';text-align: center;font-style: normal;font-stretch: normal;line-height: normal;letter-spacing: normal;text-decoration: none;white-space: nowrap;vertical-align: middle;touch-action: manipulation;cursor: pointer;color: ', ';background-image: none;background-color: ', ';border-radius: ', ';border: solid ', ' ', ';box-shadow: ', ';&:focus {outline: 0;text-decoration: none;background-color: ', ';border-color: ', ';}&:hover {background-color: ', ';border: solid ', ' ', ';}&:active,&:active:hover,&:active:focus {background-image: none;outline: 0;background-color: ', ';border-color: ', ';}&[disabled] {cursor: not-allowed;box-shadow: none;pointer-events: none;}', '', '', '', ''], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(15), __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(18), __WEBPACK_IMPORTED_MODULE_9__typography__["a" /* default */].fontFamily, __WEBPACK_IMPORTED_MODULE_9__typography__["a" /* default */].normal, __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(15), function (props) { - return props.theme.white; -}, function (props) { - return props.theme.primary; -}, __WEBPACK_IMPORTED_MODULE_7__boxes__["c" /* borderRadius */], __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), function (props) { - return props.theme.primaryDesaturated; -}, __WEBPACK_IMPORTED_MODULE_7__boxes__["a" /* bottomShaddow */], function (props) { - return props.theme.primary; -}, function (props) { - return props.theme.primaryDesaturated; -}, function (props) { - return props.theme.primaryHover; -}, __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(1), function (props) { - return props.theme.primaryDark; -}, function (props) { - return props.theme.primaryActive; -}, function (props) { - return props.theme.primaryDesaturatedActive; -}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_styled_is__["a" /* default */])('secondary')(_templateObject, function (props) { - return props.theme.secondary; -}, function (props) { - return props.theme.white; -}, function (props) { - return props.theme.grey; -}, function (props) { - return props.theme.white; -}, function (props) { - return props.theme.grey; -}, function (props) { - return props.theme.whiteHover; -}, function (props) { - return props.theme.grey; -}, function (props) { - return props.theme.whiteActive; -}, function (props) { - return props.theme.grey; -}), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_styled_is__["a" /* default */])('tertiary')(_templateObject2, function (props) { - return props.theme.secondary; -}, function (props) { - return props.theme.white; -}, function (props) { - return props.theme.grey; -}, __WEBPACK_IMPORTED_MODULE_8__paper_effect__["a" /* default */], function (props) { - return props.theme.white; -}, function (props) { - return props.theme.grey; -}, function (props) { - return props.theme.whiteHover; -}, function (props) { - return props.theme.grey; -}, function (props) { - return props.theme.whiteActive; -}, function (props) { - return props.theme.grey; -}, __WEBPACK_IMPORTED_MODULE_7__boxes__["a" /* bottomShaddow */]), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_styled_is__["a" /* default */])('disabled')(_templateObject3, function (props) { - return props.theme.grey; -}, function (props) { - return props.theme.disabled; -}, function (props) { - return props.theme.grey; -}, __WEBPACK_IMPORTED_MODULE_7__boxes__["a" /* bottomShaddow */], function (props) { - return props.theme.disabled; -}, function (props) { - return props.theme.grey; -}, function (props) { - return props.theme.disabled; -}, function (props) { - return props.theme.disabled; -}, function (props) { - return props.theme.disabled; -}, function (props) { - return props.theme.disabled; -}), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_styled_is__["c" /* isOr */])('rect', 'tertiary')(_templateObject4)); - -var StyledButton = __WEBPACK_IMPORTED_MODULE_5_normalized_styled_components__["g" /* Button */].extend(_templateObject5, __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(120), style, __WEBPACK_IMPORTED_MODULE_1_remcalc___default()(20)); - -var StyledAnchor = __WEBPACK_IMPORTED_MODULE_5_normalized_styled_components__["h" /* A */].extend(_templateObject6, style); - -var StyledLink = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4_styled_components__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_6_react_router_dom__["a" /* Link */]).withConfig({ - displayName: 'button__StyledLink' -})(['display: inline-block;', ''], style); - -/** + /** * @example ./usage.md */ -var Button = function Button(props) { - var _props$href = props.href, - href = _props$href === undefined ? '' : _props$href, - _props$to = props.to, - to = _props$to === undefined ? '' : _props$to; + var Button = function Button(props) { + var _props$href = props.href, + href = _props$href === undefined ? '' : _props$href, + _props$to = props.to, + to = _props$to === undefined ? '' : _props$to; + var Views = [ + function() { + return to ? StyledLink : null; + }, + function() { + return href ? StyledAnchor : null; + }, + function() { + return StyledButton; + } + ]; - var Views = [function () { - return to ? StyledLink : null; - }, function () { - return href ? StyledAnchor : null; - }, function () { - return StyledButton; - }]; + var View = Views.reduce(function(sel, view) { + return sel ? sel : view(); + }, null); - var View = Views.reduce(function (sel, view) { - return sel ? sel : view(); - }, null); + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + View, + props, + props.children + ); + }; - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( - View, - props, - props.children - ); -}; - -Button.propTypes = { - /** + Button.propTypes = { + /** * The `