diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000000..ab7bf238c3 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,2 @@ +# npm modules +node_modules/ diff --git a/frontend/pom.xml b/frontend/pom.xml new file mode 100644 index 0000000000..4a3b2992b2 --- /dev/null +++ b/frontend/pom.xml @@ -0,0 +1,128 @@ + + + 4.0.0 + + org.zanata + server + 3.7.0-SNAPSHOT + + frontend + frontend + http://maven.apache.org + + UTF-8 + v0.12.2 + 2.7.6 + ${project.build.directory}/web + ${project.build.directory}/build + ${bundle.output}/META-INF/resources + ${project.build.directory} + ${node.install.directory}/node/npm/bin/npm-cli.js + + + user-profile-page + + + + + + + + + + + false + src/main/web + ${web.target} + + + + + com.github.eirslett + frontend-maven-plugin + 0.0.23 + + ${node.install.directory} + + + + + install node and npm + generate-resources + + install-node-and-npm + + + ${node.version} + ${npm.version} + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.4.0 + + + ${node.install.directory}/node:${node.install.directory}/node/npm/bin:${env.PATH} + + ${node.install.directory}/node/node + + + + + + execute npm install for: ${module.user-profile-page} + process-resources + + exec + + + ${web.target}/${module.user-profile-page} + + ${npm.cli.script} + install + + + + + execute npm run build for: ${module.user-profile-page} + compile + + exec + + + ${web.target}/${module.user-profile-page} + + ${npm.cli.script} + run + build + bundleDest=${bundle.dest} + + + + + + + + maven-surefire-plugin + + true + false + + + + + org.apache.maven.plugins + maven-jar-plugin + + ${bundle.output} + + + + + + diff --git a/frontend/src/main/web/user-profile-page/README.md b/frontend/src/main/web/user-profile-page/README.md new file mode 100644 index 0000000000..14aed5aec8 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/README.md @@ -0,0 +1,17 @@ +# React Profile + +## Setup + +`npm install` + +## Options + +### Production Build + +`npm run build` + +### Development Server + +#### (a HTTP server to serve index.html with webpack produced bundle.js) + +`npm start` diff --git a/frontend/src/main/web/user-profile-page/copy.sh b/frontend/src/main/web/user-profile-page/copy.sh new file mode 100755 index 0000000000..26457fe7c5 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/copy.sh @@ -0,0 +1,14 @@ +#!/bin/bash + + +arg1=$1 +arg2=$2 + +srcDest=${arg1:="$HOME/work/root/server/zanata-war/src/main/webapp/profile/js/"} +deployedDest=${arg2:="/NotBackedUp/tools/jboss-eap/standalone/deployments/zanata.war/profile/js/"} + +echo "will copy bundle.min.js to [$srcDest] and [$deployedDest]" + +cp bundle.min.js ${srcDest} +cp bundle.min.js ${deployedDest} + diff --git a/frontend/src/main/web/user-profile-page/index.html b/frontend/src/main/web/user-profile-page/index.html new file mode 100644 index 0000000000..f7f3643bb7 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/index.html @@ -0,0 +1,36 @@ + + + + + + + Zanata Profile + + + +
+
+ +
+
+
+
+
+ + + + + diff --git a/frontend/src/main/web/user-profile-page/index.js b/frontend/src/main/web/user-profile-page/index.js new file mode 100644 index 0000000000..ac503b60cc --- /dev/null +++ b/frontend/src/main/web/user-profile-page/index.js @@ -0,0 +1,10 @@ +import React from 'react'; +import RecentContributions from './lib/components/RecentContributions'; +import Configs from './lib/constants/Configs'; + +var mountNode = document.getElementById('userMatrixRoot'), + baseUrl = mountNode.getAttribute('data-base-url'); + +Configs.baseUrl = baseUrl; + +React.render(, mountNode); diff --git a/frontend/src/main/web/user-profile-page/lib/actions/Actions.js b/frontend/src/main/web/user-profile-page/lib/actions/Actions.js new file mode 100644 index 0000000000..04b7b6a959 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/actions/Actions.js @@ -0,0 +1,44 @@ +import Dispatcher from '../dispatchers/UserMatrixDispatcher'; +import ActionTypes from '../constants/ActionTypes'; + + +var Actions = { + changeDateRange: function(dateRangeOption) { + Dispatcher.handleViewAction( + { + actionType: ActionTypes.DATE_RANGE_UPDATE, + data: dateRangeOption + } + ); + }, + + changeContentState: function(contentState) { + Dispatcher.handleViewAction( + { + actionType: ActionTypes.CONTENT_STATE_UPDATE, + data: contentState + } + ); + }, + + onDaySelected: function(day) { + Dispatcher.handleViewAction( + { + actionType: ActionTypes.DAY_SELECTED, + data: day + } + ); + }, + + clearSelectedDay: function() { + Dispatcher.handleViewAction( + { + actionType: ActionTypes.DAY_SELECTED, + data: null + } + ); + } + +}; + +export default Actions; diff --git a/frontend/src/main/web/user-profile-page/lib/components/CalendarMonthMatrix.jsx b/frontend/src/main/web/user-profile-page/lib/components/CalendarMonthMatrix.jsx new file mode 100644 index 0000000000..8c23ba193b --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/CalendarMonthMatrix.jsx @@ -0,0 +1,106 @@ +import React from 'react'; +import moment from 'moment-range'; +import DayMatrix from './DayMatrix'; +import Actions from '../actions/Actions'; +import {ContentStates} from '../constants/Options'; +import {DateRanges} from '../constants/Options'; + +var CalendarMonthMatrix = React.createClass({ + propTypes: { + matrixData: React.PropTypes.arrayOf( + React.PropTypes.shape( + { + date: React.PropTypes.string.isRequired, + wordCount: React.PropTypes.number.isRequired + }) + ).isRequired, + selectedDay: React.PropTypes.string, + selectedContentState: React.PropTypes.oneOf(ContentStates).isRequired, + dateRangeOption: React.PropTypes.oneOf(DateRanges).isRequired + }, + + getDefaultProps: function() { + // this is to make week days locale aware and making sure it align with + // below display + var now = moment(), + weekDays = [], + weekDay; + for (var i = 0; i < 7; i++) { + weekDay = now.weekday(i).format('ddd'); + weekDays.push({weekDay}); + } + return { + weekDays: weekDays + } + }, + + handleClearSelection: function() { + Actions.clearSelectedDay(); + }, + + render: function() { + var selectedDay = this.props.selectedDay, + cx = React.addons.classSet, + clearClass = this.props.selectedDay ? '' : 'is-hidden', + tableClasses = { + 'l--push-bottom-1': true, + 'cal': true, + 'cal--highlight': this.props.selectedContentState === ContentStates[1], + 'cal--success': this.props.selectedContentState === ContentStates[2], + 'cal--unsure': this.props.selectedContentState === ContentStates[3] + }, + matrixData = this.props.matrixData, + days = [], result = [], + dayColumns, firstDay, heading; + + if (matrixData.length == 0) { + return
Loading
+ } + + firstDay = moment(matrixData[0]['date']); + for (var i = firstDay.weekday() - 1; i >= 0; i--) { + // for the first week, we pre-fill missing week days + days.push(); + } + + matrixData.forEach(function(entry) { + var date = entry['date']; + + days.push( + + ); + }); + + while(days.length) { + dayColumns = days.splice(0, 7); + result.push( {dayColumns} ); + } + + heading = ( +
+
+

{this.props.dateRangeOption}'s Activity

+
+
+

+
+
+ ); + + return ( +
+ {heading} + + + {this.props.weekDays} + + + {result} + +
+
+ ); + } +}); + +export default CalendarMonthMatrix; diff --git a/frontend/src/main/web/user-profile-page/lib/components/CalendarPeriodHeading.jsx b/frontend/src/main/web/user-profile-page/lib/components/CalendarPeriodHeading.jsx new file mode 100644 index 0000000000..d8849aaead --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/CalendarPeriodHeading.jsx @@ -0,0 +1,31 @@ +import React from 'react'; +import moment from 'moment'; +import dateUtils from '../utils/DateHelper' + +var CalendarPeriodHeading = React.createClass( + { + render: function() { + var stdFmt = dateUtils['dateFormat'], + dateDisplayFmt = 'DD MMM, YYYY (dddd)', + dateRangeDisplayFmt = 'DD MMM, YYYY', + period; + + if (this.props.selectedDay) { + period = moment(this.props.selectedDay, stdFmt).format(dateDisplayFmt); + } else { + period = moment(this.props.fromDate, stdFmt).format(dateRangeDisplayFmt) + + ' … ' + + moment(this.props.toDate, stdFmt).format(dateRangeDisplayFmt) + + ' (' + this.props.dateRange + ')'; + } + return ( +
+

Activity Details

+

{period}

+
+ ) + } + } +); + +export default CalendarPeriodHeading; diff --git a/frontend/src/main/web/user-profile-page/lib/components/CategoryItemMatrix.jsx b/frontend/src/main/web/user-profile-page/lib/components/CategoryItemMatrix.jsx new file mode 100644 index 0000000000..97ae07ad06 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/CategoryItemMatrix.jsx @@ -0,0 +1,18 @@ +import React from 'react'; + +var CategoryItemMatrix = React.createClass( + { + render: function() { + return ( + + + {this.props.itemTitle} ({this.props.itemName}) + + {this.props.wordCount} words + + ) + } + } +); + +export default CategoryItemMatrix; diff --git a/frontend/src/main/web/user-profile-page/lib/components/CategoryMatrixTable.jsx b/frontend/src/main/web/user-profile-page/lib/components/CategoryMatrixTable.jsx new file mode 100644 index 0000000000..fb361efc23 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/CategoryMatrixTable.jsx @@ -0,0 +1,45 @@ +import React from 'react'; +import _ from 'lodash'; +import CategoryItemMatrix from './CategoryItemMatrix'; + +var CategoryMatrixTable = React.createClass( + { + render: function() { + var categoryMatrix = {}, + rows = [], + // TODO validate category is one of the key in matrix object + categoryField = this.props.category, + categoryFieldTitle = this.props.categoryTitle + ; + + this.props.matrixData.forEach(function(matrix) { + var field = matrix[categoryField]; + if (categoryMatrix[field] && categoryMatrix[field]['wordCount']) { + categoryMatrix[field]['wordCount'] += matrix['wordCount']; + } else { + categoryMatrix[field] = { + wordCount: matrix['wordCount'], + title: matrix[categoryFieldTitle] + }; + } + }); + + _.forOwn(categoryMatrix, function(value, key) { + rows.push() + }); + + return ( +
+

{this.props.categoryName}

+ + + {rows} + +
+
+ ); + } + } +); + +export default CategoryMatrixTable; diff --git a/frontend/src/main/web/user-profile-page/lib/components/ContentStateFilter.jsx b/frontend/src/main/web/user-profile-page/lib/components/ContentStateFilter.jsx new file mode 100644 index 0000000000..8ddf528b64 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/ContentStateFilter.jsx @@ -0,0 +1,43 @@ +import React from 'react'; +import Actions from '../actions/Actions'; +import {ContentStates, ContentStateStyles} from '../constants/Options'; +import {PureRenderMixin} from 'react/addons'; + +var ContentStateFilter = React.createClass({ + mixins: [PureRenderMixin], + + propTypes: { + selectedContentState: React.PropTypes.oneOf(ContentStates).isRequired + }, + + onFilterOptionClicked: function(option, event) { + if (this.props.selectedContentState !== option) { + Actions.changeContentState(option); + } + }, + + render: function() { + var contentStateFilter= this, + selected = this.props.selectedContentState, + clickHandler = this.onFilterOptionClicked, + optionItems; + + optionItems = ContentStates.map(function(option, index) { + var optionStyle = 'pill--' + ContentStateStyles[index], + buttonStyle = 'pill pill--inline '; + buttonStyle += selected === option ? optionStyle + ' is-active' : optionStyle; + + return ( + + {option} + + ); + + }); + return ( +
{optionItems}
+ ); + } +}); + +export default ContentStateFilter; diff --git a/frontend/src/main/web/user-profile-page/lib/components/ContributionChart.jsx b/frontend/src/main/web/user-profile-page/lib/components/ContributionChart.jsx new file mode 100644 index 0000000000..ff2e4b4aee --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/ContributionChart.jsx @@ -0,0 +1,147 @@ +import React from 'react'; +import utilsDate from '../utils/DateHelper'; +import { Line } from 'react-chartjs'; +import {DateRanges} from '../constants/Options'; + +var LineChart = Line; + +var defaultChartOptions = { + animationEasing: "easeOutQuint", + bezierCurve : true, + bezierCurveTension : 0.4, + pointDot : true, + pointDotRadius : 4, + // This doesn't seem to work + datasetStroke : true, + datasetStrokeWidth : 2, + datasetFill : true, + // TODO: Need to set this to true but it breaks + responsive: true, + showTooltips: true, + scaleFontFamily: '"Source Sans Pro", "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif', + scaleFontColor: "#7c96ac", + scaleShowGridLines : true, + scaleShowVerticalLines: false, + scaleGridLineColor : "rgba(198, 210, 219, .1)", + tooltipFillColor: "rgba(255,255,255,0.8)", + // scaleOverride : true, + // scaleSteps : 10, + // scaleStepWidth : 100, + // scaleStartValue : 0, + tooltipFontFamily: '"Source Sans Pro", "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif', + tooltipFontSize: 14, + tooltipFontStyle: '400', + tooltipFontColor: 'rgb(132, 168, 196)', + tooltipTitleFontFamily: '"Source Sans Pro", "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif', + tooltipTitleFontSize: 14, + tooltipTitleFontStyle: '400', + tooltipTitleFontColor: 'rgb(65, 105, 136)', + tooltipYPadding: 6, + tooltipXPadding: 6, + tooltipCaretSize: 6, + tooltipCornerRadius: 2, + tooltipXOffset: 10, + multiTooltipTemplate: "<%= value %><%if (datasetLabel){%> (<%= datasetLabel %>)<%}%>" +}; + +function convertMatrixDataToChartData(matrixData) { + var chartData = { + labels: [], + datasets: [ + { + label: 'Total', + fillColor: 'rgba(65, 105, 136, .05)', + strokeColor: 'rgb(65, 105, 136)', + pointColor: 'rgb(65, 105, 136)', + pointStrokeColor: '#fff', + pointHighlightFill: '#fff', + pointHighlightStroke: 'rgb(65, 105, 136)', + data: [] + }, + { + label: 'Translated', + fillColor: 'rgba(112,169,139, .05)', + strokeColor: 'rgb(112,169,139)', + pointColor: 'rgb(112,169,139)', + pointStrokeColor: '#fff', + pointHighlightFill: '#fff', + pointHighlightStroke: 'rgb(112,169,139)', + data: [] + }, + { + label: 'Needs Work', + fillColor: 'rgba(224,195,80, .05)', + strokeColor: 'rgb(224,195,80)', + pointColor: 'rgb(224,195,80)', + pointStrokeColor: '#fff', + pointHighlightFill: '#fff', + pointHighlightStroke: 'rgb(224,195,80)', + data: [] + }, + { + label: 'Approved', + fillColor: "rgba(78, 159, 221, .05)", + strokeColor: 'rgb(78, 159, 221)', + pointColor: 'rgb(78, 159, 221)', + pointStrokeColor: '#fff', + pointHighlightFill: '#fff', + pointHighlightStroke: 'rgb(78, 159, 221)', + data: [] + } + ] + }, + numOfDays = matrixData.length, + intoTheFuture = false; + + + matrixData.forEach(function(value) { + var date = value['date']; + intoTheFuture = intoTheFuture || utilsDate.isInFuture(date); + chartData.labels.push(utilsDate.dayAsLabel(date, numOfDays)); + + if (!intoTheFuture) { + chartData['datasets'][0]['data'].push(value['totalActivity']); + chartData['datasets'][1]['data'].push(value['totalTranslated']); + chartData['datasets'][2]['data'].push(value['totalNeedsWork']); + chartData['datasets'][3]['data'].push(value['totalApproved']); + } + }); + + return chartData; +} + +var ContributionChart = React.createClass({ + propTypes: { + dateRangeOption: React.PropTypes.oneOf(DateRanges).isRequired, + wordCountForEachDay: React.PropTypes.arrayOf( + React.PropTypes.shape( + { + date: React.PropTypes.string.isRequired, + totalActivity: React.PropTypes.number.isRequired, + totalApproved: React.PropTypes.number.isRequired, + totalTranslated: React.PropTypes.number.isRequired, + totalNeedsWork: React.PropTypes.number.isRequired + }) + ).isRequired + }, + + getDefaultProps: function() { + return { + chartOptions: defaultChartOptions + } + }, + + shouldComponentUpdate: function(nextProps, nextState) { + return this.props.dateRangeOption !== nextProps.dateRangeOption + || this.props.wordCountForEachDay.length !== nextProps.wordCountForEachDay.length; + }, + + render: function() { + var chartData = convertMatrixDataToChartData(this.props.wordCountForEachDay); + return ( + + ) + } +}); + +export default ContributionChart; diff --git a/frontend/src/main/web/user-profile-page/lib/components/DayMatrix.jsx b/frontend/src/main/web/user-profile-page/lib/components/DayMatrix.jsx new file mode 100644 index 0000000000..8cfd891d46 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/DayMatrix.jsx @@ -0,0 +1,59 @@ +import React from 'react/addons'; +import {ContentStates, ContentStateStyles} from '../constants/Options'; +import Actions from '../actions/Actions'; +import {PureRenderMixin} from 'react/addons'; +import dateUtil from '../utils/DateHelper'; + +var DayMatrix = React.createClass({ + mixins: [PureRenderMixin], + + propTypes: { + dateLabel: React.PropTypes.string.isRequired, + date: React.PropTypes.string.isRequired, + wordCount: React.PropTypes.number.isRequired, + selectedDay: React.PropTypes.string + }, + + + handleDayClick: function(event) { + var dayChosen = this.props.date; + if (this.props.selectedDay == dayChosen) { + // click the same day again will cancel selection + Actions.clearSelectedDay(); + } else { + Actions.onDaySelected(dayChosen); + } + }, + + render: function() { + var cx = React.addons.classSet, + selectedContentState = this.props.selectedContentState, + // Note: this will make this component impure. But it will only become + // impure when you render it between midnight, e.g. two re-render attempt + // happen across two days with same props, which I think it's ok. + dateIsInFuture = dateUtil.isInFuture(this.props.date), + wordCount = dateIsInFuture ? '' : this.props.wordCount, + rowClass; + + rowClass = { + 'cal__day': true, + 'is-disabled': dateIsInFuture, + 'is-active': this.props.date === this.props.selectedDay + }; + + + + ContentStates.forEach(function(option, index) { + rowClass[ContentStateStyles[index]] = selectedContentState === option; + }); + + return ( + +
{this.props.dateLabel}
+
{wordCount}
+ + ); + } +}); + +export default DayMatrix; diff --git a/frontend/src/main/web/user-profile-page/lib/components/DropDown.jsx b/frontend/src/main/web/user-profile-page/lib/components/DropDown.jsx new file mode 100644 index 0000000000..cf0dda6372 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/DropDown.jsx @@ -0,0 +1,52 @@ +import React from 'react'; +import Actions from '../actions/Actions'; +import {PureRenderMixin} from 'react/addons'; + +var DropDown = React.createClass({ + mixins: [PureRenderMixin], + + getInitialState: function() { + return {dropdownIsActive: false}; + }, + + handleOptionClick: function(option) { + if (this.props.selectedOption != option) { + Actions.changeDateRange(option); + } + this.setState({dropdownIsActive: false}); + }, + + handleButtonClick: function(e) { + e.preventDefault(); + this.setState({dropdownIsActive: !this.state.dropdownIsActive}); + }, + + render: function() { + var options = this.props.options, + selected = this.props.selectedOption, + self = this, + dropDownClass = 'Dropdown--simple', + optionList; + + dropDownClass += this.state.dropdownIsActive ? ' is-active' : ''; + + optionList = options.map(function (option) { + var buttonClassName = 'button--link txt--nowrap'; + buttonClassName += option === selected ? ' is-active' : ''; + return
  • + +
  • + }); + + return ( +
    + +
      + {optionList} +
    +
    + ) + } +}); + +export default DropDown; diff --git a/frontend/src/main/web/user-profile-page/lib/components/FilterableMatrixTable.jsx b/frontend/src/main/web/user-profile-page/lib/components/FilterableMatrixTable.jsx new file mode 100644 index 0000000000..24cfa9c431 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/FilterableMatrixTable.jsx @@ -0,0 +1,69 @@ +import React from 'react/addons'; +import ContentStateFilter from './ContentStateFilter'; +import CalendarMonthMatrix from './CalendarMonthMatrix' +import CalendarPeriodHeading from './CalendarPeriodHeading'; +import CategoryMatrixTable from './CategoryMatrixTable'; +import {DateRanges} from '../constants/Options'; +import {ContentStates} from '../constants/Options'; + +var FilterableMatrixTable = React.createClass({ + propTypes: { + wordCountForEachDay: React.PropTypes.arrayOf( + React.PropTypes.shape( + { + date: React.PropTypes.string.isRequired, + wordCount: React.PropTypes.number.isRequired, + }) + ).isRequired, + wordCountForSelectedDay: React.PropTypes.arrayOf( + React.PropTypes.shape( + { + savedDate: React.PropTypes.string.isRequired, + projectSlug: React.PropTypes.string.isRequired, + projectName: React.PropTypes.string.isRequired, + versionSlug: React.PropTypes.string.isRequired, + localeId: React.PropTypes.string.isRequired, + localeDisplayName: React.PropTypes.string.isRequired, + savedState: React.PropTypes.string.isRequired, + wordCount: React.PropTypes.number.isRequired + }) + ).isRequired, + fromDate: React.PropTypes.string.isRequired, + toDate: React.PropTypes.string.isRequired, + dateRangeOption: React.PropTypes.oneOf(DateRanges).isRequired, + selectedContentState: React.PropTypes.oneOf(ContentStates).isRequired, + selectedDay: React.PropTypes.string + }, + + render: function () { + var selectedContentState = this.props.selectedContentState, + selectedDay = this.props.selectedDay, + categoryTables; + + if (this.props.wordCountForSelectedDay.length > 0) { + categoryTables = + [ + , + + ]; + } else { + categoryTables =
    No contributions
    + } + return ( +
    + +
    +
    + +
    +
    + + {categoryTables} +
    +
    +
    + ) + } +}); + +export default FilterableMatrixTable; diff --git a/frontend/src/main/web/user-profile-page/lib/components/RecentContributions.jsx b/frontend/src/main/web/user-profile-page/lib/components/RecentContributions.jsx new file mode 100644 index 0000000000..bc84dca614 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/components/RecentContributions.jsx @@ -0,0 +1,59 @@ +import React from 'react'; +import ContributionChart from './ContributionChart'; +import DropDown from './DropDown'; +import FilterableMatrixTable from './FilterableMatrixTable'; +import UserMatrixStore from '../stores/UserMatrixStore'; +import {DateRanges} from '../constants/Options'; + +var RecentContributions = React.createClass( + { + + getMatrixState: function() { + return UserMatrixStore.getMatrixState(); + }, + + getInitialState: function() { + return this.getMatrixState(); + }, + + componentDidMount: function() { + UserMatrixStore.addChangeListener(this._onChange); + }, + + componentWillUnmount: function() { + UserMatrixStore.removeChangeListener(this._onChange); + }, + + _onChange: function() { + this.setState(this.getMatrixState()); + }, + + render: function() { + var dateRange = this.state.dateRange; + + return ( +
    +
    +
    + +
    +

    Recent Contributions

    +
    +
    + +
    + +
    + ) + } + } +); + +export default RecentContributions; diff --git a/frontend/src/main/web/user-profile-page/lib/constants/ActionTypes.js b/frontend/src/main/web/user-profile-page/lib/constants/ActionTypes.js new file mode 100644 index 0000000000..2ba9ad439d --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/constants/ActionTypes.js @@ -0,0 +1,9 @@ +import keymirror from 'keymirror'; + +var ActionTypes = keymirror({ + DATE_RANGE_UPDATE: null, + CONTENT_STATE_UPDATE: null, + DAY_SELECTED: null +}); + +export default ActionTypes; diff --git a/frontend/src/main/web/user-profile-page/lib/constants/Configs.js b/frontend/src/main/web/user-profile-page/lib/constants/Configs.js new file mode 100644 index 0000000000..0075a8b068 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/constants/Configs.js @@ -0,0 +1,5 @@ +var Configs = { + baseUrl: null +}; + +export default Configs diff --git a/frontend/src/main/web/user-profile-page/lib/constants/Options.js b/frontend/src/main/web/user-profile-page/lib/constants/Options.js new file mode 100644 index 0000000000..056812d198 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/constants/Options.js @@ -0,0 +1,9 @@ + +var ContentStates = ['Total', 'Approved', 'Translated', 'Needs Work']; +var ContentStateStyles = ['secondary', 'highlight', 'success', 'unsure']; +var DateRanges = ['This Week', 'Last Week', 'This Month', 'Last Month']; + + +exports.ContentStates = ContentStates; +exports.ContentStateStyles = ContentStateStyles; +exports.DateRanges = DateRanges; diff --git a/frontend/src/main/web/user-profile-page/lib/dispatchers/UserMatrixDispatcher.js b/frontend/src/main/web/user-profile-page/lib/dispatchers/UserMatrixDispatcher.js new file mode 100644 index 0000000000..efa3ddf5dc --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/dispatchers/UserMatrixDispatcher.js @@ -0,0 +1,19 @@ +import assign from 'object-assign'; +import {Dispatcher} from 'flux'; + +var UserMatrixDispatcher = assign({}, new Dispatcher(), Dispatcher.prototype, { + + /** + * A bridge function between the views and the dispatcher, marking the action + * as a view action. Another variant here could be handleServerAction. + * @param {object} action The data coming from the view. + */ + handleViewAction: function(action) { + this.dispatch({ + source: 'VIEW_ACTION', + action: action + }); + } +}); + +export default UserMatrixDispatcher; diff --git a/frontend/src/main/web/user-profile-page/lib/stores/UserMatrixStore.js b/frontend/src/main/web/user-profile-page/lib/stores/UserMatrixStore.js new file mode 100644 index 0000000000..89d7ee369f --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/stores/UserMatrixStore.js @@ -0,0 +1,245 @@ +import Dispatcher from '../dispatchers/UserMatrixDispatcher'; +import assign from 'object-assign'; +import {Promise} from 'es6-promise'; +import {EventEmitter} from 'events'; +import {ContentStates} from '../constants/Options'; +import {DateRanges} from '../constants/Options'; +import ActionTypes from '../constants/ActionTypes'; +import Configs from '../constants/Configs'; +import utilsDate from '../utils/DateHelper'; +import Request from 'superagent'; + +var CHANGE_EVENT = "change"; + +var _state = { + matrix: [], + matrixForAllDays: [], + wordCountsForEachDayFilteredByContentState: [], + wordCountsForSelectedDayFilteredByContentState: [], + dateRangeOption: DateRanges[0], + selectedDay: null, + contentStateOption: ContentStates[0], + dateRange: function(option) { + return utilsDate.getDateRangeFromOption(option); + } +}; + +function loadFromServer() { + var dateRangeOption = _state['dateRangeOption'], + dateRange = utilsDate.getDateRangeFromOption(dateRangeOption), + url = Configs.baseUrl + dateRange.fromDate + '..' + dateRange.toDate; + + _state['dateRange'] = dateRange; + //console.log('about to load from server: %s', url); + return new Promise(function(resolve, reject) { + // we turn off cache because it seems like if server(maybe just node?) + // returns 304 unmodified, it won't even reach the callback! + Request.get(url) + .set("Cache-Control", "no-cache, no-store, must-revalidate") + .set("Pragma", "no-cache") + .set("Expires", 0) + .end((function (res) { + //console.log('response:' + res.body); + if (res.error) { + console.error(url, res.status, res.error.toString()); + reject(Error(res.error.toString())); + } else { + resolve(res['body']); + } + })); + }); +} + +function handleServerResponse(serverResponse) { + var dateRange = _state['dateRange'], + wordCountsForEachDay = transformToTotalWordCountsForEachDay(serverResponse, dateRange), + contentState = _state['contentStateOption'], + selectedDay = _state['selectedDay']; + + _state['matrix'] = serverResponse; + _state['matrixForAllDays'] = wordCountsForEachDay; + _state['wordCountsForEachDayFilteredByContentState'] = mapTotalWordCountByContentState(wordCountsForEachDay, contentState); + _state['wordCountsForSelectedDayFilteredByContentState'] = filterByContentStateAndDay(_state['matrix'], contentState, selectedDay); + //console.log('handle server response:' + _state); + return _state; +} + +/** + * + * @param listOfMatrices original server response + * @param {{fromDate: string, toDate: string, dates: string[]}} dateRange see + * DateHelper.getDateRangeFromOption(string) + * @returns {{label: string, date: string, totalApproved: number, + * totalTranslated: number, totalNeedsWork: number, totalActivity: + * number}[]} + */ +function transformToTotalWordCountsForEachDay(listOfMatrices, dateRange) { + var datesOfThisPeriod = dateRange['dates'], + result = [], + index = 0; + + datesOfThisPeriod.forEach(function (dateStr) { + var entry = listOfMatrices[index] || {}, + totalApproved = 0, totalTranslated = 0, totalNeedsWork = 0; + + while (entry['savedDate'] === dateStr) { + switch (entry['savedState']) { + case 'Approved': + totalApproved += entry['wordCount']; + break; + case 'Translated': + totalTranslated += entry['wordCount']; + break; + case 'NeedReview': + totalNeedsWork += entry['wordCount']; + break; + default: + throw new Error('unrecognized state:' + entry['savedState']); + } + index++; + entry = listOfMatrices[index] || {} + } + + result.push( + { + date: dateStr, + totalApproved: totalApproved, + totalTranslated: totalTranslated, + totalNeedsWork: totalNeedsWork, + totalActivity: totalApproved + totalNeedsWork + totalTranslated + }); + }); + + return result; +} + +function mapContentStateToFieldName(selectedOption) { + switch (selectedOption) { + case 'Total': + return 'totalActivity'; + case 'Approved': + return 'totalApproved'; + case 'Translated': + return 'totalTranslated'; + case 'Needs Work': + return 'totalNeedsWork'; + } +} + +/** + * + * @param listOfMatrices this should be the result of + * transformToTotalWordCountsForEachDay(). + * @param {string} selectedContentState + * @returns {{key: string, label: string, wordCount: number}[]} + */ +function mapTotalWordCountByContentState(listOfMatrices, selectedContentState) { + var wordCountFieldName = mapContentStateToFieldName(selectedContentState); + return listOfMatrices.map(function (entry) { + return { + date: entry['date'], + wordCount: entry[wordCountFieldName] + } + }); +} + +/** + * + * @param listOfMatrices original server response + * @param {string} selectedContentState + * @param {string?} selectedDay optional day + * @return filtered entries in same form as original server response + */ +function filterByContentStateAndDay(listOfMatrices, selectedContentState, selectedDay) { + var filteredEntries = listOfMatrices, + predicates = [], + predicate; + + // we have messy terminologies! + selectedContentState = (selectedContentState === 'Needs Work' ? 'NeedReview' : selectedContentState); + + if (selectedDay) { + predicates.push(function (entry) { + return entry['savedDate'] === selectedDay; + }); + } + if (selectedContentState !== 'Total') { + predicates.push(function(entry) { + return entry['savedState'] === selectedContentState; + }); + } + if (predicates.length > 0) { + predicate = function(entry) { + return predicates.every(function(func) { + return func.call({}, entry); + }); + }; + filteredEntries = listOfMatrices.filter(predicate); + } + return filteredEntries; +} + +var UserMatrixStore = assign({}, EventEmitter.prototype, { + getMatrixState: function() { + if (_state.matrixForAllDays.length == 0) { + loadFromServer() + .then(handleServerResponse) + .then(function (newState) { + UserMatrixStore.emitChange(); + }) + } + return _state; + }.bind(this), + + emitChange: function() { + this.emit(CHANGE_EVENT); + }, + + /** + * @param {function} callback + */ + addChangeListener: function(callback) { + this.on(CHANGE_EVENT, callback); + }, + + /** + * @param {function} callback + */ + removeChangeListener: function(callback) { + this.removeListener(CHANGE_EVENT, callback); + }, + + dispatchToken: Dispatcher.register(function(payload) { + var action = payload.action; + switch (action['actionType']) { + case ActionTypes.DATE_RANGE_UPDATE: + console.log('date range from %s -> %s', _state['dateRangeOption'], action.data); + _state['dateRangeOption'] = action.data; + _state['selectedDay'] = null; + loadFromServer() + .then(handleServerResponse) + .then(function(newState) { + UserMatrixStore.emitChange(); + }) + .catch(function(err) { + console.error('something bad happen:' + err.stack); + }); + break; + case ActionTypes.CONTENT_STATE_UPDATE: + console.log('content state from %s -> %s', _state['contentStateOption'], action.data); + _state['contentStateOption'] = action.data; + _state['wordCountsForEachDayFilteredByContentState'] = mapTotalWordCountByContentState(_state['matrixForAllDays'], _state['contentStateOption']); + _state['wordCountsForSelectedDayFilteredByContentState'] = filterByContentStateAndDay(_state['matrix'], _state['contentStateOption'], _state['selectedDay']); + UserMatrixStore.emitChange(); + break; + case ActionTypes.DAY_SELECTED: + console.log('day selection from %s -> %s', _state['selectedDay'], action.data); + _state['selectedDay'] = action.data; + _state['wordCountsForSelectedDayFilteredByContentState'] = filterByContentStateAndDay(_state['matrix'], _state['contentStateOption'], _state['selectedDay']); + UserMatrixStore.emitChange(); + break; + } + }) +}); + +export default UserMatrixStore; diff --git a/frontend/src/main/web/user-profile-page/lib/stores/__mocks__/superagent.js b/frontend/src/main/web/user-profile-page/lib/stores/__mocks__/superagent.js new file mode 100644 index 0000000000..b28928a888 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/stores/__mocks__/superagent.js @@ -0,0 +1,33 @@ +var RequestMock = {}; + +var _mockResponse = {}; +var _set = {}; +var _get; + +function get(getUrl) { + _get = getUrl; + return this; +} + +function set(name, value) { + _set[name] = value; + return this; +} + +function end(func) { + func.call(this, _mockResponse); +} + +RequestMock.get = get; +RequestMock.set = set; +RequestMock.end = end; + +RequestMock.__setResponse = function(res) { + _mockResponse = res; +}; + +RequestMock.getUrl = function() { + return _get; +}; + +module.exports = RequestMock; diff --git a/frontend/src/main/web/user-profile-page/lib/stores/__tests__/UserMatrixStoreTest.js b/frontend/src/main/web/user-profile-page/lib/stores/__tests__/UserMatrixStoreTest.js new file mode 100644 index 0000000000..b95f8b7ce0 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/stores/__tests__/UserMatrixStoreTest.js @@ -0,0 +1,90 @@ +jest.dontMock('../UserMatrixStore') + .dontMock('moment') + .dontMock('moment-range'); +jest.mock('../../utils/DateHelper'); + +describe('UserMatrixStore', function() { + var MockRequest; + var baseUrl = 'http://localhost/base'; + var responseBody = [ + { + "savedDate": "2015-03-01", + "projectSlug": "gcc", + "projectName": "gcc", + "versionSlug": "master", + "localeId": "zh", + "localeDisplayName": "Chinese", + "savedState": "Translated", + "wordCount": 100 + }]; + + beforeEach(function() { + require('../../constants/Configs').baseUrl = baseUrl; + MockRequest = require('superagent'); + MockRequest.__setResponse({error: false, body: responseBody}); + + require('../../utils/DateHelper') + .getDateRangeFromOption + .mockImplementation( + function(option) { + return { + fromDate: '2015-03-01', toDate: '2015-03-07', + dates: ['2015-03-01', '2015-03-02', '2015-03-03', '2015-03-04', '2015-03-05', '2015-03-06', '2015-03-07'] + } + }); + }); + + it('will load from server if state is empty', function() { + var UserMatrixStore = require('../UserMatrixStore'); + + UserMatrixStore.addChangeListener(function() { + var state = UserMatrixStore.getMatrixState(); + + expect(state.dateRangeOption).toEqual('This Week'); + expect(state.contentStateOption).toEqual('Total'); + expect(state.selectedDay).toBeNull(); + expect(state.matrix).toEqual(responseBody); + expect(state.matrixForAllDays).toEqual( + [ + {date: '2015-03-01', totalActivity: 100, totalApproved: 0, totalNeedsWork: 0, totalTranslated: 100}, + {date: '2015-03-02', totalActivity: 0, totalApproved: 0, totalNeedsWork: 0, totalTranslated: 0}, + {date: '2015-03-03', totalActivity: 0, totalApproved: 0, totalNeedsWork: 0, totalTranslated: 0}, + {date: '2015-03-04', totalActivity: 0, totalApproved: 0, totalNeedsWork: 0, totalTranslated: 0}, + {date: '2015-03-05', totalActivity: 0, totalApproved: 0, totalNeedsWork: 0, totalTranslated: 0}, + {date: '2015-03-06', totalActivity: 0, totalApproved: 0, totalNeedsWork: 0, totalTranslated: 0}, + {date: '2015-03-07', totalActivity: 0, totalApproved: 0, totalNeedsWork: 0, totalTranslated: 0} + ] + ); + expect(state.wordCountsForEachDayFilteredByContentState).toEqual( + [ + {date: '2015-03-01', wordCount: 100}, + {date: '2015-03-02', wordCount: 0}, + {date: '2015-03-03', wordCount: 0}, + {date: '2015-03-04', wordCount: 0}, + {date: '2015-03-05', wordCount: 0}, + {date: '2015-03-06', wordCount: 0}, + {date: '2015-03-07', wordCount: 0} + ] + ); + expect(state.wordCountsForSelectedDayFilteredByContentState).toEqual( + [ + { + "savedDate": "2015-03-01", + "projectSlug": "gcc", + "projectName": "gcc", + "versionSlug": "master", + "localeId": "zh", + "localeDisplayName": "Chinese", + "savedState": "Translated", + "wordCount": 100 + } + ] + ); + }); + + UserMatrixStore.getMatrixState(); + + expect(MockRequest.getUrl()).toContain(baseUrl); + + }); +}); diff --git a/frontend/src/main/web/user-profile-page/lib/stores/userStats.json b/frontend/src/main/web/user-profile-page/lib/stores/userStats.json new file mode 100644 index 0000000000..272dcfa011 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/stores/userStats.json @@ -0,0 +1,82 @@ +[ + { + "savedDate": "2015-03-01", + "projectSlug": "gcc", + "projectName": "gcc", + "versionSlug": "master", + "localeId": "zh", + "localeDisplayName": "Chinese", + "savedState": "Translated", + "wordCount": 22 + }, + { + "savedDate": "2015-03-01", + "projectSlug": "gcc", + "projectName": "gcc", + "versionSlug": "master", + "localeId": "zh", + "localeDisplayName": "Chinese", + "savedState": "NeedReview", + "wordCount": 13 + }, + { + "savedDate": "2015-03-01", + "projectSlug": "about-fedora", + "projectName": "about fedora", + "versionSlug": "beta", + "localeId": "ja", + "localeDisplayName": "Japanese", + "savedState": "NeedReview", + "wordCount": 71 + }, + { + "savedDate": "2015-03-01", + "projectSlug": "about-fedora", + "projectName": "about fedora", + "versionSlug": "beta", + "localeId": "ja", + "localeDisplayName": "Japanese", + "savedState": "Translated", + "wordCount": 2 + }, + { + "savedDate": "2015-03-02", + "projectSlug": "zanata-server", + "projectName": "Zanata Server", + "versionSlug": "master", + "localeId": "zh", + "localeDisplayName": "Chinese", + "savedState": "Translated", + "wordCount": 354 + }, + { + "savedDate": "2015-03-02", + "projectSlug": "zanata-server", + "projectName": "Zanata Server", + "versionSlug": "master", + "localeId": "zh", + "localeDisplayName": "Chinese", + "savedState": "NeedReview", + "wordCount": 24 + }, + { + "savedDate": "2015-03-03", + "projectSlug": "zanata-server", + "projectName": "Zanata Server", + "versionSlug": "master", + "localeId": "zh", + "localeDisplayName": "Japanese", + "savedState": "Translated", + "wordCount": 251 + }, + { + "savedDate": "2015-03-12", + "projectSlug": "zanata-server", + "projectName": "Zanata Server", + "versionSlug": "master", + "localeId": "zh", + "localeDisplayName": "Japanese", + "savedState": "Translated", + "wordCount": 251 + } +] diff --git a/frontend/src/main/web/user-profile-page/lib/utils/DateHelper.js b/frontend/src/main/web/user-profile-page/lib/utils/DateHelper.js new file mode 100644 index 0000000000..d4fb79185b --- /dev/null +++ b/frontend/src/main/web/user-profile-page/lib/utils/DateHelper.js @@ -0,0 +1,68 @@ +import moment from 'moment-range'; + +var DateHelper = { + dateFormat: 'YYYY-MM-DD', + getDateRangeFromOption: function (dateRangeOption) { + var now = moment(), + dateFormat = this.dateFormat, + dates = [], + range, + fromDate, + toDate; + + switch(dateRangeOption) { + case 'This Week': + fromDate = moment().weekday(0); + toDate = moment().weekday(6); + break; + case 'Last Week': + fromDate = moment().weekday(-7); + toDate = moment().weekday(-1); + break; + case 'This Month': + fromDate = moment().date(1); + toDate = moment().month(now.month() + 1).date(0); + break; + case 'Last Month': + fromDate = moment().month(now.month() - 1).date(1); + toDate = moment().date(0); + break; + default: + console.error('selectedDateRange [%s] can not be matched. Using (This Week) instead.', dateRangeOption); + fromDate = moment().weekday(0); + toDate = moment(); + } + + range = moment().range(fromDate, toDate); + + range.by('days', function(moment) { + dates.push(moment.format(dateFormat)); + }); + + return { + fromDate: fromDate.format(dateFormat), + toDate: toDate.format(dateFormat), + dates: dates + } + }, + + dayAsLabel: function(dateStr, numOfDays, useFullName) { + var date = moment(dateStr), + dayOfWeekFmt, + dayOfMonthFmt; + + dayOfWeekFmt = useFullName ? 'dddd (Do MMM)' : 'ddd'; + dayOfMonthFmt = useFullName ? 'Do MMM (dddd)' : 'D'; + if (numOfDays < 8) { + return date.format(dayOfWeekFmt); + } else { + return date.format(dayOfMonthFmt); + } + }, + + isInFuture: function(dateStr) { + return moment(dateStr).isAfter(moment()); + } +}; + +export default DateHelper; diff --git a/frontend/src/main/web/user-profile-page/package.json b/frontend/src/main/web/user-profile-page/package.json new file mode 100644 index 0000000000..91cfff54f9 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/package.json @@ -0,0 +1,48 @@ +{ + "name": "react-profile", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "jest", + "js": "webpack", + "build": "NODE_ENV=production webpack -p --config webpack.prod.config.js", + "start": "node server.js" + }, + "author": "Patrick Huang ", + "license": "LGPL", + "devDependencies": { + "babel-core": "^4.3.0", + "babel-loader": "^4.0.0", + "jsx-loader": "^0.12.2", + "react-hot-loader": "^1.1.1", + "webpack": "^1.5.3", + "webpack-dev-server": "^1.7.0", + "jest-cli": "~0.4.0", + "react-tools": "~0.13.0" + }, + "dependencies": { + "lodash": "^3.2.0", + "moment": "^2.9.0", + "moment-range": "^1.0.6", + "react": "^0.12.2", + "react-chartjs": "^0.4.0", + "superagent": "~0.21.0", + "flux": "~2.0.1", + "object-assign": "~2.0.0", + "events": "~1.0.2", + "es6-promise": "~2.0.1", + "keymirror": "~0.1.1", + "chart.js": "git://github.com/huangp/Chart.js" + }, + "jest": { + "unmockedModulePathPatterns": [ + "./node_modules/react", + "./node_modules/object-assign", + "./node_modules/es6-promise", + "./node_modules/events", + "./lib" + ], + "scriptPreprocessor": "./preprocessor.js" + } +} diff --git a/frontend/src/main/web/user-profile-page/preprocessor.js b/frontend/src/main/web/user-profile-page/preprocessor.js new file mode 100644 index 0000000000..70cd1d08e2 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/preprocessor.js @@ -0,0 +1,7 @@ +var ReactTools = require('react-tools'); +var Babel = require('babel-core'); +module.exports = { + process: function(src) { + return Babel.transform(src).code; + } +}; diff --git a/frontend/src/main/web/user-profile-page/server.js b/frontend/src/main/web/user-profile-page/server.js new file mode 100644 index 0000000000..705f163f51 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/server.js @@ -0,0 +1,15 @@ +var webpack = require('webpack'); +var WebpackDevServer = require('webpack-dev-server'); +var config = require('./webpack.config'); + +new WebpackDevServer(webpack(config), { + publicPath: config.output.publicPath, + hot: true, + stats: { colors: true }, + historyApiFallback: true +}).listen(3000, 'localhost', function (err, result) { + if (err) { + console.log(err); + } + console.log('Listening at localhost:3000'); +}); diff --git a/frontend/src/main/web/user-profile-page/webpack.config.js b/frontend/src/main/web/user-profile-page/webpack.config.js new file mode 100644 index 0000000000..ca38d7b433 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/webpack.config.js @@ -0,0 +1,37 @@ +var webpack = require('webpack'); + +module.exports = { + context: __dirname, + devtool: 'eval', + entry: [ + 'webpack-dev-server/client?http://localhost:3000', + 'webpack/hot/only-dev-server', + './index.js', + ], + output: { + path: __dirname, + filename: 'bundle.js', + pathinfo: true + }, + module: { + loaders: [ + { + test: /\.jsx?$/, + exclude: /node_modules/, + loaders: ['react-hot', 'babel-loader'] + } + ] + }, + plugins: [ + new webpack.HotModuleReplacementPlugin(), + new webpack.DefinePlugin({ "global.GENTLY": false }), + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + new webpack.NoErrorsPlugin() + ], + resolve: { + extensions: ['', '.js', '.jsx', '.json'] + }, + node: { + __dirname: true + } +}; diff --git a/frontend/src/main/web/user-profile-page/webpack.prod.config.js b/frontend/src/main/web/user-profile-page/webpack.prod.config.js new file mode 100644 index 0000000000..d43d3d6823 --- /dev/null +++ b/frontend/src/main/web/user-profile-page/webpack.prod.config.js @@ -0,0 +1,49 @@ +var webpack = require('webpack'); +var path = require('path'); + +// default destination +var bundleDest = __dirname; +process.argv.forEach(function(arg) { + if (/^bundleDest=.+$/.test(arg)) { + bundleDest = arg.split('=')[1]; + } +}); + +module.exports = { + context: __dirname, + entry: [ + './index.js', + ], + output: { + path: bundleDest, + filename: path.basename(__dirname) + '.bundle.min.js', + pathinfo: true + }, + module: { + loaders: [ + { + test: /\.jsx?$/, + exclude: /node_modules/, + loader: 'babel-loader' + } + ] + }, + plugins: [ + new webpack.DefinePlugin({ "global.GENTLY": false }), + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + new webpack.optimize.UglifyJsPlugin(), + new webpack.optimize.DedupePlugin(), + new webpack.DefinePlugin({ + "process.env": { + NODE_ENV: JSON.stringify("production") + } + }), + new webpack.NoErrorsPlugin() + ], + resolve: { + extensions: ['', '.js', '.jsx', '.json'] + }, + node: { + __dirname: true + } +}; diff --git a/pom.xml b/pom.xml index 86c952b6ae..97e4d57db0 100644 --- a/pom.xml +++ b/pom.xml @@ -401,6 +401,12 @@ ${zanata.assets.version} + + org.zanata + frontend + ${project.version} + + org.zanata @@ -1676,6 +1682,21 @@ + + + build frontend module + + + !excludeFrontend + + + + 3.1.0 + + + frontend + + diff --git a/zanata-war/pom.xml b/zanata-war/pom.xml index 9342d1c09a..938bc00303 100644 --- a/zanata-war/pom.xml +++ b/zanata-war/pom.xml @@ -1281,6 +1281,11 @@ zanata-assets + + org.zanata + frontend + + org.zanata zanata-common-util diff --git a/zanata-war/src/main/webapp/profile/home.xhtml b/zanata-war/src/main/webapp/profile/home.xhtml index 60dbcf85fd..acf2bd5125 100644 --- a/zanata-war/src/main/webapp/profile/home.xhtml +++ b/zanata-war/src/main/webapp/profile/home.xhtml @@ -43,6 +43,6 @@ + src="#{request.contextPath}/user-profile-page.bundle.min.js"> diff --git a/zanata-war/src/main/webapp/profile/js/bundle.min.js b/zanata-war/src/main/webapp/profile/js/bundle.min.js deleted file mode 100644 index 41a278e9ea..0000000000 --- a/zanata-war/src/main/webapp/profile/js/bundle.min.js +++ /dev/null @@ -1,645 +0,0 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([/*!******************!*\ - !*** multi main ***! - \******************/ -function(t,e,n){t.exports=n(/*! ./index.js */98)},/*!**********************************!*\ - !*** ./~/react/lib/invariant.js ***! - \**********************************/ -function(t){"use strict";var e=function(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],c=0;u=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return l[c++]}))}throw u.framesToPop=1,u}};t.exports=e},/*!**************************************!*\ - !*** ./~/react/lib/Object.assign.js ***! - \**************************************/ -function(t){function e(t){if(null==t)throw new TypeError("Object.assign target cannot be null or undefined");for(var e=Object(t),n=Object.prototype.hasOwnProperty,r=1;r1){for(var p=Array(h),f=0;h>f;f++)p[f]=arguments[f+2];u.children=p}if(t&&t.defaultProps){var d=t.defaultProps;for(s in d)"undefined"==typeof u[s]&&(u[s]=d[s])}return new a(t,l,c,i.current,r.current,u)},a.createFactory=function(t){var e=a.createElement.bind(null,t);return e.type=t,e},a.cloneAndReplaceProps=function(t,e){var n=new a(t.type,t.key,t.ref,t._owner,t._context,e);return n},a.isValidElement=function(t){var e=!(!t||!t._isReactElement);return e},t.exports=a},/*!********************************!*\ - !*** ./~/react/lib/warning.js ***! - \********************************/ -function(t,e,n){"use strict";var r=n(/*! ./emptyFunction */10),i=r;t.exports=i},/*!*********************************************!*\ - !*** ./~/react/lib/ExecutionEnvironment.js ***! - \*********************************************/ -function(t){"use strict";var e=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:e&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};t.exports=n},/*!***************************************!*\ - !*** ./~/react/lib/EventConstants.js ***! - \***************************************/ -function(t,e,n){"use strict";var r=n(/*! ./keyMirror */28),i=r({bubbled:null,captured:null}),o=r({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),a={topLevelTypes:o,PropagationPhases:i};t.exports=a},/*!******************************!*\ - !*** ./~/react/lib/keyOf.js ***! - \******************************/ -function(t){var e=function(t){var e;for(e in t)if(t.hasOwnProperty(e))return e;return null};t.exports=e},/*!************************************************!*\ - !*** ./~/react/lib/ReactCompositeComponent.js ***! - \************************************************/ -function(t,e,n){"use strict";function r(t){var e=t._owner||null;return e&&e.constructor&&e.constructor.displayName?" Check the render method of `"+e.constructor.displayName+"`.":""}function i(t,e){for(var n in e)e.hasOwnProperty(n)&&S("function"==typeof e[n])}function o(t,e){var n=L.hasOwnProperty(e)?L[e]:null;F.hasOwnProperty(e)&&S(n===R.OVERRIDE_BASE),t.hasOwnProperty(e)&&S(n===R.DEFINE_MANY||n===R.DEFINE_MANY_MERGED)}function a(t){var e=t._compositeLifeCycleState;S(t.isMounted()||e===I.MOUNTING),S(null==d.current),S(e!==I.UNMOUNTING)}function s(t,e){if(e){S(!y.isValidFactory(e)),S(!m.isValidElement(e));var n=t.prototype;e.hasOwnProperty(O)&&N.mixins(t,e.mixins);for(var r in e)if(e.hasOwnProperty(r)&&r!==O){var i=e[r];if(o(n,r),N.hasOwnProperty(r))N[r](t,i);else{var a=L.hasOwnProperty(r),s=n.hasOwnProperty(r),u=i&&i.__reactDontBind,l="function"==typeof i,p=l&&!a&&!s&&!u;if(p)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[r]=i,n[r]=i;else if(s){var f=L[r];S(a&&(f===R.DEFINE_MANY_MERGED||f===R.DEFINE_MANY)),f===R.DEFINE_MANY_MERGED?n[r]=c(n[r],i):f===R.DEFINE_MANY&&(n[r]=h(n[r],i))}else n[r]=i}}}}function u(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var i=n in N;S(!i);var o=n in t;S(!o),t[n]=r}}}function l(t,e){return S(t&&e&&"object"==typeof t&&"object"==typeof e),P(e,function(e,n){S(void 0===t[n]),t[n]=e}),t}function c(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);return null==n?r:null==r?n:l(n,r)}}function h(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}var p=n(/*! ./ReactComponent */26),f=n(/*! ./ReactContext */44),d=n(/*! ./ReactCurrentOwner */18),m=n(/*! ./ReactElement */3),v=(n(/*! ./ReactElementValidator */45),n(/*! ./ReactEmptyComponent */36)),g=n(/*! ./ReactErrorUtils */153),y=n(/*! ./ReactLegacyElement */30),_=n(/*! ./ReactOwner */74),b=n(/*! ./ReactPerf */16),w=n(/*! ./ReactPropTransferer */75),C=n(/*! ./ReactPropTypeLocations */77),x=(n(/*! ./ReactPropTypeLocationNames */76),n(/*! ./ReactUpdates */9)),E=n(/*! ./Object.assign */2),D=n(/*! ./instantiateReactComponent */39),S=n(/*! ./invariant */1),M=n(/*! ./keyMirror */28),T=n(/*! ./keyOf */7),P=(n(/*! ./monitorCodeUse */40),n(/*! ./mapObject */92)),k=n(/*! ./shouldUpdateReactComponent */56),O=(n(/*! ./warning */4),T({mixins:null})),R=M({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),A=[],L={mixins:R.DEFINE_MANY,statics:R.DEFINE_MANY,propTypes:R.DEFINE_MANY,contextTypes:R.DEFINE_MANY,childContextTypes:R.DEFINE_MANY,getDefaultProps:R.DEFINE_MANY_MERGED,getInitialState:R.DEFINE_MANY_MERGED,getChildContext:R.DEFINE_MANY_MERGED,render:R.DEFINE_ONCE,componentWillMount:R.DEFINE_MANY,componentDidMount:R.DEFINE_MANY,componentWillReceiveProps:R.DEFINE_MANY,shouldComponentUpdate:R.DEFINE_ONCE,componentWillUpdate:R.DEFINE_MANY,componentDidUpdate:R.DEFINE_MANY,componentWillUnmount:R.DEFINE_MANY,updateComponent:R.OVERRIDE_BASE},N={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;nn;n++){var r=v[n];if(r.isMounted()){var i=r._pendingCallbacks;if(r._pendingCallbacks=null,r.performUpdateIfNecessary(t.reconcileTransaction),i)for(var o=0;oe||i.hasOverloadedBooleanValue[t]&&e===!1}var i=n(/*! ./DOMProperty */21),o=n(/*! ./escapeTextForBrowser */49),a=n(/*! ./memoizeStringOnly */93),s=(n(/*! ./warning */4),a(function(t){return o(t)+'="'})),u={createMarkupForID:function(t){return s(i.ID_ATTRIBUTE_NAME)+o(t)+'"'},createMarkupForProperty:function(t,e){if(i.isStandardName.hasOwnProperty(t)&&i.isStandardName[t]){if(r(t,e))return"";var n=i.getAttributeName[t];return i.hasBooleanValue[t]||i.hasOverloadedBooleanValue[t]&&e===!0?o(n):s(n)+o(e)+'"'}return i.isCustomAttribute(t)?null==e?"":s(t)+o(e)+'"':null},setValueForProperty:function(t,e,n){if(i.isStandardName.hasOwnProperty(e)&&i.isStandardName[e]){var o=i.getMutationMethod[e];if(o)o(t,n);else if(r(e,n))this.deleteValueForProperty(t,e);else if(i.mustUseAttribute[e])t.setAttribute(i.getAttributeName[e],""+n);else{var a=i.getPropertyName[e];i.hasSideEffects[e]&&""+t[a]==""+n||(t[a]=n)}}else i.isCustomAttribute(e)&&(null==n?t.removeAttribute(e):t.setAttribute(e,""+n))},deleteValueForProperty:function(t,e){if(i.isStandardName.hasOwnProperty(e)&&i.isStandardName[e]){var n=i.getMutationMethod[e];if(n)n(t,void 0);else if(i.mustUseAttribute[e])t.removeAttribute(i.getAttributeName[e]);else{var r=i.getPropertyName[e],o=i.getDefaultValueForProperty(t.nodeName,r);i.hasSideEffects[e]&&""+t[r]===o||(t[r]=o)}}else i.isCustomAttribute(e)&&t.removeAttribute(e)}};t.exports=u},/*!*****************************************!*\ - !*** ./~/react/lib/EventPropagators.js ***! - \*****************************************/ -function(t,e,n){"use strict";function r(t,e,n){var r=e.dispatchConfig.phasedRegistrationNames[n];return v(t,r)}function i(t,e,n){var i=e?m.bubbled:m.captured,o=r(t,n,i);o&&(n._dispatchListeners=f(n._dispatchListeners,o),n._dispatchIDs=f(n._dispatchIDs,t))}function o(t){t&&t.dispatchConfig.phasedRegistrationNames&&p.injection.getInstanceHandle().traverseTwoPhase(t.dispatchMarker,i,t)}function a(t,e,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,i=v(t,r);i&&(n._dispatchListeners=f(n._dispatchListeners,i),n._dispatchIDs=f(n._dispatchIDs,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t.dispatchMarker,null,t)}function u(t){d(t,o)}function l(t,e,n,r){p.injection.getInstanceHandle().traverseEnterLeave(n,r,a,t,e)}function c(t){d(t,s)}var h=n(/*! ./EventConstants */6),p=n(/*! ./EventPluginHub */29),f=n(/*! ./accumulateInto */47),d=n(/*! ./forEachAccumulated */50),m=h.PropagationPhases,v=p.getListener,g={accumulateTwoPhaseDispatches:u,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:l};t.exports=g},/*!******************************!*\ - !*** ./~/react/lib/React.js ***! - \******************************/ -function(t,e,n){"use strict";var r=n(/*! ./DOMPropertyOperations */22),i=n(/*! ./EventPluginUtils */42),o=n(/*! ./ReactChildren */68),a=n(/*! ./ReactComponent */26),s=n(/*! ./ReactCompositeComponent */8),u=n(/*! ./ReactContext */44),l=n(/*! ./ReactCurrentOwner */18),c=n(/*! ./ReactElement */3),h=(n(/*! ./ReactElementValidator */45),n(/*! ./ReactDOM */15)),p=n(/*! ./ReactDOMComponent */69),f=n(/*! ./ReactDefaultInjection */152),d=n(/*! ./ReactInstanceHandles */27),m=n(/*! ./ReactLegacyElement */30),v=n(/*! ./ReactMount */13),g=n(/*! ./ReactMultiChild */71),y=n(/*! ./ReactPerf */16),_=n(/*! ./ReactPropTypes */78),b=n(/*! ./ReactServerRendering */159),w=n(/*! ./ReactTextComponent */81),C=n(/*! ./Object.assign */2),x=n(/*! ./deprecated */48),E=n(/*! ./onlyChild */94);f.inject();var D=c.createElement,S=c.createFactory;D=m.wrapCreateElement(D),S=m.wrapCreateFactory(S);var M=y.measure("React","render",v.render),T={Children:{map:o.map,forEach:o.forEach,count:o.count,only:E},DOM:h,PropTypes:_,initializeTouchEvents:function(t){i.useTouchEvents=t},createClass:s.createClass,createElement:D,createFactory:S,constructAndRenderComponent:v.constructAndRenderComponent,constructAndRenderComponentByID:v.constructAndRenderComponentByID,render:M,renderToString:b.renderToString,renderToStaticMarkup:b.renderToStaticMarkup,unmountComponentAtNode:v.unmountComponentAtNode,isValidClass:m.isValidClass,isValidElement:c.isValidElement,withContext:u.withContext,__spread:C,renderComponent:x("React","renderComponent","render",this,M),renderComponentToString:x("React","renderComponentToString","renderToString",this,b.renderToString),renderComponentToStaticMarkup:x("React","renderComponentToStaticMarkup","renderToStaticMarkup",this,b.renderToStaticMarkup),isValidComponent:x("React","isValidComponent","isValidElement",this,c.isValidElement)};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({Component:a,CurrentOwner:l,DOMComponent:p,DOMPropertyOperations:r,InstanceHandles:d,Mount:v,MultiChild:g,TextComponent:w}),T.version="0.12.2",t.exports=T},/*!*************************************************!*\ - !*** ./~/react/lib/ReactBrowserEventEmitter.js ***! - \*************************************************/ -function(t,e,n){"use strict";function r(t){return Object.prototype.hasOwnProperty.call(t,m)||(t[m]=f++,h[t[m]]={}),h[t[m]]}var i=n(/*! ./EventConstants */6),o=n(/*! ./EventPluginHub */29),a=n(/*! ./EventPluginRegistry */66),s=n(/*! ./ReactEventEmitterMixin */154),u=n(/*! ./ViewportMetrics */83),l=n(/*! ./Object.assign */2),c=n(/*! ./isEventSupported */55),h={},p=!1,f=0,d={topBlur:"blur",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",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=l({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(t){t.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=t}},setEnabled:function(t){v.ReactEventListener&&v.ReactEventListener.setEnabled(t)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(t,e){for(var n=e,o=r(n),s=a.registrationNameDependencies[t],u=i.topLevelTypes,l=0,h=s.length;h>l;l++){var p=s[l];o.hasOwnProperty(p)&&o[p]||(p===u.topWheel?c("wheel")?v.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",n):c("mousewheel")?v.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",n):v.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",n):p===u.topScroll?c("scroll",!0)?v.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):v.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",v.ReactEventListener.WINDOW_HANDLE):p===u.topFocus||p===u.topBlur?(c("focus",!0)?(v.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",n),v.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",n)):c("focusin")&&(v.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",n),v.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",n)),o[u.topBlur]=!0,o[u.topFocus]=!0):d.hasOwnProperty(p)&&v.ReactEventListener.trapBubbledEvent(p,d[p],n),o[p]=!0)}},trapBubbledEvent:function(t,e,n){return v.ReactEventListener.trapBubbledEvent(t,e,n)},trapCapturedEvent:function(t,e,n){return v.ReactEventListener.trapCapturedEvent(t,e,n)},ensureScrollValueMonitoring:function(){if(!p){var t=u.refreshScrollValues;v.ReactEventListener.monitorScrollValue(t),p=!0}},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:o.putListener,getListener:o.getListener,deleteListener:o.deleteListener,deleteAllListeners:o.deleteAllListeners});t.exports=v},/*!***************************************!*\ - !*** ./~/react/lib/ReactComponent.js ***! - \***************************************/ -function(t,e,n){"use strict";var r=n(/*! ./ReactElement */3),i=n(/*! ./ReactOwner */74),o=n(/*! ./ReactUpdates */9),a=n(/*! ./Object.assign */2),s=n(/*! ./invariant */1),u=n(/*! ./keyMirror */28),l=u({MOUNTED:null,UNMOUNTED:null}),c=!1,h=null,p=null,f={injection:{injectEnvironment:function(t){s(!c),p=t.mountImageIntoNode,h=t.unmountIDFromEnvironment,f.BackendIDOperations=t.BackendIDOperations,c=!0}},LifeCycle:l,BackendIDOperations:null,Mixin:{isMounted:function(){return this._lifeCycleState===l.MOUNTED},setProps:function(t,e){var n=this._pendingElement||this._currentElement;this.replaceProps(a({},n.props,t),e)},replaceProps:function(t,e){s(this.isMounted()),s(0===this._mountDepth),this._pendingElement=r.cloneAndReplaceProps(this._pendingElement||this._currentElement,t),o.enqueueUpdate(this,e)},_setPropsInternal:function(t,e){var n=this._pendingElement||this._currentElement;this._pendingElement=r.cloneAndReplaceProps(n,a({},n.props,t)),o.enqueueUpdate(this,e)},construct:function(t){this.props=t.props,this._owner=t._owner,this._lifeCycleState=l.UNMOUNTED,this._pendingCallbacks=null,this._currentElement=t,this._pendingElement=null},mountComponent:function(t,e,n){s(!this.isMounted());var r=this._currentElement.ref;if(null!=r){var o=this._currentElement._owner;i.addComponentAsRefTo(this,r,o)}this._rootNodeID=t,this._lifeCycleState=l.MOUNTED,this._mountDepth=n},unmountComponent:function(){s(this.isMounted());var t=this._currentElement.ref;null!=t&&i.removeComponentAsRefFrom(this,t,this._owner),h(this._rootNodeID),this._rootNodeID=null,this._lifeCycleState=l.UNMOUNTED},receiveComponent:function(t,e){s(this.isMounted()),this._pendingElement=t,this.performUpdateIfNecessary(e)},performUpdateIfNecessary:function(t){if(null!=this._pendingElement){var e=this._currentElement,n=this._pendingElement;this._currentElement=n,this.props=n.props,this._owner=n._owner,this._pendingElement=null,this.updateComponent(t,e)}},updateComponent:function(t,e){var n=this._currentElement;(n._owner!==e._owner||n.ref!==e.ref)&&(null!=e.ref&&i.removeComponentAsRefFrom(this,e.ref,e._owner),null!=n.ref&&i.addComponentAsRefTo(this,n.ref,n._owner))},mountComponentIntoNode:function(t,e,n){var r=o.ReactReconcileTransaction.getPooled();r.perform(this._mountComponentIntoNode,this,t,e,r,n),o.ReactReconcileTransaction.release(r)},_mountComponentIntoNode:function(t,e,n,r){var i=this.mountComponent(t,n,0);p(i,e,r)},isOwnedBy:function(t){return this._owner===t},getSiblingByRef:function(t){var e=this._owner;return e&&e.refs?e.refs[t]:null}}};t.exports=f},/*!*********************************************!*\ - !*** ./~/react/lib/ReactInstanceHandles.js ***! - \*********************************************/ -function(t,e,n){"use strict";function r(t){return f+t.toString(36)}function i(t,e){return t.charAt(e)===f||e===t.length}function o(t){return""===t||t.charAt(0)===f&&t.charAt(t.length-1)!==f}function a(t,e){return 0===e.indexOf(t)&&i(e,t.length)}function s(t){return t?t.substr(0,t.lastIndexOf(f)):""}function u(t,e){if(p(o(t)&&o(e)),p(a(t,e)),t===e)return t;for(var n=t.length+d,r=n;r=a;a++)if(i(t,a)&&i(e,a))r=a;else if(t.charAt(a)!==e.charAt(a))break;var s=t.substr(0,r);return p(o(s)),s}function c(t,e,n,r,i,o){t=t||"",e=e||"",p(t!==e);var l=a(e,t);p(l||a(t,e));for(var c=0,h=l?s:u,f=t;;f=h(f,e)){var d;if(i&&f===t||o&&f===e||(d=n(f,l,r)),d===!1||f===e)break;p(c++1){var e=t.indexOf(f,1);return e>-1?t.substr(0,e):t}return null},traverseEnterLeave:function(t,e,n,r,i){var o=l(t,e);o!==t&&c(t,o,n,r,!1,!0),o!==e&&c(o,e,n,i,!0,!1)},traverseTwoPhase:function(t,e,n){t&&(c("",t,e,n,!0,!1),c(t,"",e,n,!1,!0))},traverseAncestors:function(t,e,n){c("",t,e,n,!0,!1)},_getFirstCommonAncestorID:l,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:f};t.exports=v},/*!**********************************!*\ - !*** ./~/react/lib/keyMirror.js ***! - \**********************************/ -function(t,e,n){"use strict";var r=n(/*! ./invariant */1),i=function(t){var e,n={};r(t instanceof Object&&!Array.isArray(t));for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=i},/*!***************************************!*\ - !*** ./~/react/lib/EventPluginHub.js ***! - \***************************************/ -function(t,e,n){"use strict";var r=n(/*! ./EventPluginRegistry */66),i=n(/*! ./EventPluginUtils */42),o=n(/*! ./accumulateInto */47),a=n(/*! ./forEachAccumulated */50),s=n(/*! ./invariant */1),u={},l=null,c=function(t){if(t){var e=i.executeDispatch,n=r.getPluginModuleForEvent(t);n&&n.executeDispatch&&(e=n.executeDispatch),i.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t)}},h=null,p={injection:{injectMount:i.injection.injectMount,injectInstanceHandle:function(t){h=t},getInstanceHandle:function(){return h},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(t,e,n){s(!n||"function"==typeof n);var r=u[e]||(u[e]={});r[t]=n},getListener:function(t,e){var n=u[e];return n&&n[t]},deleteListener:function(t,e){var n=u[e];n&&delete n[t]},deleteAllListeners:function(t){for(var e in u)delete u[e][t]},extractEvents:function(t,e,n,i){for(var a,s=r.plugins,u=0,l=s.length;l>u;u++){var c=s[u];if(c){var h=c.extractEvents(t,e,n,i);h&&(a=o(a,h))}}return a},enqueueEvents:function(t){t&&(l=o(l,t))},processEventQueue:function(){var t=l;l=null,a(t,c),s(!l)},__purge:function(){u={}},__getListenerBank:function(){return u}};t.exports=p},/*!*******************************************!*\ - !*** ./~/react/lib/ReactLegacyElement.js ***! - \*******************************************/ -function(t,e,n){"use strict";function r(t,e){if("function"==typeof e)for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if("function"==typeof r){var i=r.bind(e);for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);t[n]=i}else t[n]=r}}var i=(n(/*! ./ReactCurrentOwner */18),n(/*! ./invariant */1)),o=(n(/*! ./monitorCodeUse */40),n(/*! ./warning */4),{}),a={},s={};s.wrapCreateFactory=function(t){var e=function(e){return"function"!=typeof e?t(e):e.isReactNonLegacyFactory?t(e.type):e.isReactLegacyFactory?t(e.type):e};return e},s.wrapCreateElement=function(t){var e=function(e){if("function"!=typeof e)return t.apply(this,arguments);var n;return e.isReactNonLegacyFactory?(n=Array.prototype.slice.call(arguments,0),n[0]=e.type,t.apply(this,n)):e.isReactLegacyFactory?(e._isMockFunction&&(e.type._mockedReactClassConstructor=e),n=Array.prototype.slice.call(arguments,0),n[0]=e.type,t.apply(this,n)):e.apply(null,Array.prototype.slice.call(arguments,1))};return e},s.wrapFactory=function(t){i("function"==typeof t);var e=function(){return t.apply(this,arguments)};return r(e,t.type),e.isReactLegacyFactory=o,e.type=t.type,e},s.markNonLegacyFactory=function(t){return t.isReactNonLegacyFactory=a,t},s.isValidFactory=function(t){return"function"==typeof t&&t.isReactLegacyFactory===o},s.isValidClass=function(t){return s.isValidFactory(t)},s._isLegacyCallWarningEnabled=!0,t.exports=s},/*!*****************************************!*\ - !*** ./~/react/lib/SyntheticUIEvent.js ***! - \*****************************************/ -function(t,e,n){"use strict";function r(t,e,n){i.call(this,t,e,n)}var i=n(/*! ./SyntheticEvent */19),o=n(/*! ./getEventTarget */53),a={view:function(t){if(t.view)return t.view;var e=o(t);if(null!=e&&e.window===e)return e;var n=e.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(t){return t.detail||0}};i.augmentClass(r,a),t.exports=r},/*!********************************!*\ - !*** ./lib/actions/Actions.js ***! - \********************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! ../dispatchers/UserMatrixDispatcher */60)),o=r(n(/*! ../constants/ActionTypes */58)),a={changeDateRange:function(t){i.handleViewAction({actionType:o.DATE_RANGE_UPDATE,data:t})},changeContentState:function(t){i.handleViewAction({actionType:o.CONTENT_STATE_UPDATE,data:t})},onDaySelected:function(t){i.handleViewAction({actionType:o.DAY_SELECTED,data:t})},clearSelectedDay:function(){i.handleViewAction({actionType:o.DAY_SELECTED,data:null})}};t.exports=a},/*!*********************************!*\ - !*** ./lib/utils/DateHelper.js ***! - \*********************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! moment-range */61)),o={dateFormat:"YYYY-MM-DD",getDateRangeFromOption:function(t){var e,n,r,o=i(),a=this.dateFormat,s=[];switch(t){case"This Week":n=i().weekday(0),r=i().weekday(6);break;case"Last Week":n=i().weekday(-7),r=i().weekday(-1);break;case"This Month":n=i().date(1),r=i().month(o.month()+1).date(0);break;case"Last Month":n=i().month(o.month()-1).date(1),r=i().date(0);break;default:console.error("selectedDateRange [%s] can not be matched. Using (This Week) instead.",t),n=i().weekday(0),r=i()}return e=i().range(n,r),e.by("days",function(t){s.push(t.format(a))}),{fromDate:n.format(a),toDate:r.format(a),dates:s}},dayAsLabel:function(t,e,n){var r,o,a=i(t);return r=n?"dddd (Do MMM)":"ddd",o=n?"Do MMM (dddd)":"D",a.format(8>e?r:o)},isInFuture:function(t){return i(t).isAfter(i())}};t.exports=o},/*!***************************!*\ - !*** ./~/react/addons.js ***! - \***************************/ -function(t,e,n){t.exports=n(/*! ./lib/ReactWithAddons */164)},/*!***************************************!*\ - !*** ./~/react/lib/AutoFocusMixin.js ***! - \***************************************/ -function(t,e,n){"use strict";var r=n(/*! ./focusNode */86),i={componentDidMount:function(){this.props.autoFocus&&r(this.getDOMNode())}};t.exports=i},/*!********************************************!*\ - !*** ./~/react/lib/ReactEmptyComponent.js ***! - \********************************************/ -function(t,e,n){"use strict";function r(){return l(s),s()}function i(t){c[t]=!0}function o(t){delete c[t]}function a(t){return c[t]}var s,u=n(/*! ./ReactElement */3),l=n(/*! ./invariant */1),c={},h={injectEmptyComponent:function(t){s=u.createFactory(t)}},p={deregisterNullComponentID:o,getEmptyComponent:r,injection:h,isNullComponentID:a,registerNullComponentID:i};t.exports=p},/*!********************************************!*\ - !*** ./~/react/lib/SyntheticMouseEvent.js ***! - \********************************************/ -function(t,e,n){"use strict";function r(t,e,n){i.call(this,t,e,n)}var i=n(/*! ./SyntheticUIEvent */31),o=n(/*! ./ViewportMetrics */83),a=n(/*! ./getEventModifierState */52),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(t){var e=t.button;return"which"in t?e:2===e?2:4===e?1:0},buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},pageX:function(t){return"pageX"in t?t.pageX:t.clientX+o.currentScrollLeft},pageY:function(t){return"pageY"in t?t.pageY:t.clientY+o.currentScrollTop}};i.augmentClass(r,s),t.exports=r},/*!************************************!*\ - !*** ./~/react/lib/Transaction.js ***! - \************************************/ -function(t,e,n){"use strict";var r=n(/*! ./invariant */1),i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(t,e,n,i,o,a,s,u){r(!this.isInTransaction());var l,c;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=t.call(e,n,i,o,a,s,u),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(h){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(t){for(var e=this.transactionWrappers,n=t;nn;n++)t[n].call(e[n]);t.length=0,e.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),i.addPoolingTo(r),t.exports=r},/*!*****************************************!*\ - !*** ./~/react/lib/EventPluginUtils.js ***! - \*****************************************/ -function(t,e,n){"use strict";function r(t){return t===v.topMouseUp||t===v.topTouchEnd||t===v.topTouchCancel}function i(t){return t===v.topMouseMove||t===v.topTouchMove}function o(t){return t===v.topMouseDown||t===v.topTouchStart}function a(t,e){var n=t._dispatchListeners,r=t._dispatchIDs;if(Array.isArray(n))for(var i=0;i.";var l=null;n._owner&&n._owner!==p.current&&(l=n._owner.constructor.displayName,e+=" It was passed a child from "+l+"."),e+=" See http://fb.me/react-warning-keys for more information.",f(t,{component:s,componentOwner:l}),console.warn(e)}}function s(){var t=r()||"";m.hasOwnProperty(t)||(m[t]=!0,f("react_object_map_children"))}function u(t,e){if(Array.isArray(t))for(var n=0;n":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;t.exports=n},/*!*******************************************!*\ - !*** ./~/react/lib/forEachAccumulated.js ***! - \*******************************************/ -function(t){"use strict";var e=function(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)};t.exports=e},/*!*****************************************!*\ - !*** ./~/react/lib/getEventCharCode.js ***! - \*****************************************/ -function(t){"use strict";function e(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=e},/*!**********************************************!*\ - !*** ./~/react/lib/getEventModifierState.js ***! - \**********************************************/ -function(t){"use strict";function e(t){var e=this,n=e.nativeEvent;if(n.getModifierState)return n.getModifierState(t);var i=r[t];return i?!!n[i]:!1}function n(){return e}var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=n},/*!***************************************!*\ - !*** ./~/react/lib/getEventTarget.js ***! - \***************************************/ -function(t){"use strict";function e(t){var e=t.target||t.srcElement||window;return 3===e.nodeType?e.parentNode:e}t.exports=e},/*!***********************************************!*\ - !*** ./~/react/lib/getTextContentAccessor.js ***! - \***********************************************/ -function(t,e,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(/*! ./ExecutionEnvironment */5),o=null;t.exports=r},/*!*****************************************!*\ - !*** ./~/react/lib/isEventSupported.js ***! - \*****************************************/ -function(t,e,n){"use strict";/** - * Checks if an event is supported in the current execution environment. - * - * NOTE: This will not work correctly for non-generic events such as `change`, - * `reset`, `load`, `error`, and `select`. - * - * Borrows from Modernizr. - * - * @param {string} eventNameSuffix Event name, e.g. "click". - * @param {?boolean} capture Check if the capture phase is supported. - * @return {boolean} True if the event is supported. - * @internal - * @license Modernizr 3.0.0pre (Custom Build) | MIT - */ -function r(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&i&&"wheel"===t&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=n(/*! ./ExecutionEnvironment */5);o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},/*!***************************************************!*\ - !*** ./~/react/lib/shouldUpdateReactComponent.js ***! - \***************************************************/ -function(t){"use strict";function e(t,e){return t&&e&&t.type===e.type&&t.key===e.key&&t._owner===e._owner?!0:!1}t.exports=e},/*!***********************************!*\ - !*** (webpack)/buildin/module.js ***! - \***********************************/ -function(t){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},/*!**************************************!*\ - !*** ./lib/constants/ActionTypes.js ***! - \**************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! keymirror */116)),o=i({DATE_RANGE_UPDATE:null,CONTENT_STATE_UPDATE:null,DAY_SELECTED:null});t.exports=o},/*!**********************************!*\ - !*** ./lib/constants/Configs.js ***! - \**********************************/ -function(t){"use strict";var e={baseUrl:null};t.exports=e},/*!*************************************************!*\ - !*** ./lib/dispatchers/UserMatrixDispatcher.js ***! - \*************************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! object-assign */63)),o=n(/*! flux */113).Dispatcher,a=i({},new o,o.prototype,{handleViewAction:function(t){this.dispatch({source:"VIEW_ACTION",action:t})}});t.exports=a},/*!********************************************!*\ - !*** ./~/moment-range/lib/moment-range.js ***! - \********************************************/ -function(t,e,n){!function(e,r){t.exports=r(n(/*! moment */62))}(this,function(t){var e,n;return n={year:!0,month:!0,week:!0,day:!0,hour:!0,minute:!0,second:!0},e=function(){function e(e,n){this.start=t(e),this.end=t(n)}return e.prototype.contains=function(t){return t instanceof e?this.start<=t.start&&this.end>=t.end:this.start<=t&&t<=this.end},e.prototype._by_string=function(e,n){var r,i;for(r=t(this.start),i=[];this.contains(r);)n.call(this,r.clone()),i.push(r.add(1,e));return i},e.prototype._by_range=function(e,n){var r,i,o,a;if(i=Math.floor(this/e),1/0===i)return this;for(a=[],r=o=0;i>=0?i>=o:o>=i;r=i>=0?++o:--o)a.push(n.call(this,t(this.start.valueOf()+e.valueOf()*r)));return a},e.prototype.overlaps=function(t){return null!==this.intersect(t)},e.prototype.intersect=function(t){var n,r,i,o,a,s,u,l;return this.start<=(r=t.start)&&r<(n=this.end)&&ne-o?(n=t.clone().add(i-1,"months"),r=(e-o)/(o-n)):(n=t.clone().add(i+1,"months"),r=(e-o)/(n-o)),-(i+r)}function m(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function v(){}function g(t,e){e!==!1&&U(t),b(this,t),this._d=new Date(+t._d),Sn===!1&&(Sn=!0,Se.updateOffset(this),Sn=!1)}function y(t){var e=O(t),n=e.year||0,r=e.quarter||0,i=e.month||0,o=e.week||0,a=e.day||0,s=e.hour||0,u=e.minute||0,l=e.second||0,c=e.millisecond||0;this._milliseconds=+c+1e3*l+6e4*u+36e5*s,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=Se.localeData(),this._bubble()}function _(t,e){for(var n in e)s(e,n)&&(t[n]=e[n]);return s(e,"toString")&&(t.toString=e.toString),s(e,"valueOf")&&(t.valueOf=e.valueOf),t}function b(t,e){var n,r,i;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),Ye.length>0)for(n in Ye)r=Ye[n],i=e[r],"undefined"!=typeof i&&(t[r]=i);return t}function w(t){return 0>t?Math.ceil(t):Math.floor(t)}function C(t,e,n){for(var r=""+Math.abs(t),i=t>=0;r.lengthr;r++)(n&&t[r]!==e[r]||!n&&A(t[r])!==A(e[r]))&&a++;return a+o}function k(t){if(t){var e=t.toLowerCase().replace(/(.)s$/,"$1");t=gn[t]||yn[e]||e}return t}function O(t){var e,n,r={};for(n in t)s(t,n)&&(e=k(n),e&&(r[e]=t[n]));return r}function R(t){var e,n;if(0===t.indexOf("week"))e=7,n="day";else{if(0!==t.indexOf("month"))return;e=12,n="month"}Se[t]=function(r,i){var a,s,u=Se._locale[t],l=[];if("number"==typeof r&&(i=r,r=o),s=function(t){var e=Se().utc().set(n,t);return u.call(Se._locale,e,r||"")},null!=i)return s(i);for(a=0;e>a;a++)l.push(s(a));return l}}function A(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function L(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function N(t,e,n){return de(Se([t,11,31+e-n]),e,n).week}function I(t){return F(t)?366:365}function F(t){return t%4===0&&t%100!==0||t%400===0}function U(t){var e;t._a&&-2===t._pf.overflow&&(e=t._a[Le]<0||t._a[Le]>11?Le:t._a[Ne]<1||t._a[Ne]>L(t._a[Ae],t._a[Le])?Ne:t._a[Ie]<0||t._a[Ie]>24||24===t._a[Ie]&&(0!==t._a[Fe]||0!==t._a[Ue]||0!==t._a[We])?Ie:t._a[Fe]<0||t._a[Fe]>59?Fe:t._a[Ue]<0||t._a[Ue]>59?Ue:t._a[We]<0||t._a[We]>999?We:-1,t._pf._overflowDayOfYear&&(Ae>e||e>Ne)&&(e=Ne),t._pf.overflow=e)}function W(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===o)),t._isValid}function B(t){return t?t.toLowerCase().replace("_","-"):t}function Y(t){for(var e,n,r,i,o=0;o0;){if(r=j(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&P(i,n,!0)>=e-1)break;e--}o++}return null}function j(t){var e=null;if(!Be[t]&&je)try{e=Se.locale(),!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),Se.locale(e)}catch(n){}return Be[t]}function z(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(Se.isMoment(t)||T(t)?+t:+Se(t))-+n,n._d.setTime(+n._d+r),Se.updateOffset(n,!1),n):Se(t).local()}function V(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function H(t){var e,n,r=t.match(Ge);for(e=0,n=r.length;n>e;e++)r[e]=xn[r[e]]?xn[r[e]]:V(r[e]);return function(i){var o="";for(e=0;n>e;e++)o+=r[e]instanceof Function?r[e].call(i,t):r[e];return o}}function G(t,e){return t.isValid()?(e=q(e,t.localeData()),_n[e]||(_n[e]=H(e)),_n[e](t)):t.localeData().invalidDate()}function q(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(qe.lastIndex=0;r>=0&&qe.test(t);)t=t.replace(qe,n),qe.lastIndex=0,r-=1;return t}function K(t,e){var n,r=e._strict;switch(t){case"Q":return on;case"DDDD":return sn;case"YYYY":case"GGGG":case"gggg":return r?un:$e;case"Y":case"G":case"g":return cn;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return r?ln:Qe;case"S":if(r)return on;case"SS":if(r)return an;case"SSS":if(r)return sn;case"DDD":return Xe;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Je;case"a":case"A":return e._locale._meridiemParse;case"x":return nn;case"X":return rn;case"Z":case"ZZ":return tn;case"T":return en;case"SSSS":return Ze;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return r?an:Ke;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Ke;case"Do":return r?e._locale._ordinalParse:e._locale._ordinalParseLenient;default:return n=new RegExp(re(ne(t.replace("\\","")),"i"))}}function X(t){t=t||"";var e=t.match(tn)||[],n=e[e.length-1]||[],r=(n+"").match(mn)||["-",0,0],i=+(60*r[1])+A(r[2]);return"+"===r[0]?i:-i}function $(t,e,n){var r,i=n._a;switch(t){case"Q":null!=e&&(i[Le]=3*(A(e)-1));break;case"M":case"MM":null!=e&&(i[Le]=A(e)-1);break;case"MMM":case"MMMM":r=n._locale.monthsParse(e,t,n._strict),null!=r?i[Le]=r:n._pf.invalidMonth=e;break;case"D":case"DD":null!=e&&(i[Ne]=A(e));break;case"Do":null!=e&&(i[Ne]=A(parseInt(e.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=e&&(n._dayOfYear=A(e));break;case"YY":i[Ae]=Se.parseTwoDigitYear(e);break;case"YYYY":case"YYYYY":case"YYYYYY":i[Ae]=A(e);break;case"a":case"A":n._meridiem=e;break;case"h":case"hh":n._pf.bigHour=!0;case"H":case"HH":i[Ie]=A(e);break;case"m":case"mm":i[Fe]=A(e);break;case"s":case"ss":i[Ue]=A(e);break;case"S":case"SS":case"SSS":case"SSSS":i[We]=A(1e3*("0."+e));break;case"x":n._d=new Date(A(e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=X(e);break;case"dd":case"ddd":case"dddd":r=n._locale.weekdaysParse(e),null!=r?(n._w=n._w||{},n._w.d=r):n._pf.invalidWeekday=e;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":t=t.substr(0,1);case"gggg":case"GGGG":case"GGGGG":t=t.substr(0,2),e&&(n._w=n._w||{},n._w[t]=A(e));break;case"gg":case"GG":n._w=n._w||{},n._w[t]=Se.parseTwoDigitYear(e)}}function Q(t){var e,n,r,i,o,s,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,s=4,n=a(e.GG,t._a[Ae],de(Se(),1,4).year),r=a(e.W,1),i=a(e.E,1)):(o=t._locale._week.dow,s=t._locale._week.doy,n=a(e.gg,t._a[Ae],de(Se(),o,s).year),r=a(e.w,1),null!=e.d?(i=e.d,o>i&&++r):i=null!=e.e?e.e+o:o),u=me(n,r,i,s,o),t._a[Ae]=u.year,t._dayOfYear=u.dayOfYear}function Z(t){var e,n,r,i,o=[];if(!t._d){for(r=te(t),t._w&&null==t._a[Ne]&&null==t._a[Le]&&Q(t),t._dayOfYear&&(i=a(t._a[Ae],r[Ae]),t._dayOfYear>I(i)&&(t._pf._overflowDayOfYear=!0),n=ce(i,0,t._dayOfYear),t._a[Le]=n.getUTCMonth(),t._a[Ne]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ie]&&0===t._a[Fe]&&0===t._a[Ue]&&0===t._a[We]&&(t._nextDay=!0,t._a[Ie]=0),t._d=(t._useUTC?ce:le).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ie]=24)}}function J(t){var e;t._d||(e=O(t._i),t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],Z(t))}function te(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function ee(t){if(t._f===Se.ISO_8601)return void oe(t);t._a=[],t._pf.empty=!0;var e,n,r,i,a,s=""+t._i,u=s.length,l=0;for(r=q(t._f,t._locale).match(Ge)||[],e=0;e0&&t._pf.unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),l+=n.length),xn[i]?(n?t._pf.empty=!1:t._pf.unusedTokens.push(i),$(i,n,t)):t._strict&&!n&&t._pf.unusedTokens.push(i);t._pf.charsLeftOver=u-l,s.length>0&&t._pf.unusedInput.push(s),t._pf.bigHour===!0&&t._a[Ie]<=12&&(t._pf.bigHour=o),t._a[Ie]=m(t._locale,t._a[Ie],t._meridiem),Z(t),U(t)}function ne(t){return t.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i})}function re(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ie(t){var e,n,r,i,o;if(0===t._f.length)return t._pf.invalidFormat=!0,void(t._d=new Date(0/0));for(i=0;io)&&(r=o,n=e));_(t,n||e)}function oe(t){var e,n,r=t._i,i=hn.exec(r);if(i){for(t._pf.iso=!0,e=0,n=fn.length;n>e;e++)if(fn[e][1].exec(r)){t._f=fn[e][0]+(i[6]||" ");break}for(e=0,n=dn.length;n>e;e++)if(dn[e][1].exec(r)){t._f+=dn[e][0];break}r.match(tn)&&(t._f+="Z"),ee(t)}else t._isValid=!1}function ae(t){oe(t),t._isValid===!1&&(delete t._isValid,Se.createFromInputFallback(t))}function se(t,e){var n,r=[];for(n=0;nt&&s.setFullYear(t),s}function ce(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function he(t,e){if("string"==typeof t)if(isNaN(t)){if(t=e.weekdaysParse(t),"number"!=typeof t)return null}else t=parseInt(t,10);return t}function pe(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function fe(t,e,n){var r=Se.duration(t).abs(),i=Oe(r.as("s")),o=Oe(r.as("m")),a=Oe(r.as("h")),s=Oe(r.as("d")),u=Oe(r.as("M")),l=Oe(r.as("y")),c=i0,c[4]=n,pe.apply({},c)}function de(t,e,n){var r,i=n-e,o=n-t.day();return o>i&&(o-=7),i-7>o&&(o+=7),r=Se(t).add(o,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function me(t,e,n,r,i){var o,a,s=ce(t,0,1).getUTCDay();return s=0===s?7:s,n=null!=n?n:i,o=i-s+(s>r?7:0)-(i>s?7:0),a=7*(e-1)+(n-i)+o+1,{year:a>0?t:t-1,dayOfYear:a>0?a:I(t-1)+a}}function ve(t){var e,n=t._i,r=t._f;return t._locale=t._locale||Se.localeData(t._l),null===n||r===o&&""===n?Se.invalid({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),Se.isMoment(n)?new g(n,!0):(r?M(r)?ie(t):ee(t):ue(t),e=new g(t),e._nextDay&&(e.add(1,"d"),e._nextDay=o),e))}function ge(t,e){var n,r;if(1===e.length&&M(e[0])&&(e=e[0]),!e.length)return Se();for(n=e[0],r=1;r=0?"+":"-";return e+C(Math.abs(t),6)},gg:function(){return C(this.weekYear()%100,2)},gggg:function(){return C(this.weekYear(),4)},ggggg:function(){return C(this.weekYear(),5)},GG:function(){return C(this.isoWeekYear()%100,2)},GGGG:function(){return C(this.isoWeekYear(),4)},GGGGG:function(){return C(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return C(A(this.milliseconds()/10),2)},SSS:function(){return C(this.milliseconds(),3)},SSSS:function(){return C(this.milliseconds(),3)},Z:function(){var t=this.utcOffset(),e="+";return 0>t&&(t=-t,e="-"),e+C(A(t/60),2)+":"+C(A(t)%60,2)},ZZ:function(){var t=this.utcOffset(),e="+";return 0>t&&(t=-t,e="-"),e+C(A(t/60),2)+C(A(t)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},En={},Dn=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],Sn=!1;wn.length;)Te=wn.pop(),xn[Te+"o"]=f(xn[Te],Te);for(;Cn.length;)Te=Cn.pop(),xn[Te+Te]=p(xn[Te],2);xn.DDDD=p(xn.DDD,3),_(v.prototype,{set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t,e,n){var r,i,o;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(i=Se.utc([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,r;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=Se([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.apply(e,[n]):r},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,r):i.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(t){return t},postformat:function(t){return t},week:function(t){return de(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),Se=function(t,e,n,r){var i;return"boolean"==typeof n&&(r=n,n=o),i={},i._isAMomentObject=!0,i._i=t,i._f=e,i._l=n,i._strict=r,i._isUTC=!1,i._pf=u(),ve(i)},Se.suppressDeprecationWarnings=!1,Se.createFromInputFallback=c("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),Se.min=function(){var t=[].slice.call(arguments,0);return ge("isBefore",t)},Se.max=function(){var t=[].slice.call(arguments,0);return ge("isAfter",t)},Se.utc=function(t,e,n,r){var i;return"boolean"==typeof n&&(r=n,n=o),i={},i._isAMomentObject=!0,i._useUTC=!0,i._isUTC=!0,i._l=n,i._i=t,i._f=e,i._strict=r,i._pf=u(),ve(i).utc()},Se.unix=function(t){return Se(1e3*t)},Se.duration=function(t,e){var n,r,i,o,a=t,u=null;return Se.isDuration(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(u=Ve.exec(t))?(n="-"===u[1]?-1:1,a={y:0,d:A(u[Ne])*n,h:A(u[Ie])*n,m:A(u[Fe])*n,s:A(u[Ue])*n,ms:A(u[We])*n}):(u=He.exec(t))?(n="-"===u[1]?-1:1,i=function(t){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*n},a={y:i(u[2]),M:i(u[3]),d:i(u[4]),h:i(u[5]),m:i(u[6]),s:i(u[7]),w:i(u[8])}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(o=E(Se(a.from),Se(a.to)),a={},a.ms=o.milliseconds,a.M=o.months),r=new y(a),Se.isDuration(t)&&s(t,"_locale")&&(r._locale=t._locale),r},Se.version=Pe,Se.defaultFormat=pn,Se.ISO_8601=function(){},Se.momentProperties=Ye,Se.updateOffset=function(){},Se.relativeTimeThreshold=function(t,e){return bn[t]===o?!1:e===o?bn[t]:(bn[t]=e,!0)},Se.lang=c("moment.lang is deprecated. Use moment.locale instead.",function(t,e){return Se.locale(t,e)}),Se.locale=function(t,e){var n;return t&&(n="undefined"!=typeof e?Se.defineLocale(t,e):Se.localeData(t),n&&(Se.duration._locale=Se._locale=n)),Se._locale._abbr},Se.defineLocale=function(t,e){return null!==e?(e.abbr=t,Be[t]||(Be[t]=new v),Be[t].set(e),Se.locale(t),Be[t]):(delete Be[t],null)},Se.langData=c("moment.langData is deprecated. Use moment.localeData instead.",function(t){return Se.localeData(t)}),Se.localeData=function(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Se._locale;if(!M(t)){if(e=j(t))return e;t=[t]}return Y(t)},Se.isMoment=function(t){return t instanceof g||null!=t&&s(t,"_isAMomentObject")},Se.isDuration=function(t){return t instanceof y};for(Te=Dn.length-1;Te>=0;--Te)R(Dn[Te]);Se.normalizeUnits=function(t){return k(t)},Se.invalid=function(t){var e=Se.utc(0/0);return null!=t?_(e._pf,t):e._pf.userInvalidated=!0,e},Se.parseZone=function(){return Se.apply(null,arguments).parseZone()},Se.parseTwoDigitYear=function(t){return A(t)+(A(t)>68?1900:2e3)},Se.isDate=T,_(Se.fn=g.prototype,{clone:function(){return Se(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var t=Se(this).utc();return 00:!1},parsingFlags:function(){return _({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(t){return this.utcOffset(0,t)},local:function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(t){var e=G(this,t||Se.defaultFormat);return this.localeData().postformat(e)},add:D(1,"add"),subtract:D(-1,"subtract"),diff:function(t,e,n){var r,i,o=z(t,this),a=6e4*(o.utcOffset()-this.utcOffset());return e=k(e),"year"===e||"month"===e||"quarter"===e?(i=d(this,o),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-o,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-a)/864e5:"week"===e?(r-a)/6048e5:r),n?i:w(i)},from:function(t,e){return Se.duration({to:this,from:t}).locale(this.locale()).humanize(!e)},fromNow:function(t){return this.from(Se(),t)},calendar:function(t){var e=t||Se(),n=z(e,this).startOf("day"),r=this.diff(n,"days",!0),i=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(i,this,Se(e)))},isLeapYear:function(){return F(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=he(t,this.localeData()),this.add(t-e,"d")):e},month:we("Month",!0),startOf:function(t){switch(t=k(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t?this.weekday(0):"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=k(t),t===o||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(t,e){var n;return e=k("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=Se.isMoment(t)?t:Se(t),+this>+t):(n=Se.isMoment(t)?+t:+Se(t),n<+this.clone().startOf(e))},isBefore:function(t,e){var n;return e=k("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=Se.isMoment(t)?t:Se(t),+t>+this):(n=Se.isMoment(t)?+t:+Se(t),+this.clone().endOf(e)t?this:t}),max:c("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(t){return t=Se.apply(null,arguments),t>this?this:t}),zone:c("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),utcOffset:function(t,e){var n,r=this._offset||0;return null!=t?("string"==typeof t&&(t=X(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(n=this._dateUtcOffset()),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==t&&(!e||this._changeInProgress?S(this,Se.duration(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Se.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(X(this._i)),this},hasAlignedHourOffset:function(t){return t=t?Se(t).utcOffset():0,(this.utcOffset()-t)%60===0},daysInMonth:function(){return L(this.year(),this.month())},dayOfYear:function(t){var e=Oe((Se(this).startOf("day")-Se(this).startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},quarter:function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},weekYear:function(t){var e=de(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")},isoWeekYear:function(t){var e=de(this,1,4).year;return null==t?e:this.add(t-e,"y")},week:function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},isoWeek:function(t){var e=de(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},weekday:function(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},isoWeeksInYear:function(){return N(this.year(),1,4)},weeksInYear:function(){var t=this.localeData()._week;return N(this.year(),t.dow,t.doy)},get:function(t){return t=k(t),this[t]()},set:function(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else t=k(t),"function"==typeof this[t]&&this[t](e);return this},locale:function(t){var e;return t===o?this._locale._abbr:(e=Se.localeData(t),null!=e&&(this._locale=e),this)},lang:c("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===o?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),Se.fn.millisecond=Se.fn.milliseconds=we("Milliseconds",!1),Se.fn.second=Se.fn.seconds=we("Seconds",!1),Se.fn.minute=Se.fn.minutes=we("Minutes",!1),Se.fn.hour=Se.fn.hours=we("Hours",!0),Se.fn.date=we("Date",!0),Se.fn.dates=c("dates accessor is deprecated. Use date instead.",we("Date",!0)),Se.fn.year=we("FullYear",!0),Se.fn.years=c("years accessor is deprecated. Use year instead.",we("FullYear",!0)),Se.fn.days=Se.fn.day,Se.fn.months=Se.fn.month,Se.fn.weeks=Se.fn.week,Se.fn.isoWeeks=Se.fn.isoWeek,Se.fn.quarters=Se.fn.quarter,Se.fn.toJSON=Se.fn.toISOString,Se.fn.isUTC=Se.fn.isUtc,_(Se.duration.fn=y.prototype,{_bubble:function(){var t,e,n,r=this._milliseconds,i=this._days,o=this._months,a=this._data,s=0;a.milliseconds=r%1e3,t=w(r/1e3),a.seconds=t%60,e=w(t/60),a.minutes=e%60,n=w(e/60),a.hours=n%24,i+=w(n/24),s=w(Ce(i)),i-=w(xe(s)),o+=w(i/30),i%=30,s+=w(o/12),o%=12,a.days=i,a.months=o,a.years=s},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return w(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12) -},humanize:function(t){var e=fe(this,!t,this.localeData());return t&&(e=this.localeData().pastFuture(+this,e)),this.localeData().postformat(e)},add:function(t,e){var n=Se.duration(t,e);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=Se.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=k(t),this[t.toLowerCase()+"s"]()},as:function(t){var e,n;if(t=k(t),"month"===t||"year"===t)return e=this._days+this._milliseconds/864e5,n=this._months+12*Ce(e),"month"===t?n:n/12;switch(e=this._days+Math.round(xe(this._months/12)),t){case"week":return e/7+this._milliseconds/6048e5;case"day":return e+this._milliseconds/864e5;case"hour":return 24*e+this._milliseconds/36e5;case"minute":return 24*e*60+this._milliseconds/6e4;case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:Se.fn.lang,locale:Se.fn.locale,toIsoString:c("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),i=Math.abs(this.minutes()),o=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||o?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(o?o+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),Se.duration.fn.toString=Se.duration.fn.toISOString;for(Te in vn)s(vn,Te)&&Ee(Te.toLowerCase());Se.duration.fn.asMilliseconds=function(){return this.as("ms")},Se.duration.fn.asSeconds=function(){return this.as("s")},Se.duration.fn.asMinutes=function(){return this.as("m")},Se.duration.fn.asHours=function(){return this.as("h")},Se.duration.fn.asDays=function(){return this.as("d")},Se.duration.fn.asWeeks=function(){return this.as("weeks")},Se.duration.fn.asMonths=function(){return this.as("M")},Se.duration.fn.asYears=function(){return this.as("y")},Se.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===A(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),je?i.exports=Se:(r=function(t,e,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(ke.moment=Me),Se}.call(e,n,e,i),!(r!==o&&(i.exports=r)),De(!0))}).call(this)}).call(e,function(){return this}(),n(/*! (webpack)/buildin/module.js */57)(t))},/*!**********************************!*\ - !*** ./~/object-assign/index.js ***! - \**********************************/ -function(t){"use strict";function e(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=Object.assign||function(t){for(var n,r,i=e(t),o=1;o-1),!l.plugins[n]){a(e.extractEvents),l.plugins[n]=e;var r=e.eventTypes;for(var o in r)a(i(r[o],e,o))}}}function i(t,e,n){a(!l.eventNameDispatchConfigs.hasOwnProperty(n)),l.eventNameDispatchConfigs[n]=t;var r=t.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,e,n)}return!0}return t.registrationName?(o(t.registrationName,e,n),!0):!1}function o(t,e,n){a(!l.registrationNameModules[t]),l.registrationNameModules[t]=e,l.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=n(/*! ./invariant */1),s=null,u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(t){a(!s),s=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];u.hasOwnProperty(n)&&u[n]===i||(a(!u[n]),u[n]=i,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return l.registrationNameModules[e.registrationName]||null;for(var n in e.phasedRegistrationNames)if(e.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[e.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var t in u)u.hasOwnProperty(t)&&delete u[t];l.plugins.length=0;var e=l.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=l.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};t.exports=l},/*!********************************************!*\ - !*** ./~/react/lib/LocalEventTrapMixin.js ***! - \********************************************/ -function(t,e,n){"use strict";function r(t){t.remove()}var i=n(/*! ./ReactBrowserEventEmitter */25),o=n(/*! ./accumulateInto */47),a=n(/*! ./forEachAccumulated */50),s=n(/*! ./invariant */1),u={trapBubbledEvent:function(t,e){s(this.isMounted());var n=i.trapBubbledEvent(t,e,this.getDOMNode());this._localEventListeners=o(this._localEventListeners,n)},componentWillUnmount:function(){this._localEventListeners&&a(this._localEventListeners,r)}};t.exports=u},/*!**************************************!*\ - !*** ./~/react/lib/ReactChildren.js ***! - \**************************************/ -function(t,e,n){"use strict";function r(t,e){this.forEachFunction=t,this.forEachContext=e}function i(t,e,n,r){var i=t;i.forEachFunction.call(i.forEachContext,e,r)}function o(t,e,n){if(null==t)return t;var o=r.getPooled(e,n);p(t,i,o),r.release(o)}function a(t,e,n){this.mapResult=t,this.mapFunction=e,this.mapContext=n}function s(t,e,n,r){var i=t,o=i.mapResult,a=!o.hasOwnProperty(n);if(a){var s=i.mapFunction.call(i.mapContext,e,r);o[n]=s}}function u(t,e,n){if(null==t)return t;var r={},i=a.getPooled(r,e,n);return p(t,s,i),a.release(i),r}function l(){return null}function c(t){return p(t,l,null)}var h=n(/*! ./PooledClass */14),p=n(/*! ./traverseAllChildren */97),f=(n(/*! ./warning */4),h.twoArgumentPooler),d=h.threeArgumentPooler;h.addPoolingTo(r,f),h.addPoolingTo(a,d);var m={forEach:o,map:u,count:c};t.exports=m},/*!******************************************!*\ - !*** ./~/react/lib/ReactDOMComponent.js ***! - \******************************************/ -function(t,e,n){"use strict";function r(t){t&&(y(null==t.children||null==t.dangerouslySetInnerHTML),y(null==t.style||"object"==typeof t.style))}function i(t,e,n,r){var i=f.findReactContainerForID(t);if(i){var o=i.nodeType===D?i.ownerDocument:i;w(e,o)}r.getPutListenerQueue().enqueuePutListener(t,e,n)}function o(t){P.call(T,t)||(y(M.test(t)),T[t]=!0)}function a(t){o(t),this._tag=t,this.tagName=t.toUpperCase()}var s=n(/*! ./CSSPropertyOperations */65),u=n(/*! ./DOMProperty */21),l=n(/*! ./DOMPropertyOperations */22),c=n(/*! ./ReactBrowserComponentMixin */12),h=n(/*! ./ReactComponent */26),p=n(/*! ./ReactBrowserEventEmitter */25),f=n(/*! ./ReactMount */13),d=n(/*! ./ReactMultiChild */71),m=n(/*! ./ReactPerf */16),v=n(/*! ./Object.assign */2),g=n(/*! ./escapeTextForBrowser */49),y=n(/*! ./invariant */1),_=(n(/*! ./isEventSupported */55),n(/*! ./keyOf */7)),b=(n(/*! ./monitorCodeUse */40),p.deleteListener),w=p.listenTo,C=p.registrationNameModules,x={string:!0,number:!0},E=_({style:null}),D=1,S={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},M=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,T={},P={}.hasOwnProperty;a.displayName="ReactDOMComponent",a.Mixin={mountComponent:m.measure("ReactDOMComponent","mountComponent",function(t,e,n){h.Mixin.mountComponent.call(this,t,e,n),r(this.props);var i=S[this._tag]?"":"";return this._createOpenTagMarkupAndPutListeners(e)+this._createContentMarkup(e)+i}),_createOpenTagMarkupAndPutListeners:function(t){var e=this.props,n="<"+this._tag;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];if(null!=o)if(C.hasOwnProperty(r))i(this._rootNodeID,r,o,t);else{r===E&&(o&&(o=e.style=v({},e.style)),o=s.createMarkupForStyles(o));var a=l.createMarkupForProperty(r,o);a&&(n+=" "+a)}}if(t.renderToStaticMarkup)return n+">";var u=l.createMarkupForID(this._rootNodeID);return n+" "+u+">"},_createContentMarkup:function(t){var e=this.props.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html)return e.__html}else{var n=x[typeof this.props.children]?this.props.children:null,r=null!=n?null:this.props.children;if(null!=n)return g(n);if(null!=r){var i=this.mountChildren(r,t);return i.join("")}}return""},receiveComponent:function(t,e){(t!==this._currentElement||null==t._owner)&&h.Mixin.receiveComponent.call(this,t,e)},updateComponent:m.measure("ReactDOMComponent","updateComponent",function(t,e){r(this._currentElement.props),h.Mixin.updateComponent.call(this,t,e),this._updateDOMProperties(e.props,t),this._updateDOMChildren(e.props,t)}),_updateDOMProperties:function(t,e){var n,r,o,a=this.props;for(n in t)if(!a.hasOwnProperty(n)&&t.hasOwnProperty(n))if(n===E){var s=t[n];for(r in s)s.hasOwnProperty(r)&&(o=o||{},o[r]="")}else C.hasOwnProperty(n)?b(this._rootNodeID,n):(u.isStandardName[n]||u.isCustomAttribute(n))&&h.BackendIDOperations.deletePropertyByID(this._rootNodeID,n);for(n in a){var l=a[n],c=t[n];if(a.hasOwnProperty(n)&&l!==c)if(n===E)if(l&&(l=a.style=v({},l)),c){for(r in c)!c.hasOwnProperty(r)||l&&l.hasOwnProperty(r)||(o=o||{},o[r]="");for(r in l)l.hasOwnProperty(r)&&c[r]!==l[r]&&(o=o||{},o[r]=l[r])}else o=l;else C.hasOwnProperty(n)?i(this._rootNodeID,n,l,e):(u.isStandardName[n]||u.isCustomAttribute(n))&&h.BackendIDOperations.updatePropertyByID(this._rootNodeID,n,l)}o&&h.BackendIDOperations.updateStylesByID(this._rootNodeID,o)},_updateDOMChildren:function(t,e){var n=this.props,r=x[typeof t.children]?t.children:null,i=x[typeof n.children]?n.children:null,o=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,a=n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html,s=null!=r?null:t.children,u=null!=i?null:n.children,l=null!=r||null!=o,c=null!=i||null!=a;null!=s&&null==u?this.updateChildren(null,e):l&&!c&&this.updateTextContent(""),null!=i?r!==i&&this.updateTextContent(""+i):null!=a?o!==a&&h.BackendIDOperations.updateInnerHTMLByID(this._rootNodeID,a):null!=u&&this.updateChildren(u,e)},unmountComponent:function(){this.unmountChildren(),p.deleteAllListeners(this._rootNodeID),h.Mixin.unmountComponent.call(this)}},v(a.prototype,h.Mixin,a.Mixin,d.Mixin,c),t.exports=a},/*!********************************************!*\ - !*** ./~/react/lib/ReactMarkupChecksum.js ***! - \********************************************/ -function(t,e,n){"use strict";var r=n(/*! ./adler32 */177),i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=r(t);return t.replace(">"," "+i.CHECKSUM_ATTR_NAME+'="'+e+'">')},canReuseMarkup:function(t,e){var n=e.getAttribute(i.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(t);return o===n}};t.exports=i},/*!****************************************!*\ - !*** ./~/react/lib/ReactMultiChild.js ***! - \****************************************/ -function(t,e,n){"use strict";function r(t,e,n){m.push({parentID:t,parentNode:null,type:c.INSERT_MARKUP,markupIndex:v.push(e)-1,textContent:null,fromIndex:null,toIndex:n})}function i(t,e,n){m.push({parentID:t,parentNode:null,type:c.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:e,toIndex:n})}function o(t,e){m.push({parentID:t,parentNode:null,type:c.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:e,toIndex:null})}function a(t,e){m.push({parentID:t,parentNode:null,type:c.TEXT_CONTENT,markupIndex:null,textContent:e,fromIndex:null,toIndex:null})}function s(){m.length&&(l.BackendIDOperations.dangerouslyProcessChildrenUpdates(m,v),u())}function u(){m.length=0,v.length=0}var l=n(/*! ./ReactComponent */26),c=n(/*! ./ReactMultiChildUpdateTypes */72),h=n(/*! ./flattenChildren */186),p=n(/*! ./instantiateReactComponent */39),f=n(/*! ./shouldUpdateReactComponent */56),d=0,m=[],v=[],g={Mixin:{mountChildren:function(t,e){var n=h(t),r=[],i=0;this._renderedChildren=n;for(var o in n){var a=n[o];if(n.hasOwnProperty(o)){var s=p(a,null);n[o]=s;var u=this._rootNodeID+o,l=s.mountComponent(u,e,this._mountDepth+1);s._mountIndex=i,r.push(l),i++}}return r},updateTextContent:function(t){d++;var e=!0;try{var n=this._renderedChildren;for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(t),e=!1}finally{d--,d||(e?u():s())}},updateChildren:function(t,e){d++;var n=!0;try{this._updateChildren(t,e),n=!1}finally{d--,d||(n?u():s())}},_updateChildren:function(t,e){var n=h(t),r=this._renderedChildren;if(n||r){var i,o=0,a=0;for(i in n)if(n.hasOwnProperty(i)){var s=r&&r[i],u=s&&s._currentElement,l=n[i];if(f(u,l))this.moveChild(s,a,o),o=Math.max(s._mountIndex,o),s.receiveComponent(l,e),s._mountIndex=a;else{s&&(o=Math.max(s._mountIndex,o),this._unmountChildByName(s,i));var c=p(l,null);this._mountChildByNameAtIndex(c,i,a,e)}a++}for(i in r)!r.hasOwnProperty(i)||n&&n[i]||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var t=this._renderedChildren;for(var e in t){var n=t[e];n.unmountComponent&&n.unmountComponent()}this._renderedChildren=null},moveChild:function(t,e,n){t._mountIndex"+o+""},receiveComponent:function(t){var e=t.props;e!==this.props&&(this.props=e,i.BackendIDOperations.updateTextContentByID(this._rootNodeID,e))}});var l=function(t){return new o(u,null,null,null,null,t)};l.type=u,t.exports=l},/*!*********************************************!*\ - !*** ./~/react/lib/ReactTransitionGroup.js ***! - \*********************************************/ -function(t,e,n){"use strict";var r=n(/*! ./React */24),i=n(/*! ./ReactTransitionChildMapping */162),o=n(/*! ./Object.assign */2),a=n(/*! ./cloneWithProps */84),s=n(/*! ./emptyFunction */10),u=r.createClass({displayName:"ReactTransitionGroup",propTypes:{component:r.PropTypes.any,childFactory:r.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:s.thatReturnsArgument}},getInitialState:function(){return{children:i.getChildMapping(this.props.children)}},componentWillReceiveProps:function(t){var e=i.getChildMapping(t.children),n=this.state.children;this.setState({children:i.mergeChildMappings(n,e)});var r;for(r in e){var o=n&&n.hasOwnProperty(r);!e[r]||o||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n){var a=e&&e.hasOwnProperty(r);!n[r]||a||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}},componentWillMount:function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidUpdate:function(){var t=this.keysToEnter;this.keysToEnter=[],t.forEach(this.performEnter);var e=this.keysToLeave;this.keysToLeave=[],e.forEach(this.performLeave)},performEnter:function(t){this.currentlyTransitioningKeys[t]=!0;var e=this.refs[t];e.componentWillEnter?e.componentWillEnter(this._handleDoneEntering.bind(this,t)):this._handleDoneEntering(t)},_handleDoneEntering:function(t){var e=this.refs[t];e.componentDidEnter&&e.componentDidEnter(),delete this.currentlyTransitioningKeys[t];var n=i.getChildMapping(this.props.children);n&&n.hasOwnProperty(t)||this.performLeave(t)},performLeave:function(t){this.currentlyTransitioningKeys[t]=!0;var e=this.refs[t];e.componentWillLeave?e.componentWillLeave(this._handleDoneLeaving.bind(this,t)):this._handleDoneLeaving(t)},_handleDoneLeaving:function(t){var e=this.refs[t];e.componentDidLeave&&e.componentDidLeave(),delete this.currentlyTransitioningKeys[t];var n=i.getChildMapping(this.props.children);if(n&&n.hasOwnProperty(t))this.performEnter(t);else{var r=o({},this.state.children);delete r[t],this.setState({children:r})}},render:function(){var t={};for(var e in this.state.children){var n=this.state.children[e];n&&(t[e]=a(this.props.childFactory(n),{ref:e}))}return r.createElement(this.props.component,this.props,t)}});t.exports=u},/*!****************************************!*\ - !*** ./~/react/lib/ViewportMetrics.js ***! - \****************************************/ -function(t,e,n){"use strict";var r=n(/*! ./getUnboundedScrollPosition */90),i={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(){var t=r(window);i.currentScrollLeft=t.x,i.currentScrollTop=t.y}};t.exports=i},/*!***************************************!*\ - !*** ./~/react/lib/cloneWithProps.js ***! - \***************************************/ -function(t,e,n){"use strict";function r(t,e){var n=o.mergeProps(e,t.props);return!n.hasOwnProperty(s)&&t.props.hasOwnProperty(s)&&(n.children=t.props.children),i.createElement(t.type,n)}var i=n(/*! ./ReactElement */3),o=n(/*! ./ReactPropTransferer */75),a=n(/*! ./keyOf */7),s=(n(/*! ./warning */4),a({children:null}));t.exports=r},/*!*************************************!*\ - !*** ./~/react/lib/containsNode.js ***! - \*************************************/ -function(t,e,n){function r(t,e){return t&&e?t===e?!0:i(t)?!1:i(e)?r(t,e.parentNode):t.contains?t.contains(e):t.compareDocumentPosition?!!(16&t.compareDocumentPosition(e)):!1:!1}var i=n(/*! ./isTextNode */192);t.exports=r},/*!**********************************!*\ - !*** ./~/react/lib/focusNode.js ***! - \**********************************/ -function(t){"use strict";function e(t){try{t.focus()}catch(e){}}t.exports=e},/*!*****************************************!*\ - !*** ./~/react/lib/getActiveElement.js ***! - \*****************************************/ -function(t){function e(){try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=e},/*!**************************************!*\ - !*** ./~/react/lib/getMarkupWrap.js ***! - \**************************************/ -function(t,e,n){function r(t){return o(!!a),p.hasOwnProperty(t)||(t="*"),s.hasOwnProperty(t)||(a.innerHTML="*"===t?"":"<"+t+">",s[t]=!a.firstChild),s[t]?p[t]:null}var i=n(/*! ./ExecutionEnvironment */5),o=n(/*! ./invariant */1),a=i.canUseDOM?document.createElement("div"):null,s={circle:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},u=[1,'"],l=[1,"","
    "],c=[3,"","
    "],h=[1,"",""],p={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c,circle:h,defs:h,ellipse:h,g:h,line:h,linearGradient:h,path:h,polygon:h,polyline:h,radialGradient:h,rect:h,stop:h,text:h};t.exports=r},/*!*******************************************************!*\ - !*** ./~/react/lib/getReactRootElementInContainer.js ***! - \*******************************************************/ -function(t){"use strict";function e(t){return t?t.nodeType===n?t.documentElement:t.firstChild:null}var n=9;t.exports=e},/*!***************************************************!*\ - !*** ./~/react/lib/getUnboundedScrollPosition.js ***! - \***************************************************/ -function(t){"use strict";function e(t){return t===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}t.exports=e},/*!*******************************************!*\ - !*** ./~/react/lib/isTextInputElement.js ***! - \*******************************************/ -function(t){"use strict";function e(t){return t&&("INPUT"===t.nodeName&&n[t.type]||"TEXTAREA"===t.nodeName)}var n={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=e},/*!**********************************!*\ - !*** ./~/react/lib/mapObject.js ***! - \**********************************/ -function(t){"use strict";function e(t,e,r){if(!t)return null;var i={};for(var o in t)n.call(t,o)&&(i[o]=e.call(r,t[o],o,t));return i}var n=Object.prototype.hasOwnProperty;t.exports=e},/*!******************************************!*\ - !*** ./~/react/lib/memoizeStringOnly.js ***! - \******************************************/ -function(t){"use strict";function e(t){var e={};return function(n){return e.hasOwnProperty(n)?e[n]:e[n]=t.call(this,n)}}t.exports=e},/*!**********************************!*\ - !*** ./~/react/lib/onlyChild.js ***! - \**********************************/ -function(t,e,n){"use strict";function r(t){return o(i.isValidElement(t)),t}var i=n(/*! ./ReactElement */3),o=n(/*! ./invariant */1);t.exports=r},/*!*************************************!*\ - !*** ./~/react/lib/setInnerHTML.js ***! - \*************************************/ -function(t,e,n){"use strict";var r=n(/*! ./ExecutionEnvironment */5),i=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(t,e){t.innerHTML=e};if(r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),i.test(e)||"<"===e[0]&&o.test(e)){t.innerHTML=""+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e})}t.exports=a},/*!*************************************!*\ - !*** ./~/react/lib/shallowEqual.js ***! - \*************************************/ -function(t){"use strict";function e(t,e){if(t===e)return!0;var n;for(n in t)if(t.hasOwnProperty(n)&&(!e.hasOwnProperty(n)||t[n]!==e[n]))return!1;for(n in e)if(e.hasOwnProperty(n)&&!t.hasOwnProperty(n))return!1;return!0}t.exports=e},/*!********************************************!*\ - !*** ./~/react/lib/traverseAllChildren.js ***! - \********************************************/ -function(t,e,n){"use strict";function r(t){return f[t]}function i(t,e){return t&&null!=t.key?a(t.key):e.toString(36)}function o(t){return(""+t).replace(d,r)}function a(t){return"$"+o(t)}function s(t,e,n){return null==t?0:m(t,"",0,e,n)}var u=n(/*! ./ReactElement */3),l=n(/*! ./ReactInstanceHandles */27),c=n(/*! ./invariant */1),h=l.SEPARATOR,p=":",f={"=":"=0",".":"=1",":":"=2"},d=/[=.:]/g,m=function(t,e,n,r,o){var s,l,f=0;if(Array.isArray(t))for(var d=0;dr;r++)t=e.weekday(r).format("ddd"),n.push(i.createElement("th",{className:"cal__heading",key:t},t));return{weekDays:n}},handleClearSelection:function(){s.clearSelectedDay()},render:function(){var t,e,n,r=this.props.selectedDay,s=i.addons.classSet,u=this.props.selectedDay?"":"is-hidden",c={"l--push-bottom-1":!0,cal:!0,"cal--highlight":this.props.selectedContentState===l[1],"cal--success":this.props.selectedContentState===l[2],"cal--unsure":this.props.selectedContentState===l[3]},h=this.props.matrixData,p=[],f=[];if(0==h.length)return i.createElement("table",null,i.createElement("tr",null,i.createElement("td",null,"Loading")));e=o(h[0].date);for(var d=e.weekday()-1;d>=0;d--)p.push(i.createElement("td",{className:"cal__day",key:e.weekday(d).format()}));for(h.forEach(function(t){var e=t.date;p.push(i.createElement(a,{key:e,dateLabel:o(e).format("Do"),date:e,wordCount:t.wordCount,selectedDay:r}))});p.length;)t=p.splice(0,7),f.push(i.createElement("tr",{className:"cal__week",key:this.props.dateRangeOption+"-week"+f.length}," ",t," "));return n=i.createElement("div",{className:"l--push-bottom-half g"},i.createElement("div",{className:"g__item w--1-2"},i.createElement("h3",{className:"epsilon txt--uppercase"},this.props.dateRangeOption,"'s Activity")),i.createElement("div",{className:"g__item w--1-2 txt--align-right"},i.createElement("p",{className:u},i.createElement("button",{className:"button--link",onClick:this.handleClearSelection},"Clear selection")))),i.createElement("div",null,n,i.createElement("table",{className:s(c)},i.createElement("thead",{className:"cal__head"},i.createElement("tr",null,this.props.weekDays)),i.createElement("tbody",null,f)))}});t.exports=h},/*!**************************************************!*\ - !*** ./lib/components/CalendarPeriodHeading.jsx ***! - \**************************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! react */11)),o=r(n(/*! moment */62)),a=r(n(/*! ../utils/DateHelper */33)),s=i.createClass({displayName:"CalendarPeriodHeading",render:function(){var t,e=a.dateFormat,n="DD MMM, YYYY (dddd)",r="DD MMM, YYYY";return t=this.props.selectedDay?o(this.props.selectedDay,e).format(n):o(this.props.fromDate,e).format(r)+" … "+o(this.props.toDate,e).format(r)+" ("+this.props.dateRange+")",i.createElement("div",{className:"l--push-bottom-half"},i.createElement("h3",{className:"epsilon txt--uppercase"},"Activity Details"),i.createElement("p",{className:"txt--understated"},t))}});t.exports=s},/*!***********************************************!*\ - !*** ./lib/components/CategoryItemMatrix.jsx ***! - \***********************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! react */11)),o=i.createClass({displayName:"CategoryItemMatrix",render:function(){return i.createElement("tr",null,i.createElement("td",{className:"l--pad-left-0 l--pad-v-0 w--1"},this.props.itemTitle," ",i.createElement("span",{className:"txt--understated"},"(",this.props.itemName,")")),i.createElement("td",{className:"txt--align-right l--pad-right-0 l--pad-v-0 txt--nowrap"},this.props.wordCount," ",i.createElement("span",{className:"txt--understated"},"words")))}});t.exports=o},/*!************************************************!*\ - !*** ./lib/components/CategoryMatrixTable.jsx ***! - \************************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! react */11)),o=r(n(/*! lodash */117)),a=r(n(/*! ./CategoryItemMatrix */101)),s=i.createClass({displayName:"CategoryMatrixTable",render:function(){var t={},e=[],n=this.props.category,r=this.props.categoryTitle;return this.props.matrixData.forEach(function(e){var i=e[n];t[i]&&t[i].wordCount?t[i].wordCount+=e.wordCount:t[i]={wordCount:e.wordCount,title:e[r]}}),o.forOwn(t,function(t,n){e.push(i.createElement(a,{key:n,itemName:n,itemTitle:t.title,wordCount:t.wordCount}))}),i.createElement("div",null,i.createElement("h3",{className:"zeta txt--uppercase txt--understated"},this.props.categoryName),i.createElement("table",{className:"l--push-bottom-half"},i.createElement("tbody",null,e)))}});t.exports=s},/*!***********************************************!*\ - !*** ./lib/components/ContentStateFilter.jsx ***! - \***********************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! react */11)),o=r(n(/*! ../actions/Actions */32)),a=n(/*! ../constants/Options */17),s=a.ContentStates,u=a.ContentStateStyles,l=n(/*! react/addons */34).PureRenderMixin,c=i.createClass({displayName:"ContentStateFilter",mixins:[l],propTypes:{selectedContentState:i.PropTypes.oneOf(s).isRequired},onFilterOptionClicked:function(t){this.props.selectedContentState!==t&&o.changeContentState(t)},render:function(){var t,e=this,n=this.props.selectedContentState,r=this.onFilterOptionClicked;return t=s.map(function(t,o){var a="pill--"+u[o],s="pill pill--inline ";return s+=n===t?a+" is-active":a,i.createElement("span",{key:t,onClick:r.bind(e,t),className:s},t)}),i.createElement("div",{className:"l--pad-bottom-half"},t)}});t.exports=c},/*!**********************************************!*\ - !*** ./lib/components/ContributionChart.jsx ***! - \**********************************************/ -function(t,e,n){"use strict";function r(t){var e={labels:[],datasets:[{label:"Total",fillColor:"rgba(65, 105, 136, .05)",strokeColor:"rgb(65, 105, 136)",pointColor:"rgb(65, 105, 136)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgb(65, 105, 136)",data:[]},{label:"Translated",fillColor:"rgba(112,169,139, .05)",strokeColor:"rgb(112,169,139)",pointColor:"rgb(112,169,139)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgb(112,169,139)",data:[]},{label:"Needs Work",fillColor:"rgba(224,195,80, .05)",strokeColor:"rgb(224,195,80)",pointColor:"rgb(224,195,80)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgb(224,195,80)",data:[]},{label:"Approved",fillColor:"rgba(78, 159, 221, .05)",strokeColor:"rgb(78, 159, 221)",pointColor:"rgb(78, 159, 221)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgb(78, 159, 221)",data:[]}]},n=t.length,r=!1;return t.forEach(function(t){var i=t.date;r=r||a.isInFuture(i),e.labels.push(a.dayAsLabel(i,n)),r||(e.datasets[0].data.push(t.totalActivity),e.datasets[1].data.push(t.totalTranslated),e.datasets[2].data.push(t.totalNeedsWork),e.datasets[3].data.push(t.totalApproved))}),e}var i=function(t){return t&&t.__esModule?t["default"]:t},o=i(n(/*! react */11)),a=i(n(/*! ../utils/DateHelper */33)),s=n(/*! react-chartjs */118).Line,u=n(/*! ../constants/Options */17).DateRanges,l=s,c={animationEasing:"easeOutQuint",bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,responsive:!0,showTooltips:!0,scaleFontFamily:'"Source Sans Pro", "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif',scaleFontColor:"#7c96ac",scaleShowGridLines:!0,scaleShowVerticalLines:!1,scaleGridLineColor:"rgba(198, 210, 219, .1)",tooltipFillColor:"rgba(255,255,255,0.8)",tooltipFontFamily:'"Source Sans Pro", "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif',tooltipFontSize:14,tooltipFontStyle:"400",tooltipFontColor:"rgb(132, 168, 196)",tooltipTitleFontFamily:'"Source Sans Pro", "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif',tooltipTitleFontSize:14,tooltipTitleFontStyle:"400",tooltipTitleFontColor:"rgb(65, 105, 136)",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:6,tooltipCornerRadius:2,tooltipXOffset:10,multiTooltipTemplate:"<%= value %><%if (datasetLabel){%> (<%= datasetLabel %>)<%}%>"},h=o.createClass({displayName:"ContributionChart",propTypes:{dateRangeOption:o.PropTypes.oneOf(u).isRequired,wordCountForEachDay:o.PropTypes.arrayOf(o.PropTypes.shape({date:o.PropTypes.string.isRequired,totalActivity:o.PropTypes.number.isRequired,totalApproved:o.PropTypes.number.isRequired,totalTranslated:o.PropTypes.number.isRequired,totalNeedsWork:o.PropTypes.number.isRequired})).isRequired},getDefaultProps:function(){return{chartOptions:c}},shouldComponentUpdate:function(t){return this.props.dateRangeOption!==t.dateRangeOption||this.props.wordCountForEachDay.length!==t.wordCountForEachDay.length},render:function(){var t=r(this.props.wordCountForEachDay);return o.createElement(l,{data:t,options:this.props.chartOptions,width:"800",height:"250"})}});t.exports=h},/*!**************************************!*\ - !*** ./lib/components/DayMatrix.jsx ***! - \**************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=n(/*! react/addons */34),o=r(i),a=n(/*! ../constants/Options */17),s=a.ContentStates,u=a.ContentStateStyles,l=r(n(/*! ../actions/Actions */32)),c=i.PureRenderMixin,h=r(n(/*! ../utils/DateHelper */33)),p=o.createClass({displayName:"DayMatrix",mixins:[c],propTypes:{dateLabel:o.PropTypes.string.isRequired,date:o.PropTypes.string.isRequired,wordCount:o.PropTypes.number.isRequired,selectedDay:o.PropTypes.string},handleDayClick:function(){var t=this.props.date;this.props.selectedDay==t?l.clearSelectedDay():l.onDaySelected(t)},render:function(){var t,e=o.addons.classSet,n=this.props.selectedContentState,r=h.isInFuture(this.props.date),i=r?"":this.props.wordCount;return t={cal__day:!0,"is-disabled":r,"is-active":this.props.date===this.props.selectedDay},s.forEach(function(e,r){t[u[r]]=n===e}),o.createElement("td",{className:e(t),onClick:this.handleDayClick,title:this.props.wordCount+" words"},o.createElement("div",{className:"cal__date"},this.props.dateLabel),o.createElement("div",{className:"cal__date-info"},i))}});t.exports=p},/*!*************************************!*\ - !*** ./lib/components/DropDown.jsx ***! - \*************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! react */11)),o=r(n(/*! ../actions/Actions */32)),a=n(/*! react/addons */34).PureRenderMixin,s=i.createClass({displayName:"DropDown",mixins:[a],getInitialState:function(){return{dropdownIsActive:!1}},handleOptionClick:function(t){this.props.selectedOption!=t&&o.changeDateRange(t),this.setState({dropdownIsActive:!1})},handleButtonClick:function(t){t.preventDefault(),this.setState({dropdownIsActive:!this.state.dropdownIsActive})},render:function(){var t,e=this.props.options,n=this.props.selectedOption,r=this,o="Dropdown--simple";return o+=this.state.dropdownIsActive?" is-active":"",t=e.map(function(t){var e="button--link txt--nowrap";return e+=t===n?" is-active":"",i.createElement("li",{key:t,className:"Dropdown-item"},i.createElement("button",{className:e,onClick:r.handleOptionClick.bind(r,t)},t))}),i.createElement("div",{className:o},i.createElement("button",{className:"button--link",onClick:this.handleButtonClick},i.createElement("span",{className:"Dropdown-toggleIcon"},i.createElement("i",{className:"i i--arrow-down"}))," ",n),i.createElement("ul",{className:"Dropdown-content"},t))}});t.exports=s},/*!**************************************************!*\ - !*** ./lib/components/FilterableMatrixTable.jsx ***! - \**************************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! react/addons */34)),o=r(n(/*! ./ContentStateFilter */103)),a=r(n(/*! ./CalendarMonthMatrix */99)),s=r(n(/*! ./CalendarPeriodHeading */100)),u=r(n(/*! ./CategoryMatrixTable */102)),l=n(/*! ../constants/Options */17),c=l.DateRanges,h=l.ContentStates,p=i.createClass({displayName:"FilterableMatrixTable",propTypes:{wordCountForEachDay:i.PropTypes.arrayOf(i.PropTypes.shape({date:i.PropTypes.string.isRequired,wordCount:i.PropTypes.number.isRequired})).isRequired,wordCountForSelectedDay:i.PropTypes.arrayOf(i.PropTypes.shape({savedDate:i.PropTypes.string.isRequired,projectSlug:i.PropTypes.string.isRequired,projectName:i.PropTypes.string.isRequired,versionSlug:i.PropTypes.string.isRequired,localeId:i.PropTypes.string.isRequired,localeDisplayName:i.PropTypes.string.isRequired,savedState:i.PropTypes.string.isRequired,wordCount:i.PropTypes.number.isRequired})).isRequired,fromDate:i.PropTypes.string.isRequired,toDate:i.PropTypes.string.isRequired,dateRangeOption:i.PropTypes.oneOf(c).isRequired,selectedContentState:i.PropTypes.oneOf(h).isRequired,selectedDay:i.PropTypes.string},render:function(){var t,e=this.props.selectedContentState,n=this.props.selectedDay;return t=this.props.wordCountForSelectedDay.length>0?[i.createElement(u,{key:"locales",matrixData:this.props.wordCountForSelectedDay,category:"localeId",categoryTitle:"localeDisplayName",categoryName:"Languages"}),i.createElement(u,{key:"projects",matrixData:this.props.wordCountForSelectedDay,category:"projectSlug",categoryTitle:"projectName",categoryName:"Projects"})]:i.createElement("div",null,"No contributions"),i.createElement("div",null,i.createElement(o,{selectedContentState:e}),i.createElement("div",{className:"g"},i.createElement("div",{className:"g__item w--1-2-l w--1-2-h"},i.createElement(a,{matrixData:this.props.wordCountForEachDay,selectedDay:n,selectedContentState:e,dateRangeOption:this.props.dateRangeOption})),i.createElement("div",{className:"g__item w--1-2-l w--1-2-h"},i.createElement(s,{fromDate:this.props.fromDate,toDate:this.props.toDate,dateRange:this.props.dateRangeOption,selectedDay:n}),t)))}});t.exports=p},/*!************************************************!*\ - !*** ./lib/components/RecentContributions.jsx ***! - \************************************************/ -function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=r(n(/*! react */11)),o=r(n(/*! ./ContributionChart */104)),a=r(n(/*! ./DropDown */106)),s=r(n(/*! ./FilterableMatrixTable */107)),u=r(n(/*! ../stores/UserMatrixStore */109)),l=n(/*! ../constants/Options */17).DateRanges,c=i.createClass({displayName:"RecentContributions",getMatrixState:function(){return u.getMatrixState()},getInitialState:function(){return this.getMatrixState()},componentDidMount:function(){u.addChangeListener(this._onChange)},componentWillUnmount:function(){u.removeChangeListener(this._onChange)},_onChange:function(){this.setState(this.getMatrixState())},render:function(){var t=this.state.dateRange;return i.createElement("div",{className:"l__wrapper"},i.createElement("div",{className:"l--push-bottom-1"},i.createElement("div",{className:"l--float-right txt--uppercase"},i.createElement(a,{options:l,selectedOption:this.state.dateRangeOption})),i.createElement("h2",{className:"delta txt--uppercase"},"Recent Contributions")),i.createElement("div",{className:"l--push-bottom-1"},i.createElement(o,{wordCountForEachDay:this.state.matrixForAllDays,dateRangeOption:this.state.dateRangeOption})),i.createElement(s,{wordCountForSelectedDay:this.state.wordCountsForSelectedDayFilteredByContentState,wordCountForEachDay:this.state.wordCountsForEachDayFilteredByContentState,fromDate:t.fromDate,toDate:t.toDate,dateRangeOption:this.state.dateRangeOption,selectedContentState:this.state.contentStateOption,selectedDay:this.state.selectedDay}))}});t.exports=c},/*!***************************************!*\ - !*** ./lib/stores/UserMatrixStore.js ***! - \***************************************/ -function(t,e,n){"use strict";function r(){var t=C.dateRangeOption,e=_.getDateRangeFromOption(t),n=y.baseUrl+e.fromDate+".."+e.toDate;return C.dateRange=e,new p(function(t,e){b.get(n).set("Cache-Control","no-cache, no-store, must-revalidate").set("Pragma","no-cache").set("Expires",0).end(function(r){r.error?(console.error(n,r.status,r.error.toString()),e(Error(r.error.toString()))):t(r.body)})})}function i(t){var e=C.dateRange,n=o(t,e),r=C.contentStateOption,i=C.selectedDay;return C.matrix=t,C.matrixForAllDays=n,C.wordCountsForEachDayFilteredByContentState=s(n,r),C.wordCountsForSelectedDayFilteredByContentState=u(C.matrix,r,i),C}function o(t,e){var n=e.dates,r=[],i=0;return n.forEach(function(e){for(var n=t[i]||{},o=0,a=0,s=0;n.savedDate===e;){switch(n.savedState){case"Approved":o+=n.wordCount;break;case"Translated":a+=n.wordCount;break;case"NeedReview":s+=n.wordCount;break;default:throw new Error("unrecognized state:"+n.savedState)}i++,n=t[i]||{}}r.push({date:e,totalApproved:o,totalTranslated:a,totalNeedsWork:s,totalActivity:o+s+a})}),r}function a(t){switch(t){case"Total":return"totalActivity";case"Approved":return"totalApproved";case"Translated":return"totalTranslated";case"Needs Work":return"totalNeedsWork"}}function s(t,e){var n=a(e);return t.map(function(t){return{date:t.date,wordCount:t[n]}})}function u(t,e,n){var r,i=t,o=[];return e="Needs Work"===e?"NeedReview":e,n&&o.push(function(t){return t.savedDate===n}),"Total"!==e&&o.push(function(t){return t.savedState===e}),o.length>0&&(r=function(t){return o.every(function(e){return e.call({},t)})},i=t.filter(r)),i}var l=function(t){return t&&t.__esModule?t["default"]:t},c=l(n(/*! ../dispatchers/UserMatrixDispatcher */60)),h=l(n(/*! object-assign */63)),p=n(/*! es6-promise */111).Promise,f=n(/*! events */112).EventEmitter,d=n(/*! ../constants/Options */17),m=d.ContentStates,v=d.DateRanges,g=l(n(/*! ../constants/ActionTypes */58)),y=l(n(/*! ../constants/Configs */59)),_=l(n(/*! ../utils/DateHelper */33)),b=l(n(/*! superagent */196)),w="change",C={matrix:[],matrixForAllDays:[],wordCountsForEachDayFilteredByContentState:[],wordCountsForSelectedDayFilteredByContentState:[],dateRangeOption:v[0],selectedDay:null,contentStateOption:m[0],dateRange:function(t){return _.getDateRangeFromOption(t)}},x=h({},f.prototype,{getMatrixState:function(){return 0==C.matrixForAllDays.length&&r().then(i).then(function(){x.emitChange()}),C}.bind(void 0),emitChange:function(){this.emit(w)},addChangeListener:function(t){this.on(w,t)},removeChangeListener:function(t){this.removeListener(w,t)},dispatchToken:c.register(function(t){var e=t.action;switch(e.actionType){case g.DATE_RANGE_UPDATE:console.log("date range from %s -> %s",C.dateRangeOption,e.data),C.dateRangeOption=e.data,C.selectedDay=null,r().then(i).then(function(){x.emitChange()})["catch"](function(t){console.error("something bad happen:"+t.stack)});break;case g.CONTENT_STATE_UPDATE:console.log("content state from %s -> %s",C.contentStateOption,e.data),C.contentStateOption=e.data,C.wordCountsForEachDayFilteredByContentState=s(C.matrixForAllDays,C.contentStateOption),C.wordCountsForSelectedDayFilteredByContentState=u(C.matrix,C.contentStateOption,C.selectedDay),x.emitChange();break;case g.DAY_SELECTED:console.log("day selection from %s -> %s",C.selectedDay,e.data),C.selectedDay=e.data,C.wordCountsForSelectedDayFilteredByContentState=u(C.matrix,C.contentStateOption,C.selectedDay),x.emitChange()}})});t.exports=x},/*!*****************************!*\ - !*** ./~/chart.js/Chart.js ***! - \*****************************/ -function(t,e,n){var r;/*! - * Chart.js - * http://chartjs.org/ - * Version: 1.0.2 - * - * Copyright 2015 Nick Downie - * Released under the MIT license - * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md - */ -(function(){"use strict";var i=this,o=i.Chart,a=function(t){return this.canvas=t.canvas,this.ctx=t,this.width=t.canvas.width,this.height=t.canvas.height,this.aspectRatio=this.width/this.height,s.retinaScale(this),this};a.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},a.types={};var s=a.helpers={},u=s.each=function(t,e,n){var r=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var i;for(i=0;i=0;r--){var i=t[r];if(e(i))return i}},s.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=e.prototype,n.prototype=new r,n.extend=f,t&&c(n.prototype,t),n.__super__=e.prototype,n}),d=s.noop=function(){},m=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),v=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},g=s.amd=!0&&n(/*! !webpack amd options */200),y=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},_=s.max=function(t){return Math.max.apply(Math,t)},b=s.min=function(t){return Math.min.apply(Math,t)},w=(s.cap=function(t,e,n){if(y(e)){if(t>e)return e}else if(y(n)&&n>t)return n;return t},s.getDecimalPlaces=function(t){return t%1!==0&&y(t)?t.toString().split(".")[1].length:0}),C=s.radians=function(t){return t*(Math.PI/180)},x=(s.getAngleFromPoint=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r),o=2*Math.PI+Math.atan2(r,n);return 0>n&&0>r&&(o+=2*Math.PI),{angle:o,distance:i}},s.aliasPixel=function(t){return t%2===0?0:.5}),E=(s.splineCurve=function(t,e,n,r){var i=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),o=Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2)),a=r*i/(i+o),s=r*o/(i+o);return{inner:{x:e.x-a*(n.x-t.x),y:e.y-a*(n.y-t.y)},outer:{x:e.x+s*(n.x-t.x),y:e.y+s*(n.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),D=(s.calculateScaleRange=function(t,e,n,r,i){var o=2,a=Math.floor(e/(1.5*n)),s=o>=a,u=_(t),l=b(t);u===l&&(u+=.5,l>=.5&&!r?l-=.5:u+=.5);for(var c=Math.abs(u-l),h=E(c),p=Math.ceil(u/(1*Math.pow(10,h)))*Math.pow(10,h),f=r?0:Math.floor(l/(1*Math.pow(10,h)))*Math.pow(10,h),d=p-f,m=Math.pow(10,h),v=Math.round(d/m);(v>a||a>2*v)&&!s;)if(v>a)m*=2,v=Math.round(d/m),v%1!==0&&(s=!0);else if(i&&h>=0){if(m/2%1!==0)break;m/=2,v=Math.round(d/m)}else m/=2,v=Math.round(d/m);return s&&(v=o,m=d/v),{steps:v,stepValue:m,min:f,max:f+v*m}},s.template=function(t,e){function n(t,e){var n=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):r[t]=r[t];return e?n(e):n}if(t instanceof Function)return t(e);var r={};return n(t,e)}),S=(s.generateLabels=function(t,e,n,r){var i=new Array(e);return labelTemplateString&&u(i,function(e,o){i[o]=D(t,{value:n+r*(o+1)})}),i},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1==(t/=1)?1:(n||(n=.3),rt?-.5*r*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-e)*Math.PI/n):r*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-e)*Math.PI/n)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*t*t*(((e*=1.525)+1)*t-e):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}}),M=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),T=(s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),s.animationLoop=function(t,e,n,r,i,o){var a=0,s=S[n]||S.linear,u=function(){a++;var n=a/e,l=s(n);t.call(o,l,n,a),r.call(o,l,n),e>a?o.animationFrame=M(u):i.apply(o)};M(u)},s.getRelativePosition=function(t){var e,n,r=t.originalEvent||t,i=t.currentTarget||t.srcElement,o=i.getBoundingClientRect();return r.touches?(e=r.touches[0].clientX-o.left,n=r.touches[0].clientY-o.top):(e=r.clientX-o.left,n=r.clientY-o.top),{x:e,y:n}},s.addEvent=function(t,e,n){t.addEventListener?t.addEventListener(e,n):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n}),P=s.removeEvent=function(t,e,n){t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=d},k=(s.bindEvents=function(t,e,n){t.events||(t.events={}),u(e,function(e){t.events[e]=function(){n.apply(t,arguments)},T(t.chart.canvas,e,t.events[e])})},s.unbindEvents=function(t,e){u(e,function(e,n){P(t.chart.canvas,n,e)})}),O=s.getMaximumWidth=function(t){var e=t.parentNode;return e.clientWidth},R=s.getMaximumHeight=function(t){var e=t.parentNode;return e.clientHeight},A=(s.getMaximumSize=s.getMaximumWidth,s.retinaScale=function(t){var e=t.ctx,n=t.canvas.width,r=t.canvas.height;window.devicePixelRatio&&(e.canvas.style.width=n+"px",e.canvas.style.height=r+"px",e.canvas.height=r*window.devicePixelRatio,e.canvas.width=n*window.devicePixelRatio,e.scale(window.devicePixelRatio,window.devicePixelRatio))}),L=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},N=s.fontString=function(t,e,n){return e+" "+t+"px "+n},I=s.longestText=function(t,e,n){t.font=e;var r=0;return u(n,function(e){var n=t.measureText(e).width;r=n>r?n:r}),r},F=s.drawRoundedRectangle=function(t,e,n,r,i,o){t.beginPath(),t.moveTo(e+o,n),t.lineTo(e+r-o,n),t.quadraticCurveTo(e+r,n,e+r,n+o),t.lineTo(e+r,n+i-o),t.quadraticCurveTo(e+r,n+i,e+r-o,n+i),t.lineTo(e+o,n+i),t.quadraticCurveTo(e,n+i,e,n+i-o),t.lineTo(e,n+o),t.quadraticCurveTo(e,n,e+o,n),t.closePath()};a.instances={},a.Type=function(t,e,n){this.options=e,this.chart=n,this.id=m(),a.instances[this.id]=this,e.responsive&&this.resize(),this.initialize.call(this,t)},c(a.Type.prototype,{initialize:function(){return this},clear:function(){return L(this.chart),this},stop:function(){return s.cancelAnimFrame.call(window,this.animationFrame),this},resize:function(t){this.stop();var e=this.chart.canvas,n=O(this.chart.canvas),r=this.options.maintainAspectRatio?n/this.chart.aspectRatio:R(this.chart.canvas);return e.width=this.chart.width=n,e.height=this.chart.height=r,A(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:d,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return D(this.options.legendTemplate,this)},destroy:function(){this.clear(),k(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete a.instances[this.id]},showTooltip:function(t,e){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var n=function(t){var e=!1;return t.length!==this.activeElements.length?e=!0:(u(t,function(t,n){t!==this.activeElements[n]&&(e=!0)},this),e)}.call(this,t);if(n||e){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var r,i,o=this.datasets.length-1;o>=0&&(r=this.datasets[o].points||this.datasets[o].bars||this.datasets[o].segments,i=p(r,t[0]),-1===i);o--);var l=[],c=[],h=function(){var t,e,n,r,o,a=[],u=[],h=[];return s.each(this.datasets,function(e){t=e.points||e.bars||e.segments,t[i]&&t[i].hasValue()&&a.push(t[i])}),s.each(a,function(t){u.push(t.x),h.push(t.y),l.push(s.template(this.options.multiTooltipTemplate,t)),c.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=b(h),n=_(h),r=b(u),e=_(u),{x:r>this.chart.width/2?r:e,y:(o+n)/2}}.call(this,i);new a.MultiTooltip({x:h.x,y:h.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:l,legendColors:c,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else u(t,function(t){var e=t.tooltipPosition();new a.Tooltip({x:Math.round(e.x),y:Math.round(e.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:D(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),a.Type.extend=function(t){var e=this,n=function(){return e.apply(this,arguments)};if(n.prototype=l(e.prototype),c(n.prototype,t),n.extend=a.Type.extend,t.name||e.prototype.name){var r=t.name||e.prototype.name,i=a.defaults[e.prototype.name]?l(a.defaults[e.prototype.name]):{};a.defaults[r]=c(i,t.defaults),a.types[r]=n,a.prototype[r]=function(t,e){var i=h(a.defaults.global,a.defaults[r],e||{});return new n(t,i,this)}}else v("Name not provided for this chart, so it hasn't been registered");return e},a.Element=function(t){c(this,t),this.initialize.apply(this,arguments),this.save()},c(a.Element.prototype,{initialize:function(){},restore:function(t){return t?u(t,function(t){this[t]=this._saved[t]},this):c(this,this._saved),this},save:function(){return this._saved=l(this),delete this._saved._saved,this},update:function(t){return u(t,function(t,e){this._saved[e]=this[e],this[e]=t},this),this},transition:function(t,e){return u(t,function(t,n){this[n]=(t-this._saved[n])*e+this._saved[n]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return y(this.value)}}),a.Element.extend=f,a.Point=a.Element.extend({display:!0,inRange:function(t,e){var n=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(e-this.y,2)=this.startAngle&&n.angle<=this.endAngle,i=n.distance>=this.innerRadius&&n.distance<=this.outerRadius;return r&&i},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,e=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*e,y:this.y+Math.sin(t)*e}},draw:function(){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),t.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.lineJoin="bevel",this.showStroke&&t.stroke()}}),a.Rectangle=a.Element.extend({draw:function(){var t=this.ctx,e=this.width/2,n=this.x-e,r=this.x+e,i=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(n+=o,r-=o,i+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(n,this.base),t.lineTo(n,i),t.lineTo(r,i),t.lineTo(r,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,e){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&e>=this.y&&e<=this.base}}),a.Tooltip=a.Element.extend({draw:function(){var t=this.chart.ctx;t.font=N(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var e=this.caretPadding=2,n=t.measureText(this.text).width+2*this.xPadding,r=this.fontSize+2*this.yPadding,i=r+this.caretHeight+e;this.x+n/2>this.chart.width?this.xAlign="left":this.x-n/2<0&&(this.xAlign="right"),this.y-i<0&&(this.yAlign="below");var o=this.x-n/2,a=this.y-i;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-e),t.lineTo(this.x+this.caretHeight,this.y-(e+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(e+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+e+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+e),t.lineTo(this.x+this.caretHeight,this.y+e+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+e+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-n+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}F(t,o,a,n,r,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+n/2,a+r/2)}}}),a.MultiTooltip=a.Element.extend({initialize:function(){this.font=N(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=N(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,e=I(this.ctx,this.font,this.labels)+this.fontSize+3,n=_([e,t]);this.width=n+2*this.xPadding;var r=this.height/2;this.y-r<0?this.y=r:this.y+r>this.chart.height&&(this.y=this.chart.height-r),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var e=this.y-this.height/2+this.yPadding,n=t-1;return 0===t?e+this.titleFontSize/2:e+(1.5*this.fontSize*n+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{F(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(e,n){t.fillStyle=this.textColor,t.fillText(e,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(n+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[n].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),a.Scale=a.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=w(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(D(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?I(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,e=this.endPoint-this.startPoint;for(this.calculateYRange(e),this.buildYLabels(),this.calculateXLabelRotation();e>this.endPoint-this.startPoint;)e=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(e),this.buildYLabels(),tthis.yLabelWidth+10?n/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var i,o=I(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)i=Math.cos(C(this.xLabelRotation)),t=i*n,e=i*r,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=i*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(C(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:d,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var e=this.drawingArea()/(this.min-this.max);return this.endPoint-e*(t-this.min)},calculateX:function(t){var e=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),n=e/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),r=n*t+this.xScalePaddingLeft;return this.offsetGridLines&&(r+=n/2),Math.round(r)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,e=(this.endPoint-this.startPoint)/this.steps,n=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,u(this.yLabels,function(r,i){var o=this.endPoint-e*i,a=Math.round(o),u=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(r,n-10,o),0!==i||u||(u=!0),u&&t.beginPath(),i>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a+=s.aliasPixel(t.lineWidth),u&&(t.moveTo(n,a),t.lineTo(this.width,a),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n-5,a),t.lineTo(n,a),t.stroke(),t.closePath()},this),u(this.xLabels,function(e,n){var r=this.calculateX(n)+x(this.lineWidth),i=this.calculateX(n-(this.offsetGridLines?.5:0))+x(this.lineWidth),o=this.xLabelRotation>0,a=this.showVerticalLines;0!==n||a||(a=!0),a&&t.beginPath(),n>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a&&(t.moveTo(i,this.endPoint),t.lineTo(i,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(i,this.endPoint),t.lineTo(i,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(r,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*C(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(e,0,0),t.restore()},this))}}),a.RadialScale=a.Element.extend({initialize:function(){this.size=b([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var e=this.drawingArea/(this.max-this.min);return(t-this.min)*e},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=w(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(D(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,e,n,r,i,o,a,s,u,l,c,h,p=b([this.height/2-this.pointLabelFontSize-5,this.width/2]),f=this.width,d=0;for(this.ctx.font=N(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),e=0;ef&&(f=t.x+r,i=e),t.x-rf&&(f=t.x+n,i=e):e>this.valuesCount/2&&t.x-n0){var r,i=n*(this.drawingArea/this.steps),o=this.yCenter-i;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,i,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a=0;e--){if(this.angleLineWidth>0){var n=this.getPointPosition(e,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(n.x,n.y),t.stroke(),t.closePath()}var r=this.getPointPosition(e,this.calculateCenterOffset(this.max)+5);t.font=N(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var i=this.labels.length,o=this.labels.length/2,a=o/2,s=a>e||e>i-a,l=e===a||e===i-a;t.textAlign=0===e?"center":e===o?"center":o>e?"left":"right",t.textBaseline=l?"middle":s?"bottom":"top",t.fillText(this.labels[e],r.x,r.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){u(a.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),g?(r=function(){return a}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))):"object"==typeof t&&t.exports&&(t.exports=a),i.Chart=a,a.noConflict=function(){return i.Chart=o,a}}).call(this),function(){"use strict";var t=this,e=t.Chart,n=e.helpers,r={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'
      <% for (var i=0; i
    • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
    • <%}%>
    '};e.Type.extend({name:"Bar",defaults:r,initialize:function(t){var r=this.options;this.ScaleClass=e.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,e,n){var i=this.calculateBaseWidth(),o=this.calculateX(n)-i/2,a=this.calculateBarWidth(t);return o+a*e+e*r.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*r.barValueSpacing},calculateBarWidth:function(t){var e=this.calculateBaseWidth()-(t-1)*r.barDatasetSpacing;return e/t}}),this.datasets=[],this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),n.each(e,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(e)}),this.BarClass=e.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),n.each(t.datasets,function(e){var r={label:e.label||null,fillColor:e.fillColor,strokeColor:e.strokeColor,bars:[]};this.datasets.push(r),n.each(e.data,function(n,i){r.bars.push(new this.BarClass({value:n,label:t.labels[i],datasetLabel:e.label,strokeColor:e.strokeColor,fillColor:e.fillColor,highlightFill:e.highlightFill||e.fillColor,highlightStroke:e.highlightStroke||e.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,e,r){n.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,r,e),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),n.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){n.each(this.datasets,function(e,r){n.each(e.bars,t,this,r)},this)},getBarsAtEvent:function(t){for(var e,r=[],i=n.getRelativePosition(t),o=function(t){r.push(t.bars[e])},a=0;a<% for (var i=0; i
  • <%if(segments[i].label){%><%=segments[i].label%><%}%>
  • <%}%>'};e.Type.extend({name:"Doughnut",defaults:r,initialize:function(t){this.segments=[],this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=e.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];n.each(this.segments,function(t){t.restore(["fillColor"])}),n.each(e,function(t){t.fillColor=t.highlightColor}),this.showTooltip(e)}),this.calculateTotal(t),n.each(t,function(t,e){this.addData(t,e,!0)},this),this.render()},getSegmentsAtEvent:function(t){var e=[],r=n.getRelativePosition(t);return n.each(this.segments,function(t){t.inRange(r.x,r.y)&&e.push(t)},this),e},addData:function(t,e,n){var r=e||this.segments.length;this.segments.splice(r,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),n||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(Math.abs(t)/this.total)},calculateTotal:function(t){this.total=0,n.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),n.each(this.activeElements,function(t){t.restore(["fillColor"])}),n.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var e=n.isNumber(t)?t:this.segments.length-1;this.segments.splice(e,1),this.reflow(),this.update()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,n.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var e=t?t:1;this.clear(),n.each(this.segments,function(t,n){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},e),t.endAngle=t.startAngle+t.circumference,t.draw(),0===n&&(t.startAngle=1.5*Math.PI),n<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>'};e.Type.extend({name:"Line",defaults:r,initialize:function(t){this.PointClass=e.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)0&&ethis.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.ythis.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y0&&(r.lineTo(s[s.length-1].x,this.scale.endPoint),r.lineTo(s[0].x,this.scale.endPoint),r.fillStyle=t.fillColor,r.closePath(),r.fill()),n.each(s,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,e=t.Chart,n=e.helpers,r={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'
      <% for (var i=0; i
    • <%if(segments[i].label){%><%=segments[i].label%><%}%>
    • <%}%>
    '};e.Type.extend({name:"PolarArea",defaults:r,initialize:function(t){this.segments=[],this.SegmentArc=e.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new e.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),n.each(t,function(t,e){this.addData(t,e,!0)},this),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];n.each(this.segments,function(t){t.restore(["fillColor"])}),n.each(e,function(t){t.fillColor=t.highlightColor}),this.showTooltip(e)}),this.render()},getSegmentsAtEvent:function(t){var e=[],r=n.getRelativePosition(t);return n.each(this.segments,function(t){t.inRange(r.x,r.y)&&e.push(t)},this),e},addData:function(t,e,n){var r=e||this.segments.length;this.segments.splice(r,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),n||(this.reflow(),this.update())},removeData:function(t){var e=n.isNumber(t)?t:this.segments.length-1;this.segments.splice(e,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,n.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var e=[];n.each(t,function(t){e.push(t.value)});var r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(e,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,r,{size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),n.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),n.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),n.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var e=t||1;this.clear(),n.each(this.segments,function(t,n){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},e),t.endAngle=t.startAngle+t.circumference,0===n&&(t.startAngle=1.5*Math.PI),n<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>'},initialize:function(t){this.PointClass=e.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),n.each(e,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(e)}),n.each(t.datasets,function(e){var r={label:e.label||null,fillColor:e.fillColor,strokeColor:e.strokeColor,pointColor:e.pointColor,pointStrokeColor:e.pointStrokeColor,points:[]};this.datasets.push(r),n.each(e.data,function(n,i){var o;this.scale.animation||(o=this.scale.getPointPosition(i,this.scale.calculateCenterOffset(n))),r.points.push(new this.PointClass({value:n,label:t.labels[i],datasetLabel:e.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:e.pointStrokeColor,fillColor:e.pointColor,highlightFill:e.pointHighlightFill||e.pointColor,highlightStroke:e.pointHighlightStroke||e.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){n.each(this.datasets,function(e){n.each(e.points,t,this)},this)},getPointsAtEvent:function(t){var e=n.getRelativePosition(t),r=n.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},e),i=2*Math.PI/this.scale.valuesCount,o=Math.round((r.angle-1.5*Math.PI)/i),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),r.distance<=this.scale.drawingArea&&n.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new e.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var e=function(){var e=[];return n.each(t,function(t){t.data?e=e.concat(t.data):n.each(t.points,function(t){e.push(t.value)})}),e}(),r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(e,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,r)},addData:function(t,e){this.scale.valuesCount++,n.each(t,function(t,n){var r=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[n].points.push(new this.PointClass({value:t,label:e,x:r.x,y:r.y,strokeColor:this.datasets[n].pointStrokeColor,fillColor:this.datasets[n].pointColor}))},this),this.scale.labels.push(e),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),n.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){n.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var e=t||1,r=this.chart.ctx;this.clear(),this.scale.draw(),n.each(this.datasets,function(t){n.each(t.points,function(t,n){t.hasValue()&&t.transition(this.scale.getPointPosition(n,this.scale.calculateCenterOffset(t.value)),e)},this),r.lineWidth=this.options.datasetStrokeWidth,r.strokeStyle=t.strokeColor,r.beginPath(),n.each(t.points,function(t,e){0===e?r.moveTo(t.x,t.y):r.lineTo(t.x,t.y)},this),r.closePath(),r.stroke(),r.fillStyle=t.fillColor,r.fill(),n.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this)},/*!*******************************************!*\ - !*** ./~/es6-promise/dist/es6-promise.js ***! - \*******************************************/ -function(t,e,n){var r;(function(t,i,o){/*! - * @overview es6-promise - a tiny implementation of Promises/A+. - * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) - * @license Licensed under MIT license - * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE - * @version 2.0.1 - */ -(function(){"use strict";function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return"function"==typeof t}function u(t){return"object"==typeof t&&null!==t}function l(){}function c(){return function(){t.nextTick(d)}}function h(){var t=0,e=new z(d),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function p(){var t=new MessageChannel;return t.port1.onmessage=d,function(){t.port2.postMessage(0)}}function f(){return function(){setTimeout(d,1)}}function d(){for(var t=0;B>t;t+=2){var e=H[t],n=H[t+1];e(n),H[t]=void 0,H[t+1]=void 0}B=0}function m(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function y(t){try{return t.then}catch(e){return X.error=e,X}}function _(t,e,n,r){try{t.call(e,n,r)}catch(i){return i}}function b(t,e,n){Y(function(t){var r=!1,i=_(n,e,function(n){r||(r=!0,e!==n?x(t,n):D(t,n))},function(e){r||(r=!0,S(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,S(t,i))},t)}function w(t,e){e._state===q?D(t,e._result):t._state===K?S(t,e._result):M(e,void 0,function(e){x(t,e)},function(e){S(t,e)})}function C(t,e){if(e.constructor===t.constructor)w(t,e);else{var n=y(e);n===X?S(t,X.error):void 0===n?D(t,e):s(n)?b(t,e,n):D(t,e)}}function x(t,e){t===e?S(t,v()):a(e)?C(t,e):D(t,e)}function E(t){t._onerror&&t._onerror(t._result),T(t)}function D(t,e){t._state===G&&(t._result=e,t._state=q,0===t._subscribers.length||Y(T,t))}function S(t,e){t._state===G&&(t._state=K,t._result=e,Y(E,t))}function M(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+q]=n,i[o+K]=r,0===o&&t._state&&Y(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,i,o=t._result,a=0;a1)throw new Error("Second argument not supported");if("object"!=typeof t)throw new TypeError("Argument must be an object");return l.prototype=t,new l},0),Y=function(t,e){H[B]=t,H[B+1]=e,B+=2,2===B&&U()},j="undefined"!=typeof window?window:{},z=j.MutationObserver||j.WebKitMutationObserver,V="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,H=new Array(1e3);U="undefined"!=typeof t&&"[object process]"==={}.toString.call(t)?c():z?h():V?p():f();var G=void 0,q=1,K=2,X=new P,$=new P;A.prototype._validateInput=function(t){return W(t)},A.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},A.prototype._init=function(){this._result=new Array(this.length)};var Q=A;A.prototype._enumerate=function(){for(var t=this.length,e=this.promise,n=this._input,r=0;e._state===G&&t>r;r++)this._eachEntry(n[r],r)},A.prototype._eachEntry=function(t,e){var n=this._instanceConstructor;u(t)?t.constructor===n&&t._state!==G?(t._onerror=null,this._settledAt(t._state,e,t._result)):this._willSettleAt(n.resolve(t),e):(this._remaining--,this._result[e]=this._makeResult(q,e,t))},A.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===G&&(this._remaining--,this._abortOnReject&&t===K?S(r,n):this._result[e]=this._makeResult(t,e,n)),0===this._remaining&&D(r,this._result)},A.prototype._makeResult=function(t,e,n){return n},A.prototype._willSettleAt=function(t,e){var n=this;M(t,void 0,function(t){n._settledAt(q,e,t)},function(t){n._settledAt(K,e,t)})};var Z=function(t,e){return new Q(this,t,!0,e).promise},J=function(t,e){function n(t){x(o,t)}function r(t){S(o,t)}var i=this,o=new i(m,e);if(!W(t))return S(o,new TypeError("You must pass an array to race.")),o;for(var a=t.length,s=0;o._state===G&&a>s;s++)M(i.resolve(t[s]),void 0,n,r);return o},te=function(t,e){var n=this;if(t&&"object"==typeof t&&t.constructor===n)return t;var r=new n(m,e);return x(r,t),r},ee=function(t,e){var n=this,r=new n(m,e);return S(r,t),r},ne=0,re=I;I.all=Z,I.race=J,I.resolve=te,I.reject=ee,I.prototype={constructor:I,then:function(t,e){var n=this,r=n._state;if(r===q&&!t||r===K&&!e)return this;var i=new this.constructor(m),o=n._result;if(r){var a=arguments[r-1];Y(function(){O(r,i,a,o)})}else M(n,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var ie=function(){var t;t="undefined"!=typeof i?i:"undefined"!=typeof window&&window.document?window:self;var e="Promise"in t&&"resolve"in t.Promise&&"reject"in t.Promise&&"all"in t.Promise&&"race"in t.Promise&&function(){var e;return new t.Promise(function(t){e=t}),s(e)}();e||(t.Promise=re)},oe={Promise:re,polyfill:ie};n(/*! !webpack amd define */199).amd?(r=function(){return oe}.call(e,n,e,o),!(void 0!==r&&(o.exports=r))):"undefined"!=typeof o&&o.exports?o.exports=oe:"undefined"!=typeof this&&(this.ES6Promise=oe)}).call(this)}).call(e,n(/*! (webpack)/~/node-libs-browser/~/process/browser.js */201),function(){return this}(),n(/*! (webpack)/buildin/module.js */57)(t))},/*!****************************!*\ - !*** ./~/events/events.js ***! - \****************************/ -function(t){function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function r(t){return"number"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(t){if(!r(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},e.prototype.emit=function(t){var e,r,a,s,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],o(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(a=arguments.length,s=new Array(a-1),u=1;a>u;u++)s[u-1]=arguments[u];r.apply(this,s)}else if(i(r)){for(a=arguments.length,s=new Array(a-1),u=1;a>u;u++)s[u-1]=arguments[u];for(l=r.slice(),a=l.length,u=0;a>u;u++)l[u].apply(this,s)}return!0},e.prototype.addListener=function(t,r){var a;if(!n(r))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(r.listener)?r.listener:r),this._events[t]?i(this._events[t])?this._events[t].push(r):this._events[t]=[this._events[t],r]:this._events[t]=r,i(this._events[t])&&!this._events[t].warned){var a;a=o(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,a&&a>0&&this._events[t].length>a&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},e.prototype.removeListener=function(t,e){var r,o,a,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(s=a;s-->0;)if(r[s]===e||r[s].listener&&r[s].listener===e){o=s;break}if(0>o)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},e.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},e.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},e.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?n(t._events[e])?1:t._events[e].length:0}},/*!*************************!*\ - !*** ./~/flux/index.js ***! - \*************************/ -function(t,e,n){t.exports.Dispatcher=n(/*! ./lib/Dispatcher */114)},/*!**********************************!*\ - !*** ./~/flux/lib/Dispatcher.js ***! - \**********************************/ -function(t,e,n){"use strict";function r(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=n(/*! ./invariant */115),o=1,a="ID_";r.prototype.register=function(t){var e=a+o++;return this.$Dispatcher_callbacks[e]=t,e},r.prototype.unregister=function(t){i(this.$Dispatcher_callbacks[t],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",t),delete this.$Dispatcher_callbacks[t]},r.prototype.waitFor=function(t){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var e=0;ee||!n||"undefined"==typeof t&&r)return 1;if(e>t||!r||"undefined"==typeof e&&n)return-1}return 0}function a(t,e,n){if(e!==e)return g(t,n);for(var r=(n||0)-1,i=t.length;++r-1;);return n}function h(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function p(t,e){return o(t.criteria,e.criteria)||t.index-e.index}function f(t,e){for(var n=-1,r=t.criteria,i=e.criteria,a=r.length;++n=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function b(t,e){for(var n=-1,r=t.length,i=-1,o=[];++ne,r=yr(0,t.length,this.__views__),i=r.start,o=r.end,a=o-i,s=this.__dropCount__,u=Es(a,this.__takeCount__),l=n?o:i-1,c=this.__iteratees__,h=c?c.length:0,p=0,f=[];t:for(;a--&&u>p;){l+=e;for(var d=-1,m=t[l];++dr&&(r=i)}return r}function on(t){for(var e=-1,n=t.length,r=ks;++ei&&(r=i)}return r}function an(t,e,n,r){var i=-1,o=t.length;for(r&&o&&(n=t[++i]);++i=200&&Bs(e),l=e.length;u&&(o=qe,s=!1,e=u);t:for(;++in&&(n=-n>i?0:i+n),r="undefined"==typeof r||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r>>>0,n>>>=0;i>n;)t[n++]=e;return t}function xn(t,e){var n=[];return _n(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function En(t,e,n,r){var i;return n(t,function(t,n,o){return e(t,n,o)?(i=r?n:t,!1):void 0}),i}function Dn(t,e,n,r){for(var i=(r||0)-1,o=t.length,a=-1,s=[];++ie&&(e=-e>i?0:i+e),n="undefined"==typeof n||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Wa(i);++r=200,u=s&&Bs(),l=[];u?(r=qe,o=!1):(s=!1,u=e?[]:l);t:for(;++n=i){for(;i>r;){var o=r+i>>>1,a=t[o];(n?e>=a:e>a)?r=o+1:i=o}return i}return Qn(t,e,Ta,n)}function Qn(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,a=e!==e,s="undefined"==typeof e;o>i;){var u=ls((i+o)/2),l=n(t[u]),c=l===l;if(a)var h=c||r;else h=s?c&&(r||"undefined"!=typeof l):r?e>=l:e>l;h?i=u+1:o=u}return Es(o,Rs)}function Zn(t,e,n){if("function"!=typeof t)return Ta;if("undefined"==typeof e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,a){return t.call(e,n,r,i,o,a)}}return function(){return t.apply(e,arguments)}}function Jn(t){return as.call(t,0)}function tr(t,e,n){for(var r=n.length,i=-1,o=xs(t.length-r,0),a=-1,s=e.length,u=Wa(o+s);++ae||null==n)return n;if(e>3&&Er(arguments[1],arguments[2],arguments[3])&&(e=2),e>3&&"function"==typeof arguments[e-2])var r=Zn(arguments[--e-1],arguments[e--],5);else e>2&&"function"==typeof arguments[e-1]&&(r=arguments[--e]);for(var i=0;++i_){var D=s?$e(s):null,S=xs(l-_,0),M=d?E:null,k=d?null:E,O=d?C:null,R=d?null:C;e|=d?A:L,e&=~(d?L:A),m||(e&=~(T|P));var N=ur(t,e,n,O,M,R,k,D,u,S);return N.placeholder=x,N}}var I=p?n:this;return f&&(t=I[y]),s&&(C=kr(C,s)),h&&u=e||!ws(e))return"";var i=e-r;return n=null==n?" ":n+"",va(n,ss(i/n.length)).slice(0,i)}function cr(t,e,n,r){function i(){for(var e=-1,s=arguments.length,u=-1,l=r.length,c=Wa(s+l);++uu))return!1;for(;c&&++su:u>i)||u===r&&u===o)&&(i=u,o=t)}),o}function vr(t,n,r){var i=e.callback||Sa;return i=i===Sa?mn:i,r?i(t,n,r):i}function gr(t,n,r){var i=e.indexOf||Xr;return i=i===Xr?a:i,t?i(t,n,r):i}function yr(t,e,n){for(var r=-1,i=n?n.length:0;++r-1&&t%1==0&&e>t}function Er(t,e,n){if(!To(n))return!1;var r=typeof e;if("number"==r)var i=n.length,o=Dr(i)&&xr(e,i);else o="string"==r&&e in n;return o&&n[e]===t}function Dr(t){return"number"==typeof t&&t>-1&&t%1==0&&Ns>=t}function Sr(t){return t===t&&(0===t?1/t>0:!To(t))}function Mr(t,e){var n=t[1],r=e[1],i=n|r,o=I|N,a=T|P,s=o|a|k|R,u=n&I&&!(r&I),l=n&N&&!(r&N),c=(l?t:e)[7],h=(u?t:e)[8],p=!(n>=N&&r>a||n>a&&r>=N),f=i>=o&&s>=i&&(N>n||(l||u)&&c.length<=h);if(!p&&!f)return t;r&T&&(t[2]=e[2],i|=n&T?0:k);var d=e[3];if(d){var m=t[3];t[3]=m?tr(m,d,e[4]):$e(d),t[4]=m?b(t[3],H):$e(e[4])}return d=e[5],d&&(m=t[5],t[5]=m?er(m,d,e[6]):$e(d),t[6]=m?b(t[5],H):$e(e[6])),d=e[7],d&&(t[7]=$e(d)),r&I&&(t[8]=null==t[8]?e[8]:Es(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function Tr(t,e){t=Lr(t);for(var n=-1,r=e.length,i={};++nr;)a[++o]=Hn(t,r,r+=e);return a}function Fr(t){for(var e=-1,n=t?t.length:0,r=-1,i=[];++ee?0:e)):[]}function Br(t,e,n){var r=t?t.length:0;return r?((n?Er(t,e,n):null==e)&&(e=1),e=r-(+e||0),Hn(t,0,0>e?0:e)):[]}function Yr(t,e,n){var r=t?t.length:0;if(!r)return[];for(e=vr(e,n,3);r--&&e(t[r],r,t););return Hn(t,0,r+1)}function jr(t,e,n){var r=t?t.length:0;if(!r)return[];var i=-1;for(e=vr(e,n,3);++in?xs(r+n,0):n||0;else if(n){var i=$n(t,e),o=t[i];return(e===e?e===o:o!==o)?i:-1}return a(t,e,n)}function $r(t){return Br(t,1)}function Qr(){for(var t=[],e=-1,n=arguments.length,r=[],i=gr(),o=i==a;++e=120&&Bs(e&&s)))}n=t.length;var u=t[0],l=-1,c=u?u.length:0,h=[],p=r[0];t:for(;++ln?xs(r+n,0):Es(n||0,r-1))+1;else if(n){i=$n(t,e,!0)-1;var o=t[i];return(e===e?e===o:o!==o)?i:-1}if(e!==e)return g(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1}function ti(){var t=arguments[0];if(!t||!t.length)return t;for(var e=0,n=gr(),r=arguments.length;++e-1;)ms.call(t,i,1);return t}function ei(t){return jn(t||[],Dn(arguments,!1,!1,1))}function ni(t,e,n){var r=-1,i=t?t.length:0,o=[];for(e=vr(e,n,3);++re?0:e)):[]}function ui(t,e,n){var r=t?t.length:0;return r?((n?Er(t,e,n):null==e)&&(e=1),e=r-(+e||0),Hn(t,0>e?0:e)):[]}function li(t,e,n){var r=t?t.length:0;if(!r)return[];for(e=vr(e,n,3);r--&&e(t[r],r,t););return Hn(t,r+1)}function ci(t,e,n){var r=t?t.length:0;if(!r)return[];var i=-1;for(e=vr(e,n,3);++i>>0,r=Wa(n);++en?xs(r+n,0):n||0:0,"string"==typeof t||!$s(t)&&No(t)?r>n&&t.indexOf(e,n)>-1:gr(t,e,n)>-1):!1}function Pi(t,e,n){var r=$s(t)?tn:wn;return("function"!=typeof e||"undefined"!=typeof n)&&(e=vr(e,n,3)),r(t,e)}function ki(t,e,n){var r=$s(t)?en:xn;return e=vr(e,n,3),r(t,e)}function Oi(t,e,n){if($s(t)){var r=Vr(t,e,n);return r>-1?t[r]:S}return e=vr(e,n,3),En(t,e,_n)}function Ri(t,e,n){return e=vr(e,n,3),En(t,e,bn)}function Ai(t,e){return Oi(t,Fn(e))}function Li(t,e,n){return"function"==typeof e&&"undefined"==typeof n&&$s(t)?Qe(t,e):_n(t,Zn(e,n,3))}function Ni(t,e,n){return"function"==typeof e&&"undefined"==typeof n&&$s(t)?Je(t,e):bn(t,Zn(e,n,3))}function Ii(t,e){return Rn(t,e,Hn(arguments,2))}function Fi(t,e,n){var r=$s(t)?nn:In;return e=vr(e,n,3),r(t,e)}function Ui(t,e){return Fi(t,Yn(e))}function Wi(t,e,n,r){var i=$s(t)?an:Vn;return i(t,vr(e,r,4),n,arguments.length<3,_n)}function Bi(t,e,n,r){var i=$s(t)?sn:Vn;return i(t,vr(e,r,4),n,arguments.length<3,bn)}function Yi(t,e,n){var r=$s(t)?en:xn;return e=vr(e,n,3),r(t,function(t,n,r){return!e(t,n,r)})}function ji(t,e,n){if(n?Er(t,e,n):null==e){t=Ar(t);var r=t.length;return r>0?t[zn(0,r-1)]:S}var i=zi(t);return i.length=Es(0>e?0:+e||0,i.length),i}function zi(t){t=Ar(t);for(var e=-1,n=t.length,r=Wa(n);++e3&&Er(e[1],e[2],e[3])&&(e=[t,e[1]]);var n=-1,r=t?t.length:0,i=Dn(e,!1,!1,1),o=Dr(r)?Wa(r):[];return _n(t,function(t){for(var e=i.length,r=Wa(e);e--;)r[e]=null==t?S:t[i[e]];o[++n]={criteria:r,index:n,value:t}}),s(o,f)}function Ki(t,e){return ki(t,Fn(e))}function Xi(t,e){if("function"!=typeof e){if("function"!=typeof t)throw new Ka(V);var n=t;t=e,e=n}return t=ws(t=+t)?t:0,function(){return--t<1?e.apply(this,arguments):void 0}}function $i(t,e,n){return n&&Er(t,e,n)&&(e=null),e=t&&null==e?t.length:xs(+e||0,0),hr(t,I,null,null,null,null,e)}function Qi(t,e){var n;if("function"!=typeof e){if("function"!=typeof t)throw new Ka(V);var r=t;t=e,e=r}return function(){return--t>0?n=e.apply(this,arguments):e=null,n}}function Zi(t,e){var n=T;if(arguments.length>2){var r=Hn(arguments,2),i=b(r,Zi.placeholder);n|=A}return hr(t,n,e,r,i)}function Ji(t){return dn(t,arguments.length>1?Dn(arguments,!1,!1,1):Ko(t))}function to(t,e){var n=T|P;if(arguments.length>2){var r=Hn(arguments,2),i=b(r,to.placeholder);n|=A}return hr(e,n,t,r,i)}function eo(t,e,n){n&&Er(t,e,n)&&(e=null);var r=hr(t,O,null,null,null,null,null,e);return r.placeholder=eo.placeholder,r}function no(t,e,n){n&&Er(t,e,n)&&(e=null);var r=hr(t,R,null,null,null,null,null,e);return r.placeholder=no.placeholder,r}function ro(t,e,n){function r(){p&&us(p),u&&us(u),u=p=f=S}function i(){var n=e-(Xs()-c);if(0>=n||n>e){u&&us(u);var r=f;u=p=f=S,r&&(d=Xs(),l=t.apply(h,s),p||u||(s=h=null))}else p=ds(i,n)}function o(){p&&us(p),u=p=f=S,(v||m!==e)&&(d=Xs(),l=t.apply(h,s),p||u||(s=h=null))}function a(){if(s=arguments,c=Xs(),h=this,f=v&&(p||!g),m===!1)var n=g&&!p;else{u||g||(d=c);var r=m-(c-d),a=0>=r||r>m;a?(u&&(u=us(u)),d=c,l=t.apply(h,s)):u||(u=ds(o,r))}return a&&p?p=us(p):p||e===m||(p=ds(i,e)),n&&(a=!0,l=t.apply(h,s)),!a||p||u||(s=h=null),l}var s,u,l,c,h,p,f,d=0,m=!1,v=!0;if("function"!=typeof t)throw new Ka(V);if(e=0>e?0:e,n===!0){var g=!0;v=!1}else To(n)&&(g=n.leading,m="maxWait"in n&&xs(+n.maxWait||0,e),v="trailing"in n?n.trailing:v);return a.cancel=r,a}function io(t){return gn(t,1,arguments,1)}function oo(t,e){return gn(t,e,arguments,2)}function ao(){var t=arguments,e=t.length;if(!e)return function(){return arguments[0]};if(!tn(t,Mo))throw new Ka(V);return function(){for(var n=0,r=t[n].apply(this,arguments);++ne)return function(){return arguments[0]};if(!tn(t,Mo))throw new Ka(V);return function(){for(var n=e,r=t[n].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function uo(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Ka(V);var n=function(){var r=n.cache,i=e?e.apply(this,arguments):arguments[0];if(r.has(i))return r.get(i);var o=t.apply(this,arguments);return r.set(i,o),o};return n.cache=new uo.Cache,n}function lo(t){if("function"!=typeof t)throw new Ka(V);return function(){return!t.apply(this,arguments)}}function co(t){return Qi(t,2)}function ho(t){var e=Hn(arguments,1),n=b(e,ho.placeholder);return hr(t,A,null,e,n)}function po(t){var e=Hn(arguments,1),n=b(e,po.placeholder);return hr(t,L,null,e,n)}function fo(t){var e=Dn(arguments,!1,!1,1);return hr(t,N,null,null,null,e)}function mo(t){if("function"!=typeof t)throw new Ka(V);return function(e){return t.apply(this,e)}}function vo(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Ka(V);return n===!1?r=!1:To(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),je.leading=r,je.maxWait=+e,je.trailing=i,ro(t,e,je)}function go(t,e){return e=null==e?Ta:e,hr(e,A,null,[t],[])}function yo(t,e,n,r){return"boolean"!=typeof e&&null!=e&&(r=n,n=Er(t,e,r)?null:e,e=!1),n="function"==typeof n&&Zn(n,r,1),vn(t,e,n)}function _o(t,e,n){return e="function"==typeof e&&Zn(e,n,1),vn(t,!0,e)}function bo(t){var e=y(t)?t.length:S;return Dr(e)&&ns.call(t)==G||!1}function wo(t){return t===!0||t===!1||y(t)&&ns.call(t)==K||!1}function Co(t){return y(t)&&ns.call(t)==X||!1}function xo(t){return t&&1===t.nodeType&&y(t)&&ns.call(t).indexOf("Element")>-1||!1}function Eo(t){if(null==t)return!0;var e=t.length;return Dr(e)&&($s(t)||No(t)||bo(t)||y(t)&&Mo(t.splice))?!e:!tu(t).length}function Do(t,e,n,r){if(n="function"==typeof n&&Zn(n,r,3),!n&&Sr(t)&&Sr(e))return t===e;var i=n?n(t,e):S;return"undefined"==typeof i?An(t,e,n):!!i}function So(t){return y(t)&&"string"==typeof t.message&&ns.call(t)==$||!1}function Mo(t){return"function"==typeof t||!1}function To(t){var e=typeof t;return"function"==e||t&&"object"==e||!1}function Po(t,e,n,r){var i=tu(e),o=i.length;if(n="function"==typeof n&&Zn(n,r,3),!n&&1==o){var a=i[0],s=e[a];if(Sr(s))return null!=t&&s===t[a]&&ts.call(t,a)}for(var u=Wa(o),l=Wa(o);o--;)s=u[o]=e[i[o]],l[o]=Sr(s);return Nn(t,i,u,l,n)}function ko(t){return Ao(t)&&t!=+t}function Oo(t){return null==t?!1:ns.call(t)==Q?is.test(Za.call(t)):y(t)&&Pe.test(t)||!1}function Ro(t){return null===t}function Ao(t){return"number"==typeof t||y(t)&&ns.call(t)==J||!1}function Lo(t){return y(t)&&ns.call(t)==ee||!1}function No(t){return"string"==typeof t||y(t)&&ns.call(t)==re||!1}function Io(t){return y(t)&&Dr(t.length)&&Be[ns.call(t)]||!1}function Fo(t){return"undefined"==typeof t}function Uo(t){var e=t?t.length:0;return Dr(e)?e?$e(t):[]:ia(t)}function Wo(t){return fn(t,Qo(t))}function Bo(t,e,n){var r=Us(t);return n&&Er(t,e,n)&&(e=null),e?fn(e,r,tu(e)):r}function Yo(t){if(null==t)return t;var e=$e(arguments);return e.push(ln),Js.apply(S,e)}function jo(t,e,n){return e=vr(e,n,3),En(t,e,Pn,!0)}function zo(t,e,n){return e=vr(e,n,3),En(t,e,kn,!0)}function Vo(t,e,n){return("function"!=typeof e||"undefined"!=typeof n)&&(e=Zn(e,n,3)),Sn(t,e,Qo)}function Ho(t,e,n){return e=Zn(e,n,3),Mn(t,e,Qo)}function Go(t,e,n){return("function"!=typeof e||"undefined"!=typeof n)&&(e=Zn(e,n,3)),Pn(t,e)}function qo(t,e,n){return e=Zn(e,n,3),Mn(t,e,tu)}function Ko(t){return On(t,Qo(t))}function Xo(t,e){return t?ts.call(t,e):!1}function $o(t,e,n){n&&Er(t,e,n)&&(e=null);for(var r=-1,i=tu(t),o=i.length,a={};++r0;++rn?0:+n||0,r))-e.length,n>=0&&t.indexOf(e,n)==n -}function ca(t){return t=u(t),t&&we.test(t)?t.replace(_e,m):t}function ha(t){return t=u(t),t&&Ae.test(t)?t.replace(Re,"\\$&"):t}function pa(t,e,n){t=u(t),e=+e;var r=t.length;if(r>=e||!ws(e))return t;var i=(e-r)/2,o=ls(i),a=ss(i);return n=lr("",a,n),n.slice(0,o)+t+n}function fa(t,e,n){return t=u(t),t&&lr(t,e,n)+t}function da(t,e,n){return t=u(t),t&&t+lr(t,e,n)}function ma(t,e,n){return n&&Er(t,e,n)&&(e=0),Ms(t,e)}function va(t,e){var n="";if(t=u(t),e=+e,1>e||!t||!ws(e))return n;do e%2&&(n+=t),e=ls(e/2),t+=t;while(e);return n}function ga(t,e,n){return t=u(t),n=null==n?0:Es(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function ya(t,n,r){var i=e.templateSettings;r&&Er(t,n,r)&&(n=r=null),t=u(t),n=hn(hn({},r||n),i,cn);var o,a,s=hn(hn({},n.imports),i.imports,cn),l=tu(s),c=Kn(s,l),h=0,p=n.interpolate||Oe,f="__p += '",d=Ga((n.escape||Oe).source+"|"+p.source+"|"+(p===Ee?De:Oe).source+"|"+(n.evaluate||Oe).source+"|$","g"),m="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++We+"]")+"\n";t.replace(d,function(e,n,r,i,s,u){return r||(r=i),f+=t.slice(h,u).replace(Ne,v),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=u+e.length,e}),f+="';\n";var g=n.variable;g||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(me,""):f).replace(ve,"$1").replace(ge,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var y=Da(function(){return ja(l,m+"return "+f).apply(S,c)});if(y.source=f,So(y))throw y;return y}function _a(t,e,n){var r=t;return(t=u(t))?(n?Er(r,e,n):null==e)?t.slice(C(t),x(t)+1):(e+="",t.slice(c(t,e),h(t,e)+1)):t}function ba(t,e,n){var r=t;return t=u(t),t?t.slice((n?Er(r,e,n):null==e)?C(t):c(t,e+"")):t}function wa(t,e,n){var r=t;return t=u(t),t?(n?Er(r,e,n):null==e)?t.slice(0,x(t)+1):t.slice(0,h(t,e+"")+1):t}function Ca(t,e,n){n&&Er(t,e,n)&&(e=null);var r=F,i=U;if(null!=e)if(To(e)){var o="separator"in e?e.separator:o;r="length"in e?+e.length||0:r,i="omission"in e?u(e.omission):i}else r=+e||0;if(t=u(t),r>=t.length)return t;var a=r-i.length;if(1>a)return i;var s=t.slice(0,a);if(null==o)return s+i;if(Lo(o)){if(t.slice(a).search(o)){var l,c,h=t.slice(0,a);for(o.global||(o=Ga(o.source,(Se.exec(o)||"")+"g")),o.lastIndex=0;l=o.exec(h);)c=l.index;s=s.slice(0,null==c?a:c)}}else if(t.indexOf(o,a)!=a){var p=s.lastIndexOf(o);p>-1&&(s=s.slice(0,p))}return s+i}function xa(t){return t=u(t),t&&be.test(t)?t.replace(ye,E):t}function Ea(t,e,n){return n&&Er(t,e,n)&&(e=null),t=u(t),t.match(e||Ie)||[]}function Da(t){try{return t.apply(S,Hn(arguments,1))}catch(e){return So(e)?e:new Ya(e)}}function Sa(t,e,n){return n&&Er(t,e,n)&&(e=null),y(t)?Pa(t):mn(t,e)}function Ma(t){return function(){return t}}function Ta(t){return t}function Pa(t){return Fn(vn(t,!0))}function ka(t,e){return Un(t+"",vn(e,!0))}function Oa(t,e,n){if(null==n){var r=To(e),i=r&&tu(e),o=i&&i.length&&On(e,i);(o?o.length:r)||(o=!1,n=e,e=t,t=this)}o||(o=On(e,tu(e)));var a=!0,s=-1,u=Mo(t),l=o.length;n===!1?a=!1:To(n)&&"chain"in n&&(a=n.chain);for(;++st||!ws(t))return[];var r=-1,i=Wa(Es(t,Os));for(e=Zn(e,n,1);++rr?i[r]=e(r):e(r);return i}function Ua(t){var e=++es;return u(t)+e}t=t?Ze.defaults(Ke.Object(),t,Ze.pick(Ke,Ue)):Ke;var Wa=t.Array,Ba=t.Date,Ya=t.Error,ja=t.Function,za=t.Math,Va=t.Number,Ha=t.Object,Ga=t.RegExp,qa=t.String,Ka=t.TypeError,Xa=Wa.prototype,$a=Ha.prototype,Qa=(Qa=t.window)&&Qa.document,Za=ja.prototype.toString,Ja=Yn("length"),ts=$a.hasOwnProperty,es=0,ns=$a.toString,rs=t._,is=Ga("^"+ha(ns).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),os=Oo(os=t.ArrayBuffer)&&os,as=Oo(as=os&&new os(0).slice)&&as,ss=za.ceil,us=t.clearTimeout,ls=za.floor,cs=Oo(cs=Ha.getPrototypeOf)&&cs,hs=Xa.push,ps=$a.propertyIsEnumerable,fs=Oo(fs=t.Set)&&fs,ds=t.setTimeout,ms=Xa.splice,vs=Oo(vs=t.Uint8Array)&&vs,gs=Oo(gs=t.WeakMap)&&gs,ys=function(){try{var e=Oo(e=t.Float64Array)&&e,n=new e(new os(10),0,1)&&e}catch(r){}return n}(),_s=Oo(_s=Wa.isArray)&&_s,bs=Oo(bs=Ha.create)&&bs,ws=t.isFinite,Cs=Oo(Cs=Ha.keys)&&Cs,xs=za.max,Es=za.min,Ds=Oo(Ds=Ba.now)&&Ds,Ss=Oo(Ss=Va.isFinite)&&Ss,Ms=t.parseInt,Ts=za.random,Ps=Va.NEGATIVE_INFINITY,ks=Va.POSITIVE_INFINITY,Os=za.pow(2,32)-1,Rs=Os-1,As=Os>>>1,Ls=ys?ys.BYTES_PER_ELEMENT:0,Ns=za.pow(2,53)-1,Is=gs&&new gs,Fs=e.support={};!function(){Fs.funcDecomp=!Oo(t.WinRTError)&&Le.test(D),Fs.funcNames="string"==typeof ja.name;try{Fs.dom=11===Qa.createDocumentFragment().nodeType}catch(e){Fs.dom=!1}try{Fs.nonEnumArgs=!ps.call(arguments,1)}catch(e){Fs.nonEnumArgs=!0}}(0,0),e.templateSettings={escape:Ce,evaluate:xe,interpolate:Ee,variable:"",imports:{_:e}};var Us=function(){function e(){}return function(n){if(To(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}(),Ws=Is?function(t,e){return Is.set(t,e),t}:Ta;as||(Jn=os&&vs?function(t){var e=t.byteLength,n=ys?ls(e/Ls):0,r=n*Ls,i=new os(e);if(n){var o=new ys(i,0,n);o.set(new ys(t,0,n))}return e!=r&&(o=new vs(i,r),o.set(new vs(t,r))),i}:Ma(null));var Bs=bs&&fs?function(t){return new Ge(t)}:Ma(null),Ys=Is?function(t){return Is.get(t)}:Aa,js=function(){var t=0,e=0;return function(n,r){var i=Xs(),o=B-(i-e);if(e=i,o>0){if(++t>=W)return n}else t=0;return Ws(n,r)}}(),zs=nr(function(t,e,n){ts.call(t,n)?++t[n]:t[n]=1}),Vs=nr(function(t,e,n){ts.call(t,n)?t[n].push(e):t[n]=[e]}),Hs=nr(function(t,e,n){t[n]=e}),Gs=sr(rn),qs=sr(on,!0),Ks=nr(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Xs=Ds||function(){return(new Ba).getTime()},$s=_s||function(t){return y(t)&&Dr(t.length)&&ns.call(t)==q||!1};Fs.dom||(xo=function(t){return t&&1===t.nodeType&&y(t)&&!Zs(t)||!1});var Qs=Ss||function(t){return"number"==typeof t&&ws(t)};(Mo(/x/)||vs&&!Mo(vs))&&(Mo=function(t){return ns.call(t)==Q});var Zs=cs?function(t){if(!t||ns.call(t)!=te)return!1;var e=t.valueOf,n=Oo(e)&&(n=cs(e))&&cs(n);return n?t==n||cs(t)==n:Or(t)}:Or,Js=rr(hn),tu=Cs?function(t){if(t)var e=t.constructor,n=t.length;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&n&&Dr(n)?Rr(t):To(t)?Cs(t):[]}:Rr,eu=rr(Wn),nu=or(function(t,e,n){return e=e.toLowerCase(),t+(n?e.charAt(0).toUpperCase()+e.slice(1):e)}),ru=or(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()});8!=Ms(Fe+"08")&&(ma=function(t,e,n){return(n?Er(t,e,n):null==e)?e=0:e&&(e=+e),t=_a(t),Ms(t,e||(Te.test(t)?16:10))});var iu=or(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),ou=or(function(t,e,n){return t+(n?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))});return n.prototype=Us(e.prototype),r.prototype=Us(n.prototype),r.prototype.constructor=r,ne.prototype["delete"]=ie,ne.prototype.get=ze,ne.prototype.has=Ve,ne.prototype.set=He,Ge.prototype.push=Xe,uo.Cache=ne,e.after=Xi,e.ary=$i,e.assign=Js,e.at=Mi,e.before=Qi,e.bind=Zi,e.bindAll=Ji,e.bindKey=to,e.callback=Sa,e.chain=yi,e.chunk=Ir,e.compact=Fr,e.constant=Ma,e.countBy=zs,e.create=Bo,e.curry=eo,e.curryRight=no,e.debounce=ro,e.defaults=Yo,e.defer=io,e.delay=oo,e.difference=Ur,e.drop=Wr,e.dropRight=Br,e.dropRightWhile=Yr,e.dropWhile=jr,e.fill=zr,e.filter=ki,e.flatten=qr,e.flattenDeep=Kr,e.flow=ao,e.flowRight=so,e.forEach=Li,e.forEachRight=Ni,e.forIn=Vo,e.forInRight=Ho,e.forOwn=Go,e.forOwnRight=qo,e.functions=Ko,e.groupBy=Vs,e.indexBy=Hs,e.initial=$r,e.intersection=Qr,e.invert=$o,e.invoke=Ii,e.keys=tu,e.keysIn=Qo,e.map=Fi,e.mapValues=Zo,e.matches=Pa,e.matchesProperty=ka,e.memoize=uo,e.merge=eu,e.mixin=Oa,e.negate=lo,e.omit=Jo,e.once=co,e.pairs=ta,e.partial=ho,e.partialRight=po,e.partition=Ks,e.pick=ea,e.pluck=Ui,e.property=La,e.propertyOf=Na,e.pull=ti,e.pullAt=ei,e.range=Ia,e.rearg=fo,e.reject=Yi,e.remove=ni,e.rest=ri,e.shuffle=zi,e.slice=ii,e.sortBy=Gi,e.sortByAll=qi,e.spread=mo,e.take=si,e.takeRight=ui,e.takeRightWhile=li,e.takeWhile=ci,e.tap=_i,e.throttle=vo,e.thru=bi,e.times=Fa,e.toArray=Uo,e.toPlainObject=Wo,e.transform=ra,e.union=hi,e.uniq=pi,e.unzip=fi,e.values=ia,e.valuesIn=oa,e.where=Ki,e.without=di,e.wrap=go,e.xor=mi,e.zip=vi,e.zipObject=gi,e.backflow=so,e.collect=Fi,e.compose=so,e.each=Li,e.eachRight=Ni,e.extend=Js,e.iteratee=Sa,e.methods=Ko,e.object=gi,e.select=ki,e.tail=ri,e.unique=pi,Oa(e,e),e.attempt=Da,e.camelCase=nu,e.capitalize=sa,e.clone=yo,e.cloneDeep=_o,e.deburr=ua,e.endsWith=la,e.escape=ca,e.escapeRegExp=ha,e.every=Pi,e.find=Oi,e.findIndex=Vr,e.findKey=jo,e.findLast=Ri,e.findLastIndex=Hr,e.findLastKey=zo,e.findWhere=Ai,e.first=Gr,e.has=Xo,e.identity=Ta,e.includes=Ti,e.indexOf=Xr,e.isArguments=bo,e.isArray=$s,e.isBoolean=wo,e.isDate=Co,e.isElement=xo,e.isEmpty=Eo,e.isEqual=Do,e.isError=So,e.isFinite=Qs,e.isFunction=Mo,e.isMatch=Po,e.isNaN=ko,e.isNative=Oo,e.isNull=Ro,e.isNumber=Ao,e.isObject=To,e.isPlainObject=Zs,e.isRegExp=Lo,e.isString=No,e.isTypedArray=Io,e.isUndefined=Fo,e.kebabCase=ru,e.last=Zr,e.lastIndexOf=Jr,e.max=Gs,e.min=qs,e.noConflict=Ra,e.noop=Aa,e.now=Xs,e.pad=pa,e.padLeft=fa,e.padRight=da,e.parseInt=ma,e.random=aa,e.reduce=Wi,e.reduceRight=Bi,e.repeat=va,e.result=na,e.runInContext=D,e.size=Vi,e.snakeCase=iu,e.some=Hi,e.sortedIndex=oi,e.sortedLastIndex=ai,e.startCase=ou,e.startsWith=ga,e.template=ya,e.trim=_a,e.trimLeft=ba,e.trimRight=wa,e.trunc=Ca,e.unescape=xa,e.uniqueId=Ua,e.words=Ea,e.all=Pi,e.any=Hi,e.contains=Ti,e.detect=Oi,e.foldl=Wi,e.foldr=Bi,e.head=Gr,e.include=Ti,e.inject=Wi,Oa(e,function(){var t={};return Pn(e,function(n,r){e.prototype[r]||(t[r]=n)}),t}(),!1),e.sample=ji,e.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return ji(e,t)}):ji(this.value())},e.VERSION=M,Qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),Qe(["filter","map","takeWhile"],function(t,e){var n=e==Y,i=e==z;r.prototype[t]=function(t,r){var o=this.clone(),a=o.__filtered__,s=o.__iteratees__||(o.__iteratees__=[]);return o.__filtered__=a||n||i&&o.__dir__<0,s.push({iteratee:vr(t,r,3),type:e}),o}}),Qe(["drop","take"],function(t,e){var n="__"+t+"Count__",i=t+"While";r.prototype[t]=function(r){r=null==r?1:xs(ls(r)||0,0);var i=this.clone();if(i.__filtered__){var o=i[n];i[n]=e?Es(o,r):o+r}else{var a=i.__views__||(i.__views__=[]);a.push({size:r,type:t+(i.__dir__<0?"Right":"")})}return i},r.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()},r.prototype[t+"RightWhile"]=function(t,e){return this.reverse()[i](t,e).reverse()}}),Qe(["first","last"],function(t,e){var n="take"+(e?"Right":"");r.prototype[t]=function(){return this[n](1).value()[0]}}),Qe(["initial","rest"],function(t,e){var n="drop"+(e?"":"Right");r.prototype[t]=function(){return this[n](1)}}),Qe(["pluck","where"],function(t,e){var n=e?"filter":"map",i=e?Fn:Yn;r.prototype[t]=function(t){return this[n](i(t))}}),r.prototype.compact=function(){return this.filter(Ta)},r.prototype.dropWhile=function(t,e){var n;return t=vr(t,e,3),this.filter(function(e,r,i){return n||(n=!t(e,r,i))})},r.prototype.reject=function(t,e){return t=vr(t,e,3),this.filter(function(e,n,r){return!t(e,n,r)})},r.prototype.slice=function(t,e){t=null==t?0:+t||0;var n=0>t?this.takeRight(-t):this.drop(t);return"undefined"!=typeof e&&(e=+e||0,n=0>e?n.dropRight(-e):n.take(e-t)),n},r.prototype.toArray=function(){return this.drop(0)},Pn(r.prototype,function(t,i){var o=e[i],a=/^(?:first|last)$/.test(i);e.prototype[i]=function(){var i=this.__wrapped__,s=arguments,u=this.__chain__,l=!!this.__actions__.length,c=i instanceof r,h=c&&!l;if(a&&!u)return h?t.call(i):o.call(e,this.value());var p=function(t){var n=[t];return hs.apply(n,s),o.apply(e,n)};if(c||$s(i)){var f=h?i:new r(this),d=t.apply(f,s);if(!a&&(l||d.__actions__)){var m=d.__actions__||(d.__actions__=[]);m.push({func:bi,args:[p],thisArg:e})}return new n(d,u)}return this.thru(p)}}),Qe(["concat","join","pop","push","shift","sort","splice","unshift"],function(t){var n=Xa[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?n.apply(this.value(),t):this[r](function(e){return n.apply(e,t)})}}),r.prototype.clone=i,r.prototype.reverse=_,r.prototype.value=Z,e.prototype.chain=wi,e.prototype.commit=Ci,e.prototype.plant=xi,e.prototype.reverse=Ei,e.prototype.toString=Di,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=Si,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var S,M="3.2.0",T=1,P=2,k=4,O=8,R=16,A=32,L=64,N=128,I=256,F=30,U="...",W=150,B=16,Y=0,j=1,z=2,V="Expected a function",H="__lodash_placeholder__",G="[object Arguments]",q="[object Array]",K="[object Boolean]",X="[object Date]",$="[object Error]",Q="[object Function]",Z="[object Map]",J="[object Number]",te="[object Object]",ee="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object WeakMap]",oe="[object ArrayBuffer]",ae="[object Float32Array]",se="[object Float64Array]",ue="[object Int8Array]",le="[object Int16Array]",ce="[object Int32Array]",he="[object Uint8Array]",pe="[object Uint8ClampedArray]",fe="[object Uint16Array]",de="[object Uint32Array]",me=/\b__p \+= '';/g,ve=/\b(__p \+=) '' \+/g,ge=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ye=/&(?:amp|lt|gt|quot|#39|#96);/g,_e=/[&<>"'`]/g,be=RegExp(ye.source),we=RegExp(_e.source),Ce=/<%-([\s\S]+?)%>/g,xe=/<%([\s\S]+?)%>/g,Ee=/<%=([\s\S]+?)%>/g,De=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Se=/\w*$/,Me=/^\s*function[ \n\r\t]+\w/,Te=/^0[xX]/,Pe=/^\[object .+?Constructor\]$/,ke=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Oe=/($^)/,Re=/[.*+?^${}()|[\]\/\\]/g,Ae=RegExp(Re.source),Le=/\bthis\b/,Ne=/['\n\r\u2028\u2029\\]/g,Ie=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"{2,}(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Fe=" \f \n\r\u2028\u2029 ᠎              ",Ue=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window","WinRTError"],We=-1,Be={};Be[ae]=Be[se]=Be[ue]=Be[le]=Be[ce]=Be[he]=Be[pe]=Be[fe]=Be[de]=!0,Be[G]=Be[q]=Be[oe]=Be[K]=Be[X]=Be[$]=Be[Q]=Be[Z]=Be[J]=Be[te]=Be[ee]=Be[ne]=Be[re]=Be[ie]=!1;var Ye={};Ye[G]=Ye[q]=Ye[oe]=Ye[K]=Ye[X]=Ye[ae]=Ye[se]=Ye[ue]=Ye[le]=Ye[ce]=Ye[J]=Ye[te]=Ye[ee]=Ye[re]=Ye[he]=Ye[pe]=Ye[fe]=Ye[de]=!0,Ye[$]=Ye[Q]=Ye[Z]=Ye[ne]=Ye[ie]=!1;var je={leading:!1,maxWait:0,trailing:!1},ze={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ve={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},He={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ge={"function":!0,object:!0},qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ke=Ge[typeof window]&&window!==(this&&this.window)?window:this,Xe=Ge[typeof e]&&e&&!e.nodeType&&e,$e=Ge[typeof t]&&t&&!t.nodeType&&t,Qe=Xe&&$e&&"object"==typeof i&&i;!Qe||Qe.global!==Qe&&Qe.window!==Qe&&Qe.self!==Qe||(Ke=Qe);var Ze=($e&&$e.exports===Xe&&Xe,D());Ke._=Ze,r=function(){return Ze}.call(e,n,e,t),!(r!==S&&(t.exports=r))}).call(this)}).call(e,n(/*! (webpack)/buildin/module.js */57)(t),function(){return this}())},/*!**********************************!*\ - !*** ./~/react-chartjs/index.js ***! - \**********************************/ -function(t,e,n){t.exports={Bar:n(/*! ./lib/bar */119),Doughnut:n(/*! ./lib/doughnut */120),Line:n(/*! ./lib/line */121),Pie:n(/*! ./lib/pie */122),PolarArea:n(/*! ./lib/polar-area */123),Radar:n(/*! ./lib/radar */124)}},/*!************************************!*\ - !*** ./~/react-chartjs/lib/bar.js ***! - \************************************/ -function(t,e,n){var r=n(/*! ./core */20);t.exports=r.createClass("Bar",["getBarsAtEvent"])},/*!*****************************************!*\ - !*** ./~/react-chartjs/lib/doughnut.js ***! - \*****************************************/ -function(t,e,n){var r=n(/*! ./core */20);t.exports=r.createClass("Doughnut",["getSegmentsAtEvent"])},/*!*************************************!*\ - !*** ./~/react-chartjs/lib/line.js ***! - \*************************************/ -function(t,e,n){var r=n(/*! ./core */20);t.exports=r.createClass("Line",["getPointsAtEvent"])},/*!************************************!*\ - !*** ./~/react-chartjs/lib/pie.js ***! - \************************************/ -function(t,e,n){var r=n(/*! ./core */20);t.exports=r.createClass("Pie",["getSegmentsAtEvent"])},/*!*******************************************!*\ - !*** ./~/react-chartjs/lib/polar-area.js ***! - \*******************************************/ -function(t,e,n){var r=n(/*! ./core */20);t.exports=r.createClass("PolarArea",["getSegmentsAtEvent"])},/*!**************************************!*\ - !*** ./~/react-chartjs/lib/radar.js ***! - \**************************************/ -function(t,e,n){var r=n(/*! ./core */20);t.exports=r.createClass("Radar",["getPointsAtEvent"])},/*!***********************************************!*\ - !*** ./~/react/lib/BeforeInputEventPlugin.js ***! - \***********************************************/ -function(t,e,n){"use strict";function r(){var t=window.opera;return"object"==typeof t&&"function"==typeof t.version&&parseInt(t.version(),10)<=12}function i(t){return(t.ctrlKey||t.altKey||t.metaKey)&&!(t.ctrlKey&&t.altKey)}var o=n(/*! ./EventConstants */6),a=n(/*! ./EventPropagators */23),s=n(/*! ./ExecutionEnvironment */5),u=n(/*! ./SyntheticInputEvent */173),l=n(/*! ./keyOf */7),c=s.canUseDOM&&"TextEvent"in window&&!("documentMode"in document||r()),h=32,p=String.fromCharCode(h),f=o.topLevelTypes,d={beforeInput:{phasedRegistrationNames:{bubbled:l({onBeforeInput:null}),captured:l({onBeforeInputCapture:null})},dependencies:[f.topCompositionEnd,f.topKeyPress,f.topTextInput,f.topPaste]}},m=null,v=!1,g={eventTypes:d,extractEvents:function(t,e,n,r){var o;if(c)switch(t){case f.topKeyPress:var s=r.which;if(s!==h)return;v=!0,o=p;break;case f.topTextInput:if(o=r.data,o===p&&v)return;break;default:return}else{switch(t){case f.topPaste:m=null;break;case f.topKeyPress:r.which&&!i(r)&&(m=String.fromCharCode(r.which));break;case f.topCompositionEnd:m=r.data}if(null===m)return;o=m}if(o){var l=u.getPooled(d.beforeInput,n,r);return l.data=o,m=null,a.accumulateTwoPhaseDispatches(l),l}}};t.exports=g},/*!********************************!*\ - !*** ./~/react/lib/CSSCore.js ***! - \********************************/ -function(t,e,n){var r=n(/*! ./invariant */1),i={addClass:function(t,e){return r(!/\s/.test(e)),e&&(t.classList?t.classList.add(e):i.hasClass(t,e)||(t.className=t.className+" "+e)),t},removeClass:function(t,e){return r(!/\s/.test(e)),e&&(t.classList?t.classList.remove(e):i.hasClass(t,e)&&(t.className=t.className.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),t},conditionClass:function(t,e,n){return(n?i.addClass:i.removeClass)(t,e)},hasClass:function(t,e){return r(!/\s/.test(e)),t.classList?!!e&&t.classList.contains(e):(" "+t.className+" ").indexOf(" "+e+" ")>-1}};t.exports=i},/*!******************************************!*\ - !*** ./~/react/lib/ChangeEventPlugin.js ***! - \******************************************/ -function(t,e,n){"use strict";function r(t){return"SELECT"===t.nodeName||"INPUT"===t.nodeName&&"file"===t.type}function i(t){var e=x.getPooled(T.change,k,t);b.accumulateTwoPhaseDispatches(e),C.batchedUpdates(o,e)}function o(t){_.enqueueEvents(t),_.processEventQueue()}function a(t,e){P=t,k=e,P.attachEvent("onchange",i)}function s(){P&&(P.detachEvent("onchange",i),P=null,k=null)}function u(t,e,n){return t===M.topChange?n:void 0}function l(t,e,n){t===M.topFocus?(s(),a(e,n)):t===M.topBlur&&s()}function c(t,e){P=t,k=e,O=t.value,R=Object.getOwnPropertyDescriptor(t.constructor.prototype,"value"),Object.defineProperty(P,"value",N),P.attachEvent("onpropertychange",p)}function h(){P&&(delete P.value,P.detachEvent("onpropertychange",p),P=null,k=null,O=null,R=null)}function p(t){if("value"===t.propertyName){var e=t.srcElement.value;e!==O&&(O=e,i(t))}}function f(t,e,n){return t===M.topInput?n:void 0}function d(t,e,n){t===M.topFocus?(h(),c(e,n)):t===M.topBlur&&h()}function m(t){return t!==M.topSelectionChange&&t!==M.topKeyUp&&t!==M.topKeyDown||!P||P.value===O?void 0:(O=P.value,k)}function v(t){return"INPUT"===t.nodeName&&("checkbox"===t.type||"radio"===t.type)}function g(t,e,n){return t===M.topClick?n:void 0}var y=n(/*! ./EventConstants */6),_=n(/*! ./EventPluginHub */29),b=n(/*! ./EventPropagators */23),w=n(/*! ./ExecutionEnvironment */5),C=n(/*! ./ReactUpdates */9),x=n(/*! ./SyntheticEvent */19),E=n(/*! ./isEventSupported */55),D=n(/*! ./isTextInputElement */91),S=n(/*! ./keyOf */7),M=y.topLevelTypes,T={change:{phasedRegistrationNames:{bubbled:S({onChange:null}),captured:S({onChangeCapture:null})},dependencies:[M.topBlur,M.topChange,M.topClick,M.topFocus,M.topInput,M.topKeyDown,M.topKeyUp,M.topSelectionChange]}},P=null,k=null,O=null,R=null,A=!1;w.canUseDOM&&(A=E("change")&&(!("documentMode"in document)||document.documentMode>8));var L=!1;w.canUseDOM&&(L=E("input")&&(!("documentMode"in document)||document.documentMode>9));var N={get:function(){return R.get.call(this)},set:function(t){O=""+t,R.set.call(this,t)}},I={eventTypes:T,extractEvents:function(t,e,n,i){var o,a;if(r(e)?A?o=u:a=l:D(e)?L?o=f:(o=m,a=d):v(e)&&(o=g),o){var s=o(t,e,n);if(s){var c=x.getPooled(T.change,s,i);return b.accumulateTwoPhaseDispatches(c),c}}a&&a(t,e,n)}};t.exports=I},/*!*********************************************!*\ - !*** ./~/react/lib/ClientReactRootIndex.js ***! - \*********************************************/ -function(t){"use strict";var e=0,n={createReactRootIndex:function(){return e++}};t.exports=n},/*!***********************************************!*\ - !*** ./~/react/lib/CompositionEventPlugin.js ***! - \***********************************************/ -function(t,e,n){"use strict";function r(t){switch(t){case y.topCompositionStart:return b.compositionStart;case y.topCompositionEnd:return b.compositionEnd;case y.topCompositionUpdate:return b.compositionUpdate}}function i(t,e){return t===y.topKeyDown&&e.keyCode===m}function o(t,e){switch(t){case y.topKeyUp:return-1!==d.indexOf(e.keyCode);case y.topKeyDown:return e.keyCode!==m;case y.topKeyPress:case y.topMouseDown:case y.topBlur:return!0;default:return!1}}function a(t){this.root=t,this.startSelection=c.getSelection(t),this.startValue=this.getText()}var s=n(/*! ./EventConstants */6),u=n(/*! ./EventPropagators */23),l=n(/*! ./ExecutionEnvironment */5),c=n(/*! ./ReactInputSelection */46),h=n(/*! ./SyntheticCompositionEvent */170),p=n(/*! ./getTextContentAccessor */54),f=n(/*! ./keyOf */7),d=[9,13,27,32],m=229,v=l.canUseDOM&&"CompositionEvent"in window,g=!v||"documentMode"in document&&document.documentMode>8&&document.documentMode<=11,y=s.topLevelTypes,_=null,b={compositionEnd:{phasedRegistrationNames:{bubbled:f({onCompositionEnd:null}),captured:f({onCompositionEndCapture:null})},dependencies:[y.topBlur,y.topCompositionEnd,y.topKeyDown,y.topKeyPress,y.topKeyUp,y.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:f({onCompositionStart:null}),captured:f({onCompositionStartCapture:null})},dependencies:[y.topBlur,y.topCompositionStart,y.topKeyDown,y.topKeyPress,y.topKeyUp,y.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:f({onCompositionUpdate:null}),captured:f({onCompositionUpdateCapture:null})},dependencies:[y.topBlur,y.topCompositionUpdate,y.topKeyDown,y.topKeyPress,y.topKeyUp,y.topMouseDown]}};a.prototype.getText=function(){return this.root.value||this.root[p()]},a.prototype.getData=function(){var t=this.getText(),e=this.startSelection.start,n=this.startValue.length-this.startSelection.end;return t.substr(e,t.length-n-e)};var w={eventTypes:b,extractEvents:function(t,e,n,s){var l,c;if(v?l=r(t):_?o(t,s)&&(l=b.compositionEnd):i(t,s)&&(l=b.compositionStart),g&&(_||l!==b.compositionStart?l===b.compositionEnd&&_&&(c=_.getData(),_=null):_=new a(e)),l){var p=h.getPooled(l,n,s);return c&&(p.data=c),u.accumulateTwoPhaseDispatches(p),p}}};t.exports=w},/*!**********************************************!*\ - !*** ./~/react/lib/DOMChildrenOperations.js ***! - \**********************************************/ -function(t,e,n){"use strict";function r(t,e,n){t.insertBefore(e,t.childNodes[n]||null)}var i,o=n(/*! ./Danger */131),a=n(/*! ./ReactMultiChildUpdateTypes */72),s=n(/*! ./getTextContentAccessor */54),u=n(/*! ./invariant */1),l=s();i="textContent"===l?function(t,e){t.textContent=e}:function(t,e){for(;t.firstChild;)t.removeChild(t.firstChild);if(e){var n=t.ownerDocument||document;t.appendChild(n.createTextNode(e))}};var c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:i,processUpdates:function(t,e){for(var n,s=null,l=null,c=0;n=t[c];c++)if(n.type===a.MOVE_EXISTING||n.type===a.REMOVE_NODE){var h=n.fromIndex,p=n.parentNode.childNodes[h],f=n.parentID;u(p),s=s||{},s[f]=s[f]||[],s[f][h]=p,l=l||[],l.push(p)}var d=o.dangerouslyRenderMarkup(e);if(l)for(var m=0;m]+)/,c="data-danger-index",h={dangerouslyRenderMarkup:function(t){u(i.canUseDOM);for(var e,n={},h=0;hl;l++){var f=u[l];if(f!==o&&f.form===o.form){var m=h.getID(f);d(m);var g=v[m];d(g),p.asap(r,g)}}}return e}});t.exports=g},/*!***************************************!*\ - !*** ./~/react/lib/ReactDOMOption.js ***! - \***************************************/ -function(t,e,n){"use strict";var r=n(/*! ./ReactBrowserComponentMixin */12),i=n(/*! ./ReactCompositeComponent */8),o=n(/*! ./ReactElement */3),a=n(/*! ./ReactDOM */15),s=(n(/*! ./warning */4),o.createFactory(a.option.type)),u=i.createClass({displayName:"ReactDOMOption",mixins:[r],componentWillMount:function(){},render:function(){return s(this.props,this.props.children)}});t.exports=u},/*!***************************************!*\ - !*** ./~/react/lib/ReactDOMSelect.js ***! - \***************************************/ -function(t,e,n){"use strict";function r(){this.isMounted()&&(this.setState({value:this._pendingValue}),this._pendingValue=0)}function i(t,e){if(null!=t[e])if(t.multiple){if(!Array.isArray(t[e]))return new Error("The `"+e+"` prop supplied to must be a scalar value if `multiple` is false.")}function o(t,e){var n,r,i,o=t.props.multiple,a=null!=e?e:t.state.value,s=t.getDOMNode().options;if(o)for(n={},r=0,i=a.length;i>r;++r)n[""+a[r]]=!0;else n=""+a;for(r=0,i=s.length;i>r;r++){var u=o?n.hasOwnProperty(s[r].value):s[r].value===n;u!==s[r].selected&&(s[r].selected=u)}}var a=n(/*! ./AutoFocusMixin */35),s=n(/*! ./LinkedValueUtils */43),u=n(/*! ./ReactBrowserComponentMixin */12),l=n(/*! ./ReactCompositeComponent */8),c=n(/*! ./ReactElement */3),h=n(/*! ./ReactDOM */15),p=n(/*! ./ReactUpdates */9),f=n(/*! ./Object.assign */2),d=c.createFactory(h.select.type),m=l.createClass({displayName:"ReactDOMSelect",mixins:[a,s.Mixin,u],propTypes:{defaultValue:i,value:i},getInitialState:function(){return{value:this.props.defaultValue||(this.props.multiple?[]:"")}},componentWillMount:function(){this._pendingValue=null},componentWillReceiveProps:function(t){!this.props.multiple&&t.multiple?this.setState({value:[this.state.value]}):this.props.multiple&&!t.multiple&&this.setState({value:this.state.value[0]})},render:function(){var t=f({},this.props);return t.onChange=this._handleChange,t.value=null,d(t,this.props.children)},componentDidMount:function(){o(this,s.getValue(this))},componentDidUpdate:function(t){var e=s.getValue(this),n=!!t.multiple,r=!!this.props.multiple;(null!=e||n!==r)&&o(this,e)},_handleChange:function(t){var e,n=s.getOnChange(this);n&&(e=n.call(this,t));var i;if(this.props.multiple){i=[];for(var o=t.target.options,a=0,u=o.length;u>a;a++)o[a].selected&&i.push(o[a].value)}else i=t.target.value;return this._pendingValue=i,p.asap(r,this),e}});t.exports=m},/*!******************************************!*\ - !*** ./~/react/lib/ReactDOMSelection.js ***! - \******************************************/ -function(t,e,n){"use strict";function r(t,e,n,r){return t===n&&e===r}function i(t){var e=document.selection,n=e.createRange(),r=n.text.length,i=n.duplicate();i.moveToElementText(t),i.setEndPoint("EndToStart",n);var o=i.text.length,a=o+r;return{start:o,end:a}}function o(t){var e=window.getSelection&&window.getSelection();if(!e||0===e.rangeCount)return null;var n=e.anchorNode,i=e.anchorOffset,o=e.focusNode,a=e.focusOffset,s=e.getRangeAt(0),u=r(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset),l=u?0:s.toString().length,c=s.cloneRange();c.selectNodeContents(t),c.setEnd(s.startContainer,s.startOffset);var h=r(c.startContainer,c.startOffset,c.endContainer,c.endOffset),p=h?0:c.toString().length,f=p+l,d=document.createRange();d.setStart(n,i),d.setEnd(o,a);var m=d.collapsed;return{start:m?f:p,end:m?p:f}}function a(t,e){var n,r,i=document.selection.createRange().duplicate();"undefined"==typeof e.end?(n=e.start,r=n):e.start>e.end?(n=e.end,r=e.start):(n=e.start,r=e.end),i.moveToElementText(t),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(t,e){if(window.getSelection){var n=window.getSelection(),r=t[c()].length,i=Math.min(e.start,r),o="undefined"==typeof e.end?i:Math.min(e.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=l(t,i),u=l(t,o);if(s&&u){var h=document.createRange();h.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(h),n.extend(u.node,u.offset)):(h.setEnd(u.node,u.offset),n.addRange(h))}}}var u=n(/*! ./ExecutionEnvironment */5),l=n(/*! ./getNodeForCharacterOffset */188),c=n(/*! ./getTextContentAccessor */54),h=u.canUseDOM&&document.selection,p={getOffsets:h?i:o,setOffsets:h?a:s};t.exports=p},/*!*****************************************!*\ - !*** ./~/react/lib/ReactDOMTextarea.js ***! - \*****************************************/ -function(t,e,n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var i=n(/*! ./AutoFocusMixin */35),o=n(/*! ./DOMPropertyOperations */22),a=n(/*! ./LinkedValueUtils */43),s=n(/*! ./ReactBrowserComponentMixin */12),u=n(/*! ./ReactCompositeComponent */8),l=n(/*! ./ReactElement */3),c=n(/*! ./ReactDOM */15),h=n(/*! ./ReactUpdates */9),p=n(/*! ./Object.assign */2),f=n(/*! ./invariant */1),d=(n(/*! ./warning */4),l.createFactory(c.textarea.type)),m=u.createClass({displayName:"ReactDOMTextarea",mixins:[i,a.Mixin,s],getInitialState:function(){var t=this.props.defaultValue,e=this.props.children;null!=e&&(f(null==t),Array.isArray(e)&&(f(e.length<=1),e=e[0]),t=""+e),null==t&&(t="");var n=a.getValue(this);return{initialValue:""+(null!=n?n:t)}},render:function(){var t=p({},this.props);return f(null==t.dangerouslySetInnerHTML),t.defaultValue=null,t.value=null,t.onChange=this._handleChange,d(t,this.state.initialValue)},componentDidUpdate:function(){var t=a.getValue(this);if(null!=t){var e=this.getDOMNode();o.setValueForProperty(e,"value",""+t)}},_handleChange:function(t){var e,n=a.getOnChange(this);return n&&(e=n.call(this,t)),h.asap(r,this),e}});t.exports=m},/*!*****************************************************!*\ - !*** ./~/react/lib/ReactDefaultBatchingStrategy.js ***! - \*****************************************************/ -function(t,e,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(/*! ./ReactUpdates */9),o=n(/*! ./Transaction */38),a=n(/*! ./Object.assign */2),s=n(/*! ./emptyFunction */10),u={initialize:s,close:function(){p.isBatchingUpdates=!1}},l={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[l,u];a(r.prototype,o.Mixin,{getTransactionWrappers:function(){return c}});var h=new r,p={isBatchingUpdates:!1,batchedUpdates:function(t,e,n){var r=p.isBatchingUpdates;p.isBatchingUpdates=!0,r?t(e,n):h.perform(t,null,e,n)}};t.exports=p},/*!**********************************************!*\ - !*** ./~/react/lib/ReactDefaultInjection.js ***! - \**********************************************/ -function(t,e,n){"use strict";function r(){D.EventEmitter.injectReactEventListener(E),D.EventPluginHub.injectEventPluginOrder(u),D.EventPluginHub.injectInstanceHandle(S),D.EventPluginHub.injectMount(M),D.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:k,EnterLeaveEventPlugin:l,ChangeEventPlugin:o,CompositionEventPlugin:s,MobileSafariClickEventPlugin:p,SelectEventPlugin:T,BeforeInputEventPlugin:i}),D.NativeComponent.injectGenericComponentClass(v),D.NativeComponent.injectComponentClasses({button:g,form:y,img:_,input:b,option:w,select:C,textarea:x,html:R("html"),head:R("head"),body:R("body")}),D.CompositeComponent.injectMixin(f),D.DOMProperty.injectDOMPropertyConfig(h),D.DOMProperty.injectDOMPropertyConfig(O),D.EmptyComponent.injectEmptyComponent("noscript"),D.Updates.injectReconcileTransaction(d.ReactReconcileTransaction),D.Updates.injectBatchingStrategy(m),D.RootIndex.injectCreateReactRootIndex(c.canUseDOM?a.createReactRootIndex:P.createReactRootIndex),D.Component.injectEnvironment(d)}var i=n(/*! ./BeforeInputEventPlugin */125),o=n(/*! ./ChangeEventPlugin */127),a=n(/*! ./ClientReactRootIndex */128),s=n(/*! ./CompositionEventPlugin */129),u=n(/*! ./DefaultEventPluginOrder */132),l=n(/*! ./EnterLeaveEventPlugin */133),c=n(/*! ./ExecutionEnvironment */5),h=n(/*! ./HTMLDOMPropertyConfig */135),p=n(/*! ./MobileSafariClickEventPlugin */137),f=n(/*! ./ReactBrowserComponentMixin */12),d=n(/*! ./ReactComponentBrowserEnvironment */140),m=n(/*! ./ReactDefaultBatchingStrategy */151),v=n(/*! ./ReactDOMComponent */69),g=n(/*! ./ReactDOMButton */142),y=n(/*! ./ReactDOMForm */143),_=n(/*! ./ReactDOMImg */145),b=n(/*! ./ReactDOMInput */146),w=n(/*! ./ReactDOMOption */147),C=n(/*! ./ReactDOMSelect */148),x=n(/*! ./ReactDOMTextarea */150),E=n(/*! ./ReactEventListener */155),D=n(/*! ./ReactInjection */156),S=n(/*! ./ReactInstanceHandles */27),M=n(/*! ./ReactMount */13),T=n(/*! ./SelectEventPlugin */166),P=n(/*! ./ServerReactRootIndex */167),k=n(/*! ./SimpleEventPlugin */168),O=n(/*! ./SVGDOMPropertyConfig */165),R=n(/*! ./createFullPageComponent */181);t.exports={inject:r}},/*!****************************************!*\ - !*** ./~/react/lib/ReactErrorUtils.js ***! - \****************************************/ -function(t){"use strict";var e={guard:function(t){return t}};t.exports=e},/*!***********************************************!*\ - !*** ./~/react/lib/ReactEventEmitterMixin.js ***! - \***********************************************/ -function(t,e,n){"use strict";function r(t){i.enqueueEvents(t),i.processEventQueue()}var i=n(/*! ./EventPluginHub */29),o={handleTopLevel:function(t,e,n,o){var a=i.extractEvents(t,e,n,o);r(a)}};t.exports=o},/*!*******************************************!*\ - !*** ./~/react/lib/ReactEventListener.js ***! - \*******************************************/ -function(t,e,n){"use strict";function r(t){var e=h.getID(t),n=c.getReactRootIDFromNodeID(e),r=h.findReactContainerForID(n),i=h.getFirstReactDOM(r);return i}function i(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function o(t){for(var e=h.getFirstReactDOM(d(t.nativeEvent))||window,n=e;n;)t.ancestors.push(n),n=r(n);for(var i=0,o=t.ancestors.length;o>i;i++){e=t.ancestors[i];var a=h.getID(e)||"";v._handleTopLevel(t.topLevelType,e,a,t.nativeEvent)}}function a(t){var e=m(window);t(e)}var s=n(/*! ./EventListener */134),u=n(/*! ./ExecutionEnvironment */5),l=n(/*! ./PooledClass */14),c=n(/*! ./ReactInstanceHandles */27),h=n(/*! ./ReactMount */13),p=n(/*! ./ReactUpdates */9),f=n(/*! ./Object.assign */2),d=n(/*! ./getEventTarget */53),m=n(/*! ./getUnboundedScrollPosition */90);f(i.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(i,l.twoArgumentPooler);var v={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(t){v._handleTopLevel=t},setEnabled:function(t){v._enabled=!!t},isEnabled:function(){return v._enabled},trapBubbledEvent:function(t,e,n){var r=n;return r?s.listen(r,e,v.dispatchEvent.bind(null,t)):void 0},trapCapturedEvent:function(t,e,n){var r=n;return r?s.capture(r,e,v.dispatchEvent.bind(null,t)):void 0},monitorScrollValue:function(t){var e=a.bind(null,t);s.listen(window,"scroll",e),s.listen(window,"resize",e)},dispatchEvent:function(t,e){if(v._enabled){var n=i.getPooled(t,e);try{p.batchedUpdates(o,n)}finally{i.release(n)}}}};t.exports=v},/*!***************************************!*\ - !*** ./~/react/lib/ReactInjection.js ***! - \***************************************/ -function(t,e,n){"use strict";var r=n(/*! ./DOMProperty */21),i=n(/*! ./EventPluginHub */29),o=n(/*! ./ReactComponent */26),a=n(/*! ./ReactCompositeComponent */8),s=n(/*! ./ReactEmptyComponent */36),u=n(/*! ./ReactBrowserEventEmitter */25),l=n(/*! ./ReactNativeComponent */73),c=n(/*! ./ReactPerf */16),h=n(/*! ./ReactRootIndex */80),p=n(/*! ./ReactUpdates */9),f={Component:o.injection,CompositeComponent:a.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:i.injection,EventEmitter:u.injection,NativeComponent:l.injection,Perf:c.injection,RootIndex:h.injection,Updates:p.injection};t.exports=f},/*!**********************************!*\ - !*** ./~/react/lib/ReactLink.js ***! - \**********************************/ -function(t,e,n){"use strict";function r(t,e){this.value=t,this.requestChange=e}function i(t){var e={value:"undefined"==typeof t?o.PropTypes.any.isRequired:t.isRequired,requestChange:o.PropTypes.func.isRequired};return o.PropTypes.shape(e)}var o=n(/*! ./React */24);r.PropTypes={link:i},t.exports=r},/*!**************************************************!*\ - !*** ./~/react/lib/ReactReconcileTransaction.js ***! - \**************************************************/ -function(t,e,n){"use strict";function r(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.putListenerQueue=u.getPooled()}var i=n(/*! ./CallbackQueue */41),o=n(/*! ./PooledClass */14),a=n(/*! ./ReactBrowserEventEmitter */25),s=n(/*! ./ReactInputSelection */46),u=n(/*! ./ReactPutListenerQueue */79),l=n(/*! ./Transaction */38),c=n(/*! ./Object.assign */2),h={initialize:s.getSelectionInformation,close:s.restoreSelection},p={initialize:function(){var t=a.isEnabled();return a.setEnabled(!1),t},close:function(t){a.setEnabled(t)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},d={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},m=[d,h,p,f],v={getTransactionWrappers:function(){return m},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null,u.release(this.putListenerQueue),this.putListenerQueue=null}};c(r.prototype,l.Mixin,v),o.addPoolingTo(r),t.exports=r},/*!*********************************************!*\ - !*** ./~/react/lib/ReactServerRendering.js ***! - \*********************************************/ -function(t,e,n){"use strict";function r(t){c(o.isValidElement(t));var e;try{var n=a.createReactRootID();return e=u.getPooled(!1),e.perform(function(){var r=l(t,null),i=r.mountComponent(n,e,0);return s.addChecksumToMarkup(i)},null)}finally{u.release(e)}}function i(t){c(o.isValidElement(t));var e;try{var n=a.createReactRootID();return e=u.getPooled(!0),e.perform(function(){var r=l(t,null);return r.mountComponent(n,e,0)},null)}finally{u.release(e)}}var o=n(/*! ./ReactElement */3),a=n(/*! ./ReactInstanceHandles */27),s=n(/*! ./ReactMarkupChecksum */70),u=n(/*! ./ReactServerRenderingTransaction */160),l=n(/*! ./instantiateReactComponent */39),c=n(/*! ./invariant */1);t.exports={renderToString:r,renderToStaticMarkup:i}},/*!********************************************************!*\ - !*** ./~/react/lib/ReactServerRenderingTransaction.js ***! - \********************************************************/ -function(t,e,n){"use strict";function r(t){this.reinitializeTransaction(),this.renderToStaticMarkup=t,this.reactMountReady=o.getPooled(null),this.putListenerQueue=a.getPooled()}var i=n(/*! ./PooledClass */14),o=n(/*! ./CallbackQueue */41),a=n(/*! ./ReactPutListenerQueue */79),s=n(/*! ./Transaction */38),u=n(/*! ./Object.assign */2),l=n(/*! ./emptyFunction */10),c={initialize:function(){this.reactMountReady.reset()},close:l},h={initialize:function(){this.putListenerQueue.reset()},close:l},p=[h,c],f={getTransactionWrappers:function(){return p},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null,a.release(this.putListenerQueue),this.putListenerQueue=null}};u(r.prototype,s.Mixin,f),i.addPoolingTo(r),t.exports=r},/*!******************************************!*\ - !*** ./~/react/lib/ReactStateSetters.js ***! - \******************************************/ -function(t){"use strict";function e(t,e){var n={};return function(r){n[e]=r,t.setState(n)}}var n={createStateSetter:function(t,e){return function(n,r,i,o,a,s){var u=e.call(t,n,r,i,o,a,s);u&&t.setState(u)}},createStateKeySetter:function(t,n){var r=t.__keySetters||(t.__keySetters={});return r[n]||(r[n]=e(t,n))}};n.Mixin={createStateSetter:function(t){return n.createStateSetter(this,t)},createStateKeySetter:function(t){return n.createStateKeySetter(this,t)}},t.exports=n},/*!****************************************************!*\ - !*** ./~/react/lib/ReactTransitionChildMapping.js ***! - \****************************************************/ -function(t,e,n){"use strict";var r=n(/*! ./ReactChildren */68),i={getChildMapping:function(t){return r.map(t,function(t){return t})},mergeChildMappings:function(t,e){function n(n){return e.hasOwnProperty(n)?e[n]:t[n]}t=t||{},e=e||{};var r={},i=[];for(var o in t)e.hasOwnProperty(o)?i.length&&(r[o]=i,i=[]):i.push(o);var a,s={};for(var u in e){if(r.hasOwnProperty(u))for(a=0;a=o&&a>=r)return{node:i,offset:r-o};o=a}i=e(n(i))}}t.exports=r},/*!**********************************!*\ - !*** ./~/react/lib/hyphenate.js ***! - \**********************************/ -function(t){function e(t){return t.replace(n,"-$1").toLowerCase()}var n=/([A-Z])/g;t.exports=e},/*!*******************************************!*\ - !*** ./~/react/lib/hyphenateStyleName.js ***! - \*******************************************/ -function(t,e,n){"use strict";function r(t){return i(t).replace(o,"-ms-")}var i=n(/*! ./hyphenate */189),o=/^ms-/;t.exports=r},/*!*******************************!*\ - !*** ./~/react/lib/isNode.js ***! - \*******************************/ -function(t){function e(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=e},/*!***********************************!*\ - !*** ./~/react/lib/isTextNode.js ***! - \***********************************/ -function(t,e,n){function r(t){return i(t)&&3==t.nodeType}var i=n(/*! ./isNode */191);t.exports=r},/*!************************************!*\ - !*** ./~/react/lib/joinClasses.js ***! - \************************************/ -function(t){"use strict";function e(t){t||(t="");var e,n=arguments.length;if(n>1)for(var r=1;n>r;r++)e=arguments[r],e&&(t=(t?t+" ":"")+e);return t}t.exports=e},/*!********************************!*\ - !*** ./~/react/lib/toArray.js ***! - \********************************/ -function(t,e,n){function r(t){var e=t.length;if(i(!Array.isArray(t)&&("object"==typeof t||"function"==typeof t)),i("number"==typeof e),i(0===e||e-1 in t),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(n){}for(var r=Array(e),o=0;e>o;o++)r[o]=t[o];return r}var i=n(/*! ./invariant */1);t.exports=r},/*!*******************************!*\ - !*** ./~/react/lib/update.js ***! - \*******************************/ -function(t,e,n){"use strict";function r(t){return Array.isArray(t)?t.concat():t&&"object"==typeof t?a(new t.constructor,t):t}function i(t,e,n){u(Array.isArray(t));var r=e[n];u(Array.isArray(r))}function o(t,e){if(u("object"==typeof e),e.hasOwnProperty(p))return u(1===Object.keys(e).length),e[p];var n=r(t);if(e.hasOwnProperty(f)){var s=e[f];u(s&&"object"==typeof s),u(n&&"object"==typeof n),a(n,e[f])}e.hasOwnProperty(l)&&(i(t,e,l),e[l].forEach(function(t){n.push(t)})),e.hasOwnProperty(c)&&(i(t,e,c),e[c].forEach(function(t){n.unshift(t)})),e.hasOwnProperty(h)&&(u(Array.isArray(t)),u(Array.isArray(e[h])),e[h].forEach(function(t){u(Array.isArray(t)),n.splice.apply(n,t)})),e.hasOwnProperty(d)&&(u("function"==typeof e[d]),n=e[d](n));for(var m in e)v.hasOwnProperty(m)&&v[m]||(n[m]=o(t[m],e[m]));return n}var a=n(/*! ./Object.assign */2),s=n(/*! ./keyOf */7),u=n(/*! ./invariant */1),l=s({$push:null}),c=s({$unshift:null}),h=s({$splice:null}),p=s({$set:null}),f=s({$merge:null}),d=s({$apply:null}),m=[l,c,h,p,f,d],v={};m.forEach(function(t){v[t]=!0}),t.exports=o},/*!************************************!*\ - !*** ./~/superagent/lib/client.js ***! - \************************************/ -function(t,e,n){function r(){}function i(t){var e={}.toString.call(t);switch(e){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function o(){if(g.XMLHttpRequest&&("file:"!=g.location.protocol||!g.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}return!1}function a(t){return t===Object(t)}function s(t){if(!a(t))return t;var e=[];for(var n in t)null!=t[n]&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.join("&")}function u(t){for(var e,n,r={},i=t.split("&"),o=0,a=i.length;a>o;++o)n=i[o],e=n.split("="),r[decodeURIComponent(e[0])]=decodeURIComponent(e[1]);return r}function l(t){var e,n,r,i,o=t.split(/\r?\n/),a={};o.pop();for(var s=0,u=o.length;u>s;++s)n=o[s],e=n.indexOf(":"),r=n.slice(0,e).toLowerCase(),i=y(n.slice(e+1)),a[r]=i;return a}function c(t){return t.split(/ *; */).shift()}function h(t){return v(t.split(/ *; */),function(t,e){var n=e.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(t[r]=i),t},{})}function p(t,e){e=e||{},this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method?this.xhr.responseText:null,this.setStatusProperties(this.xhr.status),this.header=this.headers=l(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text):null}function f(t,e){var n=this;m.call(this),this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var t=null,e=null;try{e=new p(n)}catch(r){t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=r}n.callback(t,e)})}function d(t,e){return"function"==typeof e?new f("GET",t).end(e):1==arguments.length?new f("GET",t):new f(t,e)}var m=n(/*! emitter */197),v=n(/*! reduce */198),g="undefined"==typeof window?this:window,y="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};d.serializeObject=s,d.parseString=u,d.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},d.serialize={"application/x-www-form-urlencoded":s,"application/json":JSON.stringify},d.parse={"application/x-www-form-urlencoded":u,"application/json":JSON.parse},p.prototype.get=function(t){return this.header[t.toLowerCase()]},p.prototype.setHeaderProperties=function(){var t=this.header["content-type"]||"";this.type=c(t);var e=h(t);for(var n in e)this[n]=e[n]},p.prototype.parseBody=function(t){var e=d.parse[this.type];return e&&t&&t.length?e(t):null},p.prototype.setStatusProperties=function(t){var e=t/100|0;this.status=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.clientError=4==e,this.serverError=5==e,this.error=4==e||5==e?this.toError():!1,this.accepted=202==t,this.noContent=204==t||1223==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.notFound=404==t,this.forbidden=403==t},p.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot "+e+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=e,i.url=n,i},d.Response=p,m(f.prototype),f.prototype.use=function(t){return t(this),this},f.prototype.timeout=function(t){return this._timeout=t,this},f.prototype.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},f.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},f.prototype.set=function(t,e){if(a(t)){for(var n in t)this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},f.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},f.prototype.getHeader=function(t){return this._header[t.toLowerCase()]},f.prototype.type=function(t){return this.set("Content-Type",d.types[t]||t),this},f.prototype.accept=function(t){return this.set("Accept",d.types[t]||t),this},f.prototype.auth=function(t,e){var n=btoa(t+":"+e);return this.set("Authorization","Basic "+n),this},f.prototype.query=function(t){return"string"!=typeof t&&(t=s(t)),t&&this._query.push(t),this},f.prototype.field=function(t,e){return this._formData||(this._formData=new FormData),this._formData.append(t,e),this},f.prototype.attach=function(t,e,n){return this._formData||(this._formData=new FormData),this._formData.append(t,e,n),this},f.prototype.send=function(t){var e=a(t),n=this.getHeader("Content-Type");if(e&&a(this._data))for(var r in t)this._data[r]=t[r];else"string"==typeof t?(n||this.type("form"),n=this.getHeader("Content-Type"),this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return e?(n||this.type("json"),this):this},f.prototype.callback=function(t,e){var n=this._callback;return this.clearTimeout(),2==n.length?n(t,e):t?this.emit("error",t):void n(e)},f.prototype.crossDomainError=function(){var t=new Error("Origin is not allowed by Access-Control-Allow-Origin");t.crossDomain=!0,this.callback(t)},f.prototype.timeoutError=function(){var t=this._timeout,e=new Error("timeout of "+t+"ms exceeded");e.timeout=t,this.callback(e)},f.prototype.withCredentials=function(){return this._withCredentials=!0,this},f.prototype.end=function(t){var e=this,n=this.xhr=o(),a=this._query.join("&"),s=this._timeout,u=this._formData||this._data;if(this._callback=t||r,n.onreadystatechange=function(){return 4==n.readyState?0==n.status?e.aborted?e.timeoutError():e.crossDomainError():void e.emit("end"):void 0},n.upload&&(n.upload.onprogress=function(t){t.percent=t.loaded/t.total*100,e.emit("progress",t)}),s&&!this._timer&&(this._timer=setTimeout(function(){e.abort()},s)),a&&(a=d.serializeObject(a),this.url+=~this.url.indexOf("?")?"&"+a:"?"+a),n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof u&&!i(u)){var l=d.serialize[this.getHeader("Content-Type")];l&&(u=l(u))}for(var c in this.header)null!=this.header[c]&&n.setRequestHeader(c,this.header[c]);return this.emit("request",this),n.send(u),this},d.Request=f,d.get=function(t,e,n){var r=d("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},d.head=function(t,e,n){var r=d("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},d.del=function(t,e){var n=d("DELETE",t);return e&&n.end(e),n},d.patch=function(t,e,n){var r=d("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},d.post=function(t,e,n){var r=d("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},d.put=function(t,e,n){var r=d("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},t.exports=d},/*!***************************************************!*\ - !*** ./~/superagent/~/component-emitter/index.js ***! - \***************************************************/ -function(t){function e(t){return t?n(t):void 0}function n(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){r.off(t,n),e.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var r,i=0;ir;++r)n[r].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}},/*!**************************************************!*\ - !*** ./~/superagent/~/reduce-component/index.js ***! - \**************************************************/ -function(t){t.exports=function(t,e,n){for(var r=0,i=t.length,o=3==arguments.length?n:t[r++];i>r;)o=e.call(null,o,t[r],++r,t);return o}},/*!***************************************!*\ - !*** (webpack)/buildin/amd-define.js ***! - \***************************************/ -function(t){t.exports=function(){throw new Error("define cannot be used indirect")}},/*!****************************************!*\ - !*** (webpack)/buildin/amd-options.js ***! - \****************************************/ -function(t,e){(function(e){t.exports=e}).call(e,{})},/*!**********************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/process/browser.js ***! - \**********************************************************/ -function(t){function e(){}var n=t.exports={};n.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.MutationObserver,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};var r=[];if(e){var i=document.createElement("div"),o=new MutationObserver(function(){var t=r.slice();r.length=0,t.forEach(function(t){t()})});return o.observe(i,{attributes:!0}),function(t){r.length||i.setAttribute("yes","no"),r.push(t)}}return n?(window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(t){r.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=e,n.addListener=e,n.once=e,n.off=e,n.removeListener=e,n.removeAllListeners=e,n.emit=e,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}}]);