diff options
Diffstat (limited to 'web')
151 files changed, 16099 insertions, 17545 deletions
diff --git a/web/react/.eslintrc b/web/react/.eslintrc index c4167829d..6a35d3123 100644 --- a/web/react/.eslintrc +++ b/web/react/.eslintrc @@ -19,6 +19,7 @@ }, "globals": { "React": false, + "ReactDOM": false, "ReactBootstrap": false }, "rules": { diff --git a/web/react/components/access_history_modal.jsx b/web/react/components/access_history_modal.jsx index 2ad4d5b00..c8af2553d 100644 --- a/web/react/components/access_history_modal.jsx +++ b/web/react/components/access_history_modal.jsx @@ -2,6 +2,7 @@ // See License.txt for license information. var UserStore = require('../stores/user_store.jsx'); +var ChannelStore = require('../stores/channel_store.jsx'); var AsyncClient = require('../utils/async_client.jsx'); var LoadingScreen = require('./loading_screen.jsx'); var Utils = require('../utils/utils.jsx'); @@ -14,8 +15,10 @@ export default class AccessHistoryModal extends React.Component { this.handleMoreInfo = this.handleMoreInfo.bind(this); this.onHide = this.onHide.bind(this); this.onShow = this.onShow.bind(this); + this.formatAuditInfo = this.formatAuditInfo.bind(this); + this.handleRevokedSession = this.handleRevokedSession.bind(this); - let state = this.getStateFromStoresForAudits(); + const state = this.getStateFromStoresForAudits(); state.moreInfo = []; this.state = state; @@ -34,9 +37,9 @@ export default class AccessHistoryModal extends React.Component { } componentDidMount() { UserStore.addAuditsChangeListener(this.onAuditChange); - $(React.findDOMNode(this.refs.modal)).on('shown.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', this.onShow); - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); } componentWillUnmount() { UserStore.removeAuditsChangeListener(this.onAuditChange); @@ -52,23 +55,269 @@ export default class AccessHistoryModal extends React.Component { newMoreInfo[index] = true; this.setState({moreInfo: newMoreInfo}); } - render() { - var accessList = []; - var currentHistoryDate = null; + handleRevokedSession(sessionId) { + return 'The session with id ' + sessionId + ' was revoked'; + } + formatAuditInfo(currentAudit) { + const currentActionURL = currentAudit.action.replace(/\/api\/v[1-9]/, ''); - for (var i = 0; i < this.state.audits.length; i++) { - var currentAudit = this.state.audits[i]; - var newHistoryDate = new Date(currentAudit.create_at); - var newDate = null; + let currentAuditDesc = ''; + + if (currentActionURL.indexOf('/channels') === 0) { + const channelInfo = currentAudit.extra_info.split(' '); + const channelNameField = channelInfo[0].split('='); + + let channelURL = ''; + let channelObj; + let channelName = ''; + if (channelNameField.indexOf('name') >= 0) { + channelURL = channelNameField[channelNameField.indexOf('name') + 1]; + channelObj = ChannelStore.getByName(channelURL); + if (channelObj) { + channelName = channelObj.display_name; + } else { + channelName = channelURL; + } + } + + switch (currentActionURL) { + case '/channels/create': + currentAuditDesc = 'Created the ' + channelName + ' channel/group'; + break; + case '/channels/create_direct': + currentAuditDesc = 'Established a direct message channel with ' + Utils.getDirectTeammate(channelObj.id).username; + break; + case '/channels/update': + currentAuditDesc = 'Updated the ' + channelName + ' channel/group name'; + break; + case '/channels/update_desc': + currentAuditDesc = 'Updated the ' + channelName + ' channel/group description'; + break; + default: + let userIdField = []; + let userId = ''; + let username = ''; + + if (channelInfo[1]) { + userIdField = channelInfo[1].split('='); + + if (userIdField.indexOf('user_id') >= 0) { + userId = userIdField[userIdField.indexOf('user_id') + 1]; + username = UserStore.getProfile(userId).username; + } + } + + if (/\/channels\/[A-Za-z0-9]+\/delete/.test(currentActionURL)) { + currentAuditDesc = 'Deleted the channel/group with the URL ' + channelURL; + } else if (/\/channels\/[A-Za-z0-9]+\/add/.test(currentActionURL)) { + currentAuditDesc = 'Added ' + username + ' to the ' + channelName + ' channel/group'; + } else if (/\/channels\/[A-Za-z0-9]+\/remove/.test(currentActionURL)) { + currentAuditDesc = 'Removed ' + username + ' from the ' + channelName + ' channel/group'; + } + + break; + } + } else if (currentActionURL.indexOf('/oauth') === 0) { + const oauthInfo = currentAudit.extra_info.split(' '); + + switch (currentActionURL) { + case '/oauth/register': + const clientIdField = oauthInfo[0].split('='); + + if (clientIdField[0] === 'client_id') { + currentAuditDesc = 'Attempted to register a new OAuth Application with ID ' + clientIdField[1]; + } + + break; + case '/oauth/allow': + if (oauthInfo[0] === 'attempt') { + currentAuditDesc = 'Attempted to allow a new OAuth service access'; + } else if (oauthInfo[0] === 'success') { + currentAuditDesc = 'Successfully gave a new OAuth service access'; + } else if (oauthInfo[0] === 'fail - redirect_uri did not match registered callback') { + currentAuditDesc = 'Failed to allow a new OAuth service access - the redirect URI did not match the previously registered callback'; + } + + break; + case '/oauth/access_token': + if (oauthInfo[0] === 'attempt') { + currentAuditDesc = 'Attempted to get an OAuth access token'; + } else if (oauthInfo[0] === 'success') { + currentAuditDesc = 'Successfully added a new OAuth service'; + } else { + const oauthTokenFailure = oauthInfo[0].split('-'); + + if (oauthTokenFailure[0].trim() === 'fail' && oauthTokenFailure[1]) { + currentAuditDesc = 'Failed to get an OAuth access token - ' + oauthTokenFailure[1].trim(); + } + } + + break; + default: + break; + } + } else if (currentActionURL.indexOf('/users') === 0) { + const userInfo = currentAudit.extra_info.split(' '); + + switch (currentActionURL) { + case '/users/login': + if (userInfo[0] === 'attempt') { + currentAuditDesc = 'Attempted to login'; + } else if (userInfo[0] === 'success') { + currentAuditDesc = 'Successfully logged in'; + } else if (userInfo[0]) { + currentAuditDesc = 'FAILED login attempt'; + } + + break; + case '/users/revoke_session': + currentAuditDesc = this.handleRevokedSession(userInfo[0].split('=')[1]); + break; + case '/users/newimage': + currentAuditDesc = 'Updated your profile picture'; + break; + case '/users/update': + currentAuditDesc = 'Updated the general settings of your account'; + break; + case '/users/newpassword': + if (userInfo[0] === 'attempted') { + currentAuditDesc = 'Attempted to change password'; + } else if (userInfo[0] === 'completed') { + currentAuditDesc = 'Successfully changed password'; + } else if (userInfo[0] === 'failed - tried to update user password who was logged in through oauth') { + currentAuditDesc = 'Failed to change password - tried to update user password who was logged in through oauth'; + } + + break; + case '/users/update_roles': + const userRoles = userInfo[0].split('=')[1]; - if (!currentHistoryDate || currentHistoryDate.toLocaleDateString() !== newHistoryDate.toLocaleDateString()) { - currentHistoryDate = newHistoryDate; - newDate = (<div> {currentHistoryDate.toDateString()} </div>); + currentAuditDesc = 'Updated user role(s) to '; + if (userRoles.trim()) { + currentAuditDesc += userRoles; + } else { + currentAuditDesc += 'member'; + } + + break; + case '/users/update_active': + const updateType = userInfo[0].split('=')[0]; + const updateField = userInfo[0].split('=')[1]; + + /* Either describes account activation/deactivation or a revoked session as part of an account deactivation */ + if (updateType === 'active') { + if (updateField === 'true') { + currentAuditDesc = 'Account made active'; + } else if (updateField === 'false') { + currentAuditDesc = 'Account made inactive'; + } + + const actingUserInfo = userInfo[1].split('='); + if (actingUserInfo[0] === 'session_user') { + const actingUser = UserStore.getProfile(actingUserInfo[1]); + const currentUser = UserStore.getCurrentUser(); + if (currentUser && actingUser && (Utils.isAdmin(currentUser.roles) || Utils.isSystemAdmin(currentUser.roles))) { + currentAuditDesc += ' by ' + actingUser.username; + } else if (currentUser && actingUser) { + currentAuditDesc += ' by an admin'; + } + } + } else if (updateType === 'session_id') { + currentAuditDesc = this.handleRevokedSession(updateField); + } + + break; + case '/users/send_password_reset': + currentAuditDesc = 'Sent an email to ' + userInfo[0].split('=')[1] + ' to reset your password'; + break; + case '/users/reset_password': + if (userInfo[0] === 'attempt') { + currentAuditDesc = 'Attempted to reset password'; + } else if (userInfo[0] === 'success') { + currentAuditDesc = 'Successfully reset password'; + } + + break; + case '/users/update_notify': + currentAuditDesc = 'Updated your global notification settings'; + break; + default: + break; } + } else if (currentActionURL.indexOf('/hooks') === 0) { + const webhookInfo = currentAudit.extra_info.split(' '); + + switch (currentActionURL) { + case '/hooks/incoming/create': + if (webhookInfo[0] === 'attempt') { + currentAuditDesc = 'Attempted to create a webhook'; + } else if (webhookInfo[0] === 'success') { + currentAuditDesc = 'Successfully created a webhook'; + } else if (webhookInfo[0] === 'fail - bad channel permissions') { + currentAuditDesc = 'Failed to create a webhook - bad channel permissions'; + } - if (!currentAudit.session_id && currentAudit.action.search('/users/login') !== -1) { - currentAudit.session_id = 'N/A (Login attempt)'; + break; + case '/hooks/incoming/delete': + if (webhookInfo[0] === 'attempt') { + currentAuditDesc = 'Attempted to delete a webhook'; + } else if (webhookInfo[0] === 'success') { + currentAuditDesc = 'Successfully deleted a webhook'; + } else if (webhookInfo[0] === 'fail - inappropriate conditions') { + currentAuditDesc = 'Failed to delete a webhook - inappropriate conditions'; + } + + break; + default: + break; + } + } else { + switch (currentActionURL) { + case '/logout': + currentAuditDesc = 'Logged out of your account'; + break; + case '/verify_email': + currentAuditDesc = 'Sucessfully verified your email address'; + break; + default: + break; } + } + + /* If all else fails... */ + if (!currentAuditDesc) { + /* Currently not called anywhere */ + if (currentAudit.extra_info.indexOf('revoked_all=') >= 0) { + currentAuditDesc = 'Revoked all current sessions for the team'; + } else { + let currentActionDesc = ''; + if (currentActionURL && currentActionURL.lastIndexOf('/') !== -1) { + currentActionDesc = currentActionURL.substring(currentActionURL.lastIndexOf('/') + 1).replace('_', ' '); + currentActionDesc = Utils.toTitleCase(currentActionDesc); + } + + let currentExtraInfoDesc = ''; + if (currentAudit.extra_info) { + currentExtraInfoDesc = currentAudit.extra_info; + + if (currentExtraInfoDesc.indexOf('=') !== -1) { + currentExtraInfoDesc = currentExtraInfoDesc.substring(currentExtraInfoDesc.indexOf('=') + 1); + } + } + currentAuditDesc = currentActionDesc + ' ' + currentExtraInfoDesc; + } + } + + const currentDate = new Date(currentAudit.create_at); + const currentAuditInfo = currentDate.toDateString() + ' - ' + currentDate.toLocaleTimeString(navigator.language, {hour: '2-digit', minute: '2-digit'}) + ' | ' + currentAuditDesc; + return currentAuditInfo; + } + render() { + var accessList = []; + + for (var i = 0; i < this.state.audits.length; i++) { + const currentAudit = this.state.audits[i]; + const currentAuditInfo = this.formatAuditInfo(currentAudit); var moreInfo = ( <a @@ -76,15 +325,27 @@ export default class AccessHistoryModal extends React.Component { className='theme' onClick={this.handleMoreInfo.bind(this, i)} > - More info + {'More info'} </a> ); if (this.state.moreInfo[i]) { + if (!currentAudit.session_id) { + currentAudit.session_id = 'N/A'; + + if (currentAudit.action.search('/users/login') >= 0) { + if (currentAudit.extra_info === 'attempt') { + currentAudit.session_id += ' (Login attempt)'; + } else { + currentAudit.session_id += ' (Login failure)'; + } + } + } + moreInfo = ( <div> + <div>{'IP: ' + currentAudit.ip_address}</div> <div>{'Session ID: ' + currentAudit.session_id}</div> - <div>{'URL: ' + currentAudit.action.replace(/\/api\/v[1-9]/, '')}</div> </div> ); } @@ -99,11 +360,9 @@ export default class AccessHistoryModal extends React.Component { key={'accessHistoryEntryKey' + i} className='access-history__table' > - <div className='access__date'>{newDate}</div> <div className='access__report'> - <div className='report__time'>{newHistoryDate.toLocaleTimeString(navigator.language, {hour: '2-digit', minute: '2-digit'})}</div> + <div className='report__time'>{currentAuditInfo}</div> <div className='report__info'> - <div>{'IP: ' + currentAudit.ip_address}</div> {moreInfo} </div> {divider} @@ -138,13 +397,13 @@ export default class AccessHistoryModal extends React.Component { data-dismiss='modal' aria-label='Close' > - <span aria-hidden='true'>×</span> + <span aria-hidden='true'>{'×'}</span> </button> <h4 className='modal-title' id='myModalLabel' > - Access History + {'Access History'} </h4> </div> <div diff --git a/web/react/components/activity_log_modal.jsx b/web/react/components/activity_log_modal.jsx index 1fe2133ec..2c944913f 100644 --- a/web/react/components/activity_log_modal.jsx +++ b/web/react/components/activity_log_modal.jsx @@ -56,9 +56,9 @@ export default class ActivityLogModal extends React.Component { } componentDidMount() { UserStore.addSessionsChangeListener(this.onListenerChange); - $(React.findDOMNode(this.refs.modal)).on('shown.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', this.onShow); - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); } componentWillUnmount() { UserStore.removeSessionsChangeListener(this.onListenerChange); @@ -81,6 +81,7 @@ export default class ActivityLogModal extends React.Component { const currentSession = this.state.sessions[i]; const lastAccessTime = new Date(currentSession.last_activity_at); const firstAccessTime = new Date(currentSession.create_at); + let devicePlatform = currentSession.props.platform; let devicePicture = ''; if (currentSession.props.platform === 'Windows') { @@ -88,7 +89,12 @@ export default class ActivityLogModal extends React.Component { } else if (currentSession.props.platform === 'Macintosh' || currentSession.props.platform === 'iPhone') { devicePicture = 'fa fa-apple'; } else if (currentSession.props.platform === 'Linux') { - devicePicture = 'fa fa-linux'; + if (currentSession.props.os.indexOf('Android') >= 0) { + devicePlatform = 'Android'; + devicePicture = 'fa fa-android'; + } else { + devicePicture = 'fa fa-linux'; + } } let moreInfo; @@ -119,7 +125,7 @@ export default class ActivityLogModal extends React.Component { className='activity-log__table' > <div className='activity-log__report'> - <div className='report__platform'><i className={devicePicture} />{currentSession.props.platform}</div> + <div className='report__platform'><i className={devicePicture} />{devicePlatform}</div> <div className='report__info'> <div>{`Last activity: ${lastAccessTime.toDateString()}, ${lastAccessTime.toLocaleTimeString()}`}</div> {moreInfo} diff --git a/web/react/components/admin_console/admin_controller.jsx b/web/react/components/admin_console/admin_controller.jsx index f2fb8ac78..f770d166c 100644 --- a/web/react/components/admin_console/admin_controller.jsx +++ b/web/react/components/admin_console/admin_controller.jsx @@ -40,9 +40,13 @@ export default class AdminController extends React.Component { config: AdminStore.getConfig(), teams: AdminStore.getAllTeams(), selectedTeams, - selected: 'service_settings', - selectedTeam: null + selected: props.tab || 'service_settings', + selectedTeam: props.teamId || null }; + + if (!props.tab) { + history.replaceState(null, null, `/admin_console/${this.state.selected}`); + } } componentDidMount() { @@ -142,7 +146,9 @@ export default class AdminController extends React.Component { } else if (this.state.selected === 'service_settings') { tab = <ServiceSettingsTab config={this.state.config} />; } else if (this.state.selected === 'team_users') { - tab = <TeamUsersTab team={this.state.teams[this.state.selectedTeam]} />; + if (this.state.teams) { + tab = <TeamUsersTab team={this.state.teams[this.state.selectedTeam]} />; + } } } diff --git a/web/react/components/admin_console/admin_navbar_dropdown.jsx b/web/react/components/admin_console/admin_navbar_dropdown.jsx index 21ec5c3cf..df8da94e1 100644 --- a/web/react/components/admin_console/admin_navbar_dropdown.jsx +++ b/web/react/components/admin_console/admin_navbar_dropdown.jsx @@ -27,7 +27,7 @@ export default class AdminNavbarDropdown extends React.Component { } componentDidMount() { - $(React.findDOMNode(this.refs.dropdown)).on('hide.bs.dropdown', () => { + $(ReactDOM.findDOMNode(this.refs.dropdown)).on('hide.bs.dropdown', () => { this.blockToggle = true; setTimeout(() => { this.blockToggle = false; @@ -36,7 +36,7 @@ export default class AdminNavbarDropdown extends React.Component { } componentWillUnmount() { - $(React.findDOMNode(this.refs.dropdown)).off('hide.bs.dropdown'); + $(ReactDOM.findDOMNode(this.refs.dropdown)).off('hide.bs.dropdown'); } render() { diff --git a/web/react/components/admin_console/admin_sidebar.jsx b/web/react/components/admin_console/admin_sidebar.jsx index bc6ad1931..b0e01ff17 100644 --- a/web/react/components/admin_console/admin_sidebar.jsx +++ b/web/react/components/admin_console/admin_sidebar.jsx @@ -24,6 +24,7 @@ export default class AdminSidebar extends React.Component { handleClick(name, teamId, e) { e.preventDefault(); this.props.selectTab(name, teamId); + history.pushState({name: name, teamId: teamId}, null, `/admin_console/${name}/${teamId || ''}`); } isSelected(name, teamId) { @@ -53,6 +54,9 @@ export default class AdminSidebar extends React.Component { } componentDidMount() { + if ($(window).width() > 768) { + $('.nav-pills__container').perfectScrollbar(); + } } showTeamSelect(e) { @@ -100,6 +104,7 @@ export default class AdminSidebar extends React.Component { className='menu-icon--right menu__close' onClick={this.removeTeam.bind(this, team.id)} style={{cursor: 'pointer'}} + title='Remove team from sidebar menu' > {'x'} </span> @@ -233,7 +238,10 @@ export default class AdminSidebar extends React.Component { href='#' onClick={this.showTeamSelect} > - <i className='fa fa-plus'></i> + <i + className='fa fa-plus' + title='Add team to sidebar menu' + ></i> </a> </span> </h4> diff --git a/web/react/components/admin_console/email_settings.jsx b/web/react/components/admin_console/email_settings.jsx index c028d605d..40e00ff04 100644 --- a/web/react/components/admin_console/email_settings.jsx +++ b/web/react/components/admin_console/email_settings.jsx @@ -41,28 +41,28 @@ export default class EmailSettings extends React.Component { buildConfig() { var config = this.props.config; - config.EmailSettings.EnableSignUpWithEmail = React.findDOMNode(this.refs.allowSignUpWithEmail).checked; - config.EmailSettings.SendEmailNotifications = React.findDOMNode(this.refs.sendEmailNotifications).checked; - config.EmailSettings.RequireEmailVerification = React.findDOMNode(this.refs.requireEmailVerification).checked; - config.EmailSettings.SendEmailNotifications = React.findDOMNode(this.refs.sendEmailNotifications).checked; - config.EmailSettings.FeedbackName = React.findDOMNode(this.refs.feedbackName).value.trim(); - config.EmailSettings.FeedbackEmail = React.findDOMNode(this.refs.feedbackEmail).value.trim(); - config.EmailSettings.SMTPServer = React.findDOMNode(this.refs.SMTPServer).value.trim(); - config.EmailSettings.SMTPPort = React.findDOMNode(this.refs.SMTPPort).value.trim(); - config.EmailSettings.SMTPUsername = React.findDOMNode(this.refs.SMTPUsername).value.trim(); - config.EmailSettings.SMTPPassword = React.findDOMNode(this.refs.SMTPPassword).value.trim(); - config.EmailSettings.ConnectionSecurity = React.findDOMNode(this.refs.ConnectionSecurity).value.trim(); - - config.EmailSettings.InviteSalt = React.findDOMNode(this.refs.InviteSalt).value.trim(); + config.EmailSettings.EnableSignUpWithEmail = ReactDOM.findDOMNode(this.refs.allowSignUpWithEmail).checked; + config.EmailSettings.SendEmailNotifications = ReactDOM.findDOMNode(this.refs.sendEmailNotifications).checked; + config.EmailSettings.RequireEmailVerification = ReactDOM.findDOMNode(this.refs.requireEmailVerification).checked; + config.EmailSettings.SendEmailNotifications = ReactDOM.findDOMNode(this.refs.sendEmailNotifications).checked; + config.EmailSettings.FeedbackName = ReactDOM.findDOMNode(this.refs.feedbackName).value.trim(); + config.EmailSettings.FeedbackEmail = ReactDOM.findDOMNode(this.refs.feedbackEmail).value.trim(); + config.EmailSettings.SMTPServer = ReactDOM.findDOMNode(this.refs.SMTPServer).value.trim(); + config.EmailSettings.SMTPPort = ReactDOM.findDOMNode(this.refs.SMTPPort).value.trim(); + config.EmailSettings.SMTPUsername = ReactDOM.findDOMNode(this.refs.SMTPUsername).value.trim(); + config.EmailSettings.SMTPPassword = ReactDOM.findDOMNode(this.refs.SMTPPassword).value.trim(); + config.EmailSettings.ConnectionSecurity = ReactDOM.findDOMNode(this.refs.ConnectionSecurity).value.trim(); + + config.EmailSettings.InviteSalt = ReactDOM.findDOMNode(this.refs.InviteSalt).value.trim(); if (config.EmailSettings.InviteSalt === '') { config.EmailSettings.InviteSalt = crypto.randomBytes(256).toString('base64').substring(0, 32); - React.findDOMNode(this.refs.InviteSalt).value = config.EmailSettings.InviteSalt; + ReactDOM.findDOMNode(this.refs.InviteSalt).value = config.EmailSettings.InviteSalt; } - config.EmailSettings.PasswordResetSalt = React.findDOMNode(this.refs.PasswordResetSalt).value.trim(); + config.EmailSettings.PasswordResetSalt = ReactDOM.findDOMNode(this.refs.PasswordResetSalt).value.trim(); if (config.EmailSettings.PasswordResetSalt === '') { config.EmailSettings.PasswordResetSalt = crypto.randomBytes(256).toString('base64').substring(0, 32); - React.findDOMNode(this.refs.PasswordResetSalt).value = config.EmailSettings.PasswordResetSalt; + ReactDOM.findDOMNode(this.refs.PasswordResetSalt).value = config.EmailSettings.PasswordResetSalt; } return config; @@ -70,14 +70,14 @@ export default class EmailSettings extends React.Component { handleGenerateInvite(e) { e.preventDefault(); - React.findDOMNode(this.refs.InviteSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); + ReactDOM.findDOMNode(this.refs.InviteSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); var s = {saveNeeded: true, serverError: this.state.serverError}; this.setState(s); } handleGenerateReset(e) { e.preventDefault(); - React.findDOMNode(this.refs.PasswordResetSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); + ReactDOM.findDOMNode(this.refs.PasswordResetSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); var s = {saveNeeded: true, serverError: this.state.serverError}; this.setState(s); } @@ -440,14 +440,16 @@ export default class EmailSettings extends React.Component { className='table table-bordered' cellPadding='5' > - <tr><td className='help-text'>{'None'}</td><td className='help-text'>{'Mattermost will send email over an unsecure connection.'}</td></tr> - <tr><td className='help-text'>{'TLS'}</td><td className='help-text'>{'Encrypts the communication between Mattermost and your email server.'}</td></tr> - <tr><td className='help-text'>{'STARTTLS'}</td><td className='help-text'>{'Takes an existing insecure connection and attempts to upgrade it to a secure connection using TLS.'}</td></tr> + <tbody> + <tr><td className='help-text'>{'None'}</td><td className='help-text'>{'Mattermost will send email over an unsecure connection.'}</td></tr> + <tr><td className='help-text'>{'TLS'}</td><td className='help-text'>{'Encrypts the communication between Mattermost and your email server.'}</td></tr> + <tr><td className='help-text'>{'STARTTLS'}</td><td className='help-text'>{'Takes an existing insecure connection and attempts to upgrade it to a secure connection using TLS.'}</td></tr> + </tbody> </table> </div> <div className='help-text'> <button - className='btn' + className='btn btn-default' onClick={this.handleTestConnection} disabled={!this.state.sendEmailNotifications} id='connection-button' @@ -482,7 +484,7 @@ export default class EmailSettings extends React.Component { <p className='help-text'>{'32-character salt added to signing of email invites. Randomly generated on install. Click "Re-Generate" to create new salt.'}</p> <div className='help-text'> <button - className='btn' + className='btn btn-default' onClick={this.handleGenerateInvite} disabled={!this.state.sendEmailNotifications} > @@ -513,7 +515,7 @@ export default class EmailSettings extends React.Component { <p className='help-text'>{'32-character salt added to signing of password reset emails. Randomly generated on install. Click "Re-Generate" to create new salt.'}</p> <div className='help-text'> <button - className='btn' + className='btn btn-default' onClick={this.handleGenerateReset} disabled={!this.state.sendEmailNotifications} > diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx index 6b97287e4..8b0f00083 100644 --- a/web/react/components/admin_console/gitlab_settings.jsx +++ b/web/react/components/admin_console/gitlab_settings.jsx @@ -37,12 +37,12 @@ export default class GitLabSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.GitLabSettings.Enable = React.findDOMNode(this.refs.Enable).checked; - config.GitLabSettings.Secret = React.findDOMNode(this.refs.Secret).value.trim(); - config.GitLabSettings.Id = React.findDOMNode(this.refs.Id).value.trim(); - config.GitLabSettings.AuthEndpoint = React.findDOMNode(this.refs.AuthEndpoint).value.trim(); - config.GitLabSettings.TokenEndpoint = React.findDOMNode(this.refs.TokenEndpoint).value.trim(); - config.GitLabSettings.UserApiEndpoint = React.findDOMNode(this.refs.UserApiEndpoint).value.trim(); + config.GitLabSettings.Enable = ReactDOM.findDOMNode(this.refs.Enable).checked; + config.GitLabSettings.Secret = ReactDOM.findDOMNode(this.refs.Secret).value.trim(); + config.GitLabSettings.Id = ReactDOM.findDOMNode(this.refs.Id).value.trim(); + config.GitLabSettings.AuthEndpoint = ReactDOM.findDOMNode(this.refs.AuthEndpoint).value.trim(); + config.GitLabSettings.TokenEndpoint = ReactDOM.findDOMNode(this.refs.TokenEndpoint).value.trim(); + config.GitLabSettings.UserApiEndpoint = ReactDOM.findDOMNode(this.refs.UserApiEndpoint).value.trim(); Client.saveConfig( config, @@ -113,7 +113,17 @@ export default class GitLabSettings extends React.Component { /> {'false'} </label> - <p className='help-text'>{'When true, Mattermost allows team creation and account signup using GitLab OAuth. To configure, log in to your GitLab account and go to Applications -> Profile Settings. Enter Redirect URIs "<your-mattermost-url>/login/gitlab/complete" (example: http://localhost:8065/login/gitlab/complete) and "<your-mattermost-url>/signup/gitlab/complete". Then use "Secret" and "Id" fields to complete the options below.'}</p> + <p className='help-text'> + {'When true, Mattermost allows team creation and account signup using GitLab OAuth.'} <br/> + </p> + <div className='help-text'> + <ol> + <li>{'Log in to your GitLab account and go to Applications -> Profile Settings.'}</li> + <li>{'Enter Redirect URIs "<your-mattermost-url>/login/gitlab/complete" (example: http://localhost:8065/login/gitlab/complete) and "<your-mattermost-url>/signup/gitlab/complete". '}</li> + <li>{'Then use "Secret" and "Id" fields from GitLab to complete the options below.'}</li> + <li>{'Complete the Endpoint URLs below. '}</li> + </ol> + </div> </div> </div> @@ -179,7 +189,7 @@ export default class GitLabSettings extends React.Component { onChange={this.handleChange} disabled={!this.state.Enable} /> - <p className='help-text'>{'Enter <your-gitlab-url>/oauth/authorize (example http://localhost:3000/oauth/authorize). Make sure you use HTTP or HTTPS in your URLs as appropriate.'}</p> + <p className='help-text'>{'Enter https://<your-gitlab-url>/oauth/authorize (example https://example.com:3000/oauth/authorize). Make sure you use HTTP or HTTPS in your URL depending on your server configuration.'}</p> </div> </div> @@ -201,7 +211,7 @@ export default class GitLabSettings extends React.Component { onChange={this.handleChange} disabled={!this.state.Enable} /> - <p className='help-text'>{'Enter <your-gitlab-url>/oauth/token. Make sure you use HTTP or HTTPS in your URLs as appropriate.'}</p> + <p className='help-text'>{'Enter https://<your-gitlab-url>/oauth/token. Make sure you use HTTP or HTTPS in your URL depending on your server configuration.'}</p> </div> </div> @@ -223,7 +233,7 @@ export default class GitLabSettings extends React.Component { onChange={this.handleChange} disabled={!this.state.Enable} /> - <p className='help-text'>{'Enter <your-gitlab-url>/api/v3/user. Make sure you use HTTP or HTTPS in your URLs as appropriate.'}</p> + <p className='help-text'>{'Enter https://<your-gitlab-url>/api/v3/user. Make sure you use HTTP or HTTPS in your URL depending on your server configuration.'}</p> </div> </div> @@ -250,7 +260,7 @@ export default class GitLabSettings extends React.Component { } -//config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim(); +//config.GitLabSettings.Scope = ReactDOM.findDOMNode(this.refs.Scope).value.trim(); // <div className='form-group'> // <label // className='control-label col-sm-4' diff --git a/web/react/components/admin_console/image_settings.jsx b/web/react/components/admin_console/image_settings.jsx index 24ed5a0a8..8b577e012 100644 --- a/web/react/components/admin_console/image_settings.jsx +++ b/web/react/components/admin_console/image_settings.jsx @@ -24,7 +24,7 @@ export default class FileSettings extends React.Component { var s = {saveNeeded: true, serverError: this.state.serverError}; if (action === 'DriverName') { - s.DriverName = React.findDOMNode(this.refs.DriverName).value; + s.DriverName = ReactDOM.findDOMNode(this.refs.DriverName).value; } this.setState(s); @@ -32,7 +32,7 @@ export default class FileSettings extends React.Component { handleGenerate(e) { e.preventDefault(); - React.findDOMNode(this.refs.PublicLinkSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); + ReactDOM.findDOMNode(this.refs.PublicLinkSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); var s = {saveNeeded: true, serverError: this.state.serverError}; this.setState(s); } @@ -42,62 +42,62 @@ export default class FileSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.FileSettings.DriverName = React.findDOMNode(this.refs.DriverName).value; - config.FileSettings.Directory = React.findDOMNode(this.refs.Directory).value; - config.FileSettings.AmazonS3AccessKeyId = React.findDOMNode(this.refs.AmazonS3AccessKeyId).value; - config.FileSettings.AmazonS3SecretAccessKey = React.findDOMNode(this.refs.AmazonS3SecretAccessKey).value; - config.FileSettings.AmazonS3Bucket = React.findDOMNode(this.refs.AmazonS3Bucket).value; - config.FileSettings.AmazonS3Region = React.findDOMNode(this.refs.AmazonS3Region).value; - config.FileSettings.EnablePublicLink = React.findDOMNode(this.refs.EnablePublicLink).checked; + config.FileSettings.DriverName = ReactDOM.findDOMNode(this.refs.DriverName).value; + config.FileSettings.Directory = ReactDOM.findDOMNode(this.refs.Directory).value; + config.FileSettings.AmazonS3AccessKeyId = ReactDOM.findDOMNode(this.refs.AmazonS3AccessKeyId).value; + config.FileSettings.AmazonS3SecretAccessKey = ReactDOM.findDOMNode(this.refs.AmazonS3SecretAccessKey).value; + config.FileSettings.AmazonS3Bucket = ReactDOM.findDOMNode(this.refs.AmazonS3Bucket).value; + config.FileSettings.AmazonS3Region = ReactDOM.findDOMNode(this.refs.AmazonS3Region).value; + config.FileSettings.EnablePublicLink = ReactDOM.findDOMNode(this.refs.EnablePublicLink).checked; - config.FileSettings.PublicLinkSalt = React.findDOMNode(this.refs.PublicLinkSalt).value.trim(); + config.FileSettings.PublicLinkSalt = ReactDOM.findDOMNode(this.refs.PublicLinkSalt).value.trim(); if (config.FileSettings.PublicLinkSalt === '') { config.FileSettings.PublicLinkSalt = crypto.randomBytes(256).toString('base64').substring(0, 32); - React.findDOMNode(this.refs.PublicLinkSalt).value = config.FileSettings.PublicLinkSalt; + ReactDOM.findDOMNode(this.refs.PublicLinkSalt).value = config.FileSettings.PublicLinkSalt; } var thumbnailWidth = 120; - if (!isNaN(parseInt(React.findDOMNode(this.refs.ThumbnailWidth).value, 10))) { - thumbnailWidth = parseInt(React.findDOMNode(this.refs.ThumbnailWidth).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.ThumbnailWidth).value, 10))) { + thumbnailWidth = parseInt(ReactDOM.findDOMNode(this.refs.ThumbnailWidth).value, 10); } config.FileSettings.ThumbnailWidth = thumbnailWidth; - React.findDOMNode(this.refs.ThumbnailWidth).value = thumbnailWidth; + ReactDOM.findDOMNode(this.refs.ThumbnailWidth).value = thumbnailWidth; var thumbnailHeight = 100; - if (!isNaN(parseInt(React.findDOMNode(this.refs.ThumbnailHeight).value, 10))) { - thumbnailHeight = parseInt(React.findDOMNode(this.refs.ThumbnailHeight).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.ThumbnailHeight).value, 10))) { + thumbnailHeight = parseInt(ReactDOM.findDOMNode(this.refs.ThumbnailHeight).value, 10); } config.FileSettings.ThumbnailHeight = thumbnailHeight; - React.findDOMNode(this.refs.ThumbnailHeight).value = thumbnailHeight; + ReactDOM.findDOMNode(this.refs.ThumbnailHeight).value = thumbnailHeight; var previewWidth = 1024; - if (!isNaN(parseInt(React.findDOMNode(this.refs.PreviewWidth).value, 10))) { - previewWidth = parseInt(React.findDOMNode(this.refs.PreviewWidth).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.PreviewWidth).value, 10))) { + previewWidth = parseInt(ReactDOM.findDOMNode(this.refs.PreviewWidth).value, 10); } config.FileSettings.PreviewWidth = previewWidth; - React.findDOMNode(this.refs.PreviewWidth).value = previewWidth; + ReactDOM.findDOMNode(this.refs.PreviewWidth).value = previewWidth; var previewHeight = 0; - if (!isNaN(parseInt(React.findDOMNode(this.refs.PreviewHeight).value, 10))) { - previewHeight = parseInt(React.findDOMNode(this.refs.PreviewHeight).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.PreviewHeight).value, 10))) { + previewHeight = parseInt(ReactDOM.findDOMNode(this.refs.PreviewHeight).value, 10); } config.FileSettings.PreviewHeight = previewHeight; - React.findDOMNode(this.refs.PreviewHeight).value = previewHeight; + ReactDOM.findDOMNode(this.refs.PreviewHeight).value = previewHeight; var profileWidth = 128; - if (!isNaN(parseInt(React.findDOMNode(this.refs.ProfileWidth).value, 10))) { - profileWidth = parseInt(React.findDOMNode(this.refs.ProfileWidth).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.ProfileWidth).value, 10))) { + profileWidth = parseInt(ReactDOM.findDOMNode(this.refs.ProfileWidth).value, 10); } config.FileSettings.ProfileWidth = profileWidth; - React.findDOMNode(this.refs.ProfileWidth).value = profileWidth; + ReactDOM.findDOMNode(this.refs.ProfileWidth).value = profileWidth; var profileHeight = 128; - if (!isNaN(parseInt(React.findDOMNode(this.refs.ProfileHeight).value, 10))) { - profileHeight = parseInt(React.findDOMNode(this.refs.ProfileHeight).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.ProfileHeight).value, 10))) { + profileHeight = parseInt(ReactDOM.findDOMNode(this.refs.ProfileHeight).value, 10); } config.FileSettings.ProfileHeight = profileHeight; - React.findDOMNode(this.refs.ProfileHeight).value = profileHeight; + ReactDOM.findDOMNode(this.refs.ProfileHeight).value = profileHeight; Client.saveConfig( config, diff --git a/web/react/components/admin_console/log_settings.jsx b/web/react/components/admin_console/log_settings.jsx index 367605f14..7e9eda89b 100644 --- a/web/react/components/admin_console/log_settings.jsx +++ b/web/react/components/admin_console/log_settings.jsx @@ -46,12 +46,12 @@ export default class LogSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.LogSettings.EnableConsole = React.findDOMNode(this.refs.consoleEnable).checked; - config.LogSettings.ConsoleLevel = React.findDOMNode(this.refs.consoleLevel).value; - config.LogSettings.EnableFile = React.findDOMNode(this.refs.fileEnable).checked; - config.LogSettings.FileLevel = React.findDOMNode(this.refs.fileLevel).value; - config.LogSettings.FileLocation = React.findDOMNode(this.refs.fileLocation).value.trim(); - config.LogSettings.FileFormat = React.findDOMNode(this.refs.fileFormat).value.trim(); + config.LogSettings.EnableConsole = ReactDOM.findDOMNode(this.refs.consoleEnable).checked; + config.LogSettings.ConsoleLevel = ReactDOM.findDOMNode(this.refs.consoleLevel).value; + config.LogSettings.EnableFile = ReactDOM.findDOMNode(this.refs.fileEnable).checked; + config.LogSettings.FileLevel = ReactDOM.findDOMNode(this.refs.fileLevel).value; + config.LogSettings.FileLocation = ReactDOM.findDOMNode(this.refs.fileLocation).value.trim(); + config.LogSettings.FileFormat = ReactDOM.findDOMNode(this.refs.fileFormat).value.trim(); Client.saveConfig( config, @@ -249,22 +249,24 @@ export default class LogSettings extends React.Component { onChange={this.handleChange} disabled={!this.state.fileEnable} /> - <p className='help-text'> + <div className='help-text'> {'Format of log message output. If blank will be set to "[%D %T] [%L] %M", where:'} <div className='help-text'> <table className='table table-bordered' cellPadding='5' > - <tr><td className='help-text'>{'%T'}</td><td className='help-text'>{'Time (15:04:05 MST)'}</td></tr> - <tr><td className='help-text'>{'%D'}</td><td className='help-text'>{'Date (2006/01/02)'}</td></tr> - <tr><td className='help-text'>{'%d'}</td><td className='help-text'>{'Date (01/02/06)'}</td></tr> - <tr><td className='help-text'>{'%L'}</td><td className='help-text'>{'Level (DEBG, INFO, EROR)'}</td></tr> - <tr><td className='help-text'>{'%S'}</td><td className='help-text'>{'Source'}</td></tr> - <tr><td className='help-text'>{'%M'}</td><td className='help-text'>{'Message'}</td></tr> + <tbody> + <tr><td className='help-text'>{'%T'}</td><td className='help-text'>{'Time (15:04:05 MST)'}</td></tr> + <tr><td className='help-text'>{'%D'}</td><td className='help-text'>{'Date (2006/01/02)'}</td></tr> + <tr><td className='help-text'>{'%d'}</td><td className='help-text'>{'Date (01/02/06)'}</td></tr> + <tr><td className='help-text'>{'%L'}</td><td className='help-text'>{'Level (DEBG, INFO, EROR)'}</td></tr> + <tr><td className='help-text'>{'%S'}</td><td className='help-text'>{'Source'}</td></tr> + <tr><td className='help-text'>{'%M'}</td><td className='help-text'>{'Message'}</td></tr> + </tbody> </table> </div> - </p> + </div> </div> </div> diff --git a/web/react/components/admin_console/privacy_settings.jsx b/web/react/components/admin_console/privacy_settings.jsx index 70ec04f4a..f2d22f36e 100644 --- a/web/react/components/admin_console/privacy_settings.jsx +++ b/web/react/components/admin_console/privacy_settings.jsx @@ -28,8 +28,8 @@ export default class PrivacySettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.PrivacySettings.ShowEmailAddress = React.findDOMNode(this.refs.ShowEmailAddress).checked; - config.PrivacySettings.ShowFullName = React.findDOMNode(this.refs.ShowFullName).checked; + config.PrivacySettings.ShowEmailAddress = ReactDOM.findDOMNode(this.refs.ShowEmailAddress).checked; + config.PrivacySettings.ShowFullName = ReactDOM.findDOMNode(this.refs.ShowFullName).checked; Client.saveConfig( config, diff --git a/web/react/components/admin_console/rate_settings.jsx b/web/react/components/admin_console/rate_settings.jsx index 65c39ac42..4d71777c4 100644 --- a/web/react/components/admin_console/rate_settings.jsx +++ b/web/react/components/admin_console/rate_settings.jsx @@ -46,23 +46,23 @@ export default class RateSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.RateLimitSettings.EnableRateLimiter = React.findDOMNode(this.refs.EnableRateLimiter).checked; - config.RateLimitSettings.VaryByRemoteAddr = React.findDOMNode(this.refs.VaryByRemoteAddr).checked; - config.RateLimitSettings.VaryByHeader = React.findDOMNode(this.refs.VaryByHeader).value.trim(); + config.RateLimitSettings.EnableRateLimiter = ReactDOM.findDOMNode(this.refs.EnableRateLimiter).checked; + config.RateLimitSettings.VaryByRemoteAddr = ReactDOM.findDOMNode(this.refs.VaryByRemoteAddr).checked; + config.RateLimitSettings.VaryByHeader = ReactDOM.findDOMNode(this.refs.VaryByHeader).value.trim(); var PerSec = 10; - if (!isNaN(parseInt(React.findDOMNode(this.refs.PerSec).value, 10))) { - PerSec = parseInt(React.findDOMNode(this.refs.PerSec).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.PerSec).value, 10))) { + PerSec = parseInt(ReactDOM.findDOMNode(this.refs.PerSec).value, 10); } config.RateLimitSettings.PerSec = PerSec; - React.findDOMNode(this.refs.PerSec).value = PerSec; + ReactDOM.findDOMNode(this.refs.PerSec).value = PerSec; var MemoryStoreSize = 10000; - if (!isNaN(parseInt(React.findDOMNode(this.refs.MemoryStoreSize).value, 10))) { - MemoryStoreSize = parseInt(React.findDOMNode(this.refs.MemoryStoreSize).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.MemoryStoreSize).value, 10))) { + MemoryStoreSize = parseInt(ReactDOM.findDOMNode(this.refs.MemoryStoreSize).value, 10); } config.RateLimitSettings.MemoryStoreSize = MemoryStoreSize; - React.findDOMNode(this.refs.MemoryStoreSize).value = MemoryStoreSize; + ReactDOM.findDOMNode(this.refs.MemoryStoreSize).value = MemoryStoreSize; Client.saveConfig( config, diff --git a/web/react/components/admin_console/reset_password_modal.jsx b/web/react/components/admin_console/reset_password_modal.jsx index 75264be45..35d3cdd17 100644 --- a/web/react/components/admin_console/reset_password_modal.jsx +++ b/web/react/components/admin_console/reset_password_modal.jsx @@ -18,7 +18,7 @@ export default class ResetPasswordModal extends React.Component { doSubmit(e) { e.preventDefault(); - var password = React.findDOMNode(this.refs.password).value; + var password = ReactDOM.findDOMNode(this.refs.password).value; if (!password || password.length < 5) { this.setState({serverError: 'Please enter at least 5 characters.'}); @@ -34,7 +34,7 @@ export default class ResetPasswordModal extends React.Component { Client.resetPassword(data, () => { - this.props.onModalSubmit(React.findDOMNode(this.refs.password).value); + this.props.onModalSubmit(ReactDOM.findDOMNode(this.refs.password).value); }, (err) => { this.setState({serverError: err.message}); diff --git a/web/react/components/admin_console/select_team_modal.jsx b/web/react/components/admin_console/select_team_modal.jsx index 21d1c25c3..22189821b 100644 --- a/web/react/components/admin_console/select_team_modal.jsx +++ b/web/react/components/admin_console/select_team_modal.jsx @@ -13,7 +13,7 @@ export default class SelectTeamModal extends React.Component { doSubmit(e) { e.preventDefault(); - this.props.onModalSubmit(React.findDOMNode(this.refs.team).value); + this.props.onModalSubmit(ReactDOM.findDOMNode(this.refs.team).value); } doCancel() { this.props.onModalDismissed(); diff --git a/web/react/components/admin_console/service_settings.jsx b/web/react/components/admin_console/service_settings.jsx index f29d62646..53c89a942 100644 --- a/web/react/components/admin_console/service_settings.jsx +++ b/web/react/components/admin_console/service_settings.jsx @@ -27,28 +27,29 @@ export default class ServiceSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.ServiceSettings.ListenAddress = React.findDOMNode(this.refs.ListenAddress).value.trim(); + config.ServiceSettings.ListenAddress = ReactDOM.findDOMNode(this.refs.ListenAddress).value.trim(); if (config.ServiceSettings.ListenAddress === '') { config.ServiceSettings.ListenAddress = ':8065'; - React.findDOMNode(this.refs.ListenAddress).value = config.ServiceSettings.ListenAddress; + ReactDOM.findDOMNode(this.refs.ListenAddress).value = config.ServiceSettings.ListenAddress; } - config.ServiceSettings.SegmentDeveloperKey = React.findDOMNode(this.refs.SegmentDeveloperKey).value.trim(); - config.ServiceSettings.GoogleDeveloperKey = React.findDOMNode(this.refs.GoogleDeveloperKey).value.trim(); - config.ServiceSettings.EnableIncomingWebhooks = React.findDOMNode(this.refs.EnableIncomingWebhooks).checked; - config.ServiceSettings.EnablePostUsernameOverride = React.findDOMNode(this.refs.EnablePostUsernameOverride).checked; - config.ServiceSettings.EnablePostIconOverride = React.findDOMNode(this.refs.EnablePostIconOverride).checked; - config.ServiceSettings.EnableTesting = React.findDOMNode(this.refs.EnableTesting).checked; - config.ServiceSettings.EnableSecurityFixAlert = React.findDOMNode(this.refs.EnableSecurityFixAlert).checked; + config.ServiceSettings.SegmentDeveloperKey = ReactDOM.findDOMNode(this.refs.SegmentDeveloperKey).value.trim(); + config.ServiceSettings.GoogleDeveloperKey = ReactDOM.findDOMNode(this.refs.GoogleDeveloperKey).value.trim(); + config.ServiceSettings.EnableIncomingWebhooks = ReactDOM.findDOMNode(this.refs.EnableIncomingWebhooks).checked; + config.ServiceSettings.EnableOutgoingWebhooks = React.findDOMNode(this.refs.EnableOutgoingWebhooks).checked; + config.ServiceSettings.EnablePostUsernameOverride = ReactDOM.findDOMNode(this.refs.EnablePostUsernameOverride).checked; + config.ServiceSettings.EnablePostIconOverride = ReactDOM.findDOMNode(this.refs.EnablePostIconOverride).checked; + config.ServiceSettings.EnableTesting = ReactDOM.findDOMNode(this.refs.EnableTesting).checked; + config.ServiceSettings.EnableSecurityFixAlert = ReactDOM.findDOMNode(this.refs.EnableSecurityFixAlert).checked; - //config.ServiceSettings.EnableOAuthServiceProvider = React.findDOMNode(this.refs.EnableOAuthServiceProvider).checked; + //config.ServiceSettings.EnableOAuthServiceProvider = ReactDOM.findDOMNode(this.refs.EnableOAuthServiceProvider).checked; var MaximumLoginAttempts = 10; - if (!isNaN(parseInt(React.findDOMNode(this.refs.MaximumLoginAttempts).value, 10))) { - MaximumLoginAttempts = parseInt(React.findDOMNode(this.refs.MaximumLoginAttempts).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.MaximumLoginAttempts).value, 10))) { + MaximumLoginAttempts = parseInt(ReactDOM.findDOMNode(this.refs.MaximumLoginAttempts).value, 10); } config.ServiceSettings.MaximumLoginAttempts = MaximumLoginAttempts; - React.findDOMNode(this.refs.MaximumLoginAttempts).value = MaximumLoginAttempts; + ReactDOM.findDOMNode(this.refs.MaximumLoginAttempts).value = MaximumLoginAttempts; Client.saveConfig( config, @@ -207,7 +208,40 @@ export default class ServiceSettings extends React.Component { </div> </div> - <div className='form-group'> + <div className='form-group'> + <label + className='control-label col-sm-4' + htmlFor='EnableOutgoingWebhooks' + > + {'Enable Outgoing Webhooks: '} + </label> + <div className='col-sm-8'> + <label className='radio-inline'> + <input + type='radio' + name='EnableOutgoingWebhooks' + value='true' + ref='EnableOutgoingWebhooks' + defaultChecked={this.props.config.ServiceSettings.EnableOutgoingWebhooks} + onChange={this.handleChange} + /> + {'true'} + </label> + <label className='radio-inline'> + <input + type='radio' + name='EnableOutgoingWebhooks' + value='false' + defaultChecked={!this.props.config.ServiceSettings.EnableOutgoingWebhooks} + onChange={this.handleChange} + /> + {'false'} + </label> + <p className='help-text'>{'When true, outgoing webhooks will be allowed.'}</p> + </div> + </div> + + <div className='form-group'> <label className='control-label col-sm-4' htmlFor='EnablePostUsernameOverride' diff --git a/web/react/components/admin_console/sql_settings.jsx b/web/react/components/admin_console/sql_settings.jsx index 16a69e664..b43108bf7 100644 --- a/web/react/components/admin_console/sql_settings.jsx +++ b/web/react/components/admin_console/sql_settings.jsx @@ -29,27 +29,27 @@ export default class SqlSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.SqlSettings.Trace = React.findDOMNode(this.refs.Trace).checked; - config.SqlSettings.AtRestEncryptKey = React.findDOMNode(this.refs.AtRestEncryptKey).value.trim(); + config.SqlSettings.Trace = ReactDOM.findDOMNode(this.refs.Trace).checked; + config.SqlSettings.AtRestEncryptKey = ReactDOM.findDOMNode(this.refs.AtRestEncryptKey).value.trim(); if (config.SqlSettings.AtRestEncryptKey === '') { config.SqlSettings.AtRestEncryptKey = crypto.randomBytes(256).toString('base64').substring(0, 32); - React.findDOMNode(this.refs.AtRestEncryptKey).value = config.SqlSettings.AtRestEncryptKey; + ReactDOM.findDOMNode(this.refs.AtRestEncryptKey).value = config.SqlSettings.AtRestEncryptKey; } var MaxOpenConns = 10; - if (!isNaN(parseInt(React.findDOMNode(this.refs.MaxOpenConns).value, 10))) { - MaxOpenConns = parseInt(React.findDOMNode(this.refs.MaxOpenConns).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.MaxOpenConns).value, 10))) { + MaxOpenConns = parseInt(ReactDOM.findDOMNode(this.refs.MaxOpenConns).value, 10); } config.SqlSettings.MaxOpenConns = MaxOpenConns; - React.findDOMNode(this.refs.MaxOpenConns).value = MaxOpenConns; + ReactDOM.findDOMNode(this.refs.MaxOpenConns).value = MaxOpenConns; var MaxIdleConns = 10; - if (!isNaN(parseInt(React.findDOMNode(this.refs.MaxIdleConns).value, 10))) { - MaxIdleConns = parseInt(React.findDOMNode(this.refs.MaxIdleConns).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.MaxIdleConns).value, 10))) { + MaxIdleConns = parseInt(ReactDOM.findDOMNode(this.refs.MaxIdleConns).value, 10); } config.SqlSettings.MaxIdleConns = MaxIdleConns; - React.findDOMNode(this.refs.MaxIdleConns).value = MaxIdleConns; + ReactDOM.findDOMNode(this.refs.MaxIdleConns).value = MaxIdleConns; Client.saveConfig( config, @@ -79,7 +79,7 @@ export default class SqlSettings extends React.Component { return; } - React.findDOMNode(this.refs.AtRestEncryptKey).value = crypto.randomBytes(256).toString('base64').substring(0, 32); + ReactDOM.findDOMNode(this.refs.AtRestEncryptKey).value = crypto.randomBytes(256).toString('base64').substring(0, 32); var s = {saveNeeded: true, serverError: this.state.serverError}; this.setState(s); } @@ -220,7 +220,7 @@ export default class SqlSettings extends React.Component { <p className='help-text'>{'32-character salt available to encrypt and decrypt sensitive fields in database.'}</p> <div className='help-text'> <button - className='help-link' + className='btn btn-default' onClick={this.handleGenerate} > {'Re-Generate'} diff --git a/web/react/components/admin_console/team_settings.jsx b/web/react/components/admin_console/team_settings.jsx index a517c56fe..da4299714 100644 --- a/web/react/components/admin_console/team_settings.jsx +++ b/web/react/components/admin_console/team_settings.jsx @@ -27,17 +27,17 @@ export default class TeamSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.TeamSettings.SiteName = React.findDOMNode(this.refs.SiteName).value.trim(); - config.TeamSettings.RestrictCreationToDomains = React.findDOMNode(this.refs.RestrictCreationToDomains).value.trim(); - config.TeamSettings.EnableTeamCreation = React.findDOMNode(this.refs.EnableTeamCreation).checked; - config.TeamSettings.EnableUserCreation = React.findDOMNode(this.refs.EnableUserCreation).checked; + config.TeamSettings.SiteName = ReactDOM.findDOMNode(this.refs.SiteName).value.trim(); + config.TeamSettings.RestrictCreationToDomains = ReactDOM.findDOMNode(this.refs.RestrictCreationToDomains).value.trim(); + config.TeamSettings.EnableTeamCreation = ReactDOM.findDOMNode(this.refs.EnableTeamCreation).checked; + config.TeamSettings.EnableUserCreation = ReactDOM.findDOMNode(this.refs.EnableUserCreation).checked; var MaxUsersPerTeam = 50; - if (!isNaN(parseInt(React.findDOMNode(this.refs.MaxUsersPerTeam).value, 10))) { - MaxUsersPerTeam = parseInt(React.findDOMNode(this.refs.MaxUsersPerTeam).value, 10); + if (!isNaN(parseInt(ReactDOM.findDOMNode(this.refs.MaxUsersPerTeam).value, 10))) { + MaxUsersPerTeam = parseInt(ReactDOM.findDOMNode(this.refs.MaxUsersPerTeam).value, 10); } config.TeamSettings.MaxUsersPerTeam = MaxUsersPerTeam; - React.findDOMNode(this.refs.MaxUsersPerTeam).value = MaxUsersPerTeam; + ReactDOM.findDOMNode(this.refs.MaxUsersPerTeam).value = MaxUsersPerTeam; Client.saveConfig( config, diff --git a/web/react/components/admin_console/user_item.jsx b/web/react/components/admin_console/user_item.jsx index 665ccd719..395e22e6c 100644 --- a/web/react/components/admin_console/user_item.jsx +++ b/web/react/components/admin_console/user_item.jsx @@ -111,8 +111,10 @@ export default class UserItem extends React.Component { const user = this.props.user; let currentRoles = 'Member'; if (user.roles.length > 0) { - if (user.roles.indexOf('system_admin') > -1) { + if (Utils.isSystemAdmin(user.roles)) { currentRoles = 'System Admin'; + } else if (Utils.isAdmin(user.roles)) { + currentRoles = 'Team Admin'; } else { currentRoles = user.roles.charAt(0).toUpperCase() + user.roles.slice(1); } @@ -158,7 +160,7 @@ export default class UserItem extends React.Component { href='#' onClick={this.handleMakeAdmin} > - {'Make Admin'} + {'Make Team Admin'} </a> </li> ); diff --git a/web/react/components/change_url_modal.jsx b/web/react/components/change_url_modal.jsx index f8db13392..714e93ff8 100644 --- a/web/react/components/change_url_modal.jsx +++ b/web/react/components/change_url_modal.jsx @@ -29,7 +29,7 @@ export default class ChangeUrlModal extends React.Component { } componentDidUpdate(prevProps) { if (this.props.show === true && prevProps.show === false) { - React.findDOMNode(this.refs.urlinput).select(); + ReactDOM.findDOMNode(this.refs.urlinput).select(); } } onURLChanged(e) { @@ -60,7 +60,7 @@ export default class ChangeUrlModal extends React.Component { doSubmit(e) { e.preventDefault(); - const url = React.findDOMNode(this.refs.urlinput).value; + const url = ReactDOM.findDOMNode(this.refs.urlinput).value; const cleanedURL = Utils.cleanUpUrlable(url); if (cleanedURL !== url || url.length < 2 || url.indexOf('__') > -1) { this.setState({urlError: this.getURLError(url)}); diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx index e47db073d..1b709336f 100644 --- a/web/react/components/channel_header.jsx +++ b/web/react/components/channel_header.jsx @@ -4,7 +4,6 @@ const ChannelStore = require('../stores/channel_store.jsx'); const UserStore = require('../stores/user_store.jsx'); const PostStore = require('../stores/post_store.jsx'); -const SocketStore = require('../stores/socket_store.jsx'); const NavbarSearchBox = require('./search_bar.jsx'); const AsyncClient = require('../utils/async_client.jsx'); const Client = require('../utils/client.jsx'); @@ -17,12 +16,14 @@ const AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); const Constants = require('../utils/constants.jsx'); const ActionTypes = Constants.ActionTypes; +const Popover = ReactBootstrap.Popover; +const OverlayTrigger = ReactBootstrap.OverlayTrigger; + export default class ChannelHeader extends React.Component { constructor(props) { super(props); this.onListenerChange = this.onListenerChange.bind(this); - this.onSocketChange = this.onSocketChange.bind(this); this.handleLeave = this.handleLeave.bind(this); this.searchMentions = this.searchMentions.bind(this); @@ -42,7 +43,6 @@ export default class ChannelHeader extends React.Component { ChannelStore.addExtraInfoChangeListener(this.onListenerChange); PostStore.addSearchChangeListener(this.onListenerChange); UserStore.addChangeListener(this.onListenerChange); - SocketStore.addChangeListener(this.onSocketChange); } componentWillUnmount() { ChannelStore.removeChangeListener(this.onListenerChange); @@ -57,16 +57,9 @@ export default class ChannelHeader extends React.Component { } $('.channel-header__info .description').popover({placement: 'bottom', trigger: 'hover', html: true, delay: {show: 500, hide: 500}}); } - onSocketChange(msg) { - if (msg.action === 'new_user' || - msg.action === 'user_added' || - (msg.action === 'user_removed' && msg.user_id !== UserStore.getCurrentId())) { - AsyncClient.getChannelExtraInfo(true); - } - } handleLeave() { Client.leaveChannel(this.state.channel.id, - function handleLeaveSuccess() { + () => { AppDispatcher.handleViewAction({ type: ActionTypes.LEAVE_CHANNEL, id: this.state.channel.id @@ -74,8 +67,8 @@ export default class ChannelHeader extends React.Component { const townsquare = ChannelStore.getByName('town-square'); Utils.switchChannel(townsquare); - }.bind(this), - function handleLeaveError(err) { + }, + (err) => { AsyncClient.dispatchError(err, 'handleLeave'); } ); @@ -110,7 +103,21 @@ export default class ChannelHeader extends React.Component { } const channel = this.state.channel; - const popoverContent = React.renderToString(<MessageWrapper message={channel.description}/>); + const popoverContent = ( + <Popover + id='hader-popover' + bStyle='info' + bSize='large' + placement='bottom' + className='description' + onMouseOver={() => this.refs.descriptionOverlay.show()} + onMouseOut={() => this.refs.descriptionOverlay.hide()} + > + <MessageWrapper + message={channel.description} + /> + </Popover> + ); let channelTitle = channel.display_name; const currentId = UserStore.getCurrentId(); const isAdmin = Utils.isAdmin(this.state.memberChannel.roles) || Utils.isAdmin(this.state.memberTeam.roles); @@ -301,75 +308,82 @@ export default class ChannelHeader extends React.Component { return ( <table className='channel-header alt'> - <tr> - <th> - <div className='channel-header__info'> - <div className='dropdown'> + <tbody> + <tr> + <th> + <div className='channel-header__info'> + <div className='dropdown'> + <a + href='#' + className='dropdown-toggle theme' + type='button' + id='channel_header_dropdown' + data-toggle='dropdown' + aria-expanded='true' + > + <strong className='heading'>{channelTitle} </strong> + <span className='glyphicon glyphicon-chevron-down header-dropdown__icon' /> + </a> + <ul + className='dropdown-menu' + role='menu' + aria-labelledby='channel_header_dropdown' + > + {dropdownContents} + </ul> + </div> + <OverlayTrigger + trigger={['hover', 'focus']} + placement='bottom' + overlay={popoverContent} + ref='descriptionOverlay' + > + <div + onClick={TextFormatting.handleClick} + className='description' + dangerouslySetInnerHTML={{__html: TextFormatting.formatText(channel.description, {singleline: true, mentionHighlight: false})}} + /> + </OverlayTrigger> + </div> + </th> + <th> + <PopoverListMembers + members={this.state.users} + channelId={channel.id} + /> + </th> + <th className='search-bar__container'><NavbarSearchBox /></th> + <th> + <div className='dropdown channel-header__links'> <a href='#' className='dropdown-toggle theme' type='button' - id='channel_header_dropdown' + id='channel_header_right_dropdown' data-toggle='dropdown' aria-expanded='true' > - <strong className='heading'>{channelTitle} </strong> - <span className='glyphicon glyphicon-chevron-down header-dropdown__icon' /> + <span dangerouslySetInnerHTML={{__html: Constants.MENU_ICON}} /> </a> <ul - className='dropdown-menu' + className='dropdown-menu dropdown-menu-right' role='menu' - aria-labelledby='channel_header_dropdown' + aria-labelledby='channel_header_right_dropdown' > - {dropdownContents} + <li role='presentation'> + <a + role='menuitem' + href='#' + onClick={this.searchMentions} + > + Recent Mentions + </a> + </li> </ul> </div> - <div - data-toggle='popover' - data-content={popoverContent} - className='description' - onClick={TextFormatting.handleClick} - dangerouslySetInnerHTML={{__html: TextFormatting.formatText(channel.description, {singleline: true, mentionHighlight: false})}} - /> - </div> - </th> - <th> - <PopoverListMembers - members={this.state.users} - channelId={channel.id} - /> - </th> - <th className='search-bar__container'><NavbarSearchBox /></th> - <th> - <div className='dropdown channel-header__links'> - <a - href='#' - className='dropdown-toggle theme' - type='button' - id='channel_header_right_dropdown' - data-toggle='dropdown' - aria-expanded='true' - > - <span dangerouslySetInnerHTML={{__html: Constants.MENU_ICON}} /> - </a> - <ul - className='dropdown-menu dropdown-menu-right' - role='menu' - aria-labelledby='channel_header_right_dropdown' - > - <li role='presentation'> - <a - role='menuitem' - href='#' - onClick={this.searchMentions} - > - Recent Mentions - </a> - </li> - </ul> - </div> - </th> - </tr> + </th> + </tr> + </tbody> </table> ); } diff --git a/web/react/components/channel_info_modal.jsx b/web/react/components/channel_info_modal.jsx index d6de958e7..bccd8d0b9 100644 --- a/web/react/components/channel_info_modal.jsx +++ b/web/react/components/channel_info_modal.jsx @@ -15,7 +15,7 @@ export default class CommandList extends React.Component { componentDidMount() { var self = this; if (this.refs.modal) { - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', function show(e) { + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', function show(e) { var button = e.relatedTarget; self.setState({channel_id: $(button).attr('data-channelid')}); }); diff --git a/web/react/components/channel_invite_modal.jsx b/web/react/components/channel_invite_modal.jsx index 1e621c683..7c7770095 100644 --- a/web/react/components/channel_invite_modal.jsx +++ b/web/react/components/channel_invite_modal.jsx @@ -56,8 +56,8 @@ export default class ChannelInviteModal extends React.Component { }; } componentDidMount() { - $(React.findDOMNode(this)).on('hidden.bs.modal', this.onHide); - $(React.findDOMNode(this)).on('show.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this)).on('hidden.bs.modal', this.onHide); + $(ReactDOM.findDOMNode(this)).on('show.bs.modal', this.onShow); ChannelStore.addExtraInfoChangeListener(this.onListenerChange); ChannelStore.addChangeListener(this.onListenerChange); diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx index d16069725..270631db2 100644 --- a/web/react/components/channel_loader.jsx +++ b/web/react/components/channel_loader.jsx @@ -75,15 +75,6 @@ export default class ChannelLoader extends React.Component { Utils.applyTheme(Constants.THEMES.default); } - /* Setup global mouse events */ - $('body').on('click', function hidePopover(e) { - $('[data-toggle="popover"]').each(function eachPopover() { - if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) { - $(this).popover('hide'); - } - }); - }); - $('body').on('mouseenter mouseleave', '.post', function mouseOver(ev) { if (ev.type === 'mouseenter') { $(this).parent('div').prev('.date-separator, .new-separator').addClass('hovered--after'); @@ -104,12 +95,6 @@ export default class ChannelLoader extends React.Component { } }); - /* Setup modal events */ - $('.modal').on('show.bs.modal', function onShow() { - $('.modal-body').css('overflow-y', 'auto'); - $('.modal-body').css('max-height', $(window).height() * 0.7); - }); - /* Prevent backspace from navigating back a page */ $(window).on('keydown.preventBackspace', (e) => { if (e.which === 8 && !$(e.target).is('input, textarea')) { diff --git a/web/react/components/channel_members.jsx b/web/react/components/channel_members.jsx index 0cd384977..86cc2464d 100644 --- a/web/react/components/channel_members.jsx +++ b/web/react/components/channel_members.jsx @@ -74,9 +74,9 @@ export default class ChannelMembers extends React.Component { componentDidMount() { ChannelStore.addExtraInfoChangeListener(this.onChange); ChannelStore.addChangeListener(this.onChange); - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); } componentWillUnmount() { ChannelStore.removeExtraInfoChangeListener(this.onChange); diff --git a/web/react/components/channel_notifications.jsx b/web/react/components/channel_notifications.jsx index 2114be905..6151d4bdd 100644 --- a/web/react/components/channel_notifications.jsx +++ b/web/react/components/channel_notifications.jsx @@ -51,7 +51,7 @@ export default class ChannelNotifications extends React.Component { componentDidMount() { ChannelStore.addChangeListener(this.onListenerChange); - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); } componentWillUnmount() { ChannelStore.removeChangeListener(this.onListenerChange); @@ -104,7 +104,7 @@ export default class ChannelNotifications extends React.Component { } handleUpdateNotifyLevel(notifyLevel) { this.setState({notifyLevel}); - React.findDOMNode(this.refs.modal).focus(); + ReactDOM.findDOMNode(this.refs.modal).focus(); } createNotifyLevelSection(serverError) { var handleUpdateSection; @@ -266,7 +266,7 @@ export default class ChannelNotifications extends React.Component { handleUpdateMarkUnreadLevel(markUnreadLevel) { this.setState({markUnreadLevel}); - React.findDOMNode(this.refs.modal).focus(); + ReactDOM.findDOMNode(this.refs.modal).focus(); } createMarkUnreadLevelSection(serverError) { diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx index add4125d7..12d1af6ff 100644 --- a/web/react/components/create_comment.jsx +++ b/web/react/components/create_comment.jsx @@ -32,6 +32,7 @@ export default class CreateComment extends React.Component { this.removePreview = this.removePreview.bind(this); this.handleSubmit = this.handleSubmit.bind(this); this.getFileCount = this.getFileCount.bind(this); + this.handleResize = this.handleResize.bind(this); PostStore.clearCommentDraftUploads(); @@ -40,13 +41,25 @@ export default class CreateComment extends React.Component { messageText: draft.message, uploadsInProgress: draft.uploadsInProgress, previews: draft.previews, - submitting: false + submitting: false, + windowWidth: Utils.windowWidth() }; } + componentDidMount() { + window.addEventListener('resize', this.handleResize); + } + componentWillUnmount() { + window.removeEventListener('resize', this.handleResize); + } + handleResize() { + this.setState({windowWidth: Utils.windowWidth()}); + } componentDidUpdate(prevProps, prevState) { if (prevState.uploadsInProgress < this.state.uploadsInProgress) { $('.post-right__scroll').scrollTop($('.post-right__scroll')[0].scrollHeight); - $('.post-right__scroll').perfectScrollbar('update'); + if (this.state.windowWidth > 768) { + $('.post-right__scroll').perfectScrollbar('update'); + } } } handleSubmit(e) { @@ -126,7 +139,7 @@ export default class CreateComment extends React.Component { commentMsgKeyPress(e) { if (e.which === 13 && !e.shiftKey && !e.altKey) { e.preventDefault(); - React.findDOMNode(this.refs.textbox).blur(); + ReactDOM.findDOMNode(this.refs.textbox).blur(); this.handleSubmit(e); } @@ -189,7 +202,7 @@ export default class CreateComment extends React.Component { handleTextDrop(text) { const newText = this.state.messageText + text; this.handleUserInput(newText); - Utils.setCaretPosition(React.findDOMNode(this.refs.textbox.refs.message), newText.length); + Utils.setCaretPosition(ReactDOM.findDOMNode(this.refs.textbox.refs.message), newText.length); } removePreview(id) { let previews = this.state.previews; @@ -255,6 +268,17 @@ export default class CreateComment extends React.Component { postFooterClassName += ' has-error'; } + let uploadsInProgressText = null; + if (this.state.uploadsInProgress.length > 0) { + uploadsInProgressText = ( + <span + className='pull-right post-right-comments-upload-in-progress' + > + {this.state.uploadsInProgress.length === 1 ? 'File uploading' : 'Files uploading'} + </span> + ); + } + return ( <form onSubmit={this.handleSubmit}> <div className='post-create'> @@ -262,25 +286,27 @@ export default class CreateComment extends React.Component { id={this.props.rootId} className='post-create-body comment-create-body' > - <Textbox - onUserInput={this.handleUserInput} - onKeyPress={this.commentMsgKeyPress} - messageText={this.state.messageText} - createMessage='Add a comment...' - initialText='' - id='reply_textbox' - ref='textbox' - /> - <FileUpload - ref='fileUpload' - getFileCount={this.getFileCount} - onUploadStart={this.handleUploadStart} - onFileUpload={this.handleFileUploadComplete} - onUploadError={this.handleUploadError} - onTextDrop={this.handleTextDrop} - postType='comment' - channelId={this.props.channelId} - /> + <div className='post-body__cell'> + <Textbox + onUserInput={this.handleUserInput} + onKeyPress={this.commentMsgKeyPress} + messageText={this.state.messageText} + createMessage='Add a comment...' + initialText='' + id='reply_textbox' + ref='textbox' + /> + <FileUpload + ref='fileUpload' + getFileCount={this.getFileCount} + onUploadStart={this.handleUploadStart} + onFileUpload={this.handleFileUploadComplete} + onUploadError={this.handleUploadError} + onTextDrop={this.handleTextDrop} + postType='comment' + channelId={this.props.channelId} + /> + </div> </div> <MsgTyping channelId={this.props.channelId} @@ -293,6 +319,7 @@ export default class CreateComment extends React.Component { value='Add Comment' onClick={this.handleSubmit} /> + {uploadsInProgressText} {postError} {serverError} </div> diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx index ed265ab02..035899592 100644 --- a/web/react/components/create_post.jsx +++ b/web/react/components/create_post.jsx @@ -16,6 +16,7 @@ const Utils = require('../utils/utils.jsx'); const Constants = require('../utils/constants.jsx'); const ActionTypes = Constants.ActionTypes; +const KeyCodes = Constants.KeyCodes; export default class CreatePost extends React.Component { constructor(props) { @@ -35,6 +36,8 @@ export default class CreatePost extends React.Component { this.removePreview = this.removePreview.bind(this); this.onChange = this.onChange.bind(this); this.getFileCount = this.getFileCount.bind(this); + this.handleArrowUp = this.handleArrowUp.bind(this); + this.handleResize = this.handleResize.bind(this); PostStore.clearDraftUploads(); @@ -46,9 +49,17 @@ export default class CreatePost extends React.Component { uploadsInProgress: draft.uploadsInProgress, previews: draft.previews, submitting: false, - initialText: draft.messageText + initialText: draft.messageText, + windowWidth: Utils.windowWidth(), + windowHeigth: Utils.windowHeight() }; } + handleResize() { + this.setState({ + windowWidth: Utils.windowWidth(), + windowHeight: Utils.windowHeight() + }); + } componentDidUpdate(prevProps, prevState) { if (prevState.previews.length !== this.state.previews.length) { this.resizePostHolder(); @@ -59,6 +70,11 @@ export default class CreatePost extends React.Component { this.resizePostHolder(); return; } + + if (prevState.windowWidth !== this.state.windowWidth || prevState.windowHeight !== this.state.windowHeigth) { + this.resizePostHolder(); + return; + } } getCurrentDraft() { const draft = PostStore.getCurrentDraft(); @@ -172,9 +188,9 @@ export default class CreatePost extends React.Component { } } postMsgKeyPress(e) { - if (e.which === 13 && !e.shiftKey && !e.altKey) { + if (e.which === KeyCodes.ENTER && !e.shiftKey && !e.altKey) { e.preventDefault(); - React.findDOMNode(this.refs.textbox).blur(); + ReactDOM.findDOMNode(this.refs.textbox).blur(); this.handleSubmit(e); } @@ -192,9 +208,11 @@ export default class CreatePost extends React.Component { PostStore.storeCurrentDraft(draft); } resizePostHolder() { - const height = $(window).height() - $(React.findDOMNode(this.refs.topDiv)).height() - $('#error_bar').outerHeight() - 50; + const height = this.state.windowHeigth - $(ReactDOM.findDOMNode(this.refs.topDiv)).height() - 50; $('.post-list-holder-by-time').css('height', `${height}px`); - $(window).trigger('resize'); + if (this.state.windowWidth > 960) { + $('#post_textbox').focus(); + } } handleUploadStart(clientIds, channelId) { const draft = PostStore.getDraft(channelId); @@ -240,7 +258,7 @@ export default class CreatePost extends React.Component { handleTextDrop(text) { const newText = this.state.messageText + text; this.handleUserInput(newText); - Utils.setCaretPosition(React.findDOMNode(this.refs.textbox.refs.message), newText.length); + Utils.setCaretPosition(ReactDOM.findDOMNode(this.refs.textbox.refs.message), newText.length); } removePreview(id) { const previews = Object.assign([], this.state.previews); @@ -269,9 +287,11 @@ export default class CreatePost extends React.Component { componentDidMount() { ChannelStore.addChangeListener(this.onChange); this.resizePostHolder(); + window.addEventListener('resize', this.handleResize); } componentWillUnmount() { ChannelStore.removeChangeListener(this.onChange); + window.removeEventListener('resize', this.handleResize); } onChange() { const channelId = ChannelStore.getCurrentId(); @@ -289,6 +309,27 @@ export default class CreatePost extends React.Component { const draft = PostStore.getDraft(channelId); return draft.previews.length + draft.uploadsInProgress.length; } + handleArrowUp(e) { + if (e.keyCode === KeyCodes.UP && this.state.messageText === '') { + e.preventDefault(); + + const channelId = ChannelStore.getCurrentId(); + const lastPost = PostStore.getCurrentUsersLatestPost(channelId); + if (!lastPost) { + return; + } + var type = (lastPost.root_id && lastPost.root_id.length > 0) ? 'Comment' : 'Post'; + + AppDispatcher.handleViewAction({ + type: ActionTypes.RECIEVED_EDIT_POST, + refocusId: '#post_textbox', + title: type, + message: lastPost.message, + postId: lastPost.id, + channelId: lastPost.channel_id + }); + } + } render() { let serverError = null; if (this.state.serverError) { @@ -333,6 +374,7 @@ export default class CreatePost extends React.Component { <Textbox onUserInput={this.handleUserInput} onKeyPress={this.postMsgKeyPress} + onKeyDown={this.handleArrowUp} onHeightChange={this.resizePostHolder} messageText={this.state.messageText} createMessage='Write a message...' diff --git a/web/react/components/delete_channel_modal.jsx b/web/react/components/delete_channel_modal.jsx index 9358c98d7..b7d633b38 100644 --- a/web/react/components/delete_channel_modal.jsx +++ b/web/react/components/delete_channel_modal.jsx @@ -41,7 +41,7 @@ export default class DeleteChannelModal extends React.Component { }); } componentDidMount() { - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); } render() { const channel = ChannelStore.getCurrent(); diff --git a/web/react/components/delete_post_modal.jsx b/web/react/components/delete_post_modal.jsx index ea7d76b1e..3a3dabce5 100644 --- a/web/react/components/delete_post_modal.jsx +++ b/web/react/components/delete_post_modal.jsx @@ -73,7 +73,7 @@ export default class DeletePostModal extends React.Component { this.setState(newState); } componentDidMount() { - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); PostStore.addSelectedPostChangeListener(this.onListenerChange); } componentWillUnmount() { diff --git a/web/react/components/edit_channel_modal.jsx b/web/react/components/edit_channel_modal.jsx index 6ccf12be6..d63a1db30 100644 --- a/web/react/components/edit_channel_modal.jsx +++ b/web/react/components/edit_channel_modal.jsx @@ -34,7 +34,7 @@ export default class EditChannelModal extends React.Component { function handleUpdateSuccess() { this.setState({serverError: ''}); AsyncClient.getChannel(this.state.channelId); - $(React.findDOMNode(this.refs.modal)).modal('hide'); + $(ReactDOM.findDOMNode(this.refs.modal)).modal('hide'); }.bind(this), function handleUpdateError(err) { if (err.message === 'Invalid channel_description parameter') { @@ -56,11 +56,11 @@ export default class EditChannelModal extends React.Component { this.setState({description: $(button).attr('data-desc'), title: $(button).attr('data-title'), channelId: $(button).attr('data-channelid'), serverError: ''}); } componentDidMount() { - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.handleClose); + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.handleClose); } componentWillUnmount() { - $(React.findDOMNode(this.refs.modal)).off('hidden.bs.modal', this.handleClose); + $(ReactDOM.findDOMNode(this.refs.modal)).off('hidden.bs.modal', this.handleClose); } render() { var serverError = null; diff --git a/web/react/components/edit_post_modal.jsx b/web/react/components/edit_post_modal.jsx index 165a28a64..b259b3c18 100644 --- a/web/react/components/edit_post_modal.jsx +++ b/web/react/components/edit_post_modal.jsx @@ -5,6 +5,7 @@ var Client = require('../utils/client.jsx'); var AsyncClient = require('../utils/async_client.jsx'); var Textbox = require('./textbox.jsx'); var BrowserStore = require('../stores/browser_store.jsx'); +var PostStore = require('../stores/post_store.jsx'); export default class EditPostModal extends React.Component { constructor() { @@ -14,6 +15,7 @@ export default class EditPostModal extends React.Component { this.handleEditInput = this.handleEditInput.bind(this); this.handleEditKeyPress = this.handleEditKeyPress.bind(this); this.handleUserInput = this.handleUserInput.bind(this); + this.handleEditPostEvent = this.handleEditPostEvent.bind(this); this.state = {editText: '', title: '', post_id: '', channel_id: '', comments: 0, refocusId: ''}; } @@ -35,16 +37,15 @@ export default class EditPostModal extends React.Component { Client.updatePost(updatedPost, function success() { - AsyncClient.getPosts(this.state.channel_id); + AsyncClient.getPosts(updatedPost.channel_id); window.scrollTo(0, 0); - }.bind(this), + }, function error(err) { AsyncClient.dispatchError(err, 'updatePost'); } ); $('#edit_post').modal('hide'); - $(this.state.refocusId).focus(); } handleEditInput(editMessage) { this.setState({editText: editMessage}); @@ -52,28 +53,57 @@ export default class EditPostModal extends React.Component { handleEditKeyPress(e) { if (e.which === 13 && !e.shiftKey && !e.altKey) { e.preventDefault(); - React.findDOMNode(this.refs.editbox).blur(); + ReactDOM.findDOMNode(this.refs.editbox).blur(); this.handleEdit(e); } } handleUserInput(e) { this.setState({editText: e.target.value}); } + handleEditPostEvent(options) { + this.setState({ + editText: options.message || '', + title: options.title || '', + post_id: options.postId || '', + channel_id: options.channelId || '', + comments: options.comments || 0, + refocusId: options.refocusId || '' + }); + + $(ReactDOM.findDOMNode(this.refs.modal)).modal('show'); + } componentDidMount() { var self = this; - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', function onHidden() { + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', function onHidden() { self.setState({editText: '', title: '', channel_id: '', post_id: '', comments: 0, refocusId: '', error: ''}); }); - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', function onShow(e) { + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', function onShow(e) { var button = e.relatedTarget; + if (!button) { + return; + } self.setState({editText: $(button).attr('data-message'), title: $(button).attr('data-title'), channel_id: $(button).attr('data-channelid'), post_id: $(button).attr('data-postid'), comments: $(button).attr('data-comments'), refocusId: $(button).attr('data-refoucsid')}); }); - $(React.findDOMNode(this.refs.modal)).on('shown.bs.modal', function onShown() { + $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', function onShown() { self.refs.editbox.resize(); + $('#edit_textbox').get(0).focus(); }); + + $(ReactDOM.findDOMNode(this.refs.modal)).on('hide.bs.modal', function onShown() { + if (self.state.refocusId !== '') { + setTimeout(() => { + $(self.state.refocusId).get(0).focus(); + }); + } + }); + + PostStore.addEditPostListener(this.handleEditPostEvent); + } + componentWillUnmount() { + PostStore.removeEditPostListener(this.handleEditPostEvent); } render() { var error = (<div className='form-group'><br /></div>); diff --git a/web/react/components/email_verify.jsx b/web/react/components/email_verify.jsx index 9be7f97f8..940b01f8d 100644 --- a/web/react/components/email_verify.jsx +++ b/web/react/components/email_verify.jsx @@ -39,11 +39,9 @@ export default class EmailVerify extends React.Component { return ( <div className='col-sm-12'> - <div className='panel panel-default verify_panel'> - <div className='panel-heading'> - <h3 className='panel-title'>{title}</h3> - </div> - <div className='panel-body'> + <div className='signup-team__container'> + <h3>{title}</h3> + <div> {body} {resend} {resendConfirm} diff --git a/web/react/components/error_bar.jsx b/web/react/components/error_bar.jsx index b100fd337..6311d9460 100644 --- a/web/react/components/error_bar.jsx +++ b/web/react/components/error_bar.jsx @@ -9,7 +9,6 @@ export default class ErrorBar extends React.Component { this.onErrorChange = this.onErrorChange.bind(this); this.handleClose = this.handleClose.bind(this); - this.resize = this.resize.bind(this); this.prevTimer = null; this.state = ErrorStore.getLastError(); @@ -46,34 +45,14 @@ export default class ErrorBar extends React.Component { return false; } - resize() { - if (this.isValidError(this.state)) { - var height = $(React.findDOMNode(this)).outerHeight(); - height = height < 30 ? 30 : height; - $('body').css('padding-top', height + 'px'); - } else { - $('body').css('padding-top', '0'); - } - } - componentDidMount() { ErrorStore.addChangeListener(this.onErrorChange); - - $(window).resize(() => { - this.resize(); - }); - - this.resize(); } componentWillUnmount() { ErrorStore.removeChangeListener(this.onErrorChange); } - componentDidUpdate() { - this.resize(); - } - onErrorChange() { var newState = ErrorStore.getLastError(); diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx index 659da4f5e..c6dff6550 100644 --- a/web/react/components/file_attachment.jsx +++ b/web/react/components/file_attachment.jsx @@ -43,7 +43,7 @@ export default class FileAttachment extends React.Component { return function loader() { $(this).remove(); if (name in self.refs) { - var imgDiv = React.findDOMNode(self.refs[name]); + var imgDiv = ReactDOM.findDOMNode(self.refs[name]); $(imgDiv).removeClass('post__load'); $(imgDiv).addClass('post__image'); @@ -82,7 +82,7 @@ export default class FileAttachment extends React.Component { if (nextState.fileSize !== this.state.fileSize) { if (this.refs.fileSize) { // update the UI element to display the file size without re-rendering the whole component - React.findDOMNode(this.refs.fileSize).innerHTML = utils.fileSizeToString(nextState.fileSize); + ReactDOM.findDOMNode(this.refs.fileSize).innerHTML = utils.fileSizeToString(nextState.fileSize); return false; } diff --git a/web/react/components/file_upload.jsx b/web/react/components/file_upload.jsx index e947fc50c..8854a54df 100644 --- a/web/react/components/file_upload.jsx +++ b/web/react/components/file_upload.jsx @@ -86,7 +86,7 @@ export default class FileUpload extends React.Component { } handleChange() { - var element = $(React.findDOMNode(this.refs.fileInput)); + var element = $(ReactDOM.findDOMNode(this.refs.fileInput)); this.uploadFiles(element.prop('files')); @@ -115,7 +115,7 @@ export default class FileUpload extends React.Component { } componentDidMount() { - var inputDiv = React.findDOMNode(this.refs.input); + var inputDiv = ReactDOM.findDOMNode(this.refs.input); var self = this; if (this.props.postType === 'post') { diff --git a/web/react/components/find_team.jsx b/web/react/components/find_team.jsx index 59c4e08e3..e324f3666 100644 --- a/web/react/components/find_team.jsx +++ b/web/react/components/find_team.jsx @@ -17,7 +17,7 @@ export default class FindTeam extends React.Component { var state = { }; - var email = React.findDOMNode(this.refs.email).value.trim().toLowerCase(); + var email = ReactDOM.findDOMNode(this.refs.email).value.trim().toLowerCase(); if (!email || !utils.isEmail(email)) { state.email_error = 'Please enter a valid email address'; this.setState(state); @@ -70,6 +70,7 @@ export default class FindTeam extends React.Component { className='form-control' placeholder='you@domain.com' maxLength='128' + spellCheck='false' /> {emailError} </div> diff --git a/web/react/components/get_link_modal.jsx b/web/react/components/get_link_modal.jsx index 234013b93..325e86f3d 100644 --- a/web/react/components/get_link_modal.jsx +++ b/web/react/components/get_link_modal.jsx @@ -22,12 +22,12 @@ export default class GetLinkModal extends React.Component { } componentDidMount() { if (this.refs.modal) { - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); - $(React.findDOMNode(this.refs.modal)).on('hide.bs.modal', this.onHide); + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('hide.bs.modal', this.onHide); } } handleClick() { - var copyTextarea = $(React.findDOMNode(this.refs.textarea)); + var copyTextarea = $(ReactDOM.findDOMNode(this.refs.textarea)); copyTextarea.select(); try { @@ -96,7 +96,6 @@ export default class GetLinkModal extends React.Component { <p> Send teammates the link below for them to sign-up to this team site. <br /><br /> - Be careful not to share this link publicly, since anyone with the link can join your team. </p> <textarea className='form-control no-resize' diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx index 2ca39d1b1..90290099d 100644 --- a/web/react/components/invite_member_modal.jsx +++ b/web/react/components/invite_member_modal.jsx @@ -36,7 +36,7 @@ export default class InviteMemberModal extends React.Component { var notEmpty = false; for (var i = 0; i < self.state.inviteIds.length; i++) { var index = self.state.inviteIds[i]; - if (React.findDOMNode(self.refs['email' + index]).value.trim() !== '') { + if (ReactDOM.findDOMNode(self.refs['email' + index]).value.trim() !== '') { notEmpty = true; break; } @@ -69,7 +69,7 @@ export default class InviteMemberModal extends React.Component { for (var i = 0; i < count; i++) { var index = inviteIds[i]; var invite = {}; - invite.email = React.findDOMNode(this.refs['email' + index]).value.trim(); + invite.email = ReactDOM.findDOMNode(this.refs['email' + index]).value.trim(); if (!invite.email || !utils.isEmail(invite.email)) { emailErrors[index] = 'Please enter a valid email address'; valid = false; @@ -77,9 +77,9 @@ export default class InviteMemberModal extends React.Component { emailErrors[index] = ''; } - invite.firstName = React.findDOMNode(this.refs['first_name' + index]).value.trim(); + invite.firstName = ReactDOM.findDOMNode(this.refs['first_name' + index]).value.trim(); - invite.lastName = React.findDOMNode(this.refs['last_name' + index]).value.trim(); + invite.lastName = ReactDOM.findDOMNode(this.refs['last_name' + index]).value.trim(); invites.push(invite); } @@ -95,8 +95,8 @@ export default class InviteMemberModal extends React.Component { Client.inviteMembers(data, function success() { - $(React.findDOMNode(this.refs.modal)).attr('data-confirm', 'true'); - $(React.findDOMNode(this.refs.modal)).modal('hide'); + $(ReactDOM.findDOMNode(this.refs.modal)).attr('data-confirm', 'true'); + $(ReactDOM.findDOMNode(this.refs.modal)).modal('hide'); }.bind(this), function fail(err) { if (err.message === 'This person is already on your team') { @@ -110,8 +110,8 @@ export default class InviteMemberModal extends React.Component { } componentDidUpdate() { - $(React.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 200); - $(React.findDOMNode(this.refs.modalBody)).css('overflow-y', 'scroll'); + $(ReactDOM.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 200); + $(ReactDOM.findDOMNode(this.refs.modalBody)).css('overflow-y', 'scroll'); } addInviteFields() { @@ -126,9 +126,9 @@ export default class InviteMemberModal extends React.Component { for (var i = 0; i < inviteIds.length; i++) { var index = inviteIds[i]; - React.findDOMNode(this.refs['email' + index]).value = ''; - React.findDOMNode(this.refs['first_name' + index]).value = ''; - React.findDOMNode(this.refs['last_name' + index]).value = ''; + ReactDOM.findDOMNode(this.refs['email' + index]).value = ''; + ReactDOM.findDOMNode(this.refs['first_name' + index]).value = ''; + ReactDOM.findDOMNode(this.refs['last_name' + index]).value = ''; } this.setState({ @@ -211,6 +211,7 @@ export default class InviteMemberModal extends React.Component { placeholder='First name' maxLength='64' disabled={!this.state.emailEnabled} + spellCheck='false' /> {firstNameError} </div> @@ -224,6 +225,7 @@ export default class InviteMemberModal extends React.Component { placeholder='Last name' maxLength='64' disabled={!this.state.emailEnabled} + spellCheck='false' /> {lastNameError} </div> @@ -242,6 +244,7 @@ export default class InviteMemberModal extends React.Component { placeholder='email@domain.com' maxLength='64' disabled={!this.state.emailEnabled} + spellCheck='false' /> {emailError} </div> diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index 997abce68..c982d57ca 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -25,14 +25,14 @@ export default class Login extends React.Component { return; } - const email = React.findDOMNode(this.refs.email).value.trim(); + const email = ReactDOM.findDOMNode(this.refs.email).value.trim(); if (!email) { state.serverError = 'An email is required'; this.setState(state); return; } - const password = React.findDOMNode(this.refs.password).value.trim(); + const password = ReactDOM.findDOMNode(this.refs.password).value.trim(); if (!password) { state.serverError = 'A password is required'; this.setState(state); @@ -136,6 +136,7 @@ export default class Login extends React.Component { defaultValue={priorEmail} ref='email' placeholder='Email' + spellCheck='false' /> </div> <div className={'form-group' + errorClass}> @@ -146,6 +147,7 @@ export default class Login extends React.Component { name='password' ref='password' placeholder='Password' + spellCheck='false' /> </div> <div className='form-group'> diff --git a/web/react/components/member_list_team_item.jsx b/web/react/components/member_list_team_item.jsx index 9a104aa32..3af1d3800 100644 --- a/web/react/components/member_list_team_item.jsx +++ b/web/react/components/member_list_team_item.jsx @@ -82,8 +82,10 @@ export default class MemberListTeamItem extends React.Component { const timestamp = UserStore.getCurrentUser().update_at; if (user.roles.length > 0) { - if (user.roles.indexOf('system_admin') > -1) { + if (Utils.isSystemAdmin(user.roles)) { currentRoles = 'System Admin'; + } else if (Utils.isAdmin(user.roles)) { + currentRoles = 'Team Admin'; } else { currentRoles = user.roles.charAt(0).toUpperCase() + user.roles.slice(1); } @@ -112,7 +114,7 @@ export default class MemberListTeamItem extends React.Component { href='#' onClick={this.handleMakeAdmin} > - {'Make Admin'} + {'Make Team Admin'} </a> </li> ); diff --git a/web/react/components/mention_list.jsx b/web/react/components/mention_list.jsx index b9ba5f58c..8c1da942d 100644 --- a/web/react/components/mention_list.jsx +++ b/web/react/components/mention_list.jsx @@ -61,7 +61,7 @@ export default class MentionList extends React.Component { } onClick(e) { if (!($('#' + this.props.id).is(e.target) || $('#' + this.props.id).has(e.target).length || - ('mentionlist' in this.refs && $(React.findDOMNode(this.refs.mentionlist)).has(e.target).length))) { + ('mentionlist' in this.refs && $(ReactDOM.findDOMNode(this.refs.mentionlist)).has(e.target).length))) { this.setState({mentionText: '-1'}); } } diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index 884b0d6ca..a0084ad30 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -31,12 +31,12 @@ export default class MoreChannels extends React.Component { } componentDidMount() { ChannelStore.addMoreChangeListener(this.onListenerChange); - $(React.findDOMNode(this.refs.modal)).on('shown.bs.modal', function shown() { + $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', function shown() { asyncClient.getMoreChannels(true); }); var self = this; - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', function show(e) { + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', function show(e) { var button = e.relatedTarget; self.setState({channelType: $(button).attr('data-channeltype')}); }); @@ -54,7 +54,7 @@ export default class MoreChannels extends React.Component { this.setState({joiningChannel: channelIndex}); client.joinChannel(channel.id, function joinSuccess() { - $(React.findDOMNode(this.refs.modal)).modal('hide'); + $(ReactDOM.findDOMNode(this.refs.modal)).modal('hide'); asyncClient.getChannel(channel.id); utils.switchChannel(channel); this.setState({joiningChannel: -1}); @@ -65,7 +65,7 @@ export default class MoreChannels extends React.Component { ); } handleNewChannel() { - $(React.findDOMNode(this.refs.modal)).modal('hide'); + $(ReactDOM.findDOMNode(this.refs.modal)).modal('hide'); this.setState({showNewChannelModal: true}); } render() { @@ -83,7 +83,7 @@ export default class MoreChannels extends React.Component { moreChannels = <LoadingScreen />; } else if (channels.length) { moreChannels = ( - <table className='more-channel-table table'> + <table className='more-table table'> <tbody> {channels.map(function cMap(channel, index) { var joinButton; @@ -108,8 +108,8 @@ export default class MoreChannels extends React.Component { return ( <tr key={channel.id}> <td> - <p className='more-channel-name'>{channel.display_name}</p> - <p className='more-channel-description'>{channel.description}</p> + <p className='more-name'>{channel.display_name}</p> + <p className='more-description'>{channel.description}</p> </td> <td className='td--action'> {joinButton} diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index 31ecb4c5d..d5b44d86b 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -1,136 +1,290 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -var ChannelStore = require('../stores/channel_store.jsx'); -var TeamStore = require('../stores/team_store.jsx'); -var Client = require('../utils/client.jsx'); -var AsyncClient = require('../utils/async_client.jsx'); -var utils = require('../utils/utils.jsx'); +const AsyncClient = require('../utils/async_client.jsx'); +const ChannelStore = require('../stores/channel_store.jsx'); +const Constants = require('../utils/constants.jsx'); +const Client = require('../utils/client.jsx'); +const Modal = ReactBootstrap.Modal; +const PreferenceStore = require('../stores/preference_store.jsx'); +const TeamStore = require('../stores/team_store.jsx'); +const UserStore = require('../stores/user_store.jsx'); +const Utils = require('../utils/utils.jsx'); export default class MoreDirectChannels extends React.Component { constructor(props) { super(props); - this.state = {channels: [], loadingDMChannel: -1}; + this.handleFilterChange = this.handleFilterChange.bind(this); + this.handleHide = this.handleHide.bind(this); + this.handleShowDirectChannel = this.handleShowDirectChannel.bind(this); + this.handleUserChange = this.handleUserChange.bind(this); + + this.createRowForUser = this.createRowForUser.bind(this); + + this.state = { + users: this.getUsersFromStore(), + filter: '', + loadingDMChannel: -1 + }; + } + + getUsersFromStore() { + const currentId = UserStore.getCurrentId(); + const profiles = UserStore.getProfiles(); + const users = []; + + for (const id in profiles) { + if (id !== currentId) { + users.push(profiles[id]); + } + } + + users.sort((a, b) => a.username.localeCompare(b.username)); + + return users; } componentDidMount() { - var self = this; - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', function showModal(e) { - var button = e.relatedTarget; - self.setState({channels: $(button).data('channels')}); - }); + UserStore.addChangeListener(this.handleUserChange); } - render() { - var self = this; - - var directMessageItems = this.state.channels.map(function mapActivityToChannel(channel, index) { - var badge = ''; - var titleClass = ''; - var active = ''; - var handleClick = null; - - if (channel.fake) { - // It's a direct message channel that doesn't exist yet so let's create it now - var otherUserId = utils.getUserIdFromChannelName(channel); - - if (self.state.loadingDMChannel === index) { - badge = ( - <img - className='channel-loading-gif pull-right' - src='/static/images/load.gif' - /> - ); - } + componentWillUnmount() { + UserStore.addChangeListener(this.handleUserChange); + } - if (self.state.loadingDMChannel === -1) { - handleClick = function clickHandler(e) { - e.preventDefault(); - self.setState({loadingDMChannel: index}); - - Client.createDirectChannel(channel, otherUserId, - function success(data) { - $(React.findDOMNode(self.refs.modal)).modal('hide'); - self.setState({loadingDMChannel: -1}); - AsyncClient.getChannel(data.id); - utils.switchChannel(data); - }, - function error() { - self.setState({loadingDMChannel: -1}); - window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name; - } - ); - }; - } - } else { - if (channel.id === ChannelStore.getCurrentId()) { - active = 'active'; - } + handleFilterChange() { + const filter = ReactDOM.findDOMNode(this.refs.filter).value; + + if (filter !== this.state.filter) { + this.setState({filter}); + } + } - if (channel.unread) { - badge = <span className='badge pull-right small'>{channel.unread}</span>; - titleClass = 'unread-title'; + handleHide() { + if (this.props.onModalDismissed) { + this.props.onModalDismissed(); + } + + this.setState({filter: ''}); + } + + handleShowDirectChannel(teammate, e) { + if (this.state.loadingDMChannel !== -1) { + return; + } + + e.preventDefault(); + + const channelName = Utils.getDirectChannelName(UserStore.getCurrentId(), teammate.id); + let channel = ChannelStore.getByName(channelName); + + const preference = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, teammate.id, 'true'); + AsyncClient.savePreferences([preference]); + + if (channel) { + Utils.switchChannel(channel); + + this.handleHide(); + } else { + this.setState({loadingDMChannel: teammate.id}); + + channel = { + name: channelName, + last_post_at: 0, + total_msg_count: 0, + type: 'D', + display_name: teammate.username, + teammate_id: teammate.id, + status: UserStore.getStatus(teammate.id) + }; + + Client.createDirectChannel( + channel, + teammate.id, + (data) => { + this.setState({loadingDMChannel: -1}); + + AsyncClient.getChannel(data.id); + Utils.switchChannel(data); + + this.handleHide(); + }, + () => { + this.setState({loadingDMChannel: -1}); + window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/' + channelName; } + ); + } + } - handleClick = function clickHandler(e) { - e.preventDefault(); - utils.switchChannel(channel); - $(React.findDOMNode(self.refs.modal)).modal('hide'); - }; - } + handleUserChange() { + this.setState({users: this.getUsersFromStore()}); + } + + createRowForUser(user) { + const details = []; + + const fullName = Utils.getFullName(user); + if (fullName) { + details.push( + <span + key={`${user.id}__full-name`} + className='full-name' + > + {fullName} + </span> + ); + } - return ( - <li - key={channel.name} - className={active} + if (user.nickname) { + const separator = fullName ? ' - ' : ''; + details.push( + <span + key={`${user.nickname}__nickname`} > - <a - className={'sidebar-channel ' + titleClass} - href='#' - onClick={handleClick} - >{badge}{channel.display_name}</a> - </li> + {separator + user.nickname} + </span> ); - }); + } + + let joinButton; + if (this.state.loadingDMChannel === user.id) { + joinButton = ( + <img + className='channel-loading-gif' + src='/static/images/load.gif' + /> + ); + } else { + joinButton = ( + <button + type='button' + className='btn btn-primary btn-message' + onClick={this.handleShowDirectChannel.bind(this, user)} + > + {'Message'} + </button> + ); + } return ( - <div - className='modal fade' - id='more_direct_channels' - ref='modal' - tabIndex='-1' - role='dialog' - aria-hidden='true' + <tr> + <td + key={user.id} + className='direct-channel' + > + <img + className='profile-img pull-left' + width='38' + height='38' + src={`/api/v1/users/${user.id}/image?time=${user.update_at}`} + /> + <div className='more-name'> + {user.username} + </div> + <div className='more-description'> + {details} + </div> + </td> + <td className='td--action lg'> + {joinButton} + </td> + </tr> + ); + } + + componentDidUpdate(prevProps) { + if (!prevProps.show && this.props.show) { + $(ReactDOM.findDOMNode(this.refs.userList)).css('max-height', $(window).height() - 300); + if ($(window).width() > 768) { + $(ReactDOM.findDOMNode(this.refs.userList)).perfectScrollbar(); + } + } + } + + render() { + if (!this.props.show) { + return null; + } + + let users = this.state.users; + if (this.state.filter !== '') { + users = users.filter((user) => { + return user.username.indexOf(this.state.filter) !== -1 || + user.first_name.indexOf(this.state.filter) !== -1 || + user.last_name.indexOf(this.state.filter) !== -1 || + user.nickname.indexOf(this.state.filter) !== -1; + }); + } + + const userEntries = users.map(this.createRowForUser); + + if (userEntries.length === 0) { + userEntries.push(<tr key='no-users-found'><td>{'No users found :('}</td></tr>); + } + + let memberString = 'Member'; + if (users.length !== 1) { + memberString += 's'; + } + + let count; + if (users.length === this.state.users.length) { + count = `${users.length} ${memberString}`; + } else { + count = `${users.length} ${memberString} of ${this.state.users.length} Total`; + } + + return ( + <Modal + className='modal-direct-channels' + show={this.props.show} + onHide={this.handleHide} > - <div className='modal-dialog'> - <div className='modal-content'> - <div className='modal-header'> - <button - type='button' - className='close' - data-dismiss='modal' - > - <span aria-hidden='true'>×</span> - <span className='sr-only'>Close</span> - </button> - <h4 className='modal-title'>More Direct Messages</h4> + <Modal.Header closeButton={true}> + <Modal.Title>{'Direct Messages'}</Modal.Title> + </Modal.Header> + <Modal.Body> + <div className='row filter-row'> + <div className='col-sm-6'> + <input + ref='filter' + className='form-control filter-textbox' + placeholder='Search members' + onInput={this.handleFilterChange} + /> </div> - <div className='modal-body'> - <ul className='nav nav-pills nav-stacked'> - {directMessageItems} - </ul> - </div> - <div className='modal-footer'> - <button - type='button' - className='btn btn-default' - data-dismiss='modal' - >Close</button> + <div className='col-sm-6'> + <span className='member-count'>{count}</span> </div> </div> - </div> - </div> + <div + ref='userList' + className='user-list' + > + <table className='more-table table'> + <tbody> + {userEntries} + </tbody> + </table> + </div> + </Modal.Body> + <Modal.Footer> + <button + type='button' + className='btn btn-default' + onClick={this.handleHide} + > + {'Close'} + </button> + </Modal.Footer> + </Modal> ); } } + +MoreDirectChannels.propTypes = { + show: React.PropTypes.bool.isRequired, + onModalDismissed: React.PropTypes.func +}; diff --git a/web/react/components/msg_typing.jsx b/web/react/components/msg_typing.jsx index 569942390..1bd23c55c 100644 --- a/web/react/components/msg_typing.jsx +++ b/web/react/components/msg_typing.jsx @@ -1,8 +1,11 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -var SocketStore = require('../stores/socket_store.jsx'); -var UserStore = require('../stores/user_store.jsx'); +const SocketStore = require('../stores/socket_store.jsx'); +const UserStore = require('../stores/user_store.jsx'); + +const Constants = require('../utils/constants.jsx'); +const SocketEvents = Constants.SocketEvents; export default class MsgTyping extends React.Component { constructor(props) { @@ -33,9 +36,9 @@ export default class MsgTyping extends React.Component { } onChange(msg) { - if (msg.action === 'typing' && - this.props.channelId === msg.channel_id && - this.props.parentId === msg.props.parent_id) { + if (msg.action === SocketEvents.TYPING && + this.props.channelId === msg.channel_id && + this.props.parentId === msg.props.parent_id) { this.lastTime = new Date().getTime(); var username = 'Someone'; @@ -52,7 +55,7 @@ export default class MsgTyping extends React.Component { } }.bind(this), 3000); } - } else if (msg.action === 'posted' && msg.channel_id === this.props.channelId) { + } else if (msg.action === SocketEvents.POSTED && msg.channel_id === this.props.channelId) { this.setState({text: ''}); } } diff --git a/web/react/components/navbar.jsx b/web/react/components/navbar.jsx index 6503bd801..f9cd525fd 100644 --- a/web/react/components/navbar.jsx +++ b/web/react/components/navbar.jsx @@ -14,6 +14,9 @@ var Constants = require('../utils/constants.jsx'); var ActionTypes = Constants.ActionTypes; var AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); +var Popover = ReactBootstrap.Popover; +var OverlayTrigger = ReactBootstrap.OverlayTrigger; + export default class Navbar extends React.Component { constructor(props) { super(props); @@ -36,12 +39,6 @@ export default class Navbar extends React.Component { ChannelStore.addChangeListener(this.onChange); ChannelStore.addExtraInfoChangeListener(this.onChange); $('.inner__wrap').click(this.hideSidebars); - - $('body').on('click.infopopover', function handlePopoverClick(e) { - if ($(e.target).attr('data-toggle') !== 'popover' && $(e.target).parents('.popover.in').length === 0) { - $('.info-popover').popover('hide'); - } - }); } componentWillUnmount() { ChannelStore.removeChangeListener(this.onChange); @@ -224,11 +221,15 @@ export default class Navbar extends React.Component { return ( <div className='navbar-brand'> <div className='dropdown'> - <div - data-toggle='popover' - data-content={popoverContent} - className='description info-popover' - /> + <OverlayTrigger + trigger='click' + placement='bottom' + overlay={popoverContent} + className='description' + rootClose={true} + > + <div className='description info-popover'/> + </OverlayTrigger> <a href='#' className='dropdown-toggle theme' @@ -330,11 +331,17 @@ export default class Navbar extends React.Component { var isDirect = false; if (channel) { - popoverContent = React.renderToString( - <MessageWrapper - message={channel.description} - options={{singleline: true, mentionHighlight: false}} - /> + popoverContent = ( + <Popover + bsStyle='info' + placement='bottom' + id='description-popover' + > + <MessageWrapper + message={channel.description} + options={{singleline: true, mentionHighlight: false}} + /> + </Popover> ); isAdmin = Utils.isAdmin(this.state.member.roles); @@ -354,19 +361,28 @@ export default class Navbar extends React.Component { } if (channel.description.length === 0) { - popoverContent = React.renderToString( - <div> - No channel description yet. <br/> - <a - href='#' - data-toggle='modal' - data-desc={channel.description} - data-title={channel.display_name} - data-channelid={channel.id} - data-target='#edit_channel' - > - Click here - </a> to add one.</div> + popoverContent = ( + <Popover + bsStyle='info' + placement='bottom' + id='description-popover' + > + <div> + {'No channel description yet.'} + <br/> + <a + href='#' + data-toggle='modal' + data-desc={channel.description} + data-title={channel.display_name} + data-channelid={channel.id} + data-target='#edit_channel' + > + {'Click here'} + </a> + {' to add one.'} + </div> + </Popover> ); } } diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx index b6defc393..1cb13bbe5 100644 --- a/web/react/components/navbar_dropdown.jsx +++ b/web/react/components/navbar_dropdown.jsx @@ -11,7 +11,24 @@ var AboutBuildModal = require('./about_build_modal.jsx'); var Constants = require('../utils/constants.jsx'); function getStateFromStores() { - return {teams: UserStore.getTeams()}; + let teams = []; + let teamsObject = UserStore.getTeams(); + for (let teamId in teamsObject) { + if (teamsObject.hasOwnProperty(teamId)) { + teams.push(teamsObject[teamId]); + } + } + teams.sort(function sortByDisplayName(teamA, teamB) { + let teamADisplayName = teamA.display_name.toLowerCase(); + let teamBDisplayName = teamB.display_name.toLowerCase(); + if (teamADisplayName < teamBDisplayName) { + return -1; + } else if (teamADisplayName > teamBDisplayName) { + return 1; + } + return 0; + }); + return {teams}; } export default class NavbarDropdown extends React.Component { @@ -40,7 +57,7 @@ export default class NavbarDropdown extends React.Component { UserStore.addTeamsChangeListener(this.onListenerChange); TeamStore.addChangeListener(this.onListenerChange); - $(React.findDOMNode(this.refs.dropdown)).on('hide.bs.dropdown', () => { + $(ReactDOM.findDOMNode(this.refs.dropdown)).on('hide.bs.dropdown', () => { this.blockToggle = true; setTimeout(() => { this.blockToggle = false; @@ -51,7 +68,7 @@ export default class NavbarDropdown extends React.Component { UserStore.removeTeamsChangeListener(this.onListenerChange); TeamStore.removeChangeListener(this.onListenerChange); - $(React.findDOMNode(this.refs.dropdown)).off('hide.bs.dropdown'); + $(ReactDOM.findDOMNode(this.refs.dropdown)).off('hide.bs.dropdown'); } onListenerChange() { var newState = getStateFromStores(); @@ -111,7 +128,7 @@ export default class NavbarDropdown extends React.Component { data-toggle='modal' data-target='#team_members' > - {'Manage Team'} + {'Manage Members'} </a> </li> ); @@ -154,9 +171,9 @@ export default class NavbarDropdown extends React.Component { </li> ); - this.state.teams.forEach((teamName) => { - if (teamName !== this.props.teamName) { - teams.push(<li key={teamName}><a href={Utils.getWindowLocationOrigin() + '/' + teamName}>{'Switch to ' + teamName}</a></li>); + this.state.teams.forEach((team) => { + if (team.name !== this.props.teamName) { + teams.push(<li key={team.name}><a href={Utils.getWindowLocationOrigin() + '/' + team.name}>{'Switch to ' + team.display_name}</a></li>); } }); } diff --git a/web/react/components/new_channel_modal.jsx b/web/react/components/new_channel_modal.jsx index c3d9c046d..4e6280c99 100644 --- a/web/react/components/new_channel_modal.jsx +++ b/web/react/components/new_channel_modal.jsx @@ -25,7 +25,7 @@ export default class NewChannelModal extends React.Component { handleSubmit(e) { e.preventDefault(); - const displayName = React.findDOMNode(this.refs.display_name).value.trim(); + const displayName = ReactDOM.findDOMNode(this.refs.display_name).value.trim(); if (displayName.length < 1) { this.setState({displayNameError: 'This field is required'}); return; @@ -35,8 +35,8 @@ export default class NewChannelModal extends React.Component { } handleChange() { const newData = { - displayName: React.findDOMNode(this.refs.display_name).value, - description: React.findDOMNode(this.refs.channel_desc).value + displayName: ReactDOM.findDOMNode(this.refs.display_name).value, + description: ReactDOM.findDOMNode(this.refs.channel_desc).value }; this.props.onDataChanged(newData); } diff --git a/web/react/components/password_reset_form.jsx b/web/react/components/password_reset_form.jsx index 0ef187114..217f1b393 100644 --- a/web/react/components/password_reset_form.jsx +++ b/web/react/components/password_reset_form.jsx @@ -15,7 +15,7 @@ export default class PasswordResetForm extends React.Component { e.preventDefault(); var state = {}; - var password = React.findDOMNode(this.refs.password).value.trim(); + var password = ReactDOM.findDOMNode(this.refs.password).value.trim(); if (!password || password.length < 5) { state.error = 'Please enter at least 5 characters.'; this.setState(state); @@ -69,6 +69,7 @@ export default class PasswordResetForm extends React.Component { name='password' ref='password' placeholder='Password' + spellCheck='false' /> </div> {error} diff --git a/web/react/components/password_reset_send_link.jsx b/web/react/components/password_reset_send_link.jsx index 78fbcaa2f..8f1890705 100644 --- a/web/react/components/password_reset_send_link.jsx +++ b/web/react/components/password_reset_send_link.jsx @@ -16,7 +16,7 @@ export default class PasswordResetSendLink extends React.Component { e.preventDefault(); var state = {}; - var email = React.findDOMNode(this.refs.email).value.trim().toLowerCase(); + var email = ReactDOM.findDOMNode(this.refs.email).value.trim().toLowerCase(); if (!email || !Utils.isEmail(email)) { state.error = 'Please enter a valid email address.'; this.setState(state); @@ -33,7 +33,7 @@ export default class PasswordResetSendLink extends React.Component { client.sendPasswordReset(data, function passwordResetSent() { this.setState({error: null, updateText: <p>A password reset link has been sent to <b>{email}</b> for your <b>{this.props.teamDisplayName}</b> team on {window.location.hostname}.</p>, moreUpdateText: 'Please check your inbox.'}); - $(React.findDOMNode(this.refs.reset_form)).hide(); + $(ReactDOM.findDOMNode(this.refs.reset_form)).hide(); }.bind(this), function passwordResetFailedToSend(err) { this.setState({error: err.message, update_text: null, moreUpdateText: null}); @@ -73,6 +73,7 @@ export default class PasswordResetSendLink extends React.Component { name='email' ref='email' placeholder='Email' + spellCheck='false' /> </div> {error} diff --git a/web/react/components/popover_list_members.jsx b/web/react/components/popover_list_members.jsx index 5d9052fd7..155e88600 100644 --- a/web/react/components/popover_list_members.jsx +++ b/web/react/components/popover_list_members.jsx @@ -2,6 +2,8 @@ // See License.txt for license information. var UserStore = require('../stores/user_store.jsx'); +var Popover = ReactBootstrap.Popover; +var OverlayTrigger = ReactBootstrap.OverlayTrigger; export default class PopoverListMembers extends React.Component { componentDidMount() { @@ -24,29 +26,29 @@ export default class PopoverListMembers extends React.Component { }); } }; - - $('#member_popover').popover({placement: 'bottom', trigger: 'click', html: true}); - $('body').on('click', function onClick(e) { - if (e.target.parentNode && $(e.target.parentNode.parentNode)[0] !== $('#member_popover')[0] && $(e.target).parents('.popover.in').length === 0) { - $('#member_popover').popover('hide'); - } - }); } render() { - let popoverHtml = ''; + let popoverHtml = []; let count = 0; let countText = '-'; const members = this.props.members; const teamMembers = UserStore.getProfilesUsernameMap(); if (members && teamMembers) { - members.sort(function compareByLocal(a, b) { + members.sort((a, b) => { return a.username.localeCompare(b.username); }); - members.forEach(function addMemberElement(m) { + members.forEach((m, i) => { if (teamMembers[m.username] && teamMembers[m.username].delete_at <= 0) { - popoverHtml += `<div class='text--nowrap'>${m.username}</div>`; + popoverHtml.push( + <div + className='text--nowrap' + key={'popover-member-' + i} + > + {m.username} + </div> + ); count++; } }); @@ -59,15 +61,21 @@ export default class PopoverListMembers extends React.Component { } return ( - <div - id='member_popover' - data-toggle='popover' - data-content={popoverHtml} - data-original-title='Members' + <OverlayTrigger + trigger='click' + placement='bottom' + rootClose={true} + overlay={ + <Popover + title='Members' + id='member-list-popover' + > + {popoverHtml} + </Popover> + } > - <div - id='member_tooltip' - > + <div id='member_popover'> + <div> {countText} <span className='fa fa-user' @@ -75,6 +83,7 @@ export default class PopoverListMembers extends React.Component { /> </div> </div> + </OverlayTrigger> ); } } diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index e87ac6743..fb838b736 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -37,7 +37,7 @@ export default class PostBody extends React.Component { } parseEmojis() { - twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE}); + twemoji.parse(ReactDOM.findDOMNode(this), {size: Constants.EMOJI_SIZE}); } componentDidMount() { @@ -116,7 +116,7 @@ export default class PostBody extends React.Component { } var metadata = data.items[0].snippet; this.receivedYoutubeData = true; - this.setState({youtubeUploader: metadata.channelTitle, youtubeTitle: metadata.title}); + this.setState({youtubeTitle: metadata.title}); } if (global.window.config.GoogleDeveloperKey && !this.receivedYoutubeData) { @@ -134,18 +134,12 @@ export default class PostBody extends React.Component { header = header + ' - '; } - let uploader = this.state.youtubeUploader; - if (!uploader) { - uploader = 'unknown'; - } - return ( <div className='post-comment'> <h4> <span className='video-type'>{header}</span> <span className='video-title'><a href={link}>{this.state.youtubeTitle}</a></span> </h4> - <h4 className='video-uploader'>{uploader}</h4> <div className='video-div embed-responsive-item' id={youtubeId} diff --git a/web/react/components/post_deleted_modal.jsx b/web/react/components/post_deleted_modal.jsx index 87afc6a7f..ba07a22f5 100644 --- a/web/react/components/post_deleted_modal.jsx +++ b/web/react/components/post_deleted_modal.jsx @@ -15,7 +15,7 @@ export default class PostDeletedModal extends React.Component { this.state = {}; } componentDidMount() { - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', () => { + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', () => { this.handleClose(); }); } diff --git a/web/react/components/post_info.jsx b/web/react/components/post_info.jsx index 87962641f..36260d77c 100644 --- a/web/react/components/post_info.jsx +++ b/web/react/components/post_info.jsx @@ -150,6 +150,8 @@ export default class PostInfo extends React.Component { <ul className='post-header post-info'> <li className='post-header-col'> <OverlayTrigger + delayShow={500} + container={this} placement='top' overlay={tooltip} > diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 643b38af5..4402745e1 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -1,19 +1,24 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -var PostStore = require('../stores/post_store.jsx'); -var ChannelStore = require('../stores/channel_store.jsx'); -var UserStore = require('../stores/user_store.jsx'); -var UserProfile = require('./user_profile.jsx'); -var AsyncClient = require('../utils/async_client.jsx'); -var Post = require('./post.jsx'); -var LoadingScreen = require('./loading_screen.jsx'); -var SocketStore = require('../stores/socket_store.jsx'); -var utils = require('../utils/utils.jsx'); -var Client = require('../utils/client.jsx'); -var AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); -var Constants = require('../utils/constants.jsx'); -var ActionTypes = Constants.ActionTypes; +const Post = require('./post.jsx'); +const UserProfile = require('./user_profile.jsx'); +const AsyncClient = require('../utils/async_client.jsx'); +const LoadingScreen = require('./loading_screen.jsx'); + +const PostStore = require('../stores/post_store.jsx'); +const ChannelStore = require('../stores/channel_store.jsx'); +const UserStore = require('../stores/user_store.jsx'); +const SocketStore = require('../stores/socket_store.jsx'); +const PreferenceStore = require('../stores/preference_store.jsx'); + +const utils = require('../utils/utils.jsx'); +const Client = require('../utils/client.jsx'); +const Constants = require('../utils/constants.jsx'); +const ActionTypes = Constants.ActionTypes; +const SocketEvents = Constants.SocketEvents; + +const AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); export default class PostList extends React.Component { constructor(props) { @@ -57,7 +62,7 @@ export default class PostList extends React.Component { } } - postList.order.sort(function postSort(a, b) { + postList.order.sort((a, b) => { if (postList.posts[a].create_at > postList.posts[b].create_at) { return -1; } @@ -81,7 +86,7 @@ export default class PostList extends React.Component { } return { - postList: postList + postList }; } componentDidMount() { @@ -105,9 +110,10 @@ export default class PostList extends React.Component { PostStore.clearUnseenDeletedPosts(this.props.channelId); PostStore.addChangeListener(this.onChange); UserStore.addStatusesChangeListener(this.onTimeChange); + PreferenceStore.addChangeListener(this.onTimeChange); SocketStore.addChangeListener(this.onSocketChange); - const postHolder = $(React.findDOMNode(this.refs.postlist)); + const postHolder = $(ReactDOM.findDOMNode(this.refs.postlist)); $(window).resize(() => { this.resize(); @@ -133,7 +139,7 @@ export default class PostList extends React.Component { $('.top-visible-post').removeClass('top-visible-post'); - $(React.findDOMNode(this.refs.postlistcontent)).children().each(function select() { + $(ReactDOM.findDOMNode(this.refs.postlistcontent)).children().each(function select() { if ($(this).position().top + $(this).height() / 2 > 0) { $(this).addClass('top-visible-post'); return false; @@ -156,9 +162,10 @@ export default class PostList extends React.Component { PostStore.removeChangeListener(this.onChange); UserStore.removeStatusesChangeListener(this.onTimeChange); SocketStore.removeChangeListener(this.onSocketChange); + PreferenceStore.removeChangeListener(this.onTimeChange); $('body').off('click.userpopover'); $(window).off('resize'); - var postHolder = $(React.findDOMNode(this.refs.postlist)); + var postHolder = $(ReactDOM.findDOMNode(this.refs.postlist)); postHolder.off('scroll'); } componentDidUpdate(prevProps, prevState) { @@ -214,7 +221,7 @@ export default class PostList extends React.Component { } } componentWillUpdate() { - var postHolder = $(React.findDOMNode(this.refs.postlist)); + var postHolder = $(ReactDOM.findDOMNode(this.refs.postlist)); this.prevScrollTop = postHolder.scrollTop(); } componentWillReceiveProps(nextProps) { @@ -225,7 +232,7 @@ export default class PostList extends React.Component { } } resize() { - const postHolder = $(React.findDOMNode(this.refs.postlist)); + const postHolder = $(ReactDOM.findDOMNode(this.refs.postlist)); if ($('#create_post').length > 0) { const height = $(window).height() - $('#create_post').height() - $('#error_bar').outerHeight() - 50; postHolder.css('height', height + 'px'); @@ -233,12 +240,12 @@ export default class PostList extends React.Component { } scrollTo(val) { this.isUserScroll = false; - var postHolder = $(React.findDOMNode(this.refs.postlist)); + var postHolder = $(ReactDOM.findDOMNode(this.refs.postlist)); postHolder[0].scrollTop = val; } scrollToBottom(force) { this.isUserScroll = false; - var postHolder = $(React.findDOMNode(this.refs.postlist)); + var postHolder = $(ReactDOM.findDOMNode(this.refs.postlist)); if ($('#new_message_' + this.props.channelId)[0] && !this.userHasSeenNew && !force) { $('#new_message_' + this.props.channelId)[0].scrollIntoView(); } else { @@ -260,14 +267,14 @@ export default class PostList extends React.Component { Client.getPosts( id, PostStore.getLatestUpdate(id), - function success() { + () => { this.loadInProgress = false; this.setState({isFirstLoadComplete: true}); - }.bind(this), - function fail() { + }, + () => { this.loadInProgress = false; this.setState({isFirstLoadComplete: true}); - }.bind(this) + } ); } onChange() { @@ -278,28 +285,16 @@ export default class PostList extends React.Component { } } onSocketChange(msg) { - var post; - if (msg.action === 'posted' || msg.action === 'post_edited') { - post = JSON.parse(msg.props.post); - PostStore.storePost(post); - } else if (msg.action === 'post_deleted') { + if (msg.action === SocketEvents.POST_DELETED) { var activeRoot = $(document.activeElement).closest('.comment-create-body')[0]; var activeRootPostId = ''; if (activeRoot && activeRoot.id.length > 0) { activeRootPostId = activeRoot.id; } - post = JSON.parse(msg.props.post); - - PostStore.storeUnseenDeletedPost(post); - PostStore.removePost(post, true); - PostStore.emitChange(); - if (activeRootPostId === msg.props.post_id && UserStore.getCurrentId() !== msg.user_id) { $('#post_deleted').modal('show'); } - } else if (msg.action === 'new_user') { - AsyncClient.getProfiles(); } } onTimeChange() { @@ -349,7 +344,7 @@ export default class PostList extends React.Component { data-title={channel.display_name} data-channelid={channel.id} > - <i className='fa fa-pencil'></i>Set a description + <i className='fa fa-pencil'></i>{'Set a description'} </a> </div> ); @@ -596,14 +591,14 @@ export default class PostList extends React.Component { var order = this.state.postList.order; var channelId = this.props.channelId; - $(React.findDOMNode(this.refs.loadmore)).text('Retrieving more messages...'); + $(ReactDOM.findDOMNode(this.refs.loadmore)).text('Retrieving more messages...'); Client.getPostsPage( channelId, order.length, Constants.POST_CHUNK_SIZE, function success(data) { - $(React.findDOMNode(this.refs.loadmore)).text('Load more messages'); + $(ReactDOM.findDOMNode(this.refs.loadmore)).text('Load more messages'); this.gotMorePosts = true; this.setState({numToDisplay: this.state.numToDisplay + Constants.POST_CHUNK_SIZE}); @@ -628,7 +623,7 @@ export default class PostList extends React.Component { Client.getProfiles(); }.bind(this), function fail(err) { - $(React.findDOMNode(this.refs.loadmore)).text('Load more messages'); + $(ReactDOM.findDOMNode(this.refs.loadmore)).text('Load more messages'); AsyncClient.dispatchError(err, 'getPosts'); }.bind(this) ); diff --git a/web/react/components/register_app_modal.jsx b/web/react/components/register_app_modal.jsx index e93c44126..3d4d9bf45 100644 --- a/web/react/components/register_app_modal.jsx +++ b/web/react/components/register_app_modal.jsx @@ -14,7 +14,7 @@ export default class RegisterAppModal extends React.Component { this.state = {clientId: '', clientSecret: '', saved: false}; } componentDidMount() { - $(React.findDOMNode(this)).on('hide.bs.modal', this.onHide); + $(ReactDOM.findDOMNode(this)).on('hide.bs.modal', this.onHide); } register() { var state = this.state; @@ -22,7 +22,7 @@ export default class RegisterAppModal extends React.Component { var app = {}; - var name = this.refs.name.getDOMNode().value; + var name = this.refs.name.value; if (!name || name.length === 0) { state.nameError = 'Application name must be filled in.'; this.setState(state); @@ -31,7 +31,7 @@ export default class RegisterAppModal extends React.Component { state.nameError = null; app.name = name; - var homepage = this.refs.homepage.getDOMNode().value; + var homepage = this.refs.homepage.value; if (!homepage || homepage.length === 0) { state.homepageError = 'Homepage must be filled in.'; this.setState(state); @@ -40,10 +40,10 @@ export default class RegisterAppModal extends React.Component { state.homepageError = null; app.homepage = homepage; - var desc = this.refs.desc.getDOMNode().value; + var desc = this.refs.desc.value; app.description = desc; - var rawCallbacks = this.refs.callback.getDOMNode().value.trim(); + var rawCallbacks = this.refs.callback.value.trim(); if (!rawCallbacks || rawCallbacks.length === 0) { state.callbackError = 'At least one callback URL must be filled in.'; this.setState(state); @@ -73,7 +73,7 @@ export default class RegisterAppModal extends React.Component { this.setState({clientId: '', clientSecret: '', saved: false}); } save() { - this.setState({saved: this.refs.save.getDOMNode().checked}); + this.setState({saved: this.refs.save.checked}); } render() { var nameError; diff --git a/web/react/components/removed_from_channel_modal.jsx b/web/react/components/removed_from_channel_modal.jsx index ca35d6fb0..7cf0a2ef1 100644 --- a/web/react/components/removed_from_channel_modal.jsx +++ b/web/react/components/removed_from_channel_modal.jsx @@ -37,13 +37,13 @@ export default class RemovedFromChannelModal extends React.Component { } componentDidMount() { - $(React.findDOMNode(this)).on('show.bs.modal', this.handleShow); - $(React.findDOMNode(this)).on('hidden.bs.modal', this.handleClose); + $(ReactDOM.findDOMNode(this)).on('show.bs.modal', this.handleShow); + $(ReactDOM.findDOMNode(this)).on('hidden.bs.modal', this.handleClose); } componentWillUnmount() { - $(React.findDOMNode(this)).off('show.bs.modal', this.handleShow); - $(React.findDOMNode(this)).off('hidden.bs.modal', this.handleClose); + $(ReactDOM.findDOMNode(this)).off('show.bs.modal', this.handleShow); + $(ReactDOM.findDOMNode(this)).off('hidden.bs.modal', this.handleClose); } render() { diff --git a/web/react/components/rename_channel_modal.jsx b/web/react/components/rename_channel_modal.jsx index 7f7d4554c..80f0956f2 100644 --- a/web/react/components/rename_channel_modal.jsx +++ b/web/react/components/rename_channel_modal.jsx @@ -76,13 +76,13 @@ export default class RenameChannelModal extends React.Component { Client.updateChannel(channel, function handleUpdateSuccess() { - $(React.findDOMNode(this.refs.modal)).modal('hide'); + $(ReactDOM.findDOMNode(this.refs.modal)).modal('hide'); AsyncClient.getChannel(channel.id); Utils.updateAddressBar(channel.name); - React.findDOMNode(this.refs.displayName).value = ''; - React.findDOMNode(this.refs.channelName).value = ''; + ReactDOM.findDOMNode(this.refs.displayName).value = ''; + ReactDOM.findDOMNode(this.refs.channelName).value = ''; }.bind(this), function handleUpdateError(err) { state.serverError = err.message; @@ -92,15 +92,15 @@ export default class RenameChannelModal extends React.Component { ); } onNameChange() { - this.setState({channelName: React.findDOMNode(this.refs.channelName).value}); + this.setState({channelName: ReactDOM.findDOMNode(this.refs.channelName).value}); } onDisplayNameChange() { - this.setState({displayName: React.findDOMNode(this.refs.displayName).value}); + this.setState({displayName: ReactDOM.findDOMNode(this.refs.displayName).value}); } displayNameKeyUp() { - const displayName = React.findDOMNode(this.refs.displayName).value.trim(); + const displayName = ReactDOM.findDOMNode(this.refs.displayName).value.trim(); const channelName = Utils.cleanUpUrlable(displayName); - React.findDOMNode(this.refs.channelName).value = channelName; + ReactDOM.findDOMNode(this.refs.channelName).value = channelName; this.setState({channelName: channelName}); } handleClose() { @@ -119,11 +119,11 @@ export default class RenameChannelModal extends React.Component { this.setState({displayName: button.attr('data-display'), channelName: button.attr('data-name'), channelId: button.attr('data-channelid')}); } componentDidMount() { - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', this.handleShow); - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.handleClose); + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', this.handleShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.handleClose); } componentWillUnmount() { - $(React.findDOMNode(this.refs.modal)).off('hidden.bs.modal', this.handleClose); + $(ReactDOM.findDOMNode(this.refs.modal)).off('hidden.bs.modal', this.handleClose); } render() { let displayNameError = null; diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx index d1ed9b2c0..d3a4cfaeb 100644 --- a/web/react/components/rhs_comment.jsx +++ b/web/react/components/rhs_comment.jsx @@ -29,7 +29,7 @@ export default class RhsComment extends React.Component { var post = this.props.post; Client.createPost(post, post.channel_id, - function success(data) { + (data) => { AsyncClient.getPosts(post.channel_id); var channel = ChannelStore.get(post.channel_id); @@ -43,11 +43,11 @@ export default class RhsComment extends React.Component { post: data }); }, - function fail() { + () => { post.state = Constants.POST_FAILED; PostStore.updatePendingPost(post); this.forceUpdate(); - }.bind(this) + } ); post.state = Constants.POST_LOADING; @@ -55,7 +55,7 @@ export default class RhsComment extends React.Component { this.forceUpdate(); } parseEmojis() { - twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE}); + twemoji.parse(ReactDOM.findDOMNode(this), {size: Constants.EMOJI_SIZE}); } componentDidMount() { this.parseEmojis(); @@ -84,7 +84,10 @@ export default class RhsComment extends React.Component { if (isOwner) { dropdownContents.push( - <li role='presentation'> + <li + role='presentation' + key='edit-button' + > <a href='#' role='menuitem' @@ -95,7 +98,7 @@ export default class RhsComment extends React.Component { data-postid={post.id} data-channelid={post.channel_id} > - Edit + {'Edit'} </a> </li> ); @@ -103,7 +106,10 @@ export default class RhsComment extends React.Component { if (isOwner || isAdmin) { dropdownContents.push( - <li role='presentation'> + <li + role='presentation' + key='delete-button' + > <a href='#' role='menuitem' @@ -114,7 +120,7 @@ export default class RhsComment extends React.Component { data-channelid={post.channel_id} data-comments={0} > - Delete + {'Delete'} </a> </li> ); @@ -162,7 +168,7 @@ export default class RhsComment extends React.Component { href='#' onClick={this.retryComment} > - Retry + {'Retry'} </a> ); } else if (post.state === Constants.POST_LOADING) { @@ -213,14 +219,14 @@ export default class RhsComment extends React.Component { </li> </ul> <div className='post-body'> - <p className={postClass}> + <div className={postClass}> {loading} <div ref='message_holder' onClick={TextFormatting.handleClick} dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}} /> - </p> + </div> {fileAttachment} </div> </div> diff --git a/web/react/components/rhs_root_post.jsx b/web/react/components/rhs_root_post.jsx index 442d3483e..a9f1fcd30 100644 --- a/web/react/components/rhs_root_post.jsx +++ b/web/react/components/rhs_root_post.jsx @@ -19,7 +19,7 @@ export default class RhsRootPost extends React.Component { this.state = {}; } parseEmojis() { - twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE}); + twemoji.parse(ReactDOM.findDOMNode(this), {size: Constants.EMOJI_SIZE}); } componentDidMount() { this.parseEmojis(); diff --git a/web/react/components/rhs_thread.jsx b/web/react/components/rhs_thread.jsx index 41fd74adb..bcdec2870 100644 --- a/web/react/components/rhs_thread.jsx +++ b/web/react/components/rhs_thread.jsx @@ -3,7 +3,8 @@ var PostStore = require('../stores/post_store.jsx'); var UserStore = require('../stores/user_store.jsx'); -var utils = require('../utils/utils.jsx'); +var PreferenceStore = require('../stores/preference_store.jsx'); +var Utils = require('../utils/utils.jsx'); var SearchBox = require('./search_bar.jsx'); var CreateComment = require('./create_comment.jsx'); var RhsHeaderPost = require('./rhs_header_post.jsx'); @@ -18,8 +19,13 @@ export default class RhsThread extends React.Component { this.onChange = this.onChange.bind(this); this.onChangeAll = this.onChangeAll.bind(this); + this.forceUpdateInfo = this.forceUpdateInfo.bind(this); + this.handleResize = this.handleResize.bind(this); - this.state = this.getStateFromStores(); + const state = this.getStateFromStores(); + state.windowWidth = Utils.windowWidth(); + state.windowHeight = Utils.windowHeight(); + this.state = state; } getStateFromStores() { var postList = PostStore.getSelectedPost(); @@ -43,26 +49,40 @@ export default class RhsThread extends React.Component { componentDidMount() { PostStore.addSelectedPostChangeListener(this.onChange); PostStore.addChangeListener(this.onChangeAll); + PreferenceStore.addChangeListener(this.forceUpdateInfo); this.resize(); - $(window).resize(function resize() { - this.resize(); - }.bind(this)); + window.addEventListener('resize', this.handleResize); } componentDidUpdate() { if ($('.post-right__scroll')[0]) { $('.post-right__scroll').scrollTop($('.post-right__scroll')[0].scrollHeight); } - - $('.post-right__scroll').perfectScrollbar('update'); this.resize(); } componentWillUnmount() { PostStore.removeSelectedPostChangeListener(this.onChange); PostStore.removeChangeListener(this.onChangeAll); + PreferenceStore.removeChangeListener(this.forceUpdateInfo); + window.removeEventListener('resize', this.handleResize); + } + forceUpdateInfo() { + if (this.state.postList) { + for (var postId in this.state.postList.posts) { + if (this.refs[postId]) { + this.refs[postId].forceUpdate(); + } + } + } + } + handleResize() { + this.setState({ + windowWidth: Utils.windowWidth(), + windowHeight: Utils.windowHeight() + }); } onChange() { var newState = this.getStateFromStores(); - if (!utils.areStatesEqual(newState, this.state)) { + if (!Utils.areStatesEqual(newState, this.state)) { this.setState(newState); } } @@ -92,16 +112,18 @@ export default class RhsThread extends React.Component { } var newState = this.getStateFromStores(); - if (!utils.areStatesEqual(newState, this.state)) { + if (!Utils.areStatesEqual(newState, this.state)) { this.setState(newState); } } resize() { - var height = $(window).height() - $('#error_bar').outerHeight() - 100; + var height = this.state.windowHeight - $('#error_bar').outerHeight() - 100; $('.post-right__scroll').css('height', height + 'px'); $('.post-right__scroll').scrollTop(100000); - $('.post-right__scroll').perfectScrollbar(); - $('.post-right__scroll').perfectScrollbar('update'); + if (this.state.windowWidth > 768) { + $('.post-right__scroll').perfectScrollbar(); + $('.post-right__scroll').perfectScrollbar('update'); + } } render() { var postList = this.state.postList; @@ -174,6 +196,7 @@ export default class RhsThread extends React.Component { /> <div className='post-right__scroll'> <RootPost + ref={rootPost.id} post={rootPost} commentCount={postsArray.length} /> diff --git a/web/react/components/search_bar.jsx b/web/react/components/search_bar.jsx index a6f9441ec..2e9764bd9 100644 --- a/web/react/components/search_bar.jsx +++ b/web/react/components/search_bar.jsx @@ -90,7 +90,7 @@ export default class SearchBar extends React.Component { function success(data) { this.setState({isSearching: false}); if (utils.isMobile()) { - React.findDOMNode(this.refs.search).value = ''; + ReactDOM.findDOMNode(this.refs.search).value = ''; } AppDispatcher.handleServerAction({ diff --git a/web/react/components/search_results.jsx b/web/react/components/search_results.jsx index 5eea3c501..30e15d0ad 100644 --- a/web/react/components/search_results.jsx +++ b/web/react/components/search_results.jsx @@ -4,7 +4,7 @@ var PostStore = require('../stores/post_store.jsx'); var UserStore = require('../stores/user_store.jsx'); var SearchBox = require('./search_bar.jsx'); -var utils = require('../utils/utils.jsx'); +var Utils = require('../utils/utils.jsx'); var SearchResultsHeader = require('./search_results_header.jsx'); var SearchResultsItem = require('./search_results_item.jsx'); @@ -20,18 +20,19 @@ export default class SearchResults extends React.Component { this.onChange = this.onChange.bind(this); this.resize = this.resize.bind(this); + this.handleResize = this.handleResize.bind(this); - this.state = getStateFromStores(); + const state = getStateFromStores(); + state.windowWidth = Utils.windowWidth(); + state.windowHeight = Utils.windowHeight(); + this.state = state; } componentDidMount() { this.mounted = true; PostStore.addSearchChangeListener(this.onChange); this.resize(); - var self = this; - $(window).resize(function resize() { - self.resize(); - }); + window.addEventListener('resize', this.handleResize); } componentDidUpdate() { @@ -41,22 +42,32 @@ export default class SearchResults extends React.Component { componentWillUnmount() { PostStore.removeSearchChangeListener(this.onChange); this.mounted = false; + window.removeEventListener('resize', this.handleResize); + } + + handleResize() { + this.setState({ + windowWidth: Utils.windowWidth(), + windowHeight: Utils.windowHeight() + }); } onChange() { if (this.mounted) { var newState = getStateFromStores(); - if (!utils.areStatesEqual(newState, this.state)) { + if (!Utils.areStatesEqual(newState, this.state)) { this.setState(newState); } } } resize() { - var height = $(window).height() - $('#error_bar').outerHeight() - 100; + var height = this.state.windowHeight - $('#error_bar').outerHeight() - 100; $('#search-items-container').css('height', height + 'px'); $('#search-items-container').scrollTop(0); - $('#search-items-container').perfectScrollbar(); + if (this.state.windowWidth > 768) { + $('#search-items-container').perfectScrollbar(); + } } render() { diff --git a/web/react/components/setting_item_max.jsx b/web/react/components/setting_item_max.jsx index d2cbc798e..4f0fe3ed0 100644 --- a/web/react/components/setting_item_max.jsx +++ b/web/react/components/setting_item_max.jsx @@ -32,11 +32,17 @@ export default class SettingItemMax extends React.Component { } var inputs = this.props.inputs; + var widthClass; + if (this.props.width === 'full') { + widthClass = 'col-sm-12'; + } else { + widthClass = 'col-sm-9 col-sm-offset-3'; + } return ( <ul className='section-max form-horizontal'> <li className='col-sm-12 section-title'>{this.props.title}</li> - <li className='col-sm-9 col-sm-offset-3'> + <li className={widthClass}> <ul className='setting-list'> <li className='setting-list-item'> {inputs} @@ -69,5 +75,6 @@ SettingItemMax.propTypes = { extraInfo: React.PropTypes.element, updateSection: React.PropTypes.func, submit: React.PropTypes.func, - title: React.PropTypes.string + title: React.PropTypes.string, + width: React.PropTypes.string }; diff --git a/web/react/components/setting_picture.jsx b/web/react/components/setting_picture.jsx index c9031e67c..2f577fe39 100644 --- a/web/react/components/setting_picture.jsx +++ b/web/react/components/setting_picture.jsx @@ -12,7 +12,7 @@ export default class SettingPicture extends React.Component { if (file) { var reader = new FileReader(); - var img = React.findDOMNode(this.refs.image); + var img = ReactDOM.findDOMNode(this.refs.image); reader.onload = function load(e) { $(img).attr('src', e.target.result); }; diff --git a/web/react/components/setting_upload.jsx b/web/react/components/setting_upload.jsx index c7107b84d..a25789dff 100644 --- a/web/react/components/setting_upload.jsx +++ b/web/react/components/setting_upload.jsx @@ -37,7 +37,7 @@ export default class SettingsUpload extends React.Component { doSubmit(e) { e.preventDefault(); - var inputnode = React.findDOMNode(this.refs.uploadinput); + var inputnode = ReactDOM.findDOMNode(this.refs.uploadinput); if (inputnode.files && inputnode.files[0]) { this.props.submit(inputnode.files[0]); } else { diff --git a/web/react/components/settings_sidebar.jsx b/web/react/components/settings_sidebar.jsx index b5d2132d7..66568e1c8 100644 --- a/web/react/components/settings_sidebar.jsx +++ b/web/react/components/settings_sidebar.jsx @@ -10,7 +10,7 @@ export default class SettingsSidebar extends React.Component { handleClick(tab, e) { e.preventDefault(); this.props.updateTab(tab.name); - $('.settings-modal').addClass('display--content'); + $(e.target).closest('.settings-modal').addClass('display--content'); } render() { let tabList = this.props.tabs.map(function makeTab(tab) { diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index 4ac1fd4a0..d1fe37300 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -1,19 +1,21 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -var ChannelStore = require('../stores/channel_store.jsx'); -var Client = require('../utils/client.jsx'); -var AsyncClient = require('../utils/async_client.jsx'); -var SocketStore = require('../stores/socket_store.jsx'); -var UserStore = require('../stores/user_store.jsx'); -var TeamStore = require('../stores/team_store.jsx'); -var BrowserStore = require('../stores/browser_store.jsx'); -var Utils = require('../utils/utils.jsx'); -var SidebarHeader = require('./sidebar_header.jsx'); -var SearchBox = require('./search_bar.jsx'); -var Constants = require('../utils/constants.jsx'); -var NewChannelFlow = require('./new_channel_flow.jsx'); -var UnreadChannelIndicator = require('./unread_channel_indicator.jsx'); +const AsyncClient = require('../utils/async_client.jsx'); +const ChannelStore = require('../stores/channel_store.jsx'); +const Client = require('../utils/client.jsx'); +const Constants = require('../utils/constants.jsx'); +const PreferenceStore = require('../stores/preference_store.jsx'); +const NewChannelFlow = require('./new_channel_flow.jsx'); +const MoreDirectChannels = require('./more_direct_channels.jsx'); +const SearchBox = require('./search_bar.jsx'); +const SidebarHeader = require('./sidebar_header.jsx'); +const TeamStore = require('../stores/team_store.jsx'); +const UnreadChannelIndicator = require('./unread_channel_indicator.jsx'); +const UserStore = require('../stores/user_store.jsx'); +const Utils = require('../utils/utils.jsx'); +const Tooltip = ReactBootstrap.Tooltip; +const OverlayTrigger = ReactBootstrap.OverlayTrigger; export default class Sidebar extends React.Component { constructor(props) { @@ -23,138 +25,117 @@ export default class Sidebar extends React.Component { this.firstUnreadChannel = null; this.lastUnreadChannel = null; + this.getStateFromStores = this.getStateFromStores.bind(this); + this.onChange = this.onChange.bind(this); this.onScroll = this.onScroll.bind(this); - this.onResize = this.onResize.bind(this); this.updateUnreadIndicators = this.updateUnreadIndicators.bind(this); + this.handleLeaveDirectChannel = this.handleLeaveDirectChannel.bind(this); + this.updateScrollbar = this.updateScrollbar.bind(this); + this.handleResize = this.handleResize.bind(this); + + this.showNewChannelModal = this.showNewChannelModal.bind(this); + this.hideNewChannelModal = this.hideNewChannelModal.bind(this); + this.showMoreDirectChannelsModal = this.showMoreDirectChannelsModal.bind(this); + this.hideMoreDirectChannelsModal = this.hideMoreDirectChannelsModal.bind(this); + this.createChannelElement = this.createChannelElement.bind(this); + this.isLeaving = new Map(); + const state = this.getStateFromStores(); - state.modal = ''; + state.newChannelModalType = ''; + state.showDirectChannelsModal = false; state.loadingDMChannel = -1; + state.windowWidth = Utils.windowWidth(); this.state = state; } getStateFromStores() { - var members = ChannelStore.getAllMembers(); + const members = ChannelStore.getAllMembers(); var teamMemberMap = UserStore.getActiveOnlyProfiles(); var currentId = ChannelStore.getCurrentId(); + const currentUserId = UserStore.getCurrentId(); var teammates = []; for (var id in teamMemberMap) { - if (id === UserStore.getCurrentId()) { + if (id === currentUserId) { continue; } teammates.push(teamMemberMap[id]); } - // Create lists of all read and unread direct channels - var showDirectChannels = []; - var readDirectChannels = []; + const preferences = PreferenceStore.getPreferences(Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW); + + var visibleDirectChannels = []; + var hiddenDirectChannelCount = 0; for (var i = 0; i < teammates.length; i++) { - var teammate = teammates[i]; + const teammate = teammates[i]; - if (teammate.id === UserStore.getCurrentId()) { + if (teammate.id === currentUserId) { continue; } - var channelName = ''; - if (teammate.id > UserStore.getCurrentId()) { - channelName = UserStore.getCurrentId() + '__' + teammate.id; - } else { - channelName = teammate.id + '__' + UserStore.getCurrentId(); - } + const channelName = Utils.getDirectChannelName(currentUserId, teammate.id); - var channel = ChannelStore.getByName(channelName); - - if (channel == null) { - var tempChannel = {}; - tempChannel.fake = true; - tempChannel.name = channelName; - tempChannel.display_name = teammate.username; - tempChannel.teammate_username = teammate.username; - tempChannel.status = UserStore.getStatus(teammate.id); - tempChannel.last_post_at = 0; - tempChannel.total_msg_count = 0; - tempChannel.type = 'D'; - readDirectChannels.push(tempChannel); - } else { - channel.display_name = teammate.username; - channel.teammate_username = teammate.username; + let forceShow = false; + let channel = ChannelStore.getByName(channelName); - channel.status = UserStore.getStatus(teammate.id); + if (channel) { + const member = members[channel.id]; + const msgCount = channel.total_msg_count - member.msg_count; - var channelMember = members[channel.id]; - var msgCount = channel.total_msg_count - channelMember.msg_count; - if (msgCount > 0) { - showDirectChannels.push(channel); - } else if (currentId === channel.id) { - showDirectChannels.push(channel); - } else { - readDirectChannels.push(channel); - } + // always show a channel if either it is the current one or if it is unread, but it is not currently being left + forceShow = (currentId === channel.id || msgCount > 0) && !this.isLeaving.get(channel.id); + } else { + channel = {}; + channel.fake = true; + channel.name = channelName; + channel.last_post_at = 0; + channel.total_msg_count = 0; + channel.type = 'D'; } - } - // If we don't have MAX_DMS unread channels, sort the read list by last_post_at - if (showDirectChannels.length < Constants.MAX_DMS) { - readDirectChannels.sort(function sortByLastPost(a, b) { - // sort by last_post_at first - if (a.last_post_at > b.last_post_at) { - return -1; - } - if (a.last_post_at < b.last_post_at) { - return 1; - } + channel.display_name = teammate.username; + channel.teammate_id = teammate.id; + channel.status = UserStore.getStatus(teammate.id); - // if last_post_at is equal, sort by name - if (a.display_name < b.display_name) { - return -1; - } - if (a.display_name > b.display_name) { - return 1; - } - return 0; - }); + if (preferences.some((preference) => (preference.name === teammate.id && preference.value !== 'false'))) { + visibleDirectChannels.push(channel); + } else if (forceShow) { + // make sure that unread direct channels are visible + const preference = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, teammate.id, 'true'); + AsyncClient.savePreferences([preference]); - var index = 0; - while (showDirectChannels.length < Constants.MAX_DMS && index < readDirectChannels.length) { - showDirectChannels.push(readDirectChannels[index]); - index++; + visibleDirectChannels.push(channel); + } else { + hiddenDirectChannelCount += 1; } - readDirectChannels = readDirectChannels.slice(index); - - showDirectChannels.sort(function directSort(a, b) { - if (a.display_name < b.display_name) { - return -1; - } - if (a.display_name > b.display_name) { - return 1; - } - return 0; - }); } + visibleDirectChannels.sort(this.sortChannelsByDisplayName); + return { activeId: currentId, channels: ChannelStore.getAll(), - members: members, - showDirectChannels: showDirectChannels, - hideDirectChannels: readDirectChannels + members, + visibleDirectChannels, + hiddenDirectChannelCount }; } + componentDidMount() { ChannelStore.addChangeListener(this.onChange); UserStore.addChangeListener(this.onChange); UserStore.addStatusesChangeListener(this.onChange); TeamStore.addChangeListener(this.onChange); - SocketStore.addChangeListener(this.onSocketChange); - $('.nav-pills__container').perfectScrollbar(); + PreferenceStore.addChangeListener(this.onChange); this.updateTitle(); this.updateUnreadIndicators(); + this.updateScrollbar(); - $(window).on('resize', this.onResize); + window.addEventListener('resize', this.handleResize); } shouldComponentUpdate(nextProps, nextState) { if (!Utils.areStatesEqual(nextProps, this.props)) { @@ -169,15 +150,28 @@ export default class Sidebar extends React.Component { componentDidUpdate() { this.updateTitle(); this.updateUnreadIndicators(); + this.updateScrollbar(); } componentWillUnmount() { - $(window).off('resize', this.onResize); + window.removeEventListener('resize', this.handleResize); ChannelStore.removeChangeListener(this.onChange); UserStore.removeChangeListener(this.onChange); UserStore.removeStatusesChangeListener(this.onChange); TeamStore.removeChangeListener(this.onChange); - SocketStore.removeChangeListener(this.onSocketChange); + PreferenceStore.removeChangeListener(this.onChange); + } + handleResize() { + this.setState({ + windowWidth: Utils.windowWidth(), + windowHeight: Utils.windowHeight() + }); + } + updateScrollbar() { + if (this.state.windowWidth > 768) { + $('.nav-pills__container').perfectScrollbar(); + $('.nav-pills__container').perfectScrollbar('update'); + } } onChange() { var newState = this.getStateFromStores(); @@ -185,94 +179,6 @@ export default class Sidebar extends React.Component { this.setState(newState); } } - onSocketChange(msg) { - if (msg.action === 'posted') { - if (ChannelStore.getCurrentId() === msg.channel_id) { - if (window.isActive) { - AsyncClient.updateLastViewedAt(); - } - } else { - AsyncClient.getChannels(); - } - - if (UserStore.getCurrentId() !== msg.user_id) { - var mentions = []; - if (msg.props.mentions) { - mentions = JSON.parse(msg.props.mentions); - } - var channel = ChannelStore.get(msg.channel_id); - - const user = UserStore.getCurrentUser(); - const member = ChannelStore.getMember(msg.channel_id); - - var notifyLevel = member && member.notify_props ? member.notify_props.desktop : 'default'; - if (notifyLevel === 'default') { - notifyLevel = user.notify_props.desktop; - } - - if (notifyLevel === 'none') { - return; - } else if (notifyLevel === 'mention' && mentions.indexOf(user.id) === -1 && channel.type !== 'D') { - return; - } - - var username = 'Someone'; - if (UserStore.hasProfile(msg.user_id)) { - username = UserStore.getProfile(msg.user_id).username; - } - - var title = 'Posted'; - if (channel) { - title = channel.display_name; - } - - var repRegex = new RegExp('<br>', 'g'); - var post = JSON.parse(msg.props.post); - var msgProps = msg.props; - var notifyText = post.message.replace(repRegex, '\n').replace(/\n+/g, ' ').replace('<mention>', '').replace('</mention>', ''); - - if (notifyText.length > 50) { - notifyText = notifyText.substring(0, 49) + '...'; - } - - if (notifyText.length === 0) { - if (msgProps.image) { - Utils.notifyMe(title, username + ' uploaded an image', channel); - } else if (msgProps.otherFile) { - Utils.notifyMe(title, username + ' uploaded a file', channel); - } else { - Utils.notifyMe(title, username + ' did something new', channel); - } - } else { - Utils.notifyMe(title, username + ' wrote: ' + notifyText, channel); - } - if (!user.notify_props || user.notify_props.desktop_sound === 'true') { - Utils.ding(); - } - } - } else if (msg.action === 'viewed') { - if (ChannelStore.getCurrentId() !== msg.channel_id && UserStore.getCurrentId() === msg.user_id) { - AsyncClient.getChannel(msg.channel_id); - } - } else if (msg.action === 'user_added') { - if (UserStore.getCurrentId() === msg.user_id) { - AsyncClient.getChannel(msg.channel_id); - } - } else if (msg.action === 'user_removed') { - if (msg.user_id === UserStore.getCurrentId()) { - AsyncClient.getChannels(true); - - if (msg.props.remover !== msg.user_id && msg.props.channel_id === ChannelStore.getCurrentId() && $('#removed_from_channel').length > 0) { - var sentState = {}; - sentState.channelName = ChannelStore.getCurrent().display_name; - sentState.remover = UserStore.getProfile(msg.props.remover).username; - - BrowserStore.setItem('channel-removed-state', sentState); - $('#removed_from_channel').modal('show'); - } - } - } - } updateTitle() { const channel = ChannelStore.getCurrent(); if (channel) { @@ -292,17 +198,14 @@ export default class Sidebar extends React.Component { onScroll() { this.updateUnreadIndicators(); } - onResize() { - this.updateUnreadIndicators(); - } updateUnreadIndicators() { - const container = $(React.findDOMNode(this.refs.container)); + const container = $(ReactDOM.findDOMNode(this.refs.container)); var showTopUnread = false; var showBottomUnread = false; if (this.firstUnreadChannel) { - var firstUnreadElement = $(React.findDOMNode(this.refs[this.firstUnreadChannel])); + var firstUnreadElement = $(ReactDOM.findDOMNode(this.refs[this.firstUnreadChannel])); if (firstUnreadElement.position().top + firstUnreadElement.height() < 0) { showTopUnread = true; @@ -310,7 +213,7 @@ export default class Sidebar extends React.Component { } if (this.lastUnreadChannel) { - var lastUnreadElement = $(React.findDOMNode(this.refs[this.lastUnreadChannel])); + var lastUnreadElement = $(ReactDOM.findDOMNode(this.refs[this.lastUnreadChannel])); if (lastUnreadElement.position().top > container.height()) { showBottomUnread = true; @@ -322,7 +225,51 @@ export default class Sidebar extends React.Component { showBottomUnread }); } - createChannelElement(channel, index) { + + handleLeaveDirectChannel(channel) { + if (!this.isLeaving.get(channel.id)) { + this.isLeaving.set(channel.id, true); + + const preference = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, channel.teammate_id, 'false'); + + // bypass AsyncClient since we've already saved the updated preferences + Client.savePreferences( + [preference], + () => { + this.isLeaving.set(channel.id, false); + }, + () => { + this.isLeaving.set(channel.id, false); + } + ); + + this.setState(this.getStateFromStores()); + } + + if (channel.id === this.state.activeId) { + Utils.switchChannel(ChannelStore.getByName(Constants.DEFAULT_CHANNEL)); + } + } + + sortChannelsByDisplayName(a, b) { + return a.display_name.localeCompare(b.display_name); + } + + showNewChannelModal(type) { + this.setState({newChannelModalType: type}); + } + hideNewChannelModal() { + this.setState({newChannelModalType: ''}); + } + + showMoreDirectChannelsModal() { + this.setState({showDirectChannelsModal: true}); + } + hideMoreDirectChannelsModal() { + this.setState({showDirectChannelsModal: false}); + } + + createChannelElement(channel, index, arr, handleClose) { var members = this.state.members; var activeId = this.state.activeId; var channelMember = members[channel.id]; @@ -333,15 +280,16 @@ export default class Sidebar extends React.Component { linkClass = 'active'; } + let rowClass = 'sidebar-channel'; + var unread = false; if (channelMember) { msgCount = channel.total_msg_count - channelMember.msg_count; unread = (msgCount > 0 && channelMember.notify_props.mark_unread !== 'mention') || channelMember.mention_count > 0; } - var titleClass = ''; if (unread) { - titleClass = 'unread-title'; + rowClass += ' unread-title'; if (channel.id !== activeId) { if (!this.firstUnreadChannel) { @@ -374,9 +322,8 @@ export default class Sidebar extends React.Component { ); } - var badgeClass; if (msgCount > 0) { - badgeClass = 'has-badge'; + rowClass += ' has-badge'; } // set up status icon for direct message channels @@ -405,8 +352,13 @@ export default class Sidebar extends React.Component { if (!channel.fake) { handleClick = function clickHandler(e) { + if (e.target.attributes.getNamedItem('data-close')) { + handleClose(channel); + } else { + Utils.switchChannel(channel); + } + e.preventDefault(); - Utils.switchChannel(channel); }; } else if (channel.fake && teamURL) { // It's a direct message channel that doesn't exist yet so let's create it now @@ -415,23 +367,51 @@ export default class Sidebar extends React.Component { if (this.state.loadingDMChannel === -1) { handleClick = function clickHandler(e) { e.preventDefault(); - this.setState({loadingDMChannel: index}); - - Client.createDirectChannel(channel, otherUserId, - function success(data) { - this.setState({loadingDMChannel: -1}); - AsyncClient.getChannel(data.id); - Utils.switchChannel(data); - }.bind(this), - function error() { - this.setState({loadingDMChannel: -1}); - window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name; - }.bind(this) - ); + + if (e.target.attributes.getNamedItem('data-close')) { + handleClose(channel); + } else { + this.setState({loadingDMChannel: index}); + + Client.createDirectChannel(channel, otherUserId, + (data) => { + this.setState({loadingDMChannel: -1}); + AsyncClient.getChannel(data.id); + Utils.switchChannel(data); + }, + () => { + this.setState({loadingDMChannel: -1}); + window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name; + } + ); + } }.bind(this); } } + let closeButton = null; + const removeTooltip = ( + <Tooltip id='remove-dm-tooltip'>{'Remove from list'}</Tooltip> + ); + if (handleClose && !badge) { + closeButton = ( + <OverlayTrigger + delayShow={1000} + placement='top' + overlay={removeTooltip} + > + <span + className='btn-close' + data-close='true' + > + {'×'} + </span> + </OverlayTrigger> + ); + + rowClass += ' has-close'; + } + return ( <li key={channel.name} @@ -439,13 +419,14 @@ export default class Sidebar extends React.Component { className={linkClass} > <a - className={'sidebar-channel ' + titleClass + ' ' + badgeClass} + className={rowClass} href={href} onClick={handleClick} > {status} {channel.display_name} {badge} + {closeButton} </a> </li> ); @@ -464,7 +445,9 @@ export default class Sidebar extends React.Component { const privateChannels = this.state.channels.filter((channel) => channel.type === 'P'); const privateChannelItems = privateChannels.map(this.createChannelElement); - const directMessageItems = this.state.showDirectChannels.map(this.createChannelElement); + const directMessageItems = this.state.visibleDirectChannels.map((channel, index, arr) => { + return this.createChannelElement(channel, index, arr, this.handleLeaveDirectChannel); + }); // update the favicon to show if there are any notifications var link = document.createElement('link'); @@ -484,34 +467,43 @@ export default class Sidebar extends React.Component { head.appendChild(link); var directMessageMore = null; - if (this.state.hideDirectChannels.length > 0) { + if (this.state.hiddenDirectChannelCount > 0) { directMessageMore = ( - <li> + <li key='more'> <a href='#' - data-toggle='modal' - className='nav-more' - data-target='#more_direct_channels' - data-channels={JSON.stringify(this.state.hideDirectChannels)} + onClick={this.showMoreDirectChannelsModal} > - {'More (' + this.state.hideDirectChannels.length + ')'} + {'More (' + this.state.hiddenDirectChannelCount + ')'} </a> </li> ); } let showChannelModal = false; - if (this.state.modal !== '') { + if (this.state.newChannelModalType !== '') { showChannelModal = true; } + const createChannelTootlip = ( + <Tooltip id='new-channel-tooltip' >{'Create new channel'}</Tooltip> + ); + const createGroupTootlip = ( + <Tooltip id='new-group-tooltip'>{'Create new group'}</Tooltip> + ); + return ( <div> <NewChannelFlow show={showChannelModal} - channelType={this.state.modal} - onModalDismissed={() => this.setState({modal: ''})} + channelType={this.state.newChannelModalType} + onModalDismissed={this.hideNewChannelModal} + /> + <MoreDirectChannels + show={this.state.showDirectChannelsModal} + onModalDismissed={this.hideMoreDirectChannelsModal} /> + <SidebarHeader teamDisplayName={this.props.teamDisplayName} teamName={this.props.teamName} @@ -538,14 +530,20 @@ export default class Sidebar extends React.Component { <ul className='nav nav-pills nav-stacked'> <li> <h4> - Channels + {'Channels'} + <OverlayTrigger + delayShow={500} + placement='top' + overlay={createChannelTootlip} + > <a className='add-channel-btn' href='#' - onClick={() => this.setState({modal: 'O'})} + onClick={this.showNewChannelModal.bind(this, 'O')} > {'+'} </a> + </OverlayTrigger> </h4> </li> {publicChannelItems} @@ -557,7 +555,7 @@ export default class Sidebar extends React.Component { data-target='#more_channels' data-channeltype='O' > - More... + {'More...'} </a> </li> </ul> @@ -565,20 +563,26 @@ export default class Sidebar extends React.Component { <ul className='nav nav-pills nav-stacked'> <li> <h4> - Private Groups + {'Private Groups'} + <OverlayTrigger + delayShow={500} + placement='top' + overlay={createGroupTootlip} + > <a className='add-channel-btn' href='#' - onClick={() => this.setState({modal: 'P'})} + onClick={this.showNewChannelModal.bind(this, 'P')} > {'+'} </a> + </OverlayTrigger> </h4> </li> {privateChannelItems} </ul> <ul className='nav nav-pills nav-stacked'> - <li><h4>Direct Messages</h4></li> + <li><h4>{'Direct Messages'}</h4></li> {directMessageItems} {directMessageMore} </ul> diff --git a/web/react/components/sidebar_right_menu.jsx b/web/react/components/sidebar_right_menu.jsx index ea2bcf9a4..ac101d631 100644 --- a/web/react/components/sidebar_right_menu.jsx +++ b/web/react/components/sidebar_right_menu.jsx @@ -75,7 +75,7 @@ export default class SidebarRightMenu extends React.Component { data-toggle='modal' data-target='#team_members' > - <i className='glyphicon glyphicon-wrench'></i>Manage Team</a> + <i className='glyphicon glyphicon-wrench'></i>Manage Members</a> </li> ); } diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx index 75661f812..f74c29d27 100644 --- a/web/react/components/signup_user_complete.jsx +++ b/web/react/components/signup_user_complete.jsx @@ -28,7 +28,7 @@ export default class SignupUserComplete extends React.Component { handleSubmit(e) { e.preventDefault(); - const providedEmail = React.findDOMNode(this.refs.email).value.trim(); + const providedEmail = ReactDOM.findDOMNode(this.refs.email).value.trim(); if (!providedEmail) { this.setState({nameError: '', emailError: 'This field is required', passwordError: ''}); return; @@ -39,7 +39,7 @@ export default class SignupUserComplete extends React.Component { return; } - const providedUsername = React.findDOMNode(this.refs.name).value.trim().toLowerCase(); + const providedUsername = ReactDOM.findDOMNode(this.refs.name).value.trim().toLowerCase(); if (!providedUsername) { this.setState({nameError: 'This field is required', emailError: '', passwordError: '', serverError: ''}); return; @@ -59,7 +59,7 @@ export default class SignupUserComplete extends React.Component { return; } - const providedPassword = React.findDOMNode(this.refs.password).value.trim(); + const providedPassword = ReactDOM.findDOMNode(this.refs.password).value.trim(); if (!providedPassword || providedPassword.length < 5) { this.setState({nameError: '', emailError: '', passwordError: 'Please enter at least 5 characters', serverError: ''}); return; @@ -149,7 +149,7 @@ export default class SignupUserComplete extends React.Component { // set up the email entry and hide it if an email was provided var yourEmailIs = ''; if (this.state.user.email) { - yourEmailIs = <span>Your email address is {this.state.user.email}. You'll use this address to sign in to {global.window.config.SiteName}.</span>; + yourEmailIs = <span>Your email address is <strong>{this.state.user.email}</strong>. You'll use this address to sign in to {global.window.config.SiteName}.</span>; } var emailContainerStyle = 'margin--extra'; @@ -169,6 +169,7 @@ export default class SignupUserComplete extends React.Component { placeholder='' maxLength='128' autoFocus={true} + spellCheck='false' /> {emailError} </div> @@ -204,9 +205,10 @@ export default class SignupUserComplete extends React.Component { className='form-control' placeholder='' maxLength='128' + spellCheck='false' /> {nameError} - <p className='form__hint'>Username must begin with a letter, and contain between 3 to 15 lowercase characters made up of numbers, letters, and the symbols '.', '-' and '_'</p> + <span className='help-block'>Username must begin with a letter, and contain between 3 to 15 lowercase characters made up of numbers, letters, and the symbols '.', '-' and '_'</span> </div> </div> <div className='margin--extra'> @@ -218,6 +220,7 @@ export default class SignupUserComplete extends React.Component { className='form-control' placeholder='' maxLength='128' + spellCheck='false' /> {passwordError} </div> diff --git a/web/react/components/team_import_tab.jsx b/web/react/components/team_import_tab.jsx index 40f06c382..a80b1a472 100644 --- a/web/react/components/team_import_tab.jsx +++ b/web/react/components/team_import_tab.jsx @@ -34,14 +34,14 @@ export default class TeamImportTab extends React.Component { render() { var uploadHelpText = ( <div> - <p>{'Slack does not allow you to export files, images, private groups or direct messages stored in Slack. Therefore, Slack import to Mattermost only supports importing of text messages in your Slack team\'\s public channels.'}</p> - <p>{'The Slack import to Mattermost is in "Preview". Slack bot posts do not yet import and Slack @mentions are not currently supported.'}</p> + <p>{'To import a team from Slack go to Slack > Team Settings > Import/Export Data > Export > Start Export. Slack does not allow you to export files, images, private groups or direct messages stored in Slack. Therefore, Slack import to Mattermost only supports importing of text messages in your Slack team\'\s public channels.'}</p> + <p>{'The Slack import to Mattermost is in "Beta". Slack bot posts do not yet import and Slack @mentions are not currently supported.'}</p> </div> ); var uploadSection = ( <SettingUpload - title='Import from Slack' + title='Import from Slack (Beta)' submit={this.doImportSlack} helpText={uploadHelpText} fileTypesAccepted='.zip' diff --git a/web/react/components/team_members.jsx b/web/react/components/team_members.jsx index 0f60d93b2..33590c89a 100644 --- a/web/react/components/team_members.jsx +++ b/web/react/components/team_members.jsx @@ -44,11 +44,11 @@ export default class TeamMembers extends React.Component { UserStore.addChangeListener(this.onChange); var self = this; - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', function show() { + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', function show() { self.setState({render_members: false}); }); - $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', function hide() { + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', function hide() { self.setState({render_members: true}); }); } diff --git a/web/react/components/team_signup_display_name_page.jsx b/web/react/components/team_signup_display_name_page.jsx index 65da4bc96..4d08274e4 100644 --- a/web/react/components/team_signup_display_name_page.jsx +++ b/web/react/components/team_signup_display_name_page.jsx @@ -21,7 +21,7 @@ export default class TeamSignupDisplayNamePage extends React.Component { submitNext(e) { e.preventDefault(); - var displayName = React.findDOMNode(this.refs.name).value.trim(); + var displayName = ReactDOM.findDOMNode(this.refs.name).value.trim(); if (!displayName) { this.setState({nameError: 'This field is required'}); return; @@ -66,6 +66,7 @@ export default class TeamSignupDisplayNamePage extends React.Component { defaultValue={this.props.state.team.display_name} autoFocus={true} onFocus={this.handleFocus} + spellCheck='false' /> </div> </div> diff --git a/web/react/components/team_signup_email_item.jsx b/web/react/components/team_signup_email_item.jsx index 219f14eef..1d2b24ed7 100644 --- a/web/react/components/team_signup_email_item.jsx +++ b/web/react/components/team_signup_email_item.jsx @@ -13,10 +13,10 @@ export default class TeamSignupEmailItem extends React.Component { this.state = {}; } getValue() { - return React.findDOMNode(this.refs.email).value.trim(); + return ReactDOM.findDOMNode(this.refs.email).value.trim(); } validate(teamEmail) { - const email = React.findDOMNode(this.refs.email).value.trim().toLowerCase(); + const email = ReactDOM.findDOMNode(this.refs.email).value.trim().toLowerCase(); if (!email) { return true; @@ -51,6 +51,7 @@ export default class TeamSignupEmailItem extends React.Component { placeholder='Email Address' defaultValue={this.props.email} maxLength='128' + spellCheck='false' /> {emailError} </div> diff --git a/web/react/components/team_signup_password_page.jsx b/web/react/components/team_signup_password_page.jsx index dce8105ca..daa898b53 100644 --- a/web/react/components/team_signup_password_page.jsx +++ b/web/react/components/team_signup_password_page.jsx @@ -22,7 +22,7 @@ export default class TeamSignupPasswordPage extends React.Component { submitNext(e) { e.preventDefault(); - var password = React.findDOMNode(this.refs.password).value.trim(); + var password = ReactDOM.findDOMNode(this.refs.password).value.trim(); if (!password || password.length < 5) { this.setState({passwordError: 'Please enter at least 5 characters'}); return; @@ -109,8 +109,9 @@ export default class TeamSignupPasswordPage extends React.Component { className='form-control' placeholder='' maxLength='128' + spellCheck='false' /> - <div className='color--light form__hint'>Passwords must contain 5 to 50 characters. Your password will be strongest if it contains a mix of symbols, numbers, and upper and lowercase characters.</div> + <span className='color--light help-block'>Passwords must contain 5 to 50 characters. Your password will be strongest if it contains a mix of symbols, numbers, and upper and lowercase characters.</span> </div> </div> {passwordError} diff --git a/web/react/components/team_signup_url_page.jsx b/web/react/components/team_signup_url_page.jsx index 398a52f7d..67e4c9dd7 100644 --- a/web/react/components/team_signup_url_page.jsx +++ b/web/react/components/team_signup_url_page.jsx @@ -23,7 +23,7 @@ export default class TeamSignupUrlPage extends React.Component { submitNext(e) { e.preventDefault(); - const name = React.findDOMNode(this.refs.name).value.trim(); + const name = ReactDOM.findDOMNode(this.refs.name).value.trim(); if (!name) { this.setState({nameError: 'This field is required'}); return; @@ -111,6 +111,7 @@ export default class TeamSignupUrlPage extends React.Component { defaultValue={this.props.state.team.name} autoFocus={true} onFocus={this.handleFocus} + spellCheck='false' /> </div> </div> diff --git a/web/react/components/team_signup_username_page.jsx b/web/react/components/team_signup_username_page.jsx index 53a389c4c..21e76e2b8 100644 --- a/web/react/components/team_signup_username_page.jsx +++ b/web/react/components/team_signup_username_page.jsx @@ -15,13 +15,18 @@ export default class TeamSignupUsernamePage extends React.Component { } submitBack(e) { e.preventDefault(); - this.props.state.wizard = 'send_invites'; + if (global.window.config.SendEmailNotifications === 'true') { + this.props.state.wizard = 'send_invites'; + } else { + this.props.state.wizard = 'team_url'; + } + this.props.updateParent(this.props.state); } submitNext(e) { e.preventDefault(); - var name = React.findDOMNode(this.refs.name).value.trim().toLowerCase(); + var name = ReactDOM.findDOMNode(this.refs.name).value.trim().toLowerCase(); var usernameError = Utils.isValidUsername(name); if (usernameError === 'Cannot use a reserved word as a username.') { @@ -68,8 +73,9 @@ export default class TeamSignupUsernamePage extends React.Component { placeholder='' defaultValue={this.props.state.user.username} maxLength='128' + spellCheck='false' /> - <div className='color--light form__hint'>Usernames must begin with a letter and contain 3 to 15 characters made up of lowercase letters, numbers, and the symbols '.', '-' and '_'</div> + <span className='color--light help-block'>Usernames must begin with a letter and contain 3 to 15 characters made up of lowercase letters, numbers, and the symbols '.', '-' and '_'</span> </div> </div> {nameError} diff --git a/web/react/components/team_signup_welcome_page.jsx b/web/react/components/team_signup_welcome_page.jsx index 78a41eed5..1e9d8df0a 100644 --- a/web/react/components/team_signup_welcome_page.jsx +++ b/web/react/components/team_signup_welcome_page.jsx @@ -36,7 +36,7 @@ export default class TeamSignupWelcomePage extends React.Component { var state = {useDiff: true, serverError: ''}; - var email = React.findDOMNode(this.refs.email).value.trim().toLowerCase(); + var email = ReactDOM.findDOMNode(this.refs.email).value.trim().toLowerCase(); if (!email || !Utils.isEmail(email)) { state.emailError = 'Please enter a valid email address'; this.setState(state); @@ -145,6 +145,7 @@ export default class TeamSignupWelcomePage extends React.Component { className='form-control' placeholder='Email Address' maxLength='128' + spellCheck='false' /> </div> </div> diff --git a/web/react/components/team_signup_with_email.jsx b/web/react/components/team_signup_with_email.jsx index 9376a4564..ff4ccd4d8 100644 --- a/web/react/components/team_signup_with_email.jsx +++ b/web/react/components/team_signup_with_email.jsx @@ -17,7 +17,7 @@ export default class EmailSignUpPage extends React.Component { var team = {}; var state = {serverError: ''}; - team.email = React.findDOMNode(this.refs.email).value.trim().toLowerCase(); + team.email = ReactDOM.findDOMNode(this.refs.email).value.trim().toLowerCase(); if (!team.email || !Utils.isEmail(team.email)) { state.emailError = 'Please enter a valid email address'; state.inValid = true; @@ -63,6 +63,7 @@ export default class EmailSignUpPage extends React.Component { className='form-control' placeholder='Email Address' maxLength='128' + spellCheck='false' /> </div> <div className='form-group'> diff --git a/web/react/components/team_signup_with_sso.jsx b/web/react/components/team_signup_with_sso.jsx index 011bfebff..a0ccdf2c7 100644 --- a/web/react/components/team_signup_with_sso.jsx +++ b/web/react/components/team_signup_with_sso.jsx @@ -54,7 +54,7 @@ export default class SSOSignUpPage extends React.Component { ); } nameChange() { - this.setState({name: React.findDOMNode(this.refs.teamname).value.trim()}); + this.setState({name: ReactDOM.findDOMNode(this.refs.teamname).value.trim()}); } render() { var nameError = null; @@ -104,6 +104,7 @@ export default class SSOSignUpPage extends React.Component { placeholder='Enter name of new team' maxLength='128' onChange={this.nameChange} + spellCheck='false' /> {nameError} </div> diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx index 0563c294a..86bb42f62 100644 --- a/web/react/components/textbox.jsx +++ b/web/react/components/textbox.jsx @@ -9,6 +9,7 @@ const ErrorStore = require('../stores/error_store.jsx'); const Utils = require('../utils/utils.jsx'); const Constants = require('../utils/constants.jsx'); const ActionTypes = Constants.ActionTypes; +const KeyCodes = Constants.KeyCodes; export default class Textbox extends React.Component { constructor(props) { @@ -83,7 +84,7 @@ export default class Textbox extends React.Component { componentDidUpdate() { if (this.caret >= 0) { - Utils.setCaretPosition(React.findDOMNode(this.refs.message), this.caret); + Utils.setCaretPosition(ReactDOM.findDOMNode(this.refs.message), this.caret); this.caret = -1; } if (this.doProcessMentions) { @@ -97,7 +98,7 @@ export default class Textbox extends React.Component { if (!this.addedMention) { this.checkForNewMention(nextProps.messageText); } - const text = React.findDOMNode(this.refs.message).value; + const text = ReactDOM.findDOMNode(this.refs.message).value; if (nextProps.channelId !== this.props.channelId || nextProps.messageText !== text) { this.doProcessMentions = true; } @@ -117,11 +118,11 @@ export default class Textbox extends React.Component { } handleChange() { - this.props.onUserInput(React.findDOMNode(this.refs.message).value); + this.props.onUserInput(ReactDOM.findDOMNode(this.refs.message).value); } handleKeyPress(e) { - const text = React.findDOMNode(this.refs.message).value; + const text = ReactDOM.findDOMNode(this.refs.message).value; if (!this.refs.commands.isEmpty() && text.indexOf('/') === 0 && e.which === 13) { this.refs.commands.addFirstCommand(); @@ -130,7 +131,7 @@ export default class Textbox extends React.Component { } if (!this.doProcessMentions) { - const caret = Utils.getCaretPosition(React.findDOMNode(this.refs.message)); + const caret = Utils.getCaretPosition(ReactDOM.findDOMNode(this.refs.message)); const preText = text.substring(0, caret); const lastSpace = preText.lastIndexOf(' '); const lastAt = preText.lastIndexOf('@'); @@ -144,17 +145,19 @@ export default class Textbox extends React.Component { } handleKeyDown(e) { - if (Utils.getSelectedText(React.findDOMNode(this.refs.message)) !== '') { + if (Utils.getSelectedText(ReactDOM.findDOMNode(this.refs.message)) !== '') { this.doProcessMentions = true; } - if (e.keyCode === 8) { + if (e.keyCode === KeyCodes.BACKSPACE) { this.handleBackspace(e); + } else if (this.props.onKeyDown) { + this.props.onKeyDown(e); } } handleBackspace() { - const text = React.findDOMNode(this.refs.message).value; + const text = ReactDOM.findDOMNode(this.refs.message).value; if (text.indexOf('/') === 0) { this.refs.commands.getSuggestedCommands(text.substring(0, text.length - 1)); } @@ -163,7 +166,7 @@ export default class Textbox extends React.Component { return; } - const caret = Utils.getCaretPosition(React.findDOMNode(this.refs.message)); + const caret = Utils.getCaretPosition(ReactDOM.findDOMNode(this.refs.message)); const preText = text.substring(0, caret); const lastSpace = preText.lastIndexOf(' '); const lastAt = preText.lastIndexOf('@'); @@ -174,7 +177,7 @@ export default class Textbox extends React.Component { } checkForNewMention(text) { - const caret = Utils.getCaretPosition(React.findDOMNode(this.refs.message)); + const caret = Utils.getCaretPosition(ReactDOM.findDOMNode(this.refs.message)); const preText = text.substring(0, caret); @@ -201,7 +204,7 @@ export default class Textbox extends React.Component { } addMention(name) { - const caret = Utils.getCaretPosition(React.findDOMNode(this.refs.message)); + const caret = Utils.getCaretPosition(ReactDOM.findDOMNode(this.refs.message)); const text = this.props.messageText; @@ -224,14 +227,14 @@ export default class Textbox extends React.Component { } addCommand(cmd) { - const elm = React.findDOMNode(this.refs.message); + const elm = ReactDOM.findDOMNode(this.refs.message); elm.value = cmd; this.handleChange(); } resize() { - const e = React.findDOMNode(this.refs.message); - const w = React.findDOMNode(this.refs.wrapper); + const e = ReactDOM.findDOMNode(this.refs.message); + const w = ReactDOM.findDOMNode(this.refs.wrapper); const prevHeight = $(e).height(); @@ -246,9 +249,11 @@ export default class Textbox extends React.Component { if (e.scrollHeight - mod < 167) { $(e).css({height: 'auto', 'overflow-y': 'hidden'}).height(e.scrollHeight - mod); $(w).css({height: 'auto'}).height(e.scrollHeight + 2); + $(w).closest('.post-body__cell').removeClass('scroll'); } else { $(e).css({height: 'auto', 'overflow-y': 'scroll'}).height(167); $(w).css({height: 'auto'}).height(167); + $(w).closest('.post-body__cell').addClass('scroll'); } if (prevHeight !== $(e).height() && this.props.onHeightChange) { @@ -257,14 +262,14 @@ export default class Textbox extends React.Component { } handleFocus() { - const elm = React.findDOMNode(this.refs.message); + const elm = ReactDOM.findDOMNode(this.refs.message); if (elm.title === elm.value) { elm.value = ''; } } handleBlur() { - const elm = React.findDOMNode(this.refs.message); + const elm = ReactDOM.findDOMNode(this.refs.message); if (elm.value === '') { elm.value = elm.title; } @@ -316,5 +321,6 @@ Textbox.propTypes = { onUserInput: React.PropTypes.func.isRequired, onKeyPress: React.PropTypes.func.isRequired, onHeightChange: React.PropTypes.func, - createMessage: React.PropTypes.string.isRequired + createMessage: React.PropTypes.string.isRequired, + onKeyDown: React.PropTypes.func }; diff --git a/web/react/components/user_profile.jsx b/web/react/components/user_profile.jsx index 948f06444..540331663 100644 --- a/web/react/components/user_profile.jsx +++ b/web/react/components/user_profile.jsx @@ -3,6 +3,8 @@ var Utils = require('../utils/utils.jsx'); var UserStore = require('../stores/user_store.jsx'); +var Popover = ReactBootstrap.Popover; +var OverlayTrigger = ReactBootstrap.OverlayTrigger; var id = 0; @@ -32,7 +34,6 @@ export default class UserProfile extends React.Component { componentDidMount() { UserStore.addChangeListener(this.onChange); if (!this.props.disablePopover) { - $('#profile_' + this.uniqueId).popover({placement: 'right', container: 'body', trigger: 'hover', html: true, delay: {show: 200, hide: 100}}); $('body').tooltip({selector: '[data-toggle=tooltip]', trigger: 'hover click'}); } } @@ -62,23 +63,63 @@ export default class UserProfile extends React.Component { return <div>{name}</div>; } - var dataContent = '<img class="user-popover__image" src="/api/v1/users/' + this.state.profile.id + '/image?time=' + this.state.profile.update_at + '" height="128" width="128" />'; + var dataContent = []; + dataContent.push( + <img + className='user-popover__image' + src={'/api/v1/users/' + this.state.profile.id + '/image?time=' + this.state.profile.update_at} + height='128' + width='128' + key='user-popover-image' + /> + ); if (!global.window.config.ShowEmailAddress === 'true') { - dataContent += '<div class="text-nowrap">Email not shared</div>'; + dataContent.push( + <div + className='text-nowrap' + key='user-popover-no-email' + > + {'Email not shared'} + </div> + ); } else { - dataContent += '<div data-toggle="tooltip" title="' + this.state.profile.email + '"><a href="mailto:' + this.state.profile.email + '" class="text-nowrap text-lowercase user-popover__email">' + this.state.profile.email + '</a></div>'; + dataContent.push( + <div + data-toggle='tooltip' + title={this.state.profile.email} + key='user-popover-email' + > + <a + href={'mailto:' + this.state.profile.email} + className='text-nowrap text-lowercase user-popover__email' + > + {this.state.profile.email} + </a> + </div> + ); } return ( - <div - className='user-popover' - id={'profile_' + this.uniqueId} - data-toggle='popover' - data-content={dataContent} - data-original-title={this.state.profile.username} + <OverlayTrigger + trigger='click' + placement='right' + rootClose={true} + overlay={ + <Popover + title={this.state.profile.username} + id='user-profile-popover' + > + {dataContent} + </Popover> + } > - {name} - </div> + <div + className='user-popover' + id={'profile_' + this.uniqueId} + > + {name} + </div> + </OverlayTrigger> ); } } diff --git a/web/react/components/user_settings/import_theme_modal.jsx b/web/react/components/user_settings/import_theme_modal.jsx index de0663874..1a9ac0ad3 100644 --- a/web/react/components/user_settings/import_theme_modal.jsx +++ b/web/react/components/user_settings/import_theme_modal.jsx @@ -35,7 +35,7 @@ export default class ImportThemeModal extends React.Component { handleSubmit(e) { e.preventDefault(); - const text = React.findDOMNode(this.refs.input).value; + const text = ReactDOM.findDOMNode(this.refs.input).value; if (!this.isInputValid(text)) { this.setState({inputError: 'Invalid format, please try copying and pasting in again.'}); diff --git a/web/react/components/user_settings/manage_outgoing_hooks.jsx b/web/react/components/user_settings/manage_outgoing_hooks.jsx new file mode 100644 index 000000000..e83ae3bd6 --- /dev/null +++ b/web/react/components/user_settings/manage_outgoing_hooks.jsx @@ -0,0 +1,262 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +var Client = require('../../utils/client.jsx'); +var Constants = require('../../utils/constants.jsx'); +var ChannelStore = require('../../stores/channel_store.jsx'); +var LoadingScreen = require('../loading_screen.jsx'); + +export default class ManageOutgoingHooks extends React.Component { + constructor() { + super(); + + this.getHooks = this.getHooks.bind(this); + this.addNewHook = this.addNewHook.bind(this); + this.updateChannelId = this.updateChannelId.bind(this); + this.updateTriggerWords = this.updateTriggerWords.bind(this); + this.updateCallbackURLs = this.updateCallbackURLs.bind(this); + + this.state = {hooks: [], channelId: '', triggerWords: '', callbackURLs: '', getHooksComplete: false}; + } + componentDidMount() { + this.getHooks(); + } + addNewHook(e) { + e.preventDefault(); + + if ((this.state.channelId === '' && this.state.triggerWords === '') || + this.state.callbackURLs === '') { + return; + } + + const hook = {}; + hook.channel_id = this.state.channelId; + if (this.state.triggerWords.length !== 0) { + hook.trigger_words = this.state.triggerWords.trim().split(','); + } + hook.callback_urls = this.state.callbackURLs.split('\n'); + + Client.addOutgoingHook( + hook, + (data) => { + let hooks = Object.assign([], this.state.hooks); + if (!hooks) { + hooks = []; + } + hooks.push(data); + this.setState({hooks, serverError: null, channelId: '', triggerWords: '', callbackURLs: ''}); + }, + (err) => { + this.setState({serverError: err}); + } + ); + } + removeHook(id) { + const data = {}; + data.id = id; + + Client.deleteOutgoingHook( + data, + () => { + const hooks = this.state.hooks; + let index = -1; + for (let i = 0; i < hooks.length; i++) { + if (hooks[i].id === id) { + index = i; + break; + } + } + + if (index !== -1) { + hooks.splice(index, 1); + } + + this.setState({hooks}); + }, + (err) => { + this.setState({serverError: err}); + } + ); + } + regenToken(id) { + const regenData = {}; + regenData.id = id; + + Client.regenOutgoingHookToken( + regenData, + (data) => { + const hooks = Object.assign([], this.state.hooks); + for (let i = 0; i < hooks.length; i++) { + if (hooks[i].id === id) { + hooks[i] = data; + break; + } + } + + this.setState({hooks, serverError: null}); + }, + (err) => { + this.setState({serverError: err}); + } + ); + } + getHooks() { + Client.listOutgoingHooks( + (data) => { + if (data) { + this.setState({hooks: data, getHooksComplete: true, serverError: null}); + } + }, + (err) => { + this.setState({serverError: err}); + } + ); + } + updateChannelId(e) { + this.setState({channelId: e.target.value}); + } + updateTriggerWords(e) { + this.setState({triggerWords: e.target.value}); + } + updateCallbackURLs(e) { + this.setState({callbackURLs: e.target.value}); + } + render() { + let serverError; + if (this.state.serverError) { + serverError = <label className='has-error'>{this.state.serverError}</label>; + } + + const channels = ChannelStore.getAll(); + const options = [<option value=''>{'--- Select a channel ---'}</option>]; + channels.forEach((channel) => { + if (channel.type === Constants.OPEN_CHANNEL) { + options.push(<option value={channel.id}>{channel.name}</option>); + } + }); + + const hooks = []; + this.state.hooks.forEach((hook) => { + const c = ChannelStore.get(hook.channel_id); + let channelDiv; + if (c) { + channelDiv = ( + <div className='padding-top'> + <strong>{'Channel: '}</strong>{c.name} + </div> + ); + } + + let triggerDiv; + if (hook.trigger_words && hook.trigger_words.length !== 0) { + triggerDiv = ( + <div className='padding-top'> + <strong>{'Trigger Words: '}</strong>{hook.trigger_words.join(', ')} + </div> + ); + } + + hooks.push( + <div className='font--small'> + <div className='padding-top x2 divider-light'></div> + <div className='padding-top x2'> + <strong>{'URLs: '}</strong><span className='word-break--all'>{hook.callback_urls.join(', ')}</span> + </div> + {channelDiv} + {triggerDiv} + <div className='padding-top'> + <strong>{'Token: '}</strong>{hook.token} + </div> + <div className='padding-top'> + <a + className='text-danger' + href='#' + onClick={this.regenToken.bind(this, hook.id)} + > + {'Regen Token'} + </a> + <span>{' - '}</span> + <a + className='text-danger' + href='#' + onClick={this.removeHook.bind(this, hook.id)} + > + {'Remove'} + </a> + </div> + </div> + ); + }); + + let displayHooks; + if (!this.state.getHooksComplete) { + displayHooks = <LoadingScreen/>; + } else if (hooks.length > 0) { + displayHooks = hooks; + } else { + displayHooks = <label>{': None'}</label>; + } + + const existingHooks = ( + <div className='padding-top x2'> + <label className='control-label padding-top x2'>{'Existing outgoing webhooks'}</label> + {displayHooks} + </div> + ); + + const disableButton = (this.state.channelId === '' && this.state.triggerWords === '') || this.state.callbackURLs === ''; + + return ( + <div key='addOutgoingHook'> + <label className='control-label'>{'Add a new outgoing webhook'}</label> + <div className='padding-top'> + <strong>{'Channel:'}</strong> + <select + ref='channelName' + className='form-control' + value={this.state.channelId} + onChange={this.updateChannelId} + > + {options} + </select> + <span>{'Only public channels can be used'}</span> + <br/> + <br/> + <strong>{'Trigger Words:'}</strong> + <input + ref='triggerWords' + className='form-control' + value={this.state.triggerWords} + onChange={this.updateTriggerWords} + placeholder='Optional if channel selected' + /> + <span>{'Comma separated words to trigger on'}</span> + <br/> + <br/> + <strong>{'Callback URLs:'}</strong> + <textarea + ref='callbackURLs' + className='form-control no-resize' + value={this.state.callbackURLs} + resize={false} + rows={3} + onChange={this.updateCallbackURLs} + /> + <span>{'New line separated URLs that will receive the HTTP POST event'}</span> + {serverError} + <div className='padding-top'> + <a + className={'btn btn-sm btn-primary'} + href='#' + disabled={disableButton} + onClick={this.addNewHook} + > + {'Add'} + </a> + </div> + </div> + {existingHooks} + </div> + ); + } +} diff --git a/web/react/components/user_settings/user_settings.jsx b/web/react/components/user_settings/user_settings.jsx index 5ce9b6330..15bf961d6 100644 --- a/web/react/components/user_settings/user_settings.jsx +++ b/web/react/components/user_settings/user_settings.jsx @@ -9,6 +9,7 @@ var GeneralTab = require('./user_settings_general.jsx'); var AppearanceTab = require('./user_settings_appearance.jsx'); var DeveloperTab = require('./user_settings_developer.jsx'); var IntegrationsTab = require('./user_settings_integrations.jsx'); +var DisplayTab = require('./user_settings_display.jsx'); export default class UserSettings extends React.Component { constructor(props) { @@ -98,6 +99,17 @@ export default class UserSettings extends React.Component { /> </div> ); + } else if (this.props.activeTab === 'display') { + return ( + <div> + <DisplayTab + user={this.state.user} + activeSection={this.props.activeSection} + updateSection={this.props.updateSection} + updateTab={this.props.updateTab} + /> + </div> + ); } return <div/>; diff --git a/web/react/components/user_settings/user_settings_appearance.jsx b/web/react/components/user_settings/user_settings_appearance.jsx index 6d64e83b6..8c62a189d 100644 --- a/web/react/components/user_settings/user_settings_appearance.jsx +++ b/web/react/components/user_settings/user_settings_appearance.jsx @@ -29,14 +29,14 @@ export default class UserSettingsAppearance extends React.Component { UserStore.addChangeListener(this.onChange); if (this.props.activeSection === 'theme') { - $(React.findDOMNode(this.refs[this.state.theme])).addClass('active-border'); + $(ReactDOM.findDOMNode(this.refs[this.state.theme])).addClass('active-border'); } $('#user_settings').on('hidden.bs.modal', this.handleClose); } componentDidUpdate() { if (this.props.activeSection === 'theme') { $('.color-btn').removeClass('active-border'); - $(React.findDOMNode(this.refs[this.state.theme])).addClass('active-border'); + $(ReactDOM.findDOMNode(this.refs[this.state.theme])).addClass('active-border'); } } componentWillUnmount() { @@ -152,9 +152,8 @@ export default class UserSettingsAppearance extends React.Component { <input type='radio' checked={!displayCustom} onChange={this.updateType.bind(this, 'premade')} - > - {'Theme Colors'} - </input> + /> + {'Theme Colors'} </label> <br/> </div> @@ -164,9 +163,8 @@ export default class UserSettingsAppearance extends React.Component { <input type='radio' checked={displayCustom} onChange={this.updateType.bind(this, 'custom')} - > - {'Custom Theme'} - </input> + /> + {'Custom Theme'} </label> <br/> </div> @@ -178,7 +176,7 @@ export default class UserSettingsAppearance extends React.Component { href='#' onClick={this.submitTheme} > - {'Submit'} + {'Save'} </a> <a className='btn btn-sm theme' diff --git a/web/react/components/user_settings/user_settings_display.jsx b/web/react/components/user_settings/user_settings_display.jsx new file mode 100644 index 000000000..22a62273c --- /dev/null +++ b/web/react/components/user_settings/user_settings_display.jsx @@ -0,0 +1,165 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import {savePreferences} from '../../utils/client.jsx'; +import SettingItemMin from '../setting_item_min.jsx'; +import SettingItemMax from '../setting_item_max.jsx'; +import Constants from '../../utils/constants.jsx'; +import PreferenceStore from '../../stores/preference_store.jsx'; + +function getDisplayStateFromStores() { + const militaryTime = PreferenceStore.getPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'use_military_time', {value: 'false'}); + + return {militaryTime: militaryTime.value}; +} + +export default class UserSettingsDisplay extends React.Component { + constructor(props) { + super(props); + + this.handleSubmit = this.handleSubmit.bind(this); + this.handleClockRadio = this.handleClockRadio.bind(this); + this.updateSection = this.updateSection.bind(this); + this.handleClose = this.handleClose.bind(this); + + this.state = getDisplayStateFromStores(); + } + handleSubmit() { + const preference = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'use_military_time', this.state.militaryTime); + + savePreferences([preference], + () => { + PreferenceStore.emitChange(); + this.updateSection(''); + }, + (err) => { + this.setState({serverError: err.message}); + } + ); + } + handleClockRadio(militaryTime) { + this.setState({militaryTime}); + } + updateSection(section) { + this.setState(getDisplayStateFromStores()); + this.props.updateSection(section); + } + handleClose() { + this.updateSection(''); + } + componentDidMount() { + $('#user_settings').on('hidden.bs.modal', this.handleClose); + } + componentWillUnmount() { + $('#user_settings').off('hidden.bs.modal', this.handleClose); + } + render() { + const serverError = this.state.serverError || null; + let clockSection; + if (this.props.activeSection === 'clock') { + const clockFormat = [false, false]; + if (this.state.militaryTime === 'true') { + clockFormat[1] = true; + } else { + clockFormat[0] = true; + } + + const handleUpdateClockSection = (e) => { + this.updateSection(''); + e.preventDefault(); + }; + + const inputs = [ + <div key='userDisplayClockOptions'> + <div className='radio'> + <label> + <input + type='radio' + checked={clockFormat[0]} + onChange={this.handleClockRadio.bind(this, 'false')} + /> + {'12-hour clock (example: 4:00 PM)'} + </label> + <br/> + </div> + <div className='radio'> + <label> + <input + type='radio' + checked={clockFormat[1]} + onChange={this.handleClockRadio.bind(this, 'true')} + /> + {'24-hour clock (example: 16:00)'} + </label> + <br/> + </div> + <div><br/>{'Select how you prefer time displayed.'}</div> + </div> + ]; + + clockSection = ( + <SettingItemMax + title='Clock Display' + inputs={inputs} + submit={this.handleSubmit} + server_error={serverError} + updateSection={handleUpdateClockSection} + /> + ); + } else { + let describe = ''; + if (this.state.militaryTime === 'true') { + describe = '24-hour clock (example: 16:00)'; + } else { + describe = '12-hour clock (example: 4:00 PM)'; + } + + const handleUpdateClockSection = () => { + this.props.updateSection('clock'); + }; + + clockSection = ( + <SettingItemMin + title='Clock Display' + describe={describe} + updateSection={handleUpdateClockSection} + /> + ); + } + + return ( + <div> + <div className='modal-header'> + <button + type='button' + className='close' + data-dismiss='modal' + aria-label='Close' + > + <span aria-hidden='true'>{'×'}</span> + </button> + <h4 + className='modal-title' + ref='title' + > + <i className='modal-back'></i> + {'Display Settings'} + </h4> + </div> + <div className='user-settings'> + <h3 className='tab-header'>{'Display Settings'}</h3> + <div className='divider-dark first'/> + {clockSection} + <div className='divider-dark'/> + </div> + </div> + ); + } +} + +UserSettingsDisplay.propTypes = { + user: React.PropTypes.object, + updateSection: React.PropTypes.func, + updateTab: React.PropTypes.func, + activeSection: React.PropTypes.string +}; diff --git a/web/react/components/user_settings/user_settings_general.jsx b/web/react/components/user_settings/user_settings_general.jsx index ac3a2e37b..9c03f77a6 100644 --- a/web/react/components/user_settings/user_settings_general.jsx +++ b/web/react/components/user_settings/user_settings_general.jsx @@ -211,7 +211,7 @@ export default class UserSettingsGeneralTab extends React.Component { this.props.updateSection(section); } handleClose() { - $(React.findDOMNode(this)).find('.form-control').each(function clearForms() { + $(ReactDOM.findDOMNode(this)).find('.form-control').each(function clearForms() { this.value = ''; }); @@ -368,8 +368,7 @@ export default class UserSettingsGeneralTab extends React.Component { const extraInfo = ( <span> - {'Use Nickname for a name you might be called that is different from your first name and user name.'} - {'This is most often used when two or more people have similar sounding names and usernames.'} + {'Use Nickname for a name you might be called that is different from your first name and username. This is most often used when two or more people have similar sounding names and usernames.'} </span> ); diff --git a/web/react/components/user_settings/user_settings_integrations.jsx b/web/react/components/user_settings/user_settings_integrations.jsx index 5e20d41f1..231580cc3 100644 --- a/web/react/components/user_settings/user_settings_integrations.jsx +++ b/web/react/components/user_settings/user_settings_integrations.jsx @@ -4,6 +4,7 @@ var SettingItemMin = require('../setting_item_min.jsx'); var SettingItemMax = require('../setting_item_max.jsx'); var ManageIncomingHooks = require('./manage_incoming_hooks.jsx'); +var ManageOutgoingHooks = require('./manage_outgoing_hooks.jsx'); export default class UserSettingsIntegrationsTab extends React.Component { constructor(props) { @@ -19,6 +20,8 @@ export default class UserSettingsIntegrationsTab extends React.Component { } handleClose() { this.updateSection(''); + $('.ps-container.modal-body').scrollTop(0); + $('.ps-container.modal-body').perfectScrollbar('update'); } componentDidMount() { $('#user_settings').on('hidden.bs.modal', this.handleClose); @@ -28,33 +31,67 @@ export default class UserSettingsIntegrationsTab extends React.Component { } render() { let incomingHooksSection; + let outgoingHooksSection; var inputs = []; - if (this.props.activeSection === 'incoming-hooks') { - inputs.push( - <ManageIncomingHooks /> - ); + if (global.window.config.EnableIncomingWebhooks === 'true') { + if (this.props.activeSection === 'incoming-hooks') { + inputs.push( + <ManageIncomingHooks /> + ); - incomingHooksSection = ( - <SettingItemMax - title='Incoming Webhooks' - inputs={inputs} - updateSection={function clearSection(e) { - this.updateSection(''); - e.preventDefault(); - }.bind(this)} - /> - ); - } else { - incomingHooksSection = ( - <SettingItemMin - title='Incoming Webhooks' - describe='Manage your incoming webhooks (Developer feature)' - updateSection={function updateNameSection() { - this.updateSection('incoming-hooks'); - }.bind(this)} - /> - ); + incomingHooksSection = ( + <SettingItemMax + title='Incoming Webhooks' + width = 'full' + inputs={inputs} + updateSection={(e) => { + this.updateSection(''); + e.preventDefault(); + }} + /> + ); + } else { + incomingHooksSection = ( + <SettingItemMin + title='Incoming Webhooks' + width = 'full' + describe='Manage your incoming webhooks (Developer feature)' + updateSection={() => { + this.updateSection('incoming-hooks'); + }} + /> + ); + } + } + + if (global.window.config.EnableOutgoingWebhooks === 'true') { + if (this.props.activeSection === 'outgoing-hooks') { + inputs.push( + <ManageOutgoingHooks /> + ); + + outgoingHooksSection = ( + <SettingItemMax + title='Outgoing Webhooks' + inputs={inputs} + updateSection={(e) => { + this.updateSection(''); + e.preventDefault(); + }} + /> + ); + } else { + outgoingHooksSection = ( + <SettingItemMin + title='Outgoing Webhooks' + describe='Manage your outgoing webhooks' + updateSection={() => { + this.updateSection('outgoing-hooks'); + }} + /> + ); + } } return ( @@ -80,6 +117,8 @@ export default class UserSettingsIntegrationsTab extends React.Component { <h3 className='tab-header'>{'Integration Settings'}</h3> <div className='divider-dark first'/> {incomingHooksSection} + <div className='divider-light'/> + {outgoingHooksSection} <div className='divider-dark'/> </div> </div> diff --git a/web/react/components/user_settings/user_settings_modal.jsx b/web/react/components/user_settings/user_settings_modal.jsx index 19b97fc85..44cd423b5 100644 --- a/web/react/components/user_settings/user_settings_modal.jsx +++ b/web/react/components/user_settings/user_settings_modal.jsx @@ -38,9 +38,10 @@ export default class UserSettingsModal extends React.Component { if (global.window.config.EnableOAuthServiceProvider === 'true') { tabs.push({name: 'developer', uiName: 'Developer', icon: 'glyphicon glyphicon-th'}); } - if (global.window.config.EnableIncomingWebhooks === 'true') { + if (global.window.config.EnableIncomingWebhooks === 'true' || global.window.config.EnableOutgoingWebhooks === 'true') { tabs.push({name: 'integrations', uiName: 'Integrations', icon: 'glyphicon glyphicon-transfer'}); } + tabs.push({name: 'display', uiName: 'Display', icon: 'glyphicon glyphicon-eye-open'}); return ( <div diff --git a/web/react/components/user_settings/user_settings_notifications.jsx b/web/react/components/user_settings/user_settings_notifications.jsx index 4728a33ee..8693af494 100644 --- a/web/react/components/user_settings/user_settings_notifications.jsx +++ b/web/react/components/user_settings/user_settings_notifications.jsx @@ -129,7 +129,7 @@ export default class NotificationsTab extends React.Component { ); } handleClose() { - $(React.findDOMNode(this)).find('.form-control').each(function clearField() { + $(ReactDOM.findDOMNode(this)).find('.form-control').each(function clearField() { this.value = ''; }); @@ -158,15 +158,15 @@ export default class NotificationsTab extends React.Component { } handleNotifyRadio(notifyLevel) { this.setState({notifyLevel: notifyLevel}); - React.findDOMNode(this.refs.wrapper).focus(); + ReactDOM.findDOMNode(this.refs.wrapper).focus(); } handleEmailRadio(enableEmail) { this.setState({enableEmail: enableEmail}); - React.findDOMNode(this.refs.wrapper).focus(); + ReactDOM.findDOMNode(this.refs.wrapper).focus(); } handleSoundRadio(enableSound) { this.setState({enableSound: enableSound}); - React.findDOMNode(this.refs.wrapper).focus(); + ReactDOM.findDOMNode(this.refs.wrapper).focus(); } updateUsernameKey(val) { this.setState({usernameKey: val}); @@ -184,10 +184,10 @@ export default class NotificationsTab extends React.Component { this.setState({channelKey: val}); } updateCustomMentionKeys() { - var checked = React.findDOMNode(this.refs.customcheck).checked; + var checked = ReactDOM.findDOMNode(this.refs.customcheck).checked; if (checked) { - var text = React.findDOMNode(this.refs.custommentions).value; + var text = ReactDOM.findDOMNode(this.refs.custommentions).value; // remove all spaces and split string into individual keys this.setState({customKeys: text.replace(/ /g, ''), customKeysChecked: true}); @@ -196,7 +196,7 @@ export default class NotificationsTab extends React.Component { } } onCustomChange() { - React.findDOMNode(this.refs.customcheck).checked = true; + ReactDOM.findDOMNode(this.refs.customcheck).checked = true; this.updateCustomMentionKeys(); } render() { @@ -228,9 +228,8 @@ export default class NotificationsTab extends React.Component { <input type='radio' checked={notifyActive[0]} onChange={this.handleNotifyRadio.bind(this, 'all')} - > - For all activity - </input> + /> + {'For all activity'} </label> <br/> </div> @@ -240,9 +239,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={notifyActive[1]} onChange={this.handleNotifyRadio.bind(this, 'mention')} - > - Only for mentions and direct messages - </input> + /> + {'Only for mentions and direct messages'} </label> <br/> </div> @@ -252,9 +250,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={notifyActive[2]} onChange={this.handleNotifyRadio.bind(this, 'none')} - > - Never - </input> + /> + {'Never'} </label> </div> </div> @@ -320,9 +317,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={soundActive[0]} onChange={this.handleSoundRadio.bind(this, 'true')} - > - On - </input> + /> + {'On'} </label> <br/> </div> @@ -332,9 +328,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={soundActive[1]} onChange={this.handleSoundRadio.bind(this, 'false')} - > - Off - </input> + /> + {'Off'} </label> <br/> </div> @@ -402,9 +397,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={emailActive[0]} onChange={this.handleEmailRadio.bind(this, 'true')} - > - On - </input> + /> + {'On'} </label> <br/> </div> @@ -414,9 +408,8 @@ export default class NotificationsTab extends React.Component { type='radio' checked={emailActive[1]} onChange={this.handleEmailRadio.bind(this, 'false')} - > - Off - </input> + /> + {'Off'} </label> <br/> </div> @@ -482,9 +475,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.firstNameKey} onChange={handleUpdateFirstNameKey} - > - {'Your case sensitive first name "' + user.first_name + '"'} - </input> + /> + {'Your case sensitive first name "' + user.first_name + '"'} </label> </div> </div> @@ -502,9 +494,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.usernameKey} onChange={handleUpdateUsernameKey} - > - {'Your non-case sensitive username "' + user.username + '"'} - </input> + /> + {'Your non-case sensitive username "' + user.username + '"'} </label> </div> </div> @@ -521,9 +512,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.mentionKey} onChange={handleUpdateMentionKey} - > - {'Your username mentioned "@' + user.username + '"'} - </input> + /> + {'Your username mentioned "@' + user.username + '"'} </label> </div> </div> @@ -540,9 +530,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.allKey} onChange={handleUpdateAllKey} - > - {'Team-wide mentions "@all"'} - </input> + /> + {'Team-wide mentions "@all"'} </label> </div> </div> @@ -559,9 +548,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.channelKey} onChange={handleUpdateChannelKey} - > - {'Channel-wide mentions "@channel"'} - </input> + /> + {'Channel-wide mentions "@channel"'} </label> </div> </div> @@ -576,9 +564,8 @@ export default class NotificationsTab extends React.Component { type='checkbox' checked={this.state.customKeysChecked} onChange={this.updateCustomMentionKeys} - > - {'Other non-case sensitive words, separated by commas:'} - </input> + /> + {'Other non-case sensitive words, separated by commas:'} </label> </div> <input diff --git a/web/react/components/user_settings/user_settings_security.jsx b/web/react/components/user_settings/user_settings_security.jsx index 74190781c..983a10df0 100644 --- a/web/react/components/user_settings/user_settings_security.jsx +++ b/web/react/components/user_settings/user_settings_security.jsx @@ -82,7 +82,7 @@ export default class SecurityTab extends React.Component { $('#user_settings').modal('hide'); } handleClose() { - $(React.findDOMNode(this)).find('.form-control').each(function resetValue() { + $(ReactDOM.findDOMNode(this)).find('.form-control').each(function resetValue() { this.value = ''; }); this.setState({currentPassword: '', newPassword: '', confirmPassword: '', serverError: null, passwordError: null}); diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx index 8ef68dd0a..322e68c17 100644 --- a/web/react/components/view_image.jsx +++ b/web/react/components/view_image.jsx @@ -6,6 +6,7 @@ const Utils = require('../utils/utils.jsx'); const Constants = require('../utils/constants.jsx'); const ViewImagePopoverBar = require('./view_image_popover_bar.jsx'); const Modal = ReactBootstrap.Modal; +const KeyCodes = Constants.KeyCodes; export default class ViewImageModal extends React.Component { constructor(props) { @@ -63,11 +64,11 @@ export default class ViewImageModal extends React.Component { this.loadImage(id); } handleKeyPress(e) { - if (!e) { + if (!e || !this.props.show) { return; - } else if (e.keyCode === 39) { + } else if (e.keyCode === KeyCodes.RIGHT) { this.handleNext(); - } else if (e.keyCode === 37) { + } else if (e.keyCode === KeyCodes.LEFT) { this.handlePrev(); } } @@ -77,7 +78,7 @@ export default class ViewImageModal extends React.Component { } onModalHidden() { if (this.refs.video) { - var video = React.findDOMNode(this.refs.video); + var video = ReactDOM.findDOMNode(this.refs.video); video.pause(); video.currentTime = 0; } @@ -195,6 +196,7 @@ export default class ViewImageModal extends React.Component { target='_blank' > <img + style={{maxHeight: this.state.imgHeight}} ref='image' src={this.getPreviewImagePath(filename)} /> @@ -210,6 +212,7 @@ export default class ViewImageModal extends React.Component { content = ( <video + style={{maxHeight: this.state.imgHeight}} ref='video' data-setup='{}' controls='controls' @@ -334,7 +337,6 @@ export default class ViewImageModal extends React.Component { > <div className={'image-wrapper ' + bgClass} - style={{maxHeight: this.state.imgHeight}} onMouseEnter={this.onMouseEnterImage} onMouseLeave={this.onMouseLeaveImage} onClick={(e) => e.stopPropagation()} diff --git a/web/react/pages/admin_console.jsx b/web/react/pages/admin_console.jsx index 7e7dcfae8..ea9ae06f4 100644 --- a/web/react/pages/admin_console.jsx +++ b/web/react/pages/admin_console.jsx @@ -5,18 +5,21 @@ var ErrorBar = require('../components/error_bar.jsx'); var SelectTeamModal = require('../components/admin_console/select_team_modal.jsx'); var AdminController = require('../components/admin_console/admin_controller.jsx'); -export function setupAdminConsolePage() { - React.render( - <AdminController />, +export function setupAdminConsolePage(props) { + ReactDOM.render( + <AdminController + tab={props.ActiveTab} + teamId={props.TeamId} + />, document.getElementById('admin_controller') ); - React.render( + ReactDOM.render( <SelectTeamModal />, document.getElementById('select_team_modal') ); - React.render( + ReactDOM.render( <ErrorBar/>, document.getElementById('error_bar') ); diff --git a/web/react/pages/authorize.jsx b/web/react/pages/authorize.jsx index 1338e6cc2..2bc8b539d 100644 --- a/web/react/pages/authorize.jsx +++ b/web/react/pages/authorize.jsx @@ -4,7 +4,7 @@ var Authorize = require('../components/authorize.jsx'); function setupAuthorizePage(props) { - React.render( + ReactDOM.render( <Authorize teamName={props.TeamName} appName={props.AppName} diff --git a/web/react/pages/channel.jsx b/web/react/pages/channel.jsx index 4d6d3fd15..20ed1bf0a 100644 --- a/web/react/pages/channel.jsx +++ b/web/react/pages/channel.jsx @@ -24,7 +24,6 @@ var TeamSettingsModal = require('../components/team_settings_modal.jsx'); var ChannelMembersModal = require('../components/channel_members.jsx'); var ChannelInviteModal = require('../components/channel_invite_modal.jsx'); var TeamMembersModal = require('../components/team_members.jsx'); -var DirectChannelModal = require('../components/more_direct_channels.jsx'); var ErrorBar = require('../components/error_bar.jsx'); var ErrorStore = require('../stores/error_store.jsx'); var ChannelLoader = require('../components/channel_loader.jsx'); @@ -38,6 +37,7 @@ var RegisterAppModal = require('../components/register_app_modal.jsx'); var ImportThemeModal = require('../components/user_settings/import_theme_modal.jsx'); var TeamStore = require('../stores/team_store.jsx'); +var AsyncClient = require('../utils/async_client.jsx'); var Constants = require('../utils/constants.jsx'); var ActionTypes = Constants.ActionTypes; @@ -55,23 +55,25 @@ function setupChannelPage(props) { id: props.TeamId }); + AsyncClient.getAllPreferences(); + // ChannelLoader must be rendered first - React.render( + ReactDOM.render( <ChannelLoader/>, document.getElementById('channel_loader') ); - React.render( + ReactDOM.render( <ErrorBar/>, document.getElementById('error_bar') ); - React.render( + ReactDOM.render( <Navbar teamDisplayName={props.TeamDisplayName} />, document.getElementById('navbar') ); - React.render( + ReactDOM.render( <Sidebar teamDisplayName={props.TeamDisplayName} teamName={props.TeamName} @@ -80,117 +82,112 @@ function setupChannelPage(props) { document.getElementById('sidebar-left') ); - React.render( + ReactDOM.render( <GetLinkModal />, document.getElementById('get_link_modal') ); - React.render( + ReactDOM.render( <UserSettingsModal />, document.getElementById('user_settings_modal') ); - React.render( + ReactDOM.render( <ImportThemeModal />, document.getElementById('import_theme_modal') ); - React.render( + ReactDOM.render( <TeamSettingsModal teamDisplayName={props.TeamDisplayName} />, document.getElementById('team_settings_modal') ); - React.render( + ReactDOM.render( <TeamMembersModal teamDisplayName={props.TeamDisplayName} />, document.getElementById('team_members_modal') ); - React.render( + ReactDOM.render( <MemberInviteModal teamType={props.TeamType} />, document.getElementById('invite_member_modal') ); - React.render( + ReactDOM.render( <ChannelHeader />, document.getElementById('channel-header') ); - React.render( + ReactDOM.render( <EditChannelModal />, document.getElementById('edit_channel_modal') ); - React.render( + ReactDOM.render( <DeleteChannelModal />, document.getElementById('delete_channel_modal') ); - React.render( + ReactDOM.render( <RenameChannelModal />, document.getElementById('rename_channel_modal') ); - React.render( + ReactDOM.render( <ChannelNotificationsModal />, document.getElementById('channel_notifications_modal') ); - React.render( + ReactDOM.render( <ChannelMembersModal />, document.getElementById('channel_members_modal') ); - React.render( + ReactDOM.render( <ChannelInviteModal />, document.getElementById('channel_invite_modal') ); - React.render( + ReactDOM.render( <ChannelInfoModal />, document.getElementById('channel_info_modal') ); - React.render( + ReactDOM.render( <MoreChannelsModal />, document.getElementById('more_channels_modal') ); - React.render( - <DirectChannelModal />, - document.getElementById('direct_channel_modal') - ); - - React.render( + ReactDOM.render( <PostListContainer />, document.getElementById('post-list') ); - React.render( + ReactDOM.render( <EditPostModal />, document.getElementById('edit_post_modal') ); - React.render( + ReactDOM.render( <DeletePostModal />, document.getElementById('delete_post_modal') ); - React.render( + ReactDOM.render( <PostDeletedModal />, document.getElementById('post_deleted_modal') ); - React.render( + ReactDOM.render( <CreatePost />, document.getElementById('post-create') ); - React.render( + ReactDOM.render( <SidebarRight />, document.getElementById('sidebar-right') ); - React.render( + ReactDOM.render( <SidebarRightMenu teamDisplayName={props.TeamDisplayName} teamType={props.TeamType} @@ -198,44 +195,44 @@ function setupChannelPage(props) { document.getElementById('sidebar-menu') ); - React.render( + ReactDOM.render( <MentionList id='post_textbox' />, document.getElementById('post_mention_tab') ); - React.render( + ReactDOM.render( <MentionList id='reply_textbox' />, document.getElementById('reply_mention_tab') ); - React.render( + ReactDOM.render( <MentionList id='edit_textbox' />, document.getElementById('edit_mention_tab') ); - React.render( + ReactDOM.render( <AccessHistoryModal />, document.getElementById('access_history_modal') ); - React.render( + ReactDOM.render( <ActivityLogModal />, document.getElementById('activity_log_modal') ); - React.render( + ReactDOM.render( <RemovedFromChannelModal />, document.getElementById('removed_from_channel_modal') ); - React.render( + ReactDOM.render( <FileUploadOverlay overlayType='center' />, document.getElementById('file_upload_overlay') ); - React.render( + ReactDOM.render( <RegisterAppModal />, document.getElementById('register_app_modal') ); diff --git a/web/react/pages/find_team.jsx b/web/react/pages/find_team.jsx index d901e380b..f95fce5c6 100644 --- a/web/react/pages/find_team.jsx +++ b/web/react/pages/find_team.jsx @@ -4,7 +4,7 @@ var FindTeam = require('../components/find_team.jsx'); function setupFindTeamPage() { - React.render( + ReactDOM.render( <FindTeam />, document.getElementById('find-team') ); diff --git a/web/react/pages/login.jsx b/web/react/pages/login.jsx index 17835c47f..430de980c 100644 --- a/web/react/pages/login.jsx +++ b/web/react/pages/login.jsx @@ -4,7 +4,7 @@ var Login = require('../components/login.jsx'); function setupLoginPage(props) { - React.render( + ReactDOM.render( <Login teamDisplayName={props.TeamDisplayName} teamName={props.TeamName} diff --git a/web/react/pages/password_reset.jsx b/web/react/pages/password_reset.jsx index 6f9c5eab1..aef9ab3f9 100644 --- a/web/react/pages/password_reset.jsx +++ b/web/react/pages/password_reset.jsx @@ -4,7 +4,7 @@ var PasswordReset = require('../components/password_reset.jsx'); function setupPasswordResetPage(props) { - React.render( + ReactDOM.render( <PasswordReset isReset={props.IsReset} teamDisplayName={props.TeamDisplayName} diff --git a/web/react/pages/signup_team.jsx b/web/react/pages/signup_team.jsx index 06b5cfad9..dc8394a77 100644 --- a/web/react/pages/signup_team.jsx +++ b/web/react/pages/signup_team.jsx @@ -4,7 +4,7 @@ var SignupTeam = require('../components/signup_team.jsx'); function setupSignupTeamPage() { - React.render( + ReactDOM.render( <SignupTeam />, document.getElementById('signup-team') ); diff --git a/web/react/pages/signup_team_complete.jsx b/web/react/pages/signup_team_complete.jsx index 572117867..44ec05b98 100644 --- a/web/react/pages/signup_team_complete.jsx +++ b/web/react/pages/signup_team_complete.jsx @@ -4,7 +4,7 @@ var SignupTeamComplete = require('../components/signup_team_complete.jsx'); function setupSignupTeamCompletePage(props) { - React.render( + ReactDOM.render( <SignupTeamComplete email={props.Email} hash={props.Hash} diff --git a/web/react/pages/signup_user_complete.jsx b/web/react/pages/signup_user_complete.jsx index 63a55b4a1..a0e0962ff 100644 --- a/web/react/pages/signup_user_complete.jsx +++ b/web/react/pages/signup_user_complete.jsx @@ -4,7 +4,7 @@ var SignupUserComplete = require('../components/signup_user_complete.jsx'); function setupSignupUserCompletePage(props) { - React.render( + ReactDOM.render( <SignupUserComplete teamId={props.TeamId} teamName={props.TeamName} diff --git a/web/react/pages/verify.jsx b/web/react/pages/verify.jsx index 7f06ff6fb..7535009b3 100644 --- a/web/react/pages/verify.jsx +++ b/web/react/pages/verify.jsx @@ -4,7 +4,7 @@ var EmailVerify = require('../components/email_verify.jsx'); global.window.setupVerifyPage = function setupVerifyPage(props) { - React.render( + ReactDOM.render( <EmailVerify isVerified={props.IsVerified} teamURL={props.TeamURL} diff --git a/web/react/stores/post_store.jsx b/web/react/stores/post_store.jsx index d8da48000..8609d8bbf 100644 --- a/web/react/stores/post_store.jsx +++ b/web/react/stores/post_store.jsx @@ -6,6 +6,7 @@ var EventEmitter = require('events').EventEmitter; var ChannelStore = require('../stores/channel_store.jsx'); var BrowserStore = require('../stores/browser_store.jsx'); +var UserStore = require('../stores/user_store.jsx'); var Constants = require('../utils/constants.jsx'); var ActionTypes = Constants.ActionTypes; @@ -16,6 +17,7 @@ var SEARCH_TERM_CHANGE_EVENT = 'search_term_change'; var SELECTED_POST_CHANGE_EVENT = 'selected_post_change'; var MENTION_DATA_CHANGE_EVENT = 'mention_data_change'; var ADD_MENTION_EVENT = 'add_mention'; +var EDIT_POST_EVENT = 'edit_post'; class PostStoreClass extends EventEmitter { constructor() { @@ -75,6 +77,10 @@ class PostStoreClass extends EventEmitter { this.clearCommentDraftUploads = this.clearCommentDraftUploads.bind(this); this.storeLatestUpdate = this.storeLatestUpdate.bind(this); this.getLatestUpdate = this.getLatestUpdate.bind(this); + this.emitEditPost = this.emitEditPost.bind(this); + this.addEditPostListener = this.addEditPostListener.bind(this); + this.removeEditPostListener = this.removeEditPostListener.bind(this); + this.getCurrentUsersLatestPost = this.getCurrentUsersLatestPost.bind(this); } emitChange() { this.emit(CHANGE_EVENT); @@ -148,6 +154,18 @@ class PostStoreClass extends EventEmitter { this.removeListener(ADD_MENTION_EVENT, callback); } + emitEditPost(post) { + this.emit(EDIT_POST_EVENT, post); + } + + addEditPostListener(callback) { + this.on(EDIT_POST_EVENT, callback); + } + + removeEditPostListener(callback) { + this.removeListener(EDIT_POST_EVENT, callback); + } + getCurrentPosts() { var currentId = ChannelStore.getCurrentId(); @@ -212,6 +230,22 @@ class PostStoreClass extends EventEmitter { getPosts(channelId) { return BrowserStore.getItem('posts_' + channelId); } + getCurrentUsersLatestPost(channelId) { + const userId = UserStore.getCurrentId(); + var postList = makePostListNonNull(this.getPosts(channelId)); + var i = 0; + var len = postList.order.length; + var lastPost = null; + + for (i; i < len; i++) { + if (postList.posts[postList.order[i]].user_id === userId) { + lastPost = postList.posts[postList.order[i]]; + break; + } + } + + return lastPost; + } storePost(post) { this.pStorePost(post); this.emitChange(); @@ -446,6 +480,9 @@ PostStore.dispatchToken = AppDispatcher.register(function registry(payload) { case ActionTypes.RECIEVED_ADD_MENTION: PostStore.emitAddMention(action.id, action.username); break; + case ActionTypes.RECIEVED_EDIT_POST: + PostStore.emitEditPost(action); + break; default: } }); diff --git a/web/react/stores/preference_store.jsx b/web/react/stores/preference_store.jsx new file mode 100644 index 000000000..f630d150d --- /dev/null +++ b/web/react/stores/preference_store.jsx @@ -0,0 +1,123 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +const ActionTypes = require('../utils/constants.jsx').ActionTypes; +const AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); +const BrowserStore = require('./browser_store.jsx'); +const EventEmitter = require('events').EventEmitter; +const UserStore = require('../stores/user_store.jsx'); + +const CHANGE_EVENT = 'change'; + +function getPreferenceKey(category, name) { + return `${category}-${name}`; +} + +function getPreferenceKeyForModel(preference) { + return `${preference.category}-${preference.name}`; +} + +class PreferenceStoreClass extends EventEmitter { + constructor() { + super(); + + this.getAllPreferences = this.getAllPreferences.bind(this); + this.getPreference = this.getPreference.bind(this); + this.getPreferences = this.getPreferences.bind(this); + this.getPreferencesWhere = this.getPreferencesWhere.bind(this); + this.setAllPreferences = this.setAllPreferences.bind(this); + this.setPreference = this.setPreference.bind(this); + + this.emitChange = this.emitChange.bind(this); + this.addChangeListener = this.addChangeListener.bind(this); + this.removeChangeListener = this.removeChangeListener.bind(this); + + this.handleEventPayload = this.handleEventPayload.bind(this); + this.dispatchToken = AppDispatcher.register(this.handleEventPayload); + } + + getAllPreferences() { + return new Map(BrowserStore.getItem('preferences', [])); + } + + getPreference(category, name, defaultValue = '') { + return this.getAllPreferences().get(getPreferenceKey(category, name)) || defaultValue; + } + + getPreferences(category) { + return this.getPreferencesWhere((preference) => (preference.category === category)); + } + + getPreferencesWhere(pred) { + const all = this.getAllPreferences(); + const preferences = []; + + for (const [, preference] of all) { + if (pred(preference)) { + preferences.push(preference); + } + } + + return preferences; + } + + setAllPreferences(preferences) { + // note that we store the preferences as an array of key-value pairs so that we can deserialize + // it as a proper Map instead of an object + BrowserStore.setItem('preferences', [...preferences]); + } + + setPreference(category, name, value) { + const preferences = this.getAllPreferences(); + + const key = getPreferenceKey(category, name); + let preference = preferences.get(key); + + if (!preference) { + preference = { + user_id: UserStore.getCurrentId(), + category, + name + }; + } + preference.value = value; + + preferences.set(key, preference); + + this.setAllPreferences(preferences); + + return preference; + } + + emitChange(preferences) { + this.emit(CHANGE_EVENT, preferences); + } + + addChangeListener(callback) { + this.on(CHANGE_EVENT, callback); + } + + removeChangeListener(callback) { + this.removeListener(CHANGE_EVENT, callback); + } + + handleEventPayload(payload) { + const action = payload.action; + + switch (action.type) { + case ActionTypes.RECIEVED_PREFERENCES: + const preferences = this.getAllPreferences(); + + for (const preference of action.preferences) { + preferences.set(getPreferenceKeyForModel(preference), preference); + } + + this.setAllPreferences(preferences); + this.emitChange(preferences); + } + } +} + +const PreferenceStore = new PreferenceStoreClass(); +export default PreferenceStore; +window.PreferenceStore = PreferenceStore; diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx index 77e7067ad..77951f214 100644 --- a/web/react/stores/socket_store.jsx +++ b/web/react/stores/socket_store.jsx @@ -1,15 +1,22 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -var AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); -var UserStore = require('./user_store.jsx'); -var ErrorStore = require('./error_store.jsx'); -var EventEmitter = require('events').EventEmitter; +const AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); +const UserStore = require('./user_store.jsx'); +const PostStore = require('./post_store.jsx'); +const ChannelStore = require('./channel_store.jsx'); +const BrowserStore = require('./browser_store.jsx'); +const ErrorStore = require('./error_store.jsx'); +const EventEmitter = require('events').EventEmitter; -var Constants = require('../utils/constants.jsx'); -var ActionTypes = Constants.ActionTypes; +const Utils = require('../utils/utils.jsx'); +const AsyncClient = require('../utils/async_client.jsx'); -var CHANGE_EVENT = 'change'; +const Constants = require('../utils/constants.jsx'); +const ActionTypes = Constants.ActionTypes; +const SocketEvents = Constants.SocketEvents; + +const CHANGE_EVENT = 'change'; var conn; @@ -94,6 +101,39 @@ class SocketStoreClass extends EventEmitter { removeChangeListener(callback) { this.removeListener(CHANGE_EVENT, callback); } + handleMessage(msg) { + switch (msg.action) { + case SocketEvents.POSTED: + handleNewPostEvent(msg); + break; + + case SocketEvents.POST_EDITED: + handlePostEditEvent(msg); + break; + + case SocketEvents.POST_DELETED: + handlePostDeleteEvent(msg); + break; + + case SocketEvents.NEW_USER: + handleNewUserEvent(); + break; + + case SocketEvents.USER_ADDED: + handleUserAddedEvent(msg); + break; + + case SocketEvents.USER_REMOVED: + handleUserRemovedEvent(msg); + break; + + case SocketEvents.CHANNEL_VIEWED: + handleChannelViewedEvent(msg); + break; + + default: + } + } sendMessage(msg) { if (conn && conn.readyState === WebSocket.OPEN) { conn.send(JSON.stringify(msg)); @@ -104,6 +144,138 @@ class SocketStoreClass extends EventEmitter { } } +function handleNewPostEvent(msg) { + // Store post + const post = JSON.parse(msg.props.post); + PostStore.storePost(post); + + // Update channel state + if (ChannelStore.getCurrentId() === msg.channel_id) { + if (window.isActive) { + AsyncClient.updateLastViewedAt(); + } + } else { + AsyncClient.getChannel(msg.channel_id); + } + + // Send desktop notification + if (UserStore.getCurrentId() !== msg.user_id) { + const msgProps = msg.props; + + let mentions = []; + if (msgProps.mentions) { + mentions = JSON.parse(msg.props.mentions); + } + + const channel = ChannelStore.get(msg.channel_id); + const user = UserStore.getCurrentUser(); + const member = ChannelStore.getMember(msg.channel_id); + + let notifyLevel = member && member.notify_props ? member.notify_props.desktop : 'default'; + if (notifyLevel === 'default') { + notifyLevel = user.notify_props.desktop; + } + + if (notifyLevel === 'none') { + return; + } else if (notifyLevel === 'mention' && mentions.indexOf(user.id) === -1 && channel.type !== 'D') { + return; + } + + let username = 'Someone'; + if (UserStore.hasProfile(msg.user_id)) { + username = UserStore.getProfile(msg.user_id).username; + } + + let title = 'Posted'; + if (channel) { + title = channel.display_name; + } + + let notifyText = post.message.replace(/\n+/g, ' '); + if (notifyText.length > 50) { + notifyText = notifyText.substring(0, 49) + '...'; + } + + if (notifyText.length === 0) { + if (msgProps.image) { + Utils.notifyMe(title, username + ' uploaded an image', channel); + } else if (msgProps.otherFile) { + Utils.notifyMe(title, username + ' uploaded a file', channel); + } else { + Utils.notifyMe(title, username + ' did something new', channel); + } + } else { + Utils.notifyMe(title, username + ' wrote: ' + notifyText, channel); + } + if (!user.notify_props || user.notify_props.desktop_sound === 'true') { + Utils.ding(); + } + } +} + +function handlePostEditEvent(msg) { + // Store post + const post = JSON.parse(msg.props.post); + PostStore.storePost(post); + + // Update channel state + if (ChannelStore.getCurrentId() === msg.channel_id) { + if (window.isActive) { + AsyncClient.updateLastViewedAt(); + } + } +} + +function handlePostDeleteEvent(msg) { + const post = JSON.parse(msg.props.post); + + PostStore.storeUnseenDeletedPost(post); + PostStore.removePost(post, true); + PostStore.emitChange(); +} + +function handleNewUserEvent() { + AsyncClient.getProfiles(); + AsyncClient.getChannelExtraInfo(true); +} + +function handleUserAddedEvent(msg) { + if (ChannelStore.getCurrentId() === msg.channel_id) { + AsyncClient.getChannelExtraInfo(true); + } + + if (UserStore.getCurrentId() === msg.user_id) { + AsyncClient.getChannel(msg.channel_id); + } +} + +function handleUserRemovedEvent(msg) { + if (UserStore.getCurrentId() === msg.user_id) { + AsyncClient.getChannels(); + + if (msg.props.remover_id !== msg.user_id && + msg.channel_id === ChannelStore.getCurrentId() && + $('#removed_from_channel').length > 0) { + var sentState = {}; + sentState.channelName = ChannelStore.getCurrent().display_name; + sentState.remover = UserStore.getProfile(msg.props.remover_id).username; + + BrowserStore.setItem('channel-removed-state', sentState); + $('#removed_from_channel').modal('show'); + } + } else if (ChannelStore.getCurrentId() === msg.channel_id) { + AsyncClient.getChannelExtraInfo(true); + } +} + +function handleChannelViewedEvent(msg) { + // Useful for when multiple devices have the app open to different channels + if (ChannelStore.getCurrentId() !== msg.channel_id && UserStore.getCurrentId() === msg.user_id) { + AsyncClient.getChannel(msg.channel_id); + } +} + var SocketStore = new SocketStoreClass(); SocketStore.dispatchToken = AppDispatcher.register((payload) => { @@ -111,6 +283,7 @@ SocketStore.dispatchToken = AppDispatcher.register((payload) => { switch (action.type) { case ActionTypes.RECIEVED_MSG: + SocketStore.handleMessage(action.msg); SocketStore.emitChange(action.msg); break; diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx index a903f055b..b22d7237e 100644 --- a/web/react/utils/async_client.jsx +++ b/web/react/utils/async_client.jsx @@ -637,3 +637,54 @@ export function getMyTeam() { } ); } + +export function getAllPreferences() { + if (isCallInProgress('getAllPreferences')) { + return; + } + + callTracker.getAllPreferences = utils.getTimestamp(); + client.getAllPreferences( + (data, textStatus, xhr) => { + callTracker.getAllPreferences = 0; + + if (xhr.status === 304 || !data) { + return; + } + + AppDispatcher.handleServerAction({ + type: ActionTypes.RECIEVED_PREFERENCES, + preferences: data + }); + }, + (err) => { + callTracker.getAllPreferences = 0; + dispatchError(err, 'getAllPreferences'); + } + ); +} + +export function savePreferences(preferences, success, error) { + client.savePreferences( + preferences, + (data, textStatus, xhr) => { + if (xhr.status !== 304) { + AppDispatcher.handleServerAction({ + type: ActionTypes.RECIEVED_PREFERENCES, + preferences + }); + } + + if (success) { + success(data); + } + }, + (err) => { + dispatchError(err, 'savePreferences'); + + if (error) { + error(); + } + } + ); +} diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index 6dccfcdeb..f92633439 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -1141,3 +1141,102 @@ export function listIncomingHooks(success, error) { } }); } + +export function getAllPreferences(success, error) { + $.ajax({ + url: `/api/v1/preferences/`, + dataType: 'json', + type: 'GET', + success, + error: (xhr, status, err) => { + var e = handleError('getAllPreferences', xhr, status, err); + error(e); + } + }); +} + +export function getPreferenceCategory(category, success, error) { + $.ajax({ + url: `/api/v1/preferences/${category}`, + dataType: 'json', + type: 'GET', + success, + error: (xhr, status, err) => { + var e = handleError('getPreferenceCategory', xhr, status, err); + error(e); + } + }); +} + +export function savePreferences(preferences, success, error) { + $.ajax({ + url: '/api/v1/preferences/save', + dataType: 'json', + contentType: 'application/json', + type: 'POST', + data: JSON.stringify(preferences), + success, + error: (xhr, status, err) => { + var e = handleError('savePreferences', xhr, status, err); + error(e); + } + }); +} + +export function addOutgoingHook(hook, success, error) { + $.ajax({ + url: '/api/v1/hooks/outgoing/create', + dataType: 'json', + contentType: 'application/json', + type: 'POST', + data: JSON.stringify(hook), + success, + error: (xhr, status, err) => { + var e = handleError('addOutgoingHook', xhr, status, err); + error(e); + } + }); +} + +export function deleteOutgoingHook(data, success, error) { + $.ajax({ + url: '/api/v1/hooks/outgoing/delete', + dataType: 'json', + contentType: 'application/json', + type: 'POST', + data: JSON.stringify(data), + success, + error: (xhr, status, err) => { + var e = handleError('deleteOutgoingHook', xhr, status, err); + error(e); + } + }); +} + +export function listOutgoingHooks(success, error) { + $.ajax({ + url: '/api/v1/hooks/outgoing/list', + dataType: 'json', + type: 'GET', + success, + error: (xhr, status, err) => { + var e = handleError('listOutgoingHooks', xhr, status, err); + error(e); + } + }); +} + +export function regenOutgoingHookToken(data, success, error) { + $.ajax({ + url: '/api/v1/hooks/outgoing/regen_token', + dataType: 'json', + contentType: 'application/json', + type: 'POST', + data: JSON.stringify(data), + success, + error: (xhr, status, err) => { + var e = handleError('regenOutgoingHookToken', xhr, status, err); + error(e); + } + }); +} diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index affc49196..1d856e067 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -17,6 +17,7 @@ module.exports = { RECIEVED_POSTS: null, RECIEVED_POST: null, + RECIEVED_EDIT_POST: null, RECIEVED_SEARCH: null, RECIEVED_POST_SELECTED: null, RECIEVED_MENTION_DATA: null, @@ -28,6 +29,7 @@ module.exports = { RECIEVED_AUDITS: null, RECIEVED_TEAMS: null, RECIEVED_STATUSES: null, + RECIEVED_PREFERENCES: null, RECIEVED_MSG: null, @@ -45,6 +47,18 @@ module.exports = { SERVER_ACTION: null, VIEW_ACTION: null }), + + SocketEvents: { + POSTED: 'posted', + POST_EDITED: 'post_edited', + POST_DELETED: 'post_deleted', + CHANNEL_VIEWED: 'channel_viewed', + NEW_USER: 'new_user', + USER_ADDED: 'user_added', + USER_REMOVED: 'user_removed', + TYPING: 'typing' + }, + SPECIAL_MENTIONS: ['all', 'channel'], CHARACTER_LIMIT: 4000, IMAGE_TYPES: ['jpg', 'gif', 'bmp', 'png', 'jpeg'], @@ -112,6 +126,7 @@ module.exports = { MONTHS: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], MAX_DMS: 20, DM_CHANNEL: 'D', + OPEN_CHANNEL: 'O', MAX_POST_LEN: 4000, EMOJI_SIZE: 16, ONLINE_ICON_SVG: "<svg version='1.1' id='Layer_1' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:cc='http://creativecommons.org/ns#' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:svg='http://www.w3.org/2000/svg' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' sodipodi:docname='TRASH_1_4.svg' inkscape:version='0.48.4 r9939' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='12px' height='12px' viewBox='0 0 12 12' enable-background='new 0 0 12 12' xml:space='preserve'><sodipodi:namedview inkscape:cy='139.7898' inkscape:cx='26.358185' inkscape:zoom='1.18' showguides='true' showgrid='false' id='namedview6' guidetolerance='10' gridtolerance='10' objecttolerance='10' borderopacity='1' bordercolor='#666666' pagecolor='#ffffff' inkscape:current-layer='Layer_1' inkscape:window-maximized='1' inkscape:window-y='-8' inkscape:window-x='-8' inkscape:window-height='705' inkscape:window-width='1366' inkscape:guide-bbox='true' inkscape:pageshadow='2' inkscape:pageopacity='0'><sodipodi:guide position='50.036793,85.991376' orientation='1,0' id='guide2986'></sodipodi:guide><sodipodi:guide position='58.426196,66.216355' orientation='0,1' id='guide3047'></sodipodi:guide></sodipodi:namedview><g><g><path class='online--icon' d='M6,5.487c1.371,0,2.482-1.116,2.482-2.493c0-1.378-1.111-2.495-2.482-2.495S3.518,1.616,3.518,2.994C3.518,4.371,4.629,5.487,6,5.487z M10.452,8.545c-0.101-0.829-0.36-1.968-0.726-2.541C9.475,5.606,8.5,5.5,8.5,5.5S8.43,7.521,6,7.521C3.507,7.521,3.5,5.5,3.5,5.5S2.527,5.606,2.273,6.004C1.908,6.577,1.648,7.716,1.547,8.545C1.521,8.688,1.49,9.082,1.498,9.142c0.161,1.295,2.238,2.322,4.375,2.358C5.916,11.501,5.958,11.501,6,11.501c0.043,0,0.084,0,0.127-0.001c2.076-0.026,4.214-1.063,4.375-2.358C10.509,9.082,10.471,8.696,10.452,8.545z'/></g></g></svg>", @@ -201,7 +216,7 @@ module.exports = { centerChannelBg: '#1F1F1F', centerChannelColor: '#DDDDDD', newMessageSeparator: '#CC992D', - linkColor: '#0177e7', + linkColor: '#0D93FF', buttonBg: '#0177e7', buttonColor: '#FFFFFF', mentionHighlightBg: '#784098', @@ -285,5 +300,18 @@ module.exports = { id: 'mentionHighlightLink', uiName: 'Mention Highlight Link' } - ] + ], + Preferences: { + CATEGORY_DIRECT_CHANNEL_SHOW: 'direct_channel_show', + CATEGORY_DISPLAY_SETTINGS: 'display_settings' + }, + KeyCodes: { + UP: 38, + DOWN: 40, + LEFT: 37, + RIGHT: 39, + BACKSPACE: 8, + ENTER: 13, + ESCAPE: 27 + } }; diff --git a/web/react/utils/emoticons.jsx b/web/react/utils/emoticons.jsx index 94bb91503..7b43e48b4 100644 --- a/web/react/utils/emoticons.jsx +++ b/web/react/utils/emoticons.jsx @@ -3,6 +3,7 @@ const emoticonPatterns = { smile: /(^|\s)(:-?\))($|\s)/g, // :) + wink: /(^|\s)(;-?\))($|\s)/g, // ;) open_mouth: /(^|\s)(:o)($|\s)/gi, // :o scream: /(^|\s)(:-o)($|\s)/gi, // :-o smirk: /(^|\s)(:-?])($|\s)/g, // :] diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx index 12d6dd424..2813798d2 100644 --- a/web/react/utils/markdown.jsx +++ b/web/react/utils/markdown.jsx @@ -32,7 +32,7 @@ export class MattermostMarkdownRenderer extends marked.Renderer { link(href, title, text) { let outHref = href; - if (outHref.lastIndexOf('http', 0) !== 0) { + if (!(/^(mailto|https?|ftp)/.test(outHref))) { outHref = `http://${outHref}`; } diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx index 2b6e6e14e..d79aeed68 100644 --- a/web/react/utils/text_formatting.jsx +++ b/web/react/utils/text_formatting.jsx @@ -89,7 +89,7 @@ function autolinkUrls(text, tokens) { if (match.getType() === 'email') { url = `mailto:${url}`; - } else if (url.lastIndexOf('http', 0) !== 0) { + } else if (!(/^(mailto|https?|ftp)/.test(url))) { url = `http://${url}`; } diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index f9166063e..5f266bba3 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -4,6 +4,7 @@ var AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); var ChannelStore = require('../stores/channel_store.jsx'); var UserStore = require('../stores/user_store.jsx'); +var PreferenceStore = require('../stores/preference_store.jsx'); var TeamStore = require('../stores/team_store.jsx'); var Constants = require('../utils/constants.jsx'); var ActionTypes = Constants.ActionTypes; @@ -12,7 +13,8 @@ var client = require('./client.jsx'); var Autolinker = require('autolinker'); export function isEmail(email) { - var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; + //var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; + var regex = /^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i; return regex.test(email); } @@ -164,23 +166,29 @@ export function displayDate(ticks) { } export function displayTime(ticks) { - var d = new Date(ticks); - var hours = d.getHours(); - var minutes = d.getMinutes(); - - var ampm = 'AM'; - if (hours >= 12) { - ampm = 'PM'; - } + const d = new Date(ticks); + let hours = d.getHours(); + let minutes = d.getMinutes(); + let ampm = ''; - hours = hours % 12; - if (!hours) { - hours = '12'; - } if (minutes <= 9) { minutes = '0' + minutes; } - return hours + ':' + minutes + ' ' + ampm; + + const useMilitaryTime = PreferenceStore.getPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'use_military_time', {value: 'false'}).value; + if (useMilitaryTime === 'false') { + ampm = ' AM'; + if (hours >= 12) { + ampm = ' PM'; + } + + hours = hours % 12; + if (!hours) { + hours = '12'; + } + } + + return hours + ':' + minutes + ampm; } export function displayDateTime(ticks) { @@ -423,7 +431,10 @@ export function applyTheme(theme) { if (theme.sidebarTextActiveColor) { changeCss('.sidebar--left .nav-pills__container li.active a, .sidebar--left .nav-pills__container li.active a:hover, .sidebar--left .nav-pills__container li.active a:focus, .settings-modal .nav-pills>li.active a, .settings-modal .nav-pills>li.active a:hover, .settings-modal .nav-pills>li.active a:active', 'color:' + theme.sidebarTextActiveColor, 2); - changeCss('.sidebar--left .nav-pills__container li.active a .status .online--icon', 'fill:' + theme.sidebarTextActiveColor, 2); + } + + if (theme.sidebarTextActiveBg === theme.onlineIndicator) { + changeCss('.sidebar--left .nav-pills__container li.active a .status .online--icon', 'fill:' + theme.sidebarTextActiveColor, 1); } if (theme.sidebarHeaderBg) { @@ -464,12 +475,18 @@ export function applyTheme(theme) { changeCss('.date-separator .separator__text, .new-separator .separator__text', 'background:' + theme.centerChannelBg, 1); changeCss('.post-image__column .post-image__details', 'background:' + theme.centerChannelBg, 1); changeCss('.sidebar--right, .dropdown-menu, .popover', 'background:' + theme.centerChannelBg, 1); + changeCss('.popover.bottom>.arrow:after', 'border-bottom-color:' + theme.centerChannelBg, 1); + changeCss('.popover.right>.arrow:after', 'border-right-color:' + theme.centerChannelBg, 1); + changeCss('.popover.left>.arrow:after', 'border-left-color:' + theme.centerChannelBg, 1); + changeCss('.popover.top>.arrow:after', 'border-top-color:' + theme.centerChannelBg, 1); changeCss('.search-bar__container .search__form .search-bar, .form-control', 'background:' + theme.centerChannelBg, 1); } if (theme.centerChannelColor) { changeCss('.app__content, .post-create__container .post-create-body .btn-file, .post-create__container .post-create-footer .msg-typing, .command-name, .modal .modal-content, .dropdown-menu, .popover, .mentions-name', 'color:' + theme.centerChannelColor, 1); changeCss('#post-create', 'color:' + theme.centerChannelColor, 2); + changeCss('.channel-header__links a', 'fill:' + changeOpacity(theme.centerChannelColor, 0.7), 1); + changeCss('.channel-header__links a:hover, .channel-header__links a:active', 'fill:' + theme.centerChannelColor, 2); changeCss('.mentions--top, .command-box', 'box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 3); changeCss('.mentions--top, .command-box', '-webkit-box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 2); changeCss('.mentions--top, .command-box', '-moz-box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 1); @@ -482,6 +499,10 @@ export function applyTheme(theme) { changeCss('.channel-header__info>div.dropdown .header-dropdown__icon', 'color:' + changeOpacity(theme.centerChannelColor, 0.8), 1); changeCss('.channel-header #member_popover', 'color:' + changeOpacity(theme.centerChannelColor, 0.8), 1); changeCss('.custom-textarea, .custom-textarea:focus, .preview-container .preview-div, .post-image__column .post-image__details, .sidebar--right .sidebar-right__body, .markdown__table th, .markdown__table td, .command-box, .modal .modal-content, .settings-modal .settings-table .settings-content .divider-light, .dropdown-menu, .modal .modal-header, .popover, .mentions--top .mentions-box', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); + changeCss('.popover.bottom>.arrow', 'border-bottom-color:' + changeOpacity(theme.centerChannelColor, 0.25), 1); + changeCss('.popover.right>.arrow', 'border-right-color:' + changeOpacity(theme.centerChannelColor, 0.25), 1); + changeCss('.popover.left>.arrow', 'border-left-color:' + changeOpacity(theme.centerChannelColor, 0.25), 1); + changeCss('.popover.top>.arrow', 'border-top-color:' + changeOpacity(theme.centerChannelColor, 0.25), 1); changeCss('.command-name, .popover .popover-title', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.dropdown-menu .divider', 'background:' + theme.centerChannelColor, 1); changeCss('.custom-textarea', 'color:' + theme.centerChannelColor, 1); @@ -497,14 +518,15 @@ export function applyTheme(theme) { changeCss('.date-separator .separator__hr, .modal-footer, .modal .custom-textarea, .post-right__container .post.post--root hr, .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.modal .custom-textarea:focus', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.3), 1); changeCss('.channel-intro, .settings-modal .settings-table .settings-content .divider-dark, hr, .settings-modal .settings-table .settings-links', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); - changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); - changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment, .post.post--comment.other--root .post-comment, .post.same--root .post-body, .modal .more-channel-table tbody>tr td, .member-div:first-child, .member-div, .access-history__table .access__report, .activity-log__table', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.1), 2); + changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment, pre', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); + changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment, .post.post--comment.other--root .post-comment, .post.same--root .post-body, .modal .more-table tbody>tr td, .member-div:first-child, .member-div, .access-history__table .access__report, .activity-log__table', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.1), 2); changeCss('@media(max-width: 1440px){.post.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2); changeCss('@media(max-width: 1440px){.post.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2); changeCss('@media(max-width: 1800px){.inner__wrap.move--left .post.post--comment.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2); - changeCss('.post:hover, .modal .more-channel-table tbody>tr:hover td, .sidebar--right .sidebar--right__header, .settings-modal .settings-table .settings-content .section-min:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); + changeCss('.post:hover, .modal .more-table tbody>tr:hover td, .sidebar--right .sidebar--right__header, .settings-modal .settings-table .settings-content .section-min:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); changeCss('.date-separator.hovered--before:after, .date-separator.hovered--after:before, .new-separator.hovered--after:before, .new-separator.hovered--before:after', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); changeCss('.command-name:hover, .mentions-name:hover, .mentions-focus, .dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.15), 1); + changeCss('code', 'background:' + changeOpacity(theme.centerChannelColor, 0.1), 1); changeCss('.post.current--user:hover .post-body ', 'background: none;', 1); changeCss('.sidebar--right', 'color:' + theme.centerChannelColor, 2); } @@ -901,6 +923,18 @@ export function isBrowserEdge() { return window.naviagtor && navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('edge') > -1; } +export function getDirectChannelName(id, otherId) { + let handle; + + if (otherId > id) { + handle = id + '__' + otherId; + } else { + handle = otherId + '__' + id; + } + + return handle; +} + // Used to get the id of the other user from a DM channel export function getUserIdFromChannelName(channel) { var ids = channel.name.split('__'); @@ -934,3 +968,11 @@ export function getShortenedTeamURL() { } return teamURL + '/'; } + +export function windowWidth() { + return $(window).width(); +} + +export function windowHeight() { + return $(window).height(); +} diff --git a/web/sass-files/sass/partials/_admin-console.scss b/web/sass-files/sass/partials/_admin-console.scss index 09907da6d..14f1d9c2f 100644 --- a/web/sass-files/sass/partials/_admin-console.scss +++ b/web/sass-files/sass/partials/_admin-console.scss @@ -15,12 +15,11 @@ .nav { li { padding: 0; + @include opacity(1); .icon { width: 17px; } > a { - padding: 9px 15px; - display: block; &:hover, &.active, &:focus { background-color: #EAEAEA; } @@ -118,6 +117,11 @@ margin-bottom: 25px; } .help-text { + ul, ol { + padding-left: 23px; + } + } + .help-text { margin: 10px 0 0 15px; color: #777; .help-link { diff --git a/web/sass-files/sass/partials/_base.scss b/web/sass-files/sass/partials/_base.scss index 18462d92a..cb5ff67b5 100644 --- a/web/sass-files/sass/partials/_base.scss +++ b/web/sass-files/sass/partials/_base.scss @@ -34,20 +34,24 @@ body { } } -.input-group-addon { - background: transparent; +img { + max-width: 100%; + height: auto; } .popover { color: #333; - &.bottom { + &.bottom, &.right, &.top, &.left { >.arrow:after { - border-bottom-color: rgba(white, 0.5); + border-color: transparent; } } .popover-title { background: rgba(black, 0.05); } + .popover-content { + white-space: pre-wrap; + } } .dropdown-menu { @@ -78,6 +82,9 @@ a:focus, a:hover { .tooltip { .tooltip-inner { word-break: break-word; + font-size: 13px; + padding: 3px 10px 4px; + font-weight: 500; } } @@ -174,6 +181,10 @@ a:focus, a:hover { background-color: white !important; } +.alert { + padding: 8px 12px; +} + .emoji { width: 1.5em; height: 1.5em; diff --git a/web/sass-files/sass/partials/_command-box.scss b/web/sass-files/sass/partials/_command-box.scss index f1aa4dca2..184fb55eb 100644 --- a/web/sass-files/sass/partials/_command-box.scss +++ b/web/sass-files/sass/partials/_command-box.scss @@ -5,6 +5,7 @@ border: $border-gray; bottom: 38px; overflow: auto; + z-index: 100; @extend %popover-box-shadow; .sidebar--right & { bottom: 100px; diff --git a/web/sass-files/sass/partials/_content.scss b/web/sass-files/sass/partials/_content.scss index c8c205047..49b3916a9 100644 --- a/web/sass-files/sass/partials/_content.scss +++ b/web/sass-files/sass/partials/_content.scss @@ -28,6 +28,7 @@ bottom: 0; left: 0; width: 100%; + z-index: 3; } .post-list { .new-messages-hr { diff --git a/web/sass-files/sass/partials/_error-bar.scss b/web/sass-files/sass/partials/_error-bar.scss index 2e3d3c87e..8b7432bbb 100644 --- a/web/sass-files/sass/partials/_error-bar.scss +++ b/web/sass-files/sass/partials/_error-bar.scss @@ -3,7 +3,7 @@ text-align:center; position: relative; color: #fff; - position: fixed; + position: absolute; top: 0; width: 100%; z-index: 9999; diff --git a/web/sass-files/sass/partials/_files.scss b/web/sass-files/sass/partials/_files.scss index 6dbb82810..01057423d 100644 --- a/web/sass-files/sass/partials/_files.scss +++ b/web/sass-files/sass/partials/_files.scss @@ -194,6 +194,7 @@ vertical-align: top; .file-details__name { + color: #333; font-size: 16px; } .file-details__info { diff --git a/web/sass-files/sass/partials/_forms.scss b/web/sass-files/sass/partials/_forms.scss index 6c1f7cc6c..2d7b6cd26 100644 --- a/web/sass-files/sass/partials/_forms.scss +++ b/web/sass-files/sass/partials/_forms.scss @@ -37,3 +37,9 @@ } } } + +.help-block { + font-size: 0.95em; + margin: 10px 0 0; + color: #999; +} diff --git a/web/sass-files/sass/partials/_headers.scss b/web/sass-files/sass/partials/_headers.scss index 8e353aff9..8bf163f90 100644 --- a/web/sass-files/sass/partials/_headers.scss +++ b/web/sass-files/sass/partials/_headers.scss @@ -147,7 +147,8 @@ } .header__info { color: #fff; - padding-left: 4px; + @include clearfix; + padding-left: 2px; z-index: 1; position: relative; } @@ -155,7 +156,7 @@ display: block; font-weight: 600; font-size: 16px; - max-width: 80%; + max-width: 85%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -290,11 +291,6 @@ display: inline-block; width: 15px; margin: 9px 6px 3px 0; - &:hover { - svg { - fill: #777; - } - } a { height: 100%; display: block; @@ -302,6 +298,6 @@ svg { vertical-align: top; margin-top: 8px; - fill: #aaa; + fill: inherit; } } diff --git a/web/sass-files/sass/partials/_markdown.scss b/web/sass-files/sass/partials/_markdown.scss index 122586354..70c99f504 100644 --- a/web/sass-files/sass/partials/_markdown.scss +++ b/web/sass-files/sass/partials/_markdown.scss @@ -1,5 +1,6 @@ .markdown__heading { font-weight: 700; + line-height: 1.5; } .markdown__paragraph-inline { display: inline; @@ -53,15 +54,10 @@ blockquote { } pre { border: none; - background-color: #f7f7f7; margin: 5px 0; - .current--user & { - background: #fff; - } - code { - color: #c7254e; - } + color: inherit; } code { background: #fff; + color: inherit; } diff --git a/web/sass-files/sass/partials/_modal.scss b/web/sass-files/sass/partials/_modal.scss index 2722333a4..5570b5ce4 100644 --- a/web/sass-files/sass/partials/_modal.scss +++ b/web/sass-files/sass/partials/_modal.scss @@ -1,3 +1,6 @@ +#channel_members_modal .modal-body { + min-height: 110px; +} .modal-body { padding: 20px 15px; } @@ -137,7 +140,7 @@ padding: 0; } } - .more-channel-table { + .more-table { margin: 0; table-layout: fixed; p { @@ -147,9 +150,11 @@ @include opacity(0.8); margin: 5px 0; } - .more-channel-name { + .more-name { font-weight: 600; font-size: 0.95em; + overflow: hidden; + text-overflow: ellipsis; } tbody { > tr { @@ -172,6 +177,9 @@ padding: 8px 15px 8px 8px; width: 80px; vertical-align: middle; + &.lg { + width: 110px; + } } } } @@ -186,7 +194,7 @@ position: relative; max-width: 90%; min-height: 100px; - min-width: 240px; + min-width: 320px; @include border-radius(3px); display: table; margin: 0 auto; @@ -326,3 +334,44 @@ } } } + +.modal-direct-channels { + + .user-list { + margin-top: 10px; + overflow: auto; + -webkit-overflow-scrolling: touch; + max-height: 500px; + position: relative; + } + + .table { + margin-top: 10px; + } + + .modal-body { + padding: 20px 0 0; + @include clearfix; + } + + .filter-row { + padding: 0 15px; + } + + .member-count { + margin-top: 5px; + float: right; + @include opacity(0.8); + } + + .more-description { + @include opacity(0.7); + } + + .profile-img { + -moz-border-radius: 50px; + -webkit-border-radius: 50px; + border-radius: 50px; + margin-right: 8px; + } +} diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss index ccd7fd425..0f3cc0ef6 100644 --- a/web/sass-files/sass/partials/_post.scss +++ b/web/sass-files/sass/partials/_post.scss @@ -147,12 +147,12 @@ body.ios { &::-webkit-scrollbar { width: 0px !important; } - &.inactive { - display: none; - } - &.active { - display: inline; - } + &.inactive { + display: none; + } + &.active { + display: inline; + } } .post-list__table { display: table; @@ -195,6 +195,14 @@ body.ios { .post-body__cell { vertical-align: top; position: relative; + &.scroll { + .btn-file { + right: 15px; + } + .custom-textarea { + padding-right: 43px; + } + } } .send-button { display: none; @@ -399,6 +407,8 @@ body.ios { display: none; } .post-body { + position: relative; + z-index: 1; max-width: 100%; width: 600px; float: left; @@ -423,10 +433,13 @@ body.ios { } } .post-header { + position: relative; list-style-type: none; margin: 0 0 1px; padding-left: 0px; &.post-header-post { + position: relative; + z-index: 1; width: 200px; text-align: right; float: left; @@ -511,9 +524,9 @@ body.ios { } .bot-indicator { - background-color: lightgrey; - border-radius:2px; - padding-left:2px; - padding-right:2px; - font-family:"Courier New" + background-color: lightgrey; + border-radius:2px; + padding-left:2px; + padding-right:2px; + font-family:"Courier New" } diff --git a/web/sass-files/sass/partials/_post_right.scss b/web/sass-files/sass/partials/_post_right.scss index e4860b286..91f9355de 100644 --- a/web/sass-files/sass/partials/_post_right.scss +++ b/web/sass-files/sass/partials/_post_right.scss @@ -36,6 +36,11 @@ .post-create-footer { padding-top: 10px; } + .post-right-comments-upload-in-progress { + padding: 6px 0; + color: #a8adb7; + margin-right: 10px; + } } } @@ -88,6 +93,8 @@ .post-right__scroll { position: relative; + overflow: scroll; + -webkit-overflow-scrolling: touch; } .post-right-comment-time { diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss index 82ec1811a..09ac2047c 100644 --- a/web/sass-files/sass/partials/_responsive.scss +++ b/web/sass-files/sass/partials/_responsive.scss @@ -48,6 +48,7 @@ } .post-header { &.post-header-post { + z-index: inherit; width: auto; float: none; text-align: left; @@ -73,6 +74,10 @@ display: inline; .post-info { display: inline; + .tooltip { + margin-top: -25px; + margin-left: 40px; + } .post-profile-time { margin: 0; } @@ -134,6 +139,7 @@ } .post-header { &.post-header-post { + z-index: inherit; width: auto; float: none; text-align: left; @@ -153,6 +159,10 @@ display: inline; .post-info { display: inline; + .tooltip { + margin-top: -25px; + margin-left: 40px; + } .post-profile-time { width: auto; margin: 0; @@ -257,9 +267,17 @@ } } .file-details { + width: 100%; height: auto; } } + .modal-direct-channels { + .member-count { + float: none; + margin-top: 10px; + display: block; + } + } .center-file-overlay { font-size: 1.3em; } @@ -327,6 +345,7 @@ } .modal-title { float: none; + max-width: 90%; } .btn { &.btn-primary { @@ -421,6 +440,9 @@ .post-body__cell { display: table-cell; padding-left: 45px; + .sidebar--right & { + padding-left: 0; + } } .app__content & { .btn-file { @@ -572,11 +594,14 @@ &.move--right { @include translate3d(0, 0, 0); } + .nav-pills__unread-indicator-bottom { + bottom: 10px; + } .badge { top: 13px; } > div { - padding-bottom: 105px; + padding-bottom: 65px; } .team__header { display: none; @@ -612,6 +637,12 @@ &:hover, &:focus { background: transparent; } + &.has-close { + .btn-close { + display: block; + @include opacity(0.5); + } + } } } } @@ -667,7 +698,7 @@ .modal-image { .image-wrapper { font-size: 12px; - max-width: 280px; + min-width: 250px; .modal-close { @include opacity(1); } diff --git a/web/sass-files/sass/partials/_search.scss b/web/sass-files/sass/partials/_search.scss index 2de1b5380..2f15a445f 100644 --- a/web/sass-files/sass/partials/_search.scss +++ b/web/sass-files/sass/partials/_search.scss @@ -68,6 +68,8 @@ .search-items-container { position: relative; + overflow: scroll; + -webkit-overflow-scrolling: touch; } .search-results-header { diff --git a/web/sass-files/sass/partials/_settings.scss b/web/sass-files/sass/partials/_settings.scss index 8debb0b4e..c4591d7b6 100644 --- a/web/sass-files/sass/partials/_settings.scss +++ b/web/sass-files/sass/partials/_settings.scss @@ -230,13 +230,6 @@ font-weight:500; } -.profile-img { - width:128px; - height:128px; - margin-bottom: 10px; - @include border-radius(128px); -} - .sel-btn { margin-right:5px; } @@ -268,7 +261,6 @@ position:absolute; right:15px; top:13px; - color:#414142; } } @@ -299,3 +291,7 @@ .color-btn { margin:4px; } + +.no-resize { + resize:none; +} diff --git a/web/sass-files/sass/partials/_sidebar--left.scss b/web/sass-files/sass/partials/_sidebar--left.scss index 73d702fef..585a51f08 100644 --- a/web/sass-files/sass/partials/_sidebar--left.scss +++ b/web/sass-files/sass/partials/_sidebar--left.scss @@ -47,7 +47,8 @@ .nav-pills__container { height: 100%; position: relative; - overflow: auto; + overflow: scroll; + -webkit-overflow-scrolling: touch; } .nav-pills__unread-indicator { @@ -69,7 +70,7 @@ top: 66px; } .nav-pills__unread-indicator-bottom { - bottom: 10px; + bottom: 20px; } .nav { @@ -98,6 +99,27 @@ &.has-badge { padding-right: 30px; } + &.has-close { + padding-right: 30px; + &:hover { + .btn-close { + display: block; + @include opacity(0.8); + } + } + .btn-close { + position: absolute; + right: 15px; + top: -1px; + font-size: 20px; + font-weight: 600; + @include opacity(0); + display: none; + &:hover { + @include opacity(1); + } + } + } &.nav-more { text-decoration: underline; } diff --git a/web/sass-files/sass/partials/_sidebar--right.scss b/web/sass-files/sass/partials/_sidebar--right.scss index b37dbf421..c954b03d8 100644 --- a/web/sass-files/sass/partials/_sidebar--right.scss +++ b/web/sass-files/sass/partials/_sidebar--right.scss @@ -26,6 +26,7 @@ .post-header { .post-header-col { &.post-header__reply { + min-width: 30px; text-align: right; float: right; } diff --git a/web/sass-files/sass/partials/_signup.scss b/web/sass-files/sass/partials/_signup.scss index fcf0d5d77..6d0256142 100644 --- a/web/sass-files/sass/partials/_signup.scss +++ b/web/sass-files/sass/partials/_signup.scss @@ -96,12 +96,6 @@ margin-bottom: 0.8em; } - .form__hint { - font-size: 0.95em; - color: #999; - margin: 10px 0 0; - } - .signup-team-confirm__container { padding: 100px 0px 100px 0px; } diff --git a/web/sass-files/sass/partials/_videos.scss b/web/sass-files/sass/partials/_videos.scss index 9e1ce29b7..6ae5b488b 100644 --- a/web/sass-files/sass/partials/_videos.scss +++ b/web/sass-files/sass/partials/_videos.scss @@ -26,11 +26,6 @@ padding:0px; } -.video-uploader { - font-size: 13px; - margin: 0 0 15px; -} - .video-title { font-size:15px; margin-top:3px; @@ -54,4 +49,4 @@ border-top:36px solid transparent; border-bottom:36px solid transparent; border-left:60px solid rgba(255,255,255,0.4); -}
\ No newline at end of file +} diff --git a/web/static/images/webhook_icon.jpg b/web/static/images/webhook_icon.jpg Binary files differnew file mode 100644 index 000000000..af5303421 --- /dev/null +++ b/web/static/images/webhook_icon.jpg diff --git a/web/static/js/jquery-1.11.1.min.js b/web/static/js/jquery-1.11.1.min.js deleted file mode 100644 index ab28a2472..000000000 --- a/web/static/js/jquery-1.11.1.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; -if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px") -},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m}); diff --git a/web/static/js/jquery-1.11.1.js b/web/static/js/jquery-2.1.4.js index d4b67f7e6..eed17778c 100644 --- a/web/static/js/jquery-1.11.1.js +++ b/web/static/js/jquery-2.1.4.js @@ -1,5 +1,5 @@ /*! - * jQuery JavaScript Library v1.11.1 + * jQuery JavaScript Library v2.1.4 * http://jquery.com/ * * Includes Sizzle.js @@ -9,19 +9,19 @@ * Released under the MIT license * http://jquery.org/license * - * Date: 2014-05-01T17:42Z + * Date: 2015-04-28T16:01Z */ (function( global, factory ) { if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper window is present, - // execute the factory and get jQuery - // For environments that do not inherently posses a window with a document - // (such as Node.js), expose a jQuery-making factory as module.exports - // This accentuates the need for the creation of a real window + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info + // See ticket #14549 for more info. module.exports = global.document ? factory( global, true ) : function( w ) { @@ -37,21 +37,21 @@ // Pass this if window is not defined yet }(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { -// Can't do this because several apps including ASP.NET trace +// Support: Firefox 18+ +// Can't be in strict mode, several libs including ASP.NET trace // the stack via arguments.caller.callee and Firefox dies if // you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ // -var deletedIds = []; +var arr = []; -var slice = deletedIds.slice; +var slice = arr.slice; -var concat = deletedIds.concat; +var concat = arr.concat; -var push = deletedIds.push; +var push = arr.push; -var indexOf = deletedIds.indexOf; +var indexOf = arr.indexOf; var class2type = {}; @@ -64,7 +64,10 @@ var support = {}; var - version = "1.11.1", + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + + version = "2.1.4", // Define a local copy of jQuery jQuery = function( selector, context ) { @@ -73,7 +76,7 @@ var return new jQuery.fn.init( selector, context ); }, - // Support: Android<4.1, IE<9 + // Support: Android<4.1 // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, @@ -167,12 +170,12 @@ jQuery.fn = jQuery.prototype = { // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, - sort: deletedIds.sort, - splice: deletedIds.splice + sort: arr.sort, + splice: arr.splice }; jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, + var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, @@ -182,7 +185,7 @@ jQuery.extend = jQuery.fn.extend = function() { if ( typeof target === "boolean" ) { deep = target; - // skip the boolean and the target + // Skip the boolean and the target target = arguments[ i ] || {}; i++; } @@ -192,7 +195,7 @@ jQuery.extend = jQuery.fn.extend = function() { target = {}; } - // extend jQuery itself if only one argument is passed + // Extend jQuery itself if only one argument is passed if ( i === length ) { target = this; i--; @@ -249,98 +252,86 @@ jQuery.extend({ noop: function() {}, - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { return jQuery.type(obj) === "function"; }, - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, + isArray: Array.isArray, isWindow: function( obj ) { - /* jshint eqeqeq: false */ - return obj != null && obj == obj.window; + return obj != null && obj === obj.window; }, isNumeric: function( obj ) { // parseFloat NaNs numeric-cast false positives (null|true|false|"") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN - return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; + // adding 1 corrects loss of precision from parseFloat (#15100) + return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; }, isPlainObject: function( obj ) { - var key; - - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { return false; } - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 + if ( obj.constructor && + !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { return false; } - // Support: IE<9 - // Handle iteration over inherited properties before own properties. - if ( support.ownLast ) { - for ( key in obj ) { - return hasOwn.call( obj, key ); - } - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; + }, - return key === undefined || hasOwn.call( obj, key ); + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; }, type: function( obj ) { if ( obj == null ) { return obj + ""; } + // Support: Android<4.0, iOS<6 (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call(obj) ] || "object" : typeof obj; }, // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); + globalEval: function( code ) { + var script, + indirect = eval; + + code = jQuery.trim( code ); + + if ( code ) { + // If the code includes a valid, prologue position + // strict mode pragma, execute code by injecting a + // script tag into the document. + if ( code.indexOf("use strict") === 1 ) { + script = document.createElement("script"); + script.text = code; + document.head.appendChild( script ).parentNode.removeChild( script ); + } else { + // Otherwise, avoid the DOM node creation, insertion + // and removal by using an indirect global eval + indirect( code ); + } } }, // Convert dashed to camelCase; used by the css and data modules + // Support: IE9-11+ // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); @@ -400,7 +391,7 @@ jQuery.extend({ return obj; }, - // Support: Android<4.1, IE<9 + // Support: Android<4.1 trim: function( text ) { return text == null ? "" : @@ -426,25 +417,7 @@ jQuery.extend({ }, inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( indexOf ) { - return indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; + return arr == null ? -1 : indexOf.call( arr, elem, i ); }, merge: function( first, second ) { @@ -452,16 +425,8 @@ jQuery.extend({ j = 0, i = first.length; - while ( j < len ) { - first[ i++ ] = second[ j++ ]; - } - - // Support: IE<9 - // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) - if ( len !== len ) { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; } first.length = i; @@ -527,7 +492,7 @@ jQuery.extend({ // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { - var args, proxy, tmp; + var tmp, args, proxy; if ( typeof context === "string" ) { tmp = fn[ context ]; @@ -553,9 +518,7 @@ jQuery.extend({ return proxy; }, - now: function() { - return +( new Date() ); - }, + now: Date.now, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. @@ -568,7 +531,12 @@ jQuery.each("Boolean Number String Function Array Date RegExp Object Error".spli }); function isArraylike( obj ) { - var length = obj.length, + + // Support: iOS 8.2 (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = "length" in obj && obj.length, type = jQuery.type( obj ); if ( type === "function" || jQuery.isWindow( obj ) ) { @@ -584,14 +552,14 @@ function isArraylike( obj ) { } var Sizzle = /*! - * Sizzle CSS Selector Engine v1.10.19 + * Sizzle CSS Selector Engine v2.2.0-pre * http://sizzlejs.com/ * - * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * - * Date: 2014-04-18 + * Date: 2014-12-16 */ (function( window ) { @@ -618,7 +586,7 @@ var i, contains, // Instance-specific data - expando = "sizzle" + -(new Date()), + expando = "sizzle" + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, @@ -633,7 +601,6 @@ var i, }, // General-purpose constants - strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, // Instance methods @@ -643,12 +610,13 @@ var i, push_native = arr.push, push = arr.push, slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { + // Use a stripped-down indexOf as it's faster than native + // http://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { var i = 0, - len = this.length; + len = list.length; for ( ; i < len; i++ ) { - if ( this[i] === elem ) { + if ( list[i] === elem ) { return i; } } @@ -688,6 +656,7 @@ var i, ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), @@ -739,6 +708,14 @@ var i, String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); }; // Optimize for push.apply( _, NodeList ) @@ -781,19 +758,18 @@ function Sizzle( selector, context, results, seed ) { context = context || document; results = results || []; + nodeType = context.nodeType; - if ( !selector || typeof selector !== "string" ) { - return results; - } + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; + return results; } - if ( documentIsHTML && !seed ) { + if ( !seed && documentIsHTML ) { - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { + // Try to shortcut find operations when possible (e.g., not under DocumentFragment) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { // Speed-up: Sizzle("#ID") if ( (m = match[1]) ) { if ( nodeType === 9 ) { @@ -825,7 +801,7 @@ function Sizzle( selector, context, results, seed ) { return results; // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + } else if ( (m = match[3]) && support.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } @@ -835,7 +811,7 @@ function Sizzle( selector, context, results, seed ) { if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { nid = old = expando; newContext = context; - newSelector = nodeType === 9 && selector; + newSelector = nodeType !== 1 && selector; // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root @@ -1022,7 +998,7 @@ function createPositionalPseudo( fn ) { * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { - return context && typeof context.getElementsByTagName !== strundefined && context; + return context && typeof context.getElementsByTagName !== "undefined" && context; } // Expose support vars for convenience @@ -1046,9 +1022,8 @@ isXML = Sizzle.isXML = function( elem ) { * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, - doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; + var hasCompare, parent, + doc = node ? node.ownerDocument || node : preferredDoc; // If no document and documentElement is available, return if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { @@ -1058,9 +1033,7 @@ setDocument = Sizzle.setDocument = function( node ) { // Set our document document = doc; docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); + parent = doc.defaultView; // Support: IE>8 // If iframe document is assigned to "document" variable and if iframe has been reloaded, @@ -1069,21 +1042,22 @@ setDocument = Sizzle.setDocument = function( node ) { if ( parent && parent !== parent.top ) { // IE11 does not have attachEvent, so all must suffer if ( parent.addEventListener ) { - parent.addEventListener( "unload", function() { - setDocument(); - }, false ); + parent.addEventListener( "unload", unloadHandler, false ); } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", function() { - setDocument(); - }); + parent.attachEvent( "onunload", unloadHandler ); } } + /* Support tests + ---------------------------------------------------------------------- */ + documentIsHTML = !isXML( doc ); + /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) support.attributes = assert(function( div ) { div.className = "i"; return !div.getAttribute("className"); @@ -1098,17 +1072,8 @@ setDocument = Sizzle.setDocument = function( node ) { return !div.getElementsByTagName("*").length; }); - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { - div.innerHTML = "<div class='a'></div><div class='a i'></div>"; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); + // Support: IE<9 + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); // Support: IE<10 // Check if getElementById returns elements by name @@ -1122,7 +1087,7 @@ setDocument = Sizzle.setDocument = function( node ) { // ID find and filter if ( support.getById ) { Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var m = context.getElementById( id ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 @@ -1143,7 +1108,7 @@ setDocument = Sizzle.setDocument = function( node ) { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; @@ -1152,14 +1117,20 @@ setDocument = Sizzle.setDocument = function( node ) { // Tag Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); } } : + function( tag, context ) { var elem, tmp = [], i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag ); // Filter out possible comments @@ -1177,7 +1148,7 @@ setDocument = Sizzle.setDocument = function( node ) { // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + if ( documentIsHTML ) { return context.getElementsByClassName( className ); } }; @@ -1206,13 +1177,15 @@ setDocument = Sizzle.setDocument = function( node ) { // setting a boolean content attribute, // since its presence should be enough // http://bugs.jquery.com/ticket/12359 - div.innerHTML = "<select msallowclip=''><option selected=''></option></select>"; + docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" + + "<select id='" + expando + "-\f]' msallowcapture=''>" + + "<option selected=''></option></select>"; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowclip^='']").length ) { + if ( div.querySelectorAll("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } @@ -1222,12 +1195,24 @@ setDocument = Sizzle.setDocument = function( node ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } + // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ + if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibing-combinator selector` fails + if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } }); assert(function( div ) { @@ -1344,7 +1329,7 @@ setDocument = Sizzle.setDocument = function( node ) { // Maintain original order return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; } @@ -1371,7 +1356,7 @@ setDocument = Sizzle.setDocument = function( node ) { aup ? -1 : bup ? 1 : sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check @@ -1434,7 +1419,7 @@ Sizzle.matchesSelector = function( elem, expr ) { elem.document && elem.document.nodeType !== 11 ) { return ret; } - } catch(e) {} + } catch (e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; @@ -1653,7 +1638,7 @@ Expr = Sizzle.selectors = { return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); }); }, @@ -1675,7 +1660,7 @@ Expr = Sizzle.selectors = { operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; @@ -1795,7 +1780,7 @@ Expr = Sizzle.selectors = { matched = fn( seed, argument ), i = matched.length; while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); + idx = indexOf( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : @@ -1834,6 +1819,8 @@ Expr = Sizzle.selectors = { function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; return !results.pop(); }; }), @@ -1845,6 +1832,7 @@ Expr = Sizzle.selectors = { }), "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; @@ -2266,7 +2254,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } @@ -2301,13 +2289,16 @@ function matcherFromTokens( tokens ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; + return indexOf( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; } ]; for ( ; i < len; i++ ) { @@ -2557,7 +2548,7 @@ select = Sizzle.select = function( selector, context, results, seed ) { // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; -// Support: Chrome<14 +// Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; @@ -2665,7 +2656,7 @@ function winnow( elements, qualifier, not ) { } return jQuery.grep( elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; }); } @@ -2686,9 +2677,9 @@ jQuery.filter = function( expr, elems, not ) { jQuery.fn.extend({ find: function( selector ) { var i, + len = this.length, ret = [], - self = this, - len = self.length; + self = this; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter(function() { @@ -2736,9 +2727,6 @@ jQuery.fn.extend({ // A central reference to the root jQuery(document) var rootjQuery, - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) @@ -2754,7 +2742,7 @@ var rootjQuery, // Handle HTML strings if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; @@ -2769,7 +2757,7 @@ var rootjQuery, if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; - // scripts is true for back-compat + // Option to run scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[1], @@ -2797,16 +2785,10 @@ var rootjQuery, } else { elem = document.getElementById( match[2] ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 + // Support: Blackberry 4.6 + // gEBID returns nodes no longer in the document (#6963) if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object + // Inject the element directly into the jQuery object this.length = 1; this[0] = elem; } @@ -2857,7 +2839,7 @@ rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, - // methods guaranteed to produce a unique set when starting from a unique set + // Methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, @@ -2868,38 +2850,40 @@ var rparentsprev = /^(?:parents|prev(?:Until|All))/, jQuery.extend({ dir: function( elem, dir, until ) { var matched = [], - cur = elem[ dir ]; + truncate = until !== undefined; - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); + while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); } - cur = cur[dir]; } return matched; }, sibling: function( n, elem ) { - var r = []; + var matched = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); + matched.push( n ); } } - return r; + return matched; } }); jQuery.fn.extend({ has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; + var targets = jQuery( target, this ), + l = targets.length; return this.filter(function() { - for ( i = 0; i < len; i++ ) { + var i = 0; + for ( ; i < l; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } @@ -2935,24 +2919,25 @@ jQuery.fn.extend({ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); }, - // Determine the position of an element within - // the matched set of elements + // Determine the position of an element within the set index: function( elem ) { // No argument, return index in parent if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; } - // index in selector + // Index in selector if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); + return indexOf.call( jQuery( elem ), this[ 0 ] ); } // Locate the position of the desired element - return jQuery.inArray( + return indexOf.call( this, + // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); + elem.jquery ? elem[ 0 ] : elem + ); }, add: function( selector, context ) { @@ -2971,10 +2956,7 @@ jQuery.fn.extend({ }); function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - + while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} return cur; } @@ -3014,35 +2996,33 @@ jQuery.each({ return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); + return elem.contentDocument || jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); + var matched = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); + matched = jQuery.filter( selector, matched ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { - ret = jQuery.unique( ret ); + jQuery.unique( matched ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { - ret = ret.reverse(); + matched.reverse(); } } - return this.pushStack( ret ); + return this.pushStack( matched ); }; }); var rnotwhite = (/\S+/g); @@ -3091,18 +3071,18 @@ jQuery.Callbacks = function( options ) { ( optionsCache[ options ] || createOptions( options ) ) : jQuery.extend( {}, options ); - var // Flag to know if list is currently firing - firing, - // Last fire value (for non-forgettable lists) + var // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, // Actual callback list list = [], // Stack of fire calls for repeatable lists @@ -3355,8 +3335,7 @@ jQuery.extend({ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( values === progressValues ) { deferred.notifyWith( contexts, values ); - - } else if ( !(--remaining) ) { + } else if ( !( --remaining ) ) { deferred.resolveWith( contexts, values ); } }; @@ -3364,7 +3343,7 @@ jQuery.extend({ progressValues, progressContexts, resolveContexts; - // add listeners to Deferred subordinates; treat others as resolved + // Add listeners to Deferred subordinates; treat others as resolved if ( length > 1 ) { progressValues = new Array( length ); progressContexts = new Array( length ); @@ -3381,7 +3360,7 @@ jQuery.extend({ } } - // if we're not waiting on anything, resolve the master + // If we're not waiting on anything, resolve the master if ( !remaining ) { deferred.resolveWith( resolveContexts, resolveValues ); } @@ -3426,11 +3405,6 @@ jQuery.extend({ return; } - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - // Remember that the DOM is ready jQuery.isReady = true; @@ -3451,28 +3425,12 @@ jQuery.extend({ }); /** - * Clean-up method for dom ready events - */ -function detach() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } -} - -/** * The ready event handler and self cleanup method */ function completed() { - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + jQuery.ready(); } jQuery.ready.promise = function( obj ) { @@ -3481,432 +3439,355 @@ jQuery.ready.promise = function( obj ) { readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one + // We once tried to use readyState "interactive" here, but it caused issues like the one // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready setTimeout( jQuery.ready ); - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { + } else { + // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // detach all dom ready events - detach(); - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } } } return readyList.promise( obj ); }; - -var strundefined = typeof undefined; - +// Kick off the DOM ready check even if the user does not +jQuery.ready.promise(); -// Support: IE<9 -// Iteration over object's inherited properties before its own -var i; -for ( i in jQuery( support ) ) { - break; -} -support.ownLast = i !== "0"; - -// Note: most support tests are defined in their respective modules. -// false until the test is run -support.inlineBlockNeedsLayout = false; - -// Execute ASAP in case we need to set body.style.zoom -jQuery(function() { - // Minified: var a,b,c,d - var val, div, body, container; - - body = document.getElementsByTagName( "body" )[ 0 ]; - if ( !body || !body.style ) { - // Return for frameset docs that don't have a body - return; - } - // Setup - div = document.createElement( "div" ); - container = document.createElement( "div" ); - container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; - body.appendChild( container ).appendChild( div ); - if ( typeof div.style.zoom !== strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; - support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; - if ( val ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); } - } - - body.removeChild( container ); -}); + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; -(function() { - var div = document.createElement( "div" ); + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } - // Execute the test only if not already executed in another module. - if (support.deleteExpando == null) { - // Support: IE<9 - support.deleteExpando = true; - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; + if ( fn ) { + for ( ; i < len; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } } } - // Null elements to avoid leaks in IE. - div = null; -})(); + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + len ? fn( elems[0], key ) : emptyGet; +}; /** * Determines whether an object can have data */ -jQuery.acceptData = function( elem ) { - var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ], - nodeType = +elem.nodeType || 1; - - // Do not set data on non-element DOM nodes because it will not be cleared (#8335). - return nodeType !== 1 && nodeType !== 9 ? - false : - - // Nodes accept data unless otherwise specified; rejection can be conditional - !noData || noData !== true && elem.getAttribute("classid") === noData; +jQuery.acceptData = function( owner ) { + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + /* jshint -W018 */ + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); }; -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /([A-Z])/g; - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; +function Data() { + // Support: Android<4, + // Old WebKit does not have Object.preventExtensions/freeze method, + // return new empty object instead with no [[set]] accessor + Object.defineProperty( this.cache = {}, 0, { + get: function() { + return {}; } - } + }); - return data; + this.expando = jQuery.expando + Data.uid++; } -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { +Data.uid = 1; +Data.accepts = jQuery.acceptData; - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; +Data.prototype = { + key: function( owner ) { + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return the key for a frozen object. + if ( !Data.accepts( owner ) ) { + return 0; } - } - - return true; -} - -function internalData( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var ret, thisCache, - internalKey = jQuery.expando, - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { - return; - } + var descriptor = {}, + // Check if the owner object already has a cache key + unlock = owner[ this.expando ]; - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } + // If not, create one + if ( !unlock ) { + unlock = Data.uid++; - if ( !cache[ id ] ) { - // Avoid exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; - } + // Secure it in a non-enumerable, non-writable property + try { + descriptor[ this.expando ] = { value: unlock }; + Object.defineProperties( owner, descriptor ); - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + // Support: Android<4 + // Fallback to a less secure definition + } catch ( e ) { + descriptor[ this.expando ] = unlock; + jQuery.extend( owner, descriptor ); + } } - } - - thisCache = cache[ id ]; - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; + // Ensure the cache object + if ( !this.cache[ unlock ] ) { + this.cache[ unlock ] = {}; } - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( typeof name === "string" ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; + return unlock; + }, + set: function( owner, data, value ) { + var prop, + // There may be an unlock assigned to this node, + // if there is no entry for this "owner", create one inline + // and set the unlock as though an owner entry had always existed + unlock = this.key( owner ), + cache = this.cache[ unlock ]; - // Test for null|undefined property data - if ( ret == null ) { + // Handle: [ owner, key, value ] args + if ( typeof data === "string" ) { + cache[ data ] = value; - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; + // Handle: [ owner, { properties } ] args + } else { + // Fresh assignments by object are shallow copied + if ( jQuery.isEmptyObject( cache ) ) { + jQuery.extend( this.cache[ unlock ], data ); + // Otherwise, copy the properties one-by-one to the cache object + } else { + for ( prop in data ) { + cache[ prop ] = data[ prop ]; + } + } } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; + return cache; + }, + get: function( owner, key ) { + // Either a valid cache is found, or will be created. + // New caches will be created and the unlock returned, + // allowing direct access to the newly created + // empty data object. A valid owner object must be provided. + var cache = this.cache[ this.key( owner ) ]; + + return key === undefined ? + cache : cache[ key ]; + }, + access: function( owner, key, value ) { + var stored; + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ((key && typeof key === "string") && value === undefined) ) { + + stored = this.get( owner, key ); + + return stored !== undefined ? + stored : this.get( owner, jQuery.camelCase(key) ); + } + + // [*]When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, name, camel, + unlock = this.key( owner ), + cache = this.cache[ unlock ]; - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { + if ( key === undefined ) { + this.cache[ unlock ] = {}; - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { + } else { + // Support array or space separated string of keys + if ( jQuery.isArray( key ) ) { // If "name" is an array of keys... // When data is initially created, via ("key", "val") signature, // keys will be converted to camelCase. // Since there is no way to tell _how_ a key was added, remove // both plain key and camelCase key. #12786 // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + name = key.concat( key.map( jQuery.camelCase ) ); + } else { + camel = jQuery.camelCase( key ); + // Try the string as a key before any manipulation + if ( key in cache ) { + name = [ key, camel ]; + } else { + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + name = camel; + name = name in cache ? + [ name ] : ( name.match( rnotwhite ) || [] ); + } } i = name.length; while ( i-- ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { - return; + delete cache[ name[ i ] ]; } } + }, + hasData: function( owner ) { + return !jQuery.isEmptyObject( + this.cache[ owner[ this.expando ] ] || {} + ); + }, + discard: function( owner ) { + if ( owner[ this.expando ] ) { + delete this.cache[ owner[ this.expando ] ]; + } } +}; +var data_priv = new Data(); - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; +var data_user = new Data(); - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - /* jshint eqeqeq: false */ - } else if ( support.deleteExpando || cache != cache.window ) { - /* jshint eqeqeq: true */ - delete cache[ id ]; +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - // When all else fails, null - } else { - cache[ id ] = null; +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + data_user.set( elem, key, data ); + } else { + data = undefined; + } } + return data; } jQuery.extend({ - cache: {}, - - // The following elements (space-suffixed to avoid Object.prototype collisions) - // throw uncatchable exceptions if you attempt to set expando properties - noData: { - "applet ": true, - "embed ": true, - // ...but Flash objects (which have this classid) *can* handle expandos - "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" - }, - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); + return data_user.hasData( elem ) || data_priv.hasData( elem ); }, data: function( elem, name, data ) { - return internalData( elem, name, data ); + return data_user.access( elem, name, data ); }, removeData: function( elem, name ) { - return internalRemoveData( elem, name ); + data_user.remove( elem, name ); }, - // For internal use only. + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to data_priv methods, these can be deprecated. _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); + return data_priv.access( elem, name, data ); }, _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); + data_priv.remove( elem, name ); } }); jQuery.fn.extend({ data: function( key, value ) { var i, name, data, - elem = this[0], + elem = this[ 0 ], attrs = elem && elem.attributes; - // Special expections of .data basically thwart jQuery.access, - // so implement the relevant behavior ourselves - // Gets all values if ( key === undefined ) { if ( this.length ) { - data = jQuery.data( elem ); + data = data_user.get( elem ); - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { i = attrs.length; while ( i-- ) { @@ -3920,7 +3801,7 @@ jQuery.fn.extend({ } } } - jQuery._data( elem, "parsedAttrs", true ); + data_priv.set( elem, "hasDataAttrs", true ); } } @@ -3930,25 +3811,69 @@ jQuery.fn.extend({ // Sets multiple values if ( typeof key === "object" ) { return this.each(function() { - jQuery.data( this, key ); + data_user.set( this, key ); }); } - return arguments.length > 1 ? + return access( this, function( value ) { + var data, + camelKey = jQuery.camelCase( key ); + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + // Attempt to get data from the cache + // with the key as-is + data = data_user.get( elem, key ); + if ( data !== undefined ) { + return data; + } - // Sets one value - this.each(function() { - jQuery.data( this, key, value ); - }) : + // Attempt to get data from the cache + // with the key camelized + data = data_user.get( elem, camelKey ); + if ( data !== undefined ) { + return data; + } - // Gets one value - // Try to fetch any internally stored data first - elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, camelKey, undefined ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each(function() { + // First, attempt to store a copy or reference of any + // data that might've been store with a camelCased key. + var data = data_user.get( this, camelKey ); + + // For HTML5 data-* attribute interop, we have to + // store property names with dashes in a camelCase form. + // This might not apply to all properties...* + data_user.set( this, camelKey, value ); + + // *... In the case of properties that might _actually_ + // have dashes, we need to also store a copy of that + // unchanged property. + if ( key.indexOf("-") !== -1 && data !== undefined ) { + data_user.set( this, key, value ); + } + }); + }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { return this.each(function() { - jQuery.removeData( this, key ); + data_user.remove( this, key ); }); } }); @@ -3960,12 +3885,12 @@ jQuery.extend({ if ( elem ) { type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); + queue = data_priv.get( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + if ( !queue || jQuery.isArray( data ) ) { + queue = data_priv.access( elem, type, jQuery.makeArray(data) ); } else { queue.push( data ); } @@ -3999,7 +3924,7 @@ jQuery.extend({ queue.unshift( "inprogress" ); } - // clear up the last queue stop function + // Clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } @@ -4009,13 +3934,12 @@ jQuery.extend({ } }, - // not intended for public consumption - generates a queueHooks object, or returns the current one + // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { + return data_priv.get( elem, key ) || data_priv.access( elem, key, { empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); + data_priv.remove( elem, [ type + "queue", key ] ); }) }); } @@ -4040,7 +3964,7 @@ jQuery.fn.extend({ this.each(function() { var queue = jQuery.queue( this, type, data ); - // ensure a hooks for this queue + // Ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[0] !== "inprogress" ) { @@ -4077,7 +4001,7 @@ jQuery.fn.extend({ type = type || "fx"; while ( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + tmp = data_priv.get( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); @@ -4098,155 +4022,42 @@ var isHidden = function( elem, el ) { return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); }; - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; -}; var rcheckableType = (/^(?:checkbox|radio)$/i); (function() { - // Minified: var a,b,c - var input = document.createElement( "input" ), - div = document.createElement( "div" ), - fragment = document.createDocumentFragment(); - - // Setup - div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; - - // IE strips leading whitespace when .innerHTML is used - support.leadingWhitespace = div.firstChild.nodeType === 3; - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - support.tbody = !div.getElementsByTagName( "tbody" ).length; - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Safari<=5.1 + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - support.html5Clone = - document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>"; + div.appendChild( input ); - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - input.type = "checkbox"; - input.checked = true; - fragment.appendChild( input ); - support.appendChecked = input.checked; + // Support: Safari<=5.1, Android<4.2 + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + // Support: IE<=11+ // Make sure textarea (and checkbox) defaultValue is properly cloned - // Support: IE6-IE11+ div.innerHTML = "<textarea>x</textarea>"; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - - // #11217 - WebKit loses check when the name is after the checked attribute - fragment.appendChild( div ); - div.innerHTML = "<input type='radio' checked='checked' name='t'/>"; - - // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 - // old WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - support.noCloneEvent = true; - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Execute the test only if not already executed in another module. - if (support.deleteExpando == null) { - // Support: IE<9 - support.deleteExpando = true; - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - } })(); +var strundefined = typeof undefined; -(function() { - var i, eventName, - div = document.createElement( "div" ); - - // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event) - for ( i in { submit: true, change: true, focusin: true }) { - eventName = "on" + i; - - if ( !(support[ i + "Bubbles" ] = eventName in window) ) { - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) - div.setAttribute( eventName, "t" ); - support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false; - } - } - // Null elements to avoid leaks in IE. - div = null; -})(); +support.focusinBubbles = "onfocusin" in window; -var rformElems = /^(?:input|select|textarea)$/i, +var rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, @@ -4275,10 +4086,11 @@ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.get( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { @@ -4305,12 +4117,9 @@ jQuery.event = { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded - return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; + return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; } // Handle multiple events separated by a space @@ -4352,14 +4161,10 @@ jQuery.event = { handlers = events[ type ] = []; handlers.delegateCount = 0; - // Only use addEventListener/attachEvent if the special events handler returns false + // Only use addEventListener if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); } } } @@ -4383,17 +4188,15 @@ jQuery.event = { jQuery.event.global[ type ] = true; } - // Nullify elem to prevent memory leaks in IE - elem = null; }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.hasData( elem ) && data_priv.get( elem ); if ( !elemData || !(events = elemData.events) ) { return; @@ -4454,16 +4257,13 @@ jQuery.event = { // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); + data_priv.remove( elem, "events" ); } }, trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, + + var i, cur, tmp, bubbleType, ontype, handle, special, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; @@ -4545,7 +4345,7 @@ jQuery.event = { special.bindType || type; // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } @@ -4568,9 +4368,8 @@ jQuery.event = { jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; @@ -4581,12 +4380,7 @@ jQuery.event = { // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } + elem[ type ](); jQuery.event.triggered = undefined; if ( tmp ) { @@ -4604,10 +4398,10 @@ jQuery.event = { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event ); - var i, ret, handleObj, matched, j, + var i, j, ret, matched, handleObj, handlerQueue = [], args = slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event @@ -4630,8 +4424,8 @@ jQuery.event = { j = 0; while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { event.handleObj = handleObj; @@ -4659,7 +4453,7 @@ jQuery.event = { }, handlers: function( event, handlers ) { - var sel, handleObj, matches, i, + var i, matches, sel, handleObj, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; @@ -4669,13 +4463,10 @@ jQuery.event = { // Avoid non-left-click bubbling in Firefox (#3861) if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - /* jshint eqeqeq: false */ - for ( ; cur != this; cur = cur.parentNode || this ) { - /* jshint eqeqeq: true */ + for ( ; cur !== this; cur = cur.parentNode || this ) { - // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + if ( cur.disabled !== true || event.type !== "click" ) { matches = []; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; @@ -4707,52 +4498,6 @@ jQuery.event = { return handlerQueue; }, - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - // Includes some event props shared by KeyEvent and MouseEvent props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), @@ -4772,11 +4517,10 @@ jQuery.event = { }, mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; + var eventDoc, doc, body, + button = original.button; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { @@ -4788,11 +4532,6 @@ jQuery.event = { event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { @@ -4803,6 +4542,48 @@ jQuery.event = { } }, + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: Cordova 2.5 (WebKit) (#13255) + // All events should have a target; Cordova deviceready doesn't + if ( !event.target ) { + event.target = document; + } + + // Support: Safari 6.0+, Chrome<28 + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + special: { load: { // Prevent triggered image.load events from bubbling to window.load @@ -4812,14 +4593,8 @@ jQuery.event = { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== safeActiveElement() && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } + this.focus(); + return false; } }, delegateType: "focusin" @@ -4836,7 +4611,7 @@ jQuery.event = { click: { // For checkbox, fire native event so checked state will be right trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { this.click(); return false; } @@ -4884,26 +4659,11 @@ jQuery.event = { } }; -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === strundefined ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; +jQuery.removeEvent = function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } +}; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword @@ -4920,7 +4680,7 @@ jQuery.Event = function( src, props ) { // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && - // Support: IE < 9, Android < 4.0 + // Support: Android<4.0 src.returnValue === false ? returnTrue : returnFalse; @@ -4953,35 +4713,19 @@ jQuery.Event.prototype = { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { + if ( e && e.preventDefault ) { e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { + + if ( e && e.stopPropagation ) { e.stopPropagation(); } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; }, stopImmediatePropagation: function() { var e = this.originalEvent; @@ -4997,6 +4741,7 @@ jQuery.Event.prototype = { }; // Create mouseenter/leave events using mouseover/out and event-time checks +// Support: Chrome 15+ jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout", @@ -5025,112 +4770,7 @@ jQuery.each({ }; }); -// IE submit delegation -if ( !support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - +// Support: Firefox, Chrome, Safari // Create "bubbling" focus and blur events if ( !support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { @@ -5143,22 +4783,23 @@ if ( !support.focusinBubbles ) { jQuery.event.special[ fix ] = { setup: function() { var doc = this.ownerDocument || this, - attaches = jQuery._data( doc, fix ); + attaches = data_priv.access( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } - jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); + data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this, - attaches = jQuery._data( doc, fix ) - 1; + attaches = data_priv.access( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); - jQuery._removeData( doc, fix ); + data_priv.remove( doc, fix ); + } else { - jQuery._data( doc, fix, attaches ); + data_priv.access( doc, fix, attaches ); } } }; @@ -5168,7 +4809,7 @@ if ( !support.focusinBubbles ) { jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; + var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { @@ -5269,28 +4910,9 @@ jQuery.fn.extend({ }); -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, +var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, rtagName = /<([\w:]+)/, - rtbody = /<tbody/i, rhtml = /<|&#?\w+;/, rnoInnerhtml = /<(?:script|style|link)/i, // checked="checked" or checked @@ -5301,56 +4923,25 @@ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figca // We have to close these tags to support XHTML (#13200) wrapMap = { + + // Support: IE9 option: [ 1, "<select multiple='multiple'>", "</select>" ], - legend: [ 1, "<fieldset>", "</fieldset>" ], - area: [ 1, "<map>", "</map>" ], - param: [ 1, "<object>", "</object>" ], + thead: [ 1, "<table>", "</table>" ], + col: [ 2, "<table><colgroup>", "</colgroup></table>" ], tr: [ 2, "<table><tbody>", "</tbody></table>" ], - col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + _default: [ 0, "", "" ] + }; +// Support: IE9 wrapMap.optgroup = wrapMap.option; + wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -// Support: IE<8 +// Support: 1.x compatibility // Manipulating tables requires a tbody function manipulationTarget( elem, content ) { return jQuery.nodeName( elem, "table" ) && @@ -5363,118 +4954,86 @@ function manipulationTarget( elem, content ) { // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { - elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; return elem; } function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { - elem.type = match[1]; + elem.type = match[ 1 ]; } else { elem.removeAttribute("type"); } + return elem; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + data_priv.set( + elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) + ); } } function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + if ( dest.nodeType !== 1 ) { return; } - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; + // 1. Copy private data: events, handlers, etc. + if ( data_priv.hasData( src ) ) { + pdataOld = data_priv.access( src ); + pdataCur = data_priv.set( dest, pdataOld ); + events = pdataOld.events; - if ( events ) { - delete curData.handle; - curData.events = {}; + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } } } } - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); + // 2. Copy user data + if ( data_user.hasData( src ) ) { + udataOld = data_user.access( src ); + udataCur = jQuery.extend( {}, udataOld ); - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); + data_user.set( dest, udataCur ); } +} - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set +function getAll( context, tag ) { + var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : + context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : + []; - dest.defaultChecked = dest.checked = src.checked; + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], ret ) : + ret; +} - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields + // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } @@ -5482,31 +5041,20 @@ function fixCloneNodeIssues( src, dest ) { jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), inPage = jQuery.contains( elem.ownerDocument, elem ); - if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!support.noCloneEvent || !support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); } } @@ -5516,8 +5064,8 @@ jQuery.extend({ srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); } } else { cloneCopyEvent( elem, clone ); @@ -5530,22 +5078,16 @@ jQuery.extend({ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } - destElements = srcElements = node = null; - // Return the cloned set return clone; }, buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - + var elem, tmp, tag, wrap, contains, j, + fragment = context.createDocumentFragment(), nodes = [], - i = 0; + i = 0, + l = elems.length; for ( ; i < l; i++ ) { elem = elems[ i ]; @@ -5554,6 +5096,8 @@ jQuery.extend({ // Add nodes directly if ( jQuery.type( elem ) === "object" ) { + // Support: QtWebKit, PhantomJS + // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node @@ -5562,71 +5106,34 @@ jQuery.extend({ // Convert html into DOM nodes } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); + tmp = tmp || fragment.appendChild( context.createElement("div") ); // Deserialize a standard representation - tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase(); + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; + tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ]; // Descend through wrappers to the right content - j = wrap[0]; + j = wrap[ 0 ]; while ( j-- ) { tmp = tmp.lastChild; } - // Manually add leading whitespace removed by IE - if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted <tbody> from table fragments - if ( !support.tbody ) { - - // String was a <table>, *may* have spurious <tbody> - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare <thead> or <tfoot> - wrap[1] === "<table>" && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - + // Support: QtWebKit, PhantomJS + // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, tmp.childNodes ); - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; + // Remember the top-level container + tmp = fragment.firstChild; - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; } } } - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } + // Remove wrapper from fragment + fragment.textContent = ""; i = 0; while ( (elem = nodes[ i++ ]) ) { @@ -5640,7 +5147,7 @@ jQuery.extend({ contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); + tmp = getAll( fragment.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { @@ -5658,26 +5165,19 @@ jQuery.extend({ } } - tmp = null; - - return safe; + return fragment; }, - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - if ( acceptData || jQuery.acceptData( elem ) ) { + cleanData: function( elems ) { + var data, elem, type, key, + special = jQuery.event.special, + i = 0; - id = elem[ internalKey ]; - data = id && cache[ id ]; + for ( ; (elem = elems[ i ]) !== undefined; i++ ) { + if ( jQuery.acceptData( elem ) ) { + key = elem[ data_priv.expando ]; - if ( data ) { + if ( key && (data = data_priv.cache[ key ]) ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { @@ -5689,29 +5189,14 @@ jQuery.extend({ } } } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== strundefined ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - deletedIds.push( id ); + if ( data_priv.cache[ key ] ) { + // Discard any remaining `private` data + delete data_priv.cache[ key ]; } } } + // Discard any remaining `user` data + delete data_user.cache[ elem[ data_user.expando ] ]; } } }); @@ -5721,7 +5206,11 @@ jQuery.fn.extend({ return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + this.empty().each(function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + }); }, null, value, arguments.length ); }, @@ -5765,7 +5254,6 @@ jQuery.fn.extend({ i = 0; for ( ; (elem = elems[i]) != null; i++ ) { - if ( !keepData && elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem ) ); } @@ -5786,20 +5274,13 @@ jQuery.fn.extend({ i = 0; for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; + // Remove any remaining nodes + elem.textContent = ""; } } @@ -5821,24 +5302,21 @@ jQuery.fn.extend({ i = 0, l = this.length; - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) { + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { value = value.replace( rxhtmlTag, "<$1></$2>" ); try { - for (; i < l; i++ ) { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + // Remove element nodes and prevent memory leaks - elem = this[i] || {}; if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; @@ -5848,7 +5326,7 @@ jQuery.fn.extend({ elem = 0; // If using innerHTML throws an exception, use the fallback method - } catch(e) {} + } catch( e ) {} } if ( elem ) { @@ -5884,13 +5362,12 @@ jQuery.fn.extend({ // Flatten any nested arrays args = concat.apply( [], args ); - var first, node, hasScripts, - scripts, doc, fragment, + var fragment, first, scripts, hasScripts, node, doc, i = 0, l = this.length, set = this, iNoClone = l - 1, - value = args[0], + value = args[ 0 ], isFunction = jQuery.isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit @@ -5900,7 +5377,7 @@ jQuery.fn.extend({ return this.each(function( index ) { var self = set.eq( index ); if ( isFunction ) { - args[0] = value.call( this, index, self.html() ); + args[ 0 ] = value.call( this, index, self.html() ); } self.domManip( args, callback ); }); @@ -5928,11 +5405,13 @@ jQuery.fn.extend({ // Keep references to cloned scripts for later restoration if ( hasScripts ) { + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws jQuery.merge( scripts, getAll( node, "script" ) ); } } - callback.call( this[i], node, i ); + callback.call( this[ i ], node, i ); } if ( hasScripts ) { @@ -5945,7 +5424,7 @@ jQuery.fn.extend({ for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src ) { // Optional AJAX dependency, but won't run scripts if not present @@ -5953,14 +5432,11 @@ jQuery.fn.extend({ jQuery._evalUrl( node.src ); } } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); } } } } - - // Fix #11809: Avoid leaking memory - fragment = first = null; } } @@ -5977,16 +5453,17 @@ jQuery.each({ }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, - i = 0, ret = [], insert = jQuery( selector ), - last = insert.length - 1; + last = insert.length - 1, + i = 0; for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + // Support: QtWebKit + // .get() because push.apply(_, arraylike) throws push.apply( ret, elems.get() ); } @@ -6011,7 +5488,7 @@ function actualDisplay( name, doc ) { // getDefaultComputedStyle might be reliably used only on attached element display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - // Use of this method is a temporary fix (more like optmization) until something better comes along, + // Use of this method is a temporary fix (more like optimization) until something better comes along, // since it was removed from specification and supported only in FF style.display : jQuery.css( elem[ 0 ], "display" ); @@ -6040,7 +5517,7 @@ function defaultDisplay( nodeName ) { iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement ); // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse - doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document; + doc = iframe[ 0 ].contentDocument; // Support: IE doc.write(); @@ -6056,190 +5533,83 @@ function defaultDisplay( nodeName ) { return display; } - - -(function() { - var shrinkWrapBlocksVal; - - support.shrinkWrapBlocks = function() { - if ( shrinkWrapBlocksVal != null ) { - return shrinkWrapBlocksVal; - } - - // Will be changed later if needed. - shrinkWrapBlocksVal = false; - - // Minified: var b,c,d - var div, body, container; - - body = document.getElementsByTagName( "body" )[ 0 ]; - if ( !body || !body.style ) { - // Test fired too early or in an unsupported environment, exit. - return; - } - - // Setup - div = document.createElement( "div" ); - container = document.createElement( "div" ); - container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; - body.appendChild( container ).appendChild( div ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - if ( typeof div.style.zoom !== strundefined ) { - // Reset CSS: box-sizing; display; margin; border - div.style.cssText = - // Support: Firefox<29, Android 2.3 - // Vendor-prefix box-sizing - "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + - "box-sizing:content-box;display:block;margin:0;border:0;" + - "padding:1px;width:1px;zoom:1"; - div.appendChild( document.createElement( "div" ) ).style.width = "5px"; - shrinkWrapBlocksVal = div.offsetWidth !== 3; - } - - body.removeChild( container ); - - return shrinkWrapBlocksVal; - }; - -})(); var rmargin = (/^margin/); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); +var getStyles = function( elem ) { + // Support: IE<=11+, Firefox<=30+ (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + if ( elem.ownerDocument.defaultView.opener ) { + return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); + } - -var getStyles, curCSS, - rposition = /^(top|right|bottom|left)$/; - -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); + return window.getComputedStyle( elem, null ); }; - curCSS = function( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - style = elem.style; - - computed = computed || getStyles( elem ); - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined; - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + style = elem.style; - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + computed = computed || getStyles( elem ); - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - // Support: IE - // IE returns zIndex value as an integer. - return ret === undefined ? - ret : - ret + ""; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, computed ) { - var left, rs, rsLeft, ret, - style = elem.style; + // Support: IE9 + // getPropertyValue is only needed for .css('filter') (#12537) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + } - computed = computed || getStyles( elem ); - ret = computed ? computed[ name ] : undefined; + if ( computed ) { - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); } - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + // Support: iOS < 6 + // A tribute to the "awesome hack by Dean Edwards" + // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; } + } + return ret !== undefined ? // Support: IE // IE returns zIndex value as an integer. - return ret === undefined ? - ret : - ret + "" || "auto"; - }; + ret + "" : + ret; } - - function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. return { get: function() { - var condition = conditionFn(); - - if ( condition == null ) { - // The test was not ready at this point; screw the hook this time - // but check again when needed next time. - return; - } - - if ( condition ) { - // Hook not needed (or it's not possible to use it due to missing dependency), - // remove it. - // Since there are no other hooks for marginRight, remove the whole object. + if ( conditionFn() ) { + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. delete this.get; return; } // Hook needed; redefine it so that the support test is not executed again. - return (this.get = hookFn).apply( this, arguments ); } }; @@ -6247,144 +5617,91 @@ function addGetHookIf( conditionFn, hookFn ) { (function() { - // Minified: var b,c,d,e,f,g, h,i - var div, style, a, pixelPositionVal, boxSizingReliableVal, - reliableHiddenOffsetsVal, reliableMarginRightVal; - - // Setup - div = document.createElement( "div" ); - div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; - a = div.getElementsByTagName( "a" )[ 0 ]; - style = a && a.style; - - // Finish early in limited (non-browser) environments - if ( !style ) { + var pixelPositionVal, boxSizingReliableVal, + docElem = document.documentElement, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + if ( !div.style ) { return; } - style.cssText = "float:left;opacity:.5"; - - // Support: IE<9 - // Make sure that element opacity exists (as opposed to filter) - support.opacity = style.opacity === "0.5"; - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - support.cssFloat = !!style.cssFloat; - + // Support: IE9-11+ + // Style of cloned element affects source element cloned (#8908) div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; - // Support: Firefox<29, Android 2.3 - // Vendor-prefix box-sizing - support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" || - style.WebkitBoxSizing === ""; - - jQuery.extend(support, { - reliableHiddenOffsets: function() { - if ( reliableHiddenOffsetsVal == null ) { - computeStyleTests(); - } - return reliableHiddenOffsetsVal; - }, - - boxSizingReliable: function() { - if ( boxSizingReliableVal == null ) { - computeStyleTests(); - } - return boxSizingReliableVal; - }, - - pixelPosition: function() { - if ( pixelPositionVal == null ) { - computeStyleTests(); - } - return pixelPositionVal; - }, - - // Support: Android 2.3 - reliableMarginRight: function() { - if ( reliableMarginRightVal == null ) { - computeStyleTests(); - } - return reliableMarginRightVal; - } - }); - - function computeStyleTests() { - // Minified: var b,c,d,j - var div, body, container, contents; - - body = document.getElementsByTagName( "body" )[ 0 ]; - if ( !body || !body.style ) { - // Test fired too early or in an unsupported environment, exit. - return; - } - - // Setup - div = document.createElement( "div" ); - container = document.createElement( "div" ); - container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; - body.appendChild( container ).appendChild( div ); + container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" + + "position:absolute"; + container.appendChild( div ); + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computePixelPositionAndBoxSizingReliable() { div.style.cssText = // Support: Firefox<29, Android 2.3 // Vendor-prefix box-sizing "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + "border:1px;padding:1px;width:4px;position:absolute"; + div.innerHTML = ""; + docElem.appendChild( container ); - // Support: IE<9 - // Assume reasonable values in the absence of getComputedStyle - pixelPositionVal = boxSizingReliableVal = false; - reliableMarginRightVal = true; - - // Check for getComputedStyle so that this code is not run in IE<9. - if ( window.getComputedStyle ) { - pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - boxSizingReliableVal = - ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Support: Android 2.3 - // Div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container (#3333) - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - contents = div.appendChild( document.createElement( "div" ) ); - - // Reset CSS: box-sizing; display; margin; border; padding - contents.style.cssText = div.style.cssText = - // Support: Firefox<29, Android 2.3 - // Vendor-prefix box-sizing - "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + - "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; - contents.style.marginRight = contents.style.width = "0"; - div.style.width = "1px"; - - reliableMarginRightVal = - !parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight ); - } - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; - contents = div.getElementsByTagName( "td" ); - contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none"; - reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; - if ( reliableHiddenOffsetsVal ) { - contents[ 0 ].style.display = ""; - contents[ 1 ].style.display = "none"; - reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; - } - - body.removeChild( container ); + var divStyle = window.getComputedStyle( div, null ); + pixelPositionVal = divStyle.top !== "1%"; + boxSizingReliableVal = divStyle.width === "4px"; + + docElem.removeChild( container ); } + // Support: node.js jsdom + // Don't assume that getComputedStyle is a property of the global object + if ( window.getComputedStyle ) { + jQuery.extend( support, { + pixelPosition: function() { + + // This test is executed only once but we still do memoizing + // since we can use the boxSizingReliable pre-computing. + // No need to check if the test was already performed, though. + computePixelPositionAndBoxSizingReliable(); + return pixelPositionVal; + }, + boxSizingReliable: function() { + if ( boxSizingReliableVal == null ) { + computePixelPositionAndBoxSizingReliable(); + } + return boxSizingReliableVal; + }, + reliableMarginRight: function() { + + // Support: Android 2.3 + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // This support function is only executed once so no memoizing is needed. + var ret, + marginDiv = div.appendChild( document.createElement( "div" ) ); + + // Reset CSS: box-sizing; display; margin; border; padding + marginDiv.style.cssText = div.style.cssText = + // Support: Firefox<29, Android 2.3 + // Vendor-prefix box-sizing + "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + + "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + docElem.appendChild( container ); + + ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight ); + + docElem.removeChild( container ); + div.removeChild( marginDiv ); + + return ret; + } + }); + } })(); @@ -6411,11 +5728,8 @@ jQuery.swap = function( elem, options, callback, args ) { var - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ), rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ), @@ -6428,17 +5742,16 @@ var cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property +// Return a css property mapped to a potentially vendor prefixed property function vendorPropName( style, name ) { - // shortcut for names that are not vendor prefixed + // Shortcut for names that are not vendor prefixed if ( name in style ) { return name; } - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), + // Check for vendor prefixed names + var capName = name[0].toUpperCase() + name.slice(1), origName = name, i = cssPrefixes.length; @@ -6452,57 +5765,6 @@ function vendorPropName( style, name ) { return origName; } -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - values[ index ] = jQuery._data( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) ); - } - } else { - hidden = isHidden( elem ); - - if ( display && display !== "none" || !hidden ) { - jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - function setPositiveNumber( elem, value, subtract ) { var matches = rnumsplit.exec( value ); return matches ? @@ -6521,7 +5783,7 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { val = 0; for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it + // Both box models exclude margin, so add it if we want it if ( extra === "margin" ) { val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); } @@ -6532,15 +5794,15 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } - // at this point, extra isn't border nor margin, so remove border + // At this point, extra isn't border nor margin, so remove border if ( extra !== "margin" ) { val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } else { - // at this point, extra isn't content, so add padding + // At this point, extra isn't content, so add padding val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - // at this point, extra isn't content nor padding, so add border + // At this point, extra isn't content nor padding, so add border if ( extra !== "padding" ) { val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } @@ -6556,9 +5818,9 @@ function getWidthOrHeight( elem, name, extra ) { var valueIsBorderBox = true, val = name === "width" ? elem.offsetWidth : elem.offsetHeight, styles = getStyles( elem ), - isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - // some non-html elements return undefined for offsetWidth, so check for null/undefined + // Some non-html elements return undefined for offsetWidth, so check for null/undefined // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 if ( val <= 0 || val == null ) { @@ -6573,15 +5835,16 @@ function getWidthOrHeight( elem, name, extra ) { return val; } - // we need the check for style in case a browser which returns unreliable values + // Check for style in case a browser which returns unreliable values // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] ); + valueIsBorderBox = isBorderBox && + ( support.boxSizingReliable() || val === elem.style[ name ] ); // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; } - // use the active box-sizing model to add/subtract irrelevant styles + // Use the active box-sizing model to add/subtract irrelevant styles return ( val + augmentWidthOrHeight( elem, @@ -6593,13 +5856,66 @@ function getWidthOrHeight( elem, name, extra ) { ) + "px"; } +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = data_priv.get( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) ); + } + } else { + hidden = isHidden( elem ); + + if ( display !== "none" || !hidden ) { + data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + jQuery.extend({ + // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { + // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; @@ -6627,12 +5943,12 @@ jQuery.extend({ // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { - // normalize float css property - "float": support.cssFloat ? "cssFloat" : "styleFloat" + "float": "cssFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; @@ -6645,45 +5961,39 @@ jQuery.extend({ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - // gets hook for the prefixed version - // followed by the unprefixed version + // Gets hook for the prefixed version, then unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; - // convert relative number strings (+= or -=) to relative numbers. #7345 + // Convert "+=" or "-=" to relative numbers (#7345) if ( type === "string" && (ret = rrelNum.exec( value )) ) { value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); // Fixes bug #9237 type = "number"; } - // Make sure that null and NaN values aren't set. See: #7116 + // Make sure that null and NaN values aren't set (#7116) if ( value == null || value !== value ) { return; } - // If a number was passed in, add 'px' to the (except for certain CSS properties) + // If a number, add 'px' to the (except for certain CSS properties) if ( type === "number" && !jQuery.cssNumber[ origName ] ) { value += "px"; } - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + // Support: IE9-11+ + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Support: IE - // Swallow errors from 'invalid' CSS values (#5509) - try { - style[ name ] = value; - } catch(e) {} + style[ name ] = value; } } else { @@ -6698,14 +6008,13 @@ jQuery.extend({ }, css: function( elem, name, extra, styles ) { - var num, val, hooks, + var val, num, hooks, origName = jQuery.camelCase( name ); // Make sure that we're working with the right name name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - // gets hook for the prefixed version - // followed by the unprefixed version + // Try prefixed name followed by the unprefixed name hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there @@ -6718,12 +6027,12 @@ jQuery.extend({ val = curCSS( elem, name, styles ); } - //convert "normal" to computed value + // Convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } - // Return, converting to number if forced or a qualifier was provided and val looks numeric + // Make numeric if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; @@ -6736,8 +6045,9 @@ jQuery.each([ "height", "width" ], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { if ( computed ) { - // certain elements can have dimension info if we invisibly show them - // however, it must have a current display style that would benefit from this + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ? jQuery.swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); @@ -6753,7 +6063,7 @@ jQuery.each([ "height", "width" ], function( i, name ) { elem, name, extra, - support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", styles ) : 0 ); @@ -6761,55 +6071,10 @@ jQuery.each([ "height", "width" ], function( i, name ) { }; }); -if ( !support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - // if value === "", then remove inline opacity #12685 - if ( ( value >= 1 || value === "" ) && - jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there is no filter style applied in a css rule or unset inline opacity, we are done - if ( value === "" || currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - +// Support: Android 2.3 jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight, function( elem, computed ) { if ( computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block return jQuery.swap( elem, { "display": "inline-block" }, curCSS, [ elem, "marginRight" ] ); } @@ -6827,7 +6092,7 @@ jQuery.each({ var i = 0, expanded = {}, - // assumes a single number if not a string + // Assumes a single number if not a string parts = typeof value === "string" ? value.split(" ") : [ value ]; for ( ; i < 4; i++ ) { @@ -6950,17 +6215,18 @@ Tween.propHooks = { return tween.elem[ tween.prop ]; } - // passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { @@ -6972,9 +6238,8 @@ Tween.propHooks = { } }; -// Support: IE <=9 +// Support: IE9 // Panic based approach to setting things on disconnected nodes - Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { @@ -7030,16 +6295,16 @@ var start = +target || 1; do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below + // If previous iteration zeroed out, double until we get *something*. + // Use string for doubling so we don't accidentally see scale as unchanged below scale = scale || ".5"; // Adjust and apply start = start / scale; jQuery.style( tween.elem, prop, start + unit ); - // Update scale, tolerating zero or NaN from tween.cur() - // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + // Update scale, tolerating zero or NaN from tween.cur(), + // break the loop if scale is unchanged or perfect, or if we've just had enough } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); } @@ -7068,11 +6333,11 @@ function createFxNow() { // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, - attrs = { height: type }, - i = 0; + i = 0, + attrs = { height: type }; - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4 ; i += 2 - includeWidth ) { which = cssExpand[ i ]; @@ -7094,7 +6359,7 @@ function createTween( value, prop, animation ) { for ( ; index < length; index++ ) { if ( (tween = collection[ index ].call( animation, prop, value )) ) { - // we're done with this property + // We're done with this property return tween; } } @@ -7107,9 +6372,9 @@ function defaultPrefilter( elem, props, opts ) { orig = {}, style = elem.style, hidden = elem.nodeType && isHidden( elem ), - dataShow = jQuery._data( elem, "fxshow" ); + dataShow = data_priv.get( elem, "fxshow" ); - // handle queue: false promises + // Handle queue: false promises if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { @@ -7124,8 +6389,7 @@ function defaultPrefilter( elem, props, opts ) { hooks.unqueued++; anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes + // Ensure the complete handler is called before this completes anim.always(function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { @@ -7135,10 +6399,10 @@ function defaultPrefilter( elem, props, opts ) { }); } - // height/width overflow pass + // Height/width overflow pass if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not + // Record all 3 overflow attributes because IE9-10 do not // change the overflow attribute when overflowX and // overflowY are set to the same value opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; @@ -7149,29 +6413,20 @@ function defaultPrefilter( elem, props, opts ) { // Test default display if display is currently "none" checkDisplay = display === "none" ? - jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; + data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - } else { - style.zoom = 1; - } + style.display = "inline-block"; } } if ( opts.overflow ) { style.overflow = "hidden"; - if ( !support.shrinkWrapBlocks() ) { - anim.always(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } + anim.always(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); } // show/hide pass @@ -7203,10 +6458,10 @@ function defaultPrefilter( elem, props, opts ) { hidden = dataShow.hidden; } } else { - dataShow = jQuery._data( elem, "fxshow", {} ); + dataShow = data_priv.access( elem, "fxshow", {} ); } - // store state if its toggle - enables .stop().toggle() to "reverse" + // Store state if its toggle - enables .stop().toggle() to "reverse" if ( toggle ) { dataShow.hidden = !hidden; } @@ -7219,7 +6474,8 @@ function defaultPrefilter( elem, props, opts ) { } anim.done(function() { var prop; - jQuery._removeData( elem, "fxshow" ); + + data_priv.remove( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } @@ -7265,8 +6521,8 @@ function propFilter( props, specialEasing ) { value = hooks.expand( value ); delete props[ name ]; - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; @@ -7285,7 +6541,7 @@ function Animation( elem, properties, options ) { index = 0, length = animationPrefilters.length, deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector + // Don't match elem in the :animated selector delete tick.elem; }), tick = function() { @@ -7294,7 +6550,8 @@ function Animation( elem, properties, options ) { } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + // Support: Android 2.3 + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, @@ -7330,7 +6587,7 @@ function Animation( elem, properties, options ) { }, stop: function( gotoEnd ) { var index = 0, - // if we are going to the end, we want to run all the tweens + // If we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { @@ -7341,8 +6598,7 @@ function Animation( elem, properties, options ) { animation.tweens[ index ].run( 1 ); } - // resolve when we played the last frame - // otherwise, reject + // Resolve when we played the last frame; otherwise, reject if ( gotoEnd ) { deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { @@ -7384,6 +6640,7 @@ function Animation( elem, properties, options ) { } jQuery.Animation = jQuery.extend( Animation, { + tweener: function( props, callback ) { if ( jQuery.isFunction( props ) ) { callback = props; @@ -7423,7 +6680,7 @@ jQuery.speed = function( speed, easing, fn ) { opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - // normalize opt.queue - true/undefined/null -> "fx" + // Normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } @@ -7447,10 +6704,10 @@ jQuery.speed = function( speed, easing, fn ) { jQuery.fn.extend({ fadeTo: function( speed, to, easing, callback ) { - // show any hidden elements after setting opacity to 0 + // Show any hidden elements after setting opacity to 0 return this.filter( isHidden ).css( "opacity", 0 ).show() - // animate to the value specified + // Animate to the value specified .end().animate({ opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { @@ -7461,7 +6718,7 @@ jQuery.fn.extend({ var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately - if ( empty || jQuery._data( this, "finish" ) ) { + if ( empty || data_priv.get( this, "finish" ) ) { anim.stop( true ); } }; @@ -7491,7 +6748,7 @@ jQuery.fn.extend({ var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, - data = jQuery._data( this ); + data = data_priv.get( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { @@ -7513,9 +6770,9 @@ jQuery.fn.extend({ } } - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } @@ -7527,23 +6784,23 @@ jQuery.fn.extend({ } return this.each(function() { var index, - data = jQuery._data( this ), + data = data_priv.get( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; - // enable finishing flag on private data + // Enable finishing flag on private data data.finish = true; - // empty the queue first + // Empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.stop ) { hooks.stop.call( this, true ); } - // look for any active animations, and finish them + // Look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); @@ -7551,14 +6808,14 @@ jQuery.fn.extend({ } } - // look for any animations in the old queue and finish them + // Look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } - // turn off finishing flag + // Turn off finishing flag delete data.finish; }); } @@ -7590,8 +6847,8 @@ jQuery.each({ jQuery.timers = []; jQuery.fx.tick = function() { var timer, - timers = jQuery.timers, - i = 0; + i = 0, + timers = jQuery.timers; fxNow = jQuery.now(); @@ -7655,240 +6912,36 @@ jQuery.fn.delay = function( time, type ) { (function() { - // Minified: var a,b,c,d,e - var input, div, select, a, opt; - - // Setup - div = document.createElement( "div" ); - div.setAttribute( "className", "t" ); - div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; - a = div.getElementsByTagName("a")[ 0 ]; - - // First batch of tests. - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px"; - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - support.getSetAttribute = div.className !== "t"; - - // Get the style information from getAttribute - // (IE uses .cssText instead) - support.style = /top/.test( a.getAttribute("style") ); + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - support.hrefNormalized = a.getAttribute("href") === "/a"; + input.type = "checkbox"; - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - support.checkOn = !!input.value; + // Support: iOS<=5.1, Android<=4.2+ + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + // Support: IE<=11+ + // Must access selectedIndex to make default options select support.optSelected = opt.selected; - // Tests for enctype support on a form (#6743) - support.enctype = !!document.createElement("form").enctype; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) + // Support: Android<=2.3 + // Options inside disabled selects are incorrectly marked as disabled select.disabled = true; support.optDisabled = !opt.disabled; - // Support: IE8 only - // Check if we can trust getAttribute("value") + // Support: IE<=11+ + // An input loses its value after becoming a radio input = document.createElement( "input" ); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio input.value = "t"; - input.setAttribute( "type", "radio" ); + input.type = "radio"; support.radioValue = input.value === "t"; })(); -var rreturn = /\r/g; - -jQuery.fn.extend({ - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - // Support: IE10-11+ - // option.text throws exceptions (#14686, #14858) - jQuery.trim( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) { - - // Support: IE6 - // When new option element is added to select box we need to - // force reflow of newly added node in order to workaround delay - // of initialization properties - try { - option.selected = optionSet = true; - - } catch ( _ ) { - - // Will be executed only in IE6 - option.scrollHeight; - } - - } else { - option.selected = false; - } - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - - return options; - } - } - } -}); - -// Radios and checkboxes getter/setter -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - // Support: Webkit - // "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - }; - } -}); - - - - var nodeHook, boolHook, - attrHandle = jQuery.expr.attrHandle, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = support.getSetAttribute, - getSetInput = support.input; + attrHandle = jQuery.expr.attrHandle; jQuery.fn.extend({ attr: function( name, value ) { @@ -7963,21 +7016,10 @@ jQuery.extend({ // Boolean attributes get special treatment (#10870) if ( jQuery.expr.match.bool.test( name ) ) { // Set corresponding property to false - if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - elem[ propName ] = false; - // Support: IE<9 - // Also clear defaultChecked/defaultSelected (if appropriate) - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); + elem[ propName ] = false; } - elem.removeAttribute( getSetAttribute ? name : propName ); + elem.removeAttribute( name ); } } }, @@ -7985,9 +7027,8 @@ jQuery.extend({ attrHooks: { type: { set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation + if ( !support.radioValue && value === "radio" && + jQuery.nodeName( elem, "input" ) ) { var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { @@ -8000,155 +7041,40 @@ jQuery.extend({ } }); -// Hook for boolean attributes +// Hooks for boolean attributes boolHook = { set: function( elem, value, name ) { if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + elem.setAttribute( name, name ); } - return name; } }; - -// Retrieve booleans specially jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? - function( elem, name, isXML ) { - var ret, handle; - if ( !isXML ) { - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ name ]; - attrHandle[ name ] = ret; - ret = getter( elem, name, isXML ) != null ? - name.toLowerCase() : - null; - attrHandle[ name ] = handle; - } - return ret; - } : - function( elem, name, isXML ) { - if ( !isXML ) { - return elem[ jQuery.camelCase( "default-" + name ) ] ? - name.toLowerCase() : - null; - } - }; -}); - -// fix oldIE attroperties -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = { - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - if ( name === "value" || value === elem.getAttribute( name ) ) { - return value; - } - } - }; - - // Some attributes are constructed with empty-string values when not defined - attrHandle.id = attrHandle.name = attrHandle.coords = - function( elem, name, isXML ) { - var ret; - if ( !isXML ) { - return (ret = elem.getAttributeNode( name )) && ret.value !== "" ? - ret.value : - null; - } - }; - - // Fixing value retrieval on a button requires this module - jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - if ( ret && ret.specified ) { - return ret.value; - } - }, - set: nodeHook.set - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }; - }); -} - -if ( !support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle; + if ( !isXML ) { + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ name ]; + attrHandle[ name ] = ret; + ret = getter( elem, name, isXML ) != null ? + name.toLowerCase() : + null; + attrHandle[ name ] = handle; } + return ret; }; -} +}); -var rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i; +var rfocusable = /^(?:input|select|textarea|button)$/i; jQuery.fn.extend({ prop: function( name, value ) { @@ -8156,13 +7082,8 @@ jQuery.fn.extend({ }, removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} + delete this[ jQuery.propFix[ name ] || name ]; }); } }); @@ -8177,7 +7098,7 @@ jQuery.extend({ var ret, hooks, notxml, nType = elem.nodeType; - // don't get/set properties on text, comment and attribute nodes + // Don't get/set properties on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } @@ -8205,49 +7126,20 @@ jQuery.extend({ propHooks: { tabIndex: { get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - return tabindex ? - parseInt( tabindex, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - -1; + return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ? + elem.tabIndex : + -1; } } } }); -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !support.hrefNormalized ) { - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -// Support: Safari, IE9+ -// mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; } return null; } @@ -8269,11 +7161,6 @@ jQuery.each([ jQuery.propFix[ this.toLowerCase() ] = this; }); -// IE6/7 call enctype encoding -if ( !support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - @@ -8282,9 +7169,9 @@ var rclass = /[\t\r\n\f]/g; jQuery.fn.extend({ addClass: function( value ) { var classes, elem, cur, clazz, j, finalValue, + proceed = typeof value === "string" && value, i = 0, - len = this.length, - proceed = typeof value === "string" && value; + len = this.length; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { @@ -8325,9 +7212,9 @@ jQuery.fn.extend({ removeClass: function( value ) { var classes, elem, cur, clazz, j, finalValue, + proceed = arguments.length === 0 || typeof value === "string" && value, i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; + len = this.length; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { @@ -8354,7 +7241,7 @@ jQuery.fn.extend({ } } - // only assign if different to avoid unneeded rendering. + // Only assign if different to avoid unneeded rendering. finalValue = value ? jQuery.trim( cur ) : ""; if ( elem.className !== finalValue ) { elem.className = finalValue; @@ -8381,14 +7268,14 @@ jQuery.fn.extend({ return this.each(function() { if ( type === "string" ) { - // toggle individual class names + // Toggle individual class names var className, i = 0, self = jQuery( this ), classNames = value.match( rnotwhite ) || []; while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list + // Check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { @@ -8400,14 +7287,14 @@ jQuery.fn.extend({ } else if ( type === strundefined || type === "boolean" ) { if ( this.className ) { // store className if set - jQuery._data( this, "__className__", this.className ); + data_priv.set( this, "__className__", this.className ); } - // If the element has a class name or if we're passed "false", + // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || ""; } }); }, @@ -8429,6 +7316,163 @@ jQuery.fn.extend({ +var rreturn = /\r/g; + +jQuery.fn.extend({ + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // Handle most common string cases + ret.replace(rreturn, "") : + // Handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + // Support: IE10-11+ + // option.text throws exceptions (#14686, #14858) + jQuery.trim( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // IE6-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) { + optionSet = true; + } + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +}); + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); + + + + // Return jQuery for attributes-only inclusion @@ -8472,48 +7516,10 @@ var rquery = (/\?/); -var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g; - +// Support: Android 2.3 +// Workaround failure to string-cast null input jQuery.parseJSON = function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - // Support: Android 2.3 - // Workaround failure to string-cast null input - return window.JSON.parse( data + "" ); - } - - var requireNonComma, - depth = null, - str = jQuery.trim( data + "" ); - - // Guard against invalid (and possibly dangerous) input by ensuring that nothing remains - // after removing valid tokens - return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) { - - // Force termination if we see a misplaced comma - if ( requireNonComma && comma ) { - depth = 0; - } - - // Perform no more replacements after returning to outermost depth - if ( depth === 0 ) { - return token; - } - - // Commas must not follow "[", "{", or "," - requireNonComma = open || comma; - - // Determine new depth - // array/object open ("[" or "{"): depth += true - false (increment) - // array/object close ("]" or "}"): depth += false - true (decrement) - // other cases ("," or primitive): depth += true - true (numeric cast) - depth += !close - !open; - - // Remove this token - return ""; - }) ) ? - ( Function( "return " + str ) )() : - jQuery.error( "Invalid JSON: " + data ); + return JSON.parse( data + "" ); }; @@ -8523,19 +7529,16 @@ jQuery.parseXML = function( data ) { if ( !data || typeof data !== "string" ) { return null; } + + // Support: IE9 try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data, "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { + tmp = new DOMParser(); + xml = tmp.parseFromString( data, "text/xml" ); + } catch ( e ) { xml = undefined; } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; @@ -8543,13 +7546,9 @@ jQuery.parseXML = function( data ) { var - // Document location - ajaxLocParts, - ajaxLocation, - rhash = /#.*$/, rts = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, @@ -8575,22 +7574,13 @@ var transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat("*"); + allTypes = "*/".concat( "*" ), -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} + // Document location + ajaxLocation = window.location.href, -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + // Segment location into parts + ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { @@ -8611,7 +7601,7 @@ function addToPrefiltersOrTransports( structure ) { // For each dataType in the dataTypeExpression while ( (dataType = dataTypes[i++]) ) { // Prepend if requested - if ( dataType.charAt( 0 ) === "+" ) { + if ( dataType[0] === "+" ) { dataType = dataType.slice( 1 ) || "*"; (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); @@ -8653,7 +7643,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { - var deep, key, + var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { @@ -8673,7 +7663,8 @@ function ajaxExtend( target, src ) { * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { - var firstDataType, ct, finalDataType, type, + + var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; @@ -8759,7 +7750,7 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) { if ( current ) { - // There's only work to do if current dataType is non-auto + // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; @@ -8922,23 +7913,20 @@ jQuery.extend({ // Force options to be an object options = options || {}; - var // Cross-domain detection vars - parts, - // Loop variable - i, + var transport, // URL without anti-cache param cacheURL, - // Response headers as string + // Response headers responseHeadersString, + responseHeaders, // timeout handle timeoutTimer, - + // Cross-domain detection vars + parts, // To know if global events are to be dispatched fireGlobals, - - transport, - // Response headers - responseHeaders, + // Loop variable + i, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context @@ -9035,10 +8023,11 @@ jQuery.extend({ jqXHR.error = jqXHR.fail; // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // Add protocol if not provided (prefilters might expect it) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available - s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ) + .replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; @@ -9070,7 +8059,8 @@ jQuery.extend({ } // We can fire global events as of now if asked to - fireGlobals = s.global; + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { @@ -9143,7 +8133,7 @@ jQuery.extend({ return jqXHR.abort(); } - // aborting is no longer a cancellation + // Aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds @@ -9255,8 +8245,7 @@ jQuery.extend({ isSuccess = !error; } } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts + // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; @@ -9312,7 +8301,7 @@ jQuery.extend({ jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted + // Shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; @@ -9329,13 +8318,6 @@ jQuery.each( [ "get", "post" ], function( i, method ) { }; }); -// Attach a bunch of functions for handling common AJAX events -jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { - jQuery.fn[ type ] = function( fn ) { - return this.on( type, fn ); - }; -}); - jQuery._evalUrl = function( url ) { return jQuery.ajax({ @@ -9351,25 +8333,28 @@ jQuery._evalUrl = function( url ) { jQuery.fn.extend({ wrapAll: function( html ) { + var wrap; + if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); + return this.each(function( i ) { + jQuery( this ).wrapAll( html.call(this, i) ); }); } - if ( this[0] ) { + if ( this[ 0 ] ) { + // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); } wrap.map(function() { var elem = this; - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; } return elem; @@ -9381,8 +8366,8 @@ jQuery.fn.extend({ wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); + return this.each(function( i ) { + jQuery( this ).wrapInner( html.call(this, i) ); }); } @@ -9402,7 +8387,7 @@ jQuery.fn.extend({ wrap: function( html ) { var isFunction = jQuery.isFunction( html ); - return this.each(function(i) { + return this.each(function( i ) { jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); }); }, @@ -9420,11 +8405,8 @@ jQuery.fn.extend({ jQuery.expr.filters.hidden = function( elem ) { // Support: Opera <= 12.12 // Opera reports offsetWidths and offsetHeights less than zero on some elements - return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || - (!support.reliableHiddenOffsets() && - ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); + return elem.offsetWidth <= 0 && elem.offsetHeight <= 0; }; - jQuery.expr.filters.visible = function( elem ) { return !jQuery.expr.filters.hidden( elem ); }; @@ -9513,7 +8495,8 @@ jQuery.fn.extend({ }) .filter(function() { var type = this.type; - // Use .is(":disabled") so that fieldset[disabled] works + + // Use .is( ":disabled" ) so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); @@ -9533,194 +8516,134 @@ jQuery.fn.extend({ }); -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ? - // Support: IE6+ - function() { - - // XHR cannot access local files, always use ActiveX for that case - return !this.isLocal && - - // Support: IE7-8 - // oldIE XHR does not support non-RFC2616 methods (#13240) - // See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx - // and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9 - // Although this check for six methods instead of eight - // since IE also does not support "trace" and "connect" - /^(get|post|head|put|delete|options)$/i.test( this.type ) && - - createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; +jQuery.ajaxSettings.xhr = function() { + try { + return new XMLHttpRequest(); + } catch( e ) {} +}; var xhrId = 0, xhrCallbacks = {}, + xhrSuccessStatus = { + // file protocol always yields status code 0, assume 200 + 0: 200, + // Support: IE9 + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, xhrSupported = jQuery.ajaxSettings.xhr(); -// Support: IE<10 +// Support: IE9 // Open requests must be manually aborted on unload (#5280) -if ( window.ActiveXObject ) { - jQuery( window ).on( "unload", function() { +// See https://support.microsoft.com/kb/2856746 for more info +if ( window.attachEvent ) { + window.attachEvent( "onunload", function() { for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( undefined, true ); + xhrCallbacks[ key ](); } }); } -// Determine support properties support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -xhrSupported = support.ajax = !!xhrSupported; - -// Create transport if the browser can provide an xhr -if ( xhrSupported ) { - - jQuery.ajaxTransport(function( options ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !options.crossDomain || support.cors ) { +support.ajax = xhrSupported = !!xhrSupported; - var callback; +jQuery.ajaxTransport(function( options ) { + var callback; - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(), - id = ++xhrId; - - // Open the socket - xhr.open( options.type, options.url, options.async, options.username, options.password ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(), + id = ++xhrId; - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } + xhr.open( options.type, options.url, options.async, options.username, options.password ); - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers["X-Requested-With"] ) { - headers["X-Requested-With"] = "XMLHttpRequest"; + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; } + } - // Set headers - for ( i in headers ) { - // Support: IE<9 - // IE's ActiveXObject throws a 'Type Mismatch' exception when setting - // request header to a null-value. - // - // To keep consistent with other XHR implementations, cast the value - // to string and ignore `undefined`. - if ( headers[ i ] !== undefined ) { - xhr.setRequestHeader( i, headers[ i ] + "" ); - } - } + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( options.hasContent && options.data ) || null ); + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers["X-Requested-With"] ) { + headers["X-Requested-With"] = "XMLHttpRequest"; + } - // Listener - callback = function( _, isAbort ) { - var status, statusText, responses; + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - // Clean up + // Callback + callback = function( type ) { + return function() { + if ( callback ) { delete xhrCallbacks[ id ]; - callback = undefined; - xhr.onreadystatechange = jQuery.noop; - - // Abort manually if needed - if ( isAbort ) { - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } + callback = xhr.onload = xhr.onerror = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + complete( + // file: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); } else { - responses = {}; - status = xhr.status; - - // Support: IE<10 - // Accessing binary-data responseText throws an exception - // (#11426) - if ( typeof xhr.responseText === "string" ) { - responses.text = xhr.responseText; - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && options.isLocal && !options.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + // Support: IE9 + // Accessing binary-data responseText throws an exception + // (#11426) + typeof xhr.responseText === "string" ? { + text: xhr.responseText + } : undefined, + xhr.getAllResponseHeaders() + ); } } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, xhr.getAllResponseHeaders() ); - } }; + }; - if ( !options.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback ); - } else { - // Add to the list of active xhr callbacks - xhr.onreadystatechange = xhrCallbacks[ id ] = callback; - } - }, + // Listen to events + xhr.onload = callback(); + xhr.onerror = callback("error"); - abort: function() { + // Create the abort callback + callback = xhrCallbacks[ id ] = callback("abort"); + + try { + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + // #14683: Only rethrow if this hasn't been notified as an error yet if ( callback ) { - callback( undefined, true ); + throw e; } } - }; - } - }); -} - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} + }, -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +}); @@ -9741,71 +8664,42 @@ jQuery.ajaxSetup({ } }); -// Handle cache's special case and global +// Handle cache's special case and crossDomain jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; - s.global = false; } }); // Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - +jQuery.ajaxTransport( "script", function( s ) { // This transport only deals with cross domain requests if ( s.crossDomain ) { - - var script, - head = document.head || jQuery("head")[0] || document.documentElement; - + var script, callback; return { - - send: function( _, callback ) { - - script = document.createElement("script"); - - script.async = true; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( script.parentNode ) { - script.parentNode.removeChild( script ); - } - - // Dereference the script - script = null; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); + send: function( _, complete ) { + script = jQuery("<script>").prop({ + async: true, + charset: s.scriptCharset, + src: s.url + }).on( + "load error", + callback = function( evt ) { + script.remove(); + callback = null; + if ( evt ) { + complete( evt.type === "error" ? 404 : 200, evt.type ); } } - }; - - // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending - // Use native DOM manipulation to avoid our domManip AJAX trickery - head.insertBefore( script, head.firstChild ); + ); + document.head.appendChild( script[ 0 ] ); }, - abort: function() { - if ( script ) { - script.onload( undefined, true ); + if ( callback ) { + callback(); } } }; @@ -9941,12 +8835,12 @@ jQuery.fn.load = function( url, params, callback ) { return _load.apply( this, arguments ); } - var selector, response, type, + var selector, type, response, self = this, off = url.indexOf(" "); if ( off >= 0 ) { - selector = jQuery.trim( url.slice( off, url.length ) ); + selector = jQuery.trim( url.slice( off ) ); url = url.slice( 0, off ); } @@ -9996,6 +8890,16 @@ jQuery.fn.load = function( url, params, callback ) { +// Attach a bunch of functions for handling common AJAX events +jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { + jQuery.fn[ type ] = function( fn ) { + return this.on( type, fn ); + }; +}); + + + + jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; @@ -10005,18 +8909,13 @@ jQuery.expr.filters.animated = function( elem ) { - var docElem = window.document.documentElement; /** * Gets a window from an element */ function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; + return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView; } jQuery.offset = { @@ -10026,7 +8925,7 @@ jQuery.offset = { curElem = jQuery( elem ), props = {}; - // set position first, in-case top/left are set even on static elem + // Set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } @@ -10035,13 +8934,15 @@ jQuery.offset = { curCSSTop = jQuery.css( elem, "top" ); curCSSLeft = jQuery.css( elem, "left" ); calculatePosition = ( position === "absolute" || position === "fixed" ) && - jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1; + ( curCSSTop + curCSSLeft ).indexOf("auto") > -1; - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + // Need to be able to calculate position if either + // top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; + } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; @@ -10060,6 +8961,7 @@ jQuery.offset = { if ( "using" in options ) { options.using.call( elem, props ); + } else { curElem.css( props ); } @@ -10077,8 +8979,8 @@ jQuery.fn.extend({ } var docElem, win, - box = { top: 0, left: 0 }, elem = this[ 0 ], + box = { top: 0, left: 0 }, doc = elem && elem.ownerDocument; if ( !doc ) { @@ -10092,15 +8994,15 @@ jQuery.fn.extend({ return box; } + // Support: BlackBerry 5, iOS 3 (original iPhone) // If we don't have gBCR, just use 0,0 rather than error - // BlackBerry 5, iOS 3 (original iPhone) if ( typeof elem.getBoundingClientRect !== strundefined ) { box = elem.getBoundingClientRect(); } win = getWindow( doc ); return { - top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), - left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) + top: box.top + win.pageYOffset - docElem.clientTop, + left: box.left + win.pageXOffset - docElem.clientLeft }; }, @@ -10110,13 +9012,14 @@ jQuery.fn.extend({ } var offsetParent, offset, - parentOffset = { top: 0, left: 0 }, - elem = this[ 0 ]; + elem = this[ 0 ], + parentOffset = { top: 0, left: 0 }; - // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent + // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent if ( jQuery.css( elem, "position" ) === "fixed" ) { - // we assume that getBoundingClientRect is available when computed position is fixed + // Assume getBoundingClientRect is there when computed position is fixed offset = elem.getBoundingClientRect(); + } else { // Get *real* offsetParent offsetParent = this.offsetParent(); @@ -10128,16 +9031,14 @@ jQuery.fn.extend({ } // Add offsetParent borders - parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); + parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); } // Subtract parent offsets and element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 return { - top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), - left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) + top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), + left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) }; }, @@ -10148,6 +9049,7 @@ jQuery.fn.extend({ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) { offsetParent = offsetParent.offsetParent; } + return offsetParent || docElem; }); } @@ -10155,22 +9057,20 @@ jQuery.fn.extend({ // Create scrollLeft and scrollTop methods jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { - var top = /Y/.test( prop ); + var top = "pageYOffset" === prop; jQuery.fn[ method ] = function( val ) { return access( this, function( elem, method, val ) { var win = getWindow( elem ); if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; + return win ? win[ prop ] : elem[ method ]; } if ( win ) { win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() + !top ? val : window.pageXOffset, + top ? val : window.pageYOffset ); } else { @@ -10180,16 +9080,18 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( }; }); +// Support: Safari<7+, Chrome<37+ // Add the top/left cssHooks using jQuery.fn.position // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 -// getComputedStyle returns percent when specified for top/left/bottom/right -// rather than make the css module depend on the offset module, we just check for it here +// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280 +// getComputedStyle returns percent when specified for top/left/bottom/right; +// rather than make the css module depend on the offset module, just check for it here jQuery.each( [ "top", "left" ], function( i, prop ) { jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, function( elem, computed ) { if ( computed ) { computed = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset + // If curCSS returns percentage, fallback to offset return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : computed; @@ -10202,7 +9104,7 @@ jQuery.each( [ "top", "left" ], function( i, prop ) { // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth + // Margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); @@ -10221,8 +9123,8 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { if ( elem.nodeType === 9 ) { doc = elem.documentElement; - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], + // whichever is greatest return Math.max( elem.body[ "scroll" + name ], doc[ "scroll" + name ], elem.body[ "offset" + name ], doc[ "offset" + name ], @@ -10293,8 +9195,8 @@ jQuery.noConflict = function( deep ) { return jQuery; }; -// Expose jQuery and $ identifiers, even in -// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557) +// Expose jQuery and $ identifiers, even in AMD +// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) if ( typeof noGlobal === strundefined ) { window.jQuery = window.$ = jQuery; diff --git a/web/static/js/jquery-2.1.4.min.js b/web/static/js/jquery-2.1.4.min.js new file mode 100644 index 000000000..49990d6e1 --- /dev/null +++ b/web/static/js/jquery-2.1.4.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){ +return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qa[0].contentDocument,b.write(),b.close(),c=sa(a,b),qa.detach()),ra[a]=c),c}var ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xa(a,b,c){var d,e,f,g,h=a.style;return c=c||wa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),va.test(g)&&ua.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function ya(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];function Fa(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ea.length;while(e--)if(b=Ea[e]+c,b in a)return b;return d}function Ga(a,b,c){var d=Aa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Ha(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ia(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wa(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xa(a,b,f),(0>e||null==e)&&(e=a.style[b]),va.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Ha(a,b,c||(g?"border":"content"),d,f)+"px"}function Ja(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",ta(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xa(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fa(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ba.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fa(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xa(a,b,d)),"normal"===e&&b in Da&&(e=Da[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?za.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Ca,function(){return Ia(a,b,d)}):Ia(a,b,d):void 0},set:function(a,c,d){var e=d&&wa(a);return Ga(a,c,d?Ha(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ua.test(a)||(n.cssHooks[a+b].set=Ga)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wa(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Ka(a,b,c,d,e){return new Ka.prototype.init(a,b,c,d,e)}n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ka.propHooks[this.prop];return a&&a.get?a.get(this):Ka.propHooks._default.get(this)},run:function(a){var b,c=Ka.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Oa.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Oa.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ua(a,b,c){for(var d,e=(Ra[b]||[]).concat(Ra["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Va(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||ta(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Na.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?ta(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ua(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wa(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xa(a,b,c){var d,e,f=0,g=Qa.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=La||Sa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:La||Sa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wa(k,j.opts.specialEasing);g>f;f++)if(d=Qa[f].call(j,a,k,j.opts))return d;return n.map(k,Ua,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xa,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Ra[c]=Ra[c]||[],Ra[c].unshift(b)},prefilter:function(a,b){b?Qa.unshift(a):Qa.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xa(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pa.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Ta(b,!0),a,d,e)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(La=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),La=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Za:Ya)), +void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Za={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$a[b]||n.find.attr;$a[b]=function(a,b,d){var e,f;return d||(f=$a[b],$a[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$a[b]=f),e}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_a.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ab," ").indexOf(b)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cb=n.now(),db=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];function qb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rb(a,b,c,d){var e={},f=a===mb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function ub(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sb(sb(a,n.ajaxSettings),b):sb(n.ajaxSettings,a)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kb.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pb[1]&&h[2]===pb[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rb(lb,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ib.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(db.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fb.test(d)?d.replace(fb,"$1_="+cb++):d+(db.test(d)?"&":"?")+"_="+cb++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nb+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rb(mb,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tb(k,v,f)),u=ub(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cb)Cb[a]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(a){var b;return k.cors||Eb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Db[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||n.expando+"_"+cb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gb,"$1"+e):b.jsonp!==!1&&(b.url+=(db.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ib=a.document.documentElement;function Jb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ib;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jb(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=ya(k.pixelPosition,function(a,c){return c?(c=xa(a,b),va.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lb),b&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n}); diff --git a/web/static/js/perfect-scrollbar-0.6.5.jquery.min.js b/web/static/js/perfect-scrollbar-0.6.5.jquery.min.js deleted file mode 100755 index 804ae8c9b..000000000 --- a/web/static/js/perfect-scrollbar-0.6.5.jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* perfect-scrollbar v0.6.5-1 */ -!function t(e,n,r){function o(l,s){if(!n[l]){if(!e[l]){var a="function"==typeof require&&require;if(!s&&a)return a(l,!0);if(i)return i(l,!0);var c=new Error("Cannot find module '"+l+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[l]={exports:{}};e[l][0].call(u.exports,function(t){var n=e[l][1][t];return o(n?n:t)},u,u.exports,t,e,n,r)}return n[l].exports}for(var i="function"==typeof require&&require,l=0;l<r.length;l++)o(r[l]);return o}({1:[function(t,e,n){"use strict";function r(t){t.fn.perfectScrollbar=function(e){return this.each(function(){if("object"==typeof e||"undefined"==typeof e){var n=e;i.get(this)||o.initialize(this,n)}else{var r=e;"update"===r?o.update(this):"destroy"===r&&o.destroy(this)}return t(this)})}}var o=t("../main"),i=t("../plugin/instances");if("function"==typeof define&&define.amd)define(["jquery"],r);else{var l=window.jQuery?window.jQuery:window.$;"undefined"!=typeof l&&r(l)}e.exports=r},{"../main":7,"../plugin/instances":18}],2:[function(t,e,n){"use strict";function r(t,e){var n=t.className.split(" ");n.indexOf(e)<0&&n.push(e),t.className=n.join(" ")}function o(t,e){var n=t.className.split(" "),r=n.indexOf(e);r>=0&&n.splice(r,1),t.className=n.join(" ")}n.add=function(t,e){t.classList?t.classList.add(e):r(t,e)},n.remove=function(t,e){t.classList?t.classList.remove(e):o(t,e)},n.list=function(t){return t.classList?t.classList:t.className.split(" ")}},{}],3:[function(t,e,n){"use strict";function r(t,e){return window.getComputedStyle(t)[e]}function o(t,e,n){return"number"==typeof n&&(n=n.toString()+"px"),t.style[e]=n,t}function i(t,e){for(var n in e){var r=e[n];"number"==typeof r&&(r=r.toString()+"px"),t.style[n]=r}return t}var l={};l.e=function(t,e){var n=document.createElement(t);return n.className=e,n},l.appendTo=function(t,e){return e.appendChild(t),t},l.css=function(t,e,n){return"object"==typeof e?i(t,e):"undefined"==typeof n?r(t,e):o(t,e,n)},l.matches=function(t,e){return"undefined"!=typeof t.matches?t.matches(e):"undefined"!=typeof t.matchesSelector?t.matchesSelector(e):"undefined"!=typeof t.webkitMatchesSelector?t.webkitMatchesSelector(e):"undefined"!=typeof t.mozMatchesSelector?t.mozMatchesSelector(e):"undefined"!=typeof t.msMatchesSelector?t.msMatchesSelector(e):void 0},l.remove=function(t){"undefined"!=typeof t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)},l.queryChildren=function(t,e){return Array.prototype.filter.call(t.childNodes,function(t){return l.matches(t,e)})},e.exports=l},{}],4:[function(t,e,n){"use strict";var r=function(t){this.element=t,this.events={}};r.prototype.bind=function(t,e){"undefined"==typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e),this.element.addEventListener(t,e,!1)},r.prototype.unbind=function(t,e){var n="undefined"!=typeof e;this.events[t]=this.events[t].filter(function(r){return n&&r!==e?!0:(this.element.removeEventListener(t,r,!1),!1)},this)},r.prototype.unbindAll=function(){for(var t in this.events)this.unbind(t)};var o=function(){this.eventElements=[]};o.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return"undefined"==typeof e&&(e=new r(t),this.eventElements.push(e)),e},o.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},o.prototype.unbind=function(t,e,n){this.eventElement(t).unbind(e,n)},o.prototype.unbindAll=function(){for(var t=0;t<this.eventElements.length;t++)this.eventElements[t].unbindAll()},o.prototype.once=function(t,e,n){var r=this.eventElement(t),o=function(t){r.unbind(e,o),n(t)};r.bind(e,o)},e.exports=o},{}],5:[function(t,e,n){"use strict";e.exports=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}()},{}],6:[function(t,e,n){"use strict";var r=t("./class"),o=t("./dom");n.toInt=function(t){return parseInt(t,10)||0},n.clone=function(t){if(null===t)return null;if("object"==typeof t){var e={};for(var n in t)e[n]=this.clone(t[n]);return e}return t},n.extend=function(t,e){var n=this.clone(t);for(var r in e)n[r]=this.clone(e[r]);return n},n.isEditable=function(t){return o.matches(t,"input,[contenteditable]")||o.matches(t,"select,[contenteditable]")||o.matches(t,"textarea,[contenteditable]")||o.matches(t,"button,[contenteditable]")},n.removePsClasses=function(t){for(var e=r.list(t),n=0;n<e.length;n++){var o=e[n];0===o.indexOf("ps-")&&r.remove(t,o)}},n.outerWidth=function(t){return this.toInt(o.css(t,"width"))+this.toInt(o.css(t,"paddingLeft"))+this.toInt(o.css(t,"paddingRight"))+this.toInt(o.css(t,"borderLeftWidth"))+this.toInt(o.css(t,"borderRightWidth"))},n.startScrolling=function(t,e){r.add(t,"ps-in-scrolling"),"undefined"!=typeof e?r.add(t,"ps-"+e):(r.add(t,"ps-x"),r.add(t,"ps-y"))},n.stopScrolling=function(t,e){r.remove(t,"ps-in-scrolling"),"undefined"!=typeof e?r.remove(t,"ps-"+e):(r.remove(t,"ps-x"),r.remove(t,"ps-y"))},n.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(t,e,n){"use strict";var r=t("./plugin/destroy"),o=t("./plugin/initialize"),i=t("./plugin/update");e.exports={initialize:o,update:i,destroy:r}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":20}],8:[function(t,e,n){"use strict";e.exports={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,stopPropagationOnClick:!0}},{}],9:[function(t,e,n){"use strict";var r=t("../lib/dom"),o=t("../lib/helper"),i=t("./instances");e.exports=function(t){var e=i.get(t);e&&(e.event.unbindAll(),r.remove(e.scrollbarX),r.remove(e.scrollbarY),r.remove(e.scrollbarXRail),r.remove(e.scrollbarYRail),o.removePsClasses(t),i.remove(t))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(t,e,n){"use strict";function r(t,e){function n(t){return t.getBoundingClientRect()}e.settings.stopPropagationOnClick&&e.event.bind(e.scrollbarY,"click",function(t){t.stopPropagation()}),e.event.bind(e.scrollbarYRail,"click",function(r){var i=o.toInt(e.scrollbarYHeight/2),s=e.railYRatio*(r.pageY-window.scrollY-n(e.scrollbarYRail).top-i),a=e.railYRatio*(e.railYHeight-e.scrollbarYHeight),c=s/a;0>c?c=0:c>1&&(c=1),t.scrollTop=(e.contentHeight-e.containerHeight)*c,l(t),r.stopPropagation()}),e.settings.stopPropagationOnClick&&e.event.bind(e.scrollbarY,"click",function(t){t.stopPropagation()}),e.event.bind(e.scrollbarXRail,"click",function(r){var i=o.toInt(e.scrollbarXWidth/2),s=e.railXRatio*(r.pageX-window.scrollX-n(e.scrollbarXRail).left-i),a=e.railXRatio*(e.railXWidth-e.scrollbarXWidth),c=s/a;0>c?c=0:c>1&&(c=1),t.scrollLeft=(e.contentWidth-e.containerWidth)*c-e.negativeScrollAdjustment,l(t),r.stopPropagation()})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(t,e,n){"use strict";function r(t,e){function n(n){var o=r+n*e.railXRatio,i=e.scrollbarXRail.getBoundingClientRect().left+e.railXRatio*(e.railXWidth-e.scrollbarXWidth);0>o?e.scrollbarXLeft=0:o>i?e.scrollbarXLeft=i:e.scrollbarXLeft=o;var s=l.toInt(e.scrollbarXLeft*(e.contentWidth-e.containerWidth)/(e.containerWidth-e.railXRatio*e.scrollbarXWidth))-e.negativeScrollAdjustment;t.scrollLeft=s}var r=null,o=null,s=function(e){n(e.pageX-o),a(t),e.stopPropagation(),e.preventDefault()},c=function(){l.stopScrolling(t,"x"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarX,"mousedown",function(n){o=n.pageX,r=l.toInt(i.css(e.scrollbarX,"left"))*e.railXRatio,l.startScrolling(t,"x"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}function o(t,e){function n(n){var o=r+n*e.railYRatio,i=e.scrollbarYRail.getBoundingClientRect().top+e.railYRatio*(e.railYHeight-e.scrollbarYHeight);0>o?e.scrollbarYTop=0:o>i?e.scrollbarYTop=i:e.scrollbarYTop=o;var s=l.toInt(e.scrollbarYTop*(e.contentHeight-e.containerHeight)/(e.containerHeight-e.railYRatio*e.scrollbarYHeight));t.scrollTop=s}var r=null,o=null,s=function(e){n(e.pageY-o),a(t),e.stopPropagation(),e.preventDefault()},c=function(){l.stopScrolling(t,"y"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarY,"mousedown",function(n){o=n.pageY,r=l.toInt(i.css(e.scrollbarY,"top"))*e.railYRatio,l.startScrolling(t,"y"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}var i=t("../../lib/dom"),l=t("../../lib/helper"),s=t("../instances"),a=t("../update-geometry");e.exports=function(t){var e=s.get(t);r(t,e),o(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&0>r)return!e.settings.wheelPropagation}var i=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===i&&0>n||i>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}var r=!1;e.event.bind(t,"mouseenter",function(){r=!0}),e.event.bind(t,"mouseleave",function(){r=!1});var i=!1;e.event.bind(e.ownerDocument,"keydown",function(s){if((!s.isDefaultPrevented||!s.isDefaultPrevented())&&r){var a=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(a){for(;a.shadowRoot;)a=a.shadowRoot.activeElement;if(o.isEditable(a))return}var c=0,u=0;switch(s.which){case 37:c=-30;break;case 38:u=30;break;case 39:c=30;break;case 40:u=-30;break;case 33:u=90;break;case 32:u=s.shiftKey?90:-90;break;case 34:u=-90;break;case 35:u=s.ctrlKey?-e.contentHeight:-e.containerHeight;break;case 36:u=s.ctrlKey?t.scrollTop:e.containerHeight;break;default:return}t.scrollTop=t.scrollTop-u,t.scrollLeft=t.scrollLeft+c,l(t),i=n(c,u),i&&s.preventDefault()}})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&0>r)return!e.settings.wheelPropagation}var i=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===i&&0>n||i>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}function r(t){var e=t.deltaX,n=-1*t.deltaY;return("undefined"==typeof e||"undefined"==typeof n)&&(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!==e&&n!==n&&(e=0,n=t.wheelDelta),[e,n]}function i(e,n){var r=t.querySelector("textarea:hover");if(r){var o=r.scrollHeight-r.clientHeight;if(o>0&&!(0===r.scrollTop&&n>0||r.scrollTop===o&&0>n))return!0;var i=r.scrollLeft-r.clientWidth;if(i>0&&!(0===r.scrollLeft&&0>e||r.scrollLeft===i&&e>0))return!0}return!1}function s(s){if(o.env.isWebKit||!t.querySelector("select:focus")){var c=r(s),u=c[0],d=c[1];i(u,d)||(a=!1,e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(d?t.scrollTop=t.scrollTop-d*e.settings.wheelSpeed:t.scrollTop=t.scrollTop+u*e.settings.wheelSpeed,a=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(u?t.scrollLeft=t.scrollLeft+u*e.settings.wheelSpeed:t.scrollLeft=t.scrollLeft-d*e.settings.wheelSpeed,a=!0):(t.scrollTop=t.scrollTop-d*e.settings.wheelSpeed,t.scrollLeft=t.scrollLeft+u*e.settings.wheelSpeed),l(t),a=a||n(u,d),a&&(s.stopPropagation(),s.preventDefault()))}}var a=!1;"undefined"!=typeof window.onwheel?e.event.bind(t,"wheel",s):"undefined"!=typeof window.onmousewheel&&e.event.bind(t,"mousewheel",s)}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(t,e,n){"use strict";function r(t,e){e.event.bind(t,"scroll",function(){i(t)})}var o=t("../instances"),i=t("../update-geometry");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19}],15:[function(t,e,n){"use strict";function r(t,e){function n(){var t=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===t.toString().length?null:t.getRangeAt(0).commonAncestorContainer}function r(){a||(a=setInterval(function(){return i.get(t)?(t.scrollTop=t.scrollTop+c.top,t.scrollLeft=t.scrollLeft+c.left,void l(t)):void clearInterval(a)},50))}function s(){a&&(clearInterval(a),a=null),o.stopScrolling(t)}var a=null,c={top:0,left:0},u=!1;e.event.bind(e.ownerDocument,"selectionchange",function(){t.contains(n())?u=!0:(u=!1,s())}),e.event.bind(window,"mouseup",function(){u&&(u=!1,s())}),e.event.bind(window,"mousemove",function(e){if(u){var n={x:e.pageX,y:e.pageY},i={left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight};n.x<i.left+3?(c.left=-5,o.startScrolling(t,"x")):n.x>i.right-3?(c.left=5,o.startScrolling(t,"x")):c.left=0,n.y<i.top+3?(i.top+3-n.y<5?c.top=-5:c.top=-20,o.startScrolling(t,"y")):n.y>i.bottom-3?(n.y-i.bottom+3<5?c.top=5:c.top=20,o.startScrolling(t,"y")):c.top=0,0===c.top&&0===c.left?s():r()}})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(t,e,n){"use strict";function r(t,e,n,r){function l(n,r){var o=t.scrollTop,i=t.scrollLeft,l=Math.abs(n),s=Math.abs(r);if(s>l){if(0>r&&o===e.contentHeight-e.containerHeight||r>0&&0===o)return!e.settings.swipePropagation}else if(l>s&&(0>n&&i===e.contentWidth-e.containerWidth||n>0&&0===i))return!e.settings.swipePropagation;return!0}function s(e,n){t.scrollTop=t.scrollTop-n,t.scrollLeft=t.scrollLeft-e,i(t)}function a(){y=!0}function c(){y=!1}function u(t){return t.targetTouches?t.targetTouches[0]:t}function d(t){return t.targetTouches&&1===t.targetTouches.length?!0:t.pointerType&&"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE?!0:!1}function p(t){if(d(t)){Y=!0;var e=u(t);b.pageX=e.pageX,b.pageY=e.pageY,g=(new Date).getTime(),null!==m&&clearInterval(m),t.stopPropagation()}}function f(t){if(!y&&Y&&d(t)){var e=u(t),n={pageX:e.pageX,pageY:e.pageY},r=n.pageX-b.pageX,o=n.pageY-b.pageY;s(r,o),b=n;var i=(new Date).getTime(),a=i-g;a>0&&(v.x=r/a,v.y=o/a,g=i),l(r,o)&&(t.stopPropagation(),t.preventDefault())}}function h(){!y&&Y&&(Y=!1,clearInterval(m),m=setInterval(function(){return o.get(t)?Math.abs(v.x)<.01&&Math.abs(v.y)<.01?void clearInterval(m):(s(30*v.x,30*v.y),v.x*=.8,void(v.y*=.8)):void clearInterval(m)},10))}var b={},g=0,v={},m=null,y=!1,Y=!1;n&&(e.event.bind(window,"touchstart",a),e.event.bind(window,"touchend",c),e.event.bind(t,"touchstart",p),e.event.bind(t,"touchmove",f),e.event.bind(t,"touchend",h)),r&&(window.PointerEvent?(e.event.bind(window,"pointerdown",a),e.event.bind(window,"pointerup",c),e.event.bind(t,"pointerdown",p),e.event.bind(t,"pointermove",f),e.event.bind(t,"pointerup",h)):window.MSPointerEvent&&(e.event.bind(window,"MSPointerDown",a),e.event.bind(window,"MSPointerUp",c),e.event.bind(t,"MSPointerDown",p),e.event.bind(t,"MSPointerMove",f),e.event.bind(t,"MSPointerUp",h)))}var o=t("../instances"),i=t("../update-geometry");e.exports=function(t,e,n){var i=o.get(t);r(t,i,e,n)}},{"../instances":18,"../update-geometry":19}],17:[function(t,e,n){"use strict";var r=t("../lib/class"),o=t("../lib/helper"),i=t("./instances"),l=t("./update-geometry"),s=t("./handler/click-rail"),a=t("./handler/drag-scrollbar"),c=t("./handler/keyboard"),u=t("./handler/mouse-wheel"),d=t("./handler/native-scroll"),p=t("./handler/selection"),f=t("./handler/touch");e.exports=function(t,e){e="object"==typeof e?e:{},r.add(t,"ps-container");var n=i.add(t);n.settings=o.extend(n.settings,e),s(t),a(t),u(t),d(t),p(t),(o.env.supportsTouch||o.env.supportsIePointer)&&f(t,o.env.supportsTouch,o.env.supportsIePointer),n.settings.useKeyboard&&c(t),l(t)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(t,e,n){"use strict";function r(t){var e=this;e.settings=d.clone(a),e.containerWidth=null,e.containerHeight=null,e.contentWidth=null,e.contentHeight=null,e.isRtl="rtl"===s.css(t,"direction"),e.isNegativeScroll=function(){var e=t.scrollLeft,n=null;return t.scrollLeft=-1,n=t.scrollLeft<0,t.scrollLeft=e,n}(),e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,e.event=new c,e.ownerDocument=t.ownerDocument||document,e.scrollbarXRail=s.appendTo(s.e("div","ps-scrollbar-x-rail"),t),e.scrollbarX=s.appendTo(s.e("div","ps-scrollbar-x"),e.scrollbarXRail),e.scrollbarXActive=null,e.scrollbarXWidth=null,e.scrollbarXLeft=null,e.scrollbarXBottom=d.toInt(s.css(e.scrollbarXRail,"bottom")),e.isScrollbarXUsingBottom=e.scrollbarXBottom===e.scrollbarXBottom,e.scrollbarXTop=e.isScrollbarXUsingBottom?null:d.toInt(s.css(e.scrollbarXRail,"top")),e.railBorderXWidth=d.toInt(s.css(e.scrollbarXRail,"borderLeftWidth"))+d.toInt(s.css(e.scrollbarXRail,"borderRightWidth")),s.css(e.scrollbarXRail,"display","block"),e.railXMarginWidth=d.toInt(s.css(e.scrollbarXRail,"marginLeft"))+d.toInt(s.css(e.scrollbarXRail,"marginRight")),s.css(e.scrollbarXRail,"display",""),e.railXWidth=null,e.railXRatio=null,e.scrollbarYRail=s.appendTo(s.e("div","ps-scrollbar-y-rail"),t),e.scrollbarY=s.appendTo(s.e("div","ps-scrollbar-y"),e.scrollbarYRail),e.scrollbarYActive=null,e.scrollbarYHeight=null,e.scrollbarYTop=null,e.scrollbarYRight=d.toInt(s.css(e.scrollbarYRail,"right")),e.isScrollbarYUsingRight=e.scrollbarYRight===e.scrollbarYRight,e.scrollbarYLeft=e.isScrollbarYUsingRight?null:d.toInt(s.css(e.scrollbarYRail,"left")),e.scrollbarYOuterWidth=e.isRtl?d.outerWidth(e.scrollbarY):null,e.railBorderYWidth=d.toInt(s.css(e.scrollbarYRail,"borderTopWidth"))+d.toInt(s.css(e.scrollbarYRail,"borderBottomWidth")),s.css(e.scrollbarYRail,"display","block"),e.railYMarginHeight=d.toInt(s.css(e.scrollbarYRail,"marginTop"))+d.toInt(s.css(e.scrollbarYRail,"marginBottom")),s.css(e.scrollbarYRail,"display",""),e.railYHeight=null,e.railYRatio=null}function o(t){return"undefined"==typeof t.dataset?t.getAttribute("data-ps-id"):t.dataset.psId}function i(t,e){"undefined"==typeof t.dataset?t.setAttribute("data-ps-id",e):t.dataset.psId=e}function l(t){"undefined"==typeof t.dataset?t.removeAttribute("data-ps-id"):delete t.dataset.psId}var s=t("../lib/dom"),a=t("./default-setting"),c=t("../lib/event-manager"),u=t("../lib/guid"),d=t("../lib/helper"),p={};n.add=function(t){var e=u();return i(t,e),p[e]=new r(t),p[e]},n.remove=function(t){delete p[o(t)],l(t)},n.get=function(t){return p[o(t)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(t,e,n){"use strict";function r(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function o(t,e){var n={width:e.railXWidth};e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:n.left=t.scrollLeft,e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-t.scrollTop:n.top=e.scrollbarXTop+t.scrollTop,l.css(e.scrollbarXRail,n);var r={top:t.scrollTop,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?r.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth:r.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?r.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:r.left=e.scrollbarYLeft+t.scrollLeft,l.css(e.scrollbarYRail,r),l.css(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),l.css(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}var i=t("../lib/class"),l=t("../lib/dom"),s=t("../lib/helper"),a=t("./instances");e.exports=function(t){var e=a.get(t);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight;var n;t.contains(e.scrollbarXRail)||(n=l.queryChildren(t,".ps-scrollbar-x-rail"),n.length>0&&n.forEach(function(t){l.remove(t)}),l.appendTo(e.scrollbarXRail,t)),t.contains(e.scrollbarYRail)||(n=l.queryChildren(t,".ps-scrollbar-y-rail"),n.length>0&&n.forEach(function(t){l.remove(t)}),l.appendTo(e.scrollbarYRail,t)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=r(e,s.toInt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=s.toInt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):(e.scrollbarXActive=!1,e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=0),!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=r(e,s.toInt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=s.toInt(t.scrollTop*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):(e.scrollbarYActive=!1,e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0),e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),o(t,e),i[e.scrollbarXActive?"add":"remove"](t,"ps-active-x"),i[e.scrollbarYActive?"add":"remove"](t,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(t,e,n){"use strict";var r=t("../lib/dom"),o=t("../lib/helper"),i=t("./instances"),l=t("./update-geometry");e.exports=function(t){var e=i.get(t);e&&(e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,r.css(e.scrollbarXRail,"display","block"),r.css(e.scrollbarYRail,"display","block"),e.railXMarginWidth=o.toInt(r.css(e.scrollbarXRail,"marginLeft"))+o.toInt(r.css(e.scrollbarXRail,"marginRight")),e.railYMarginHeight=o.toInt(r.css(e.scrollbarYRail,"marginTop"))+o.toInt(r.css(e.scrollbarYRail,"marginBottom")),r.css(e.scrollbarXRail,"display","none"),r.css(e.scrollbarYRail,"display","none"),l(t),r.css(e.scrollbarXRail,"display",""),r.css(e.scrollbarYRail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19}]},{},[1]);
\ No newline at end of file diff --git a/web/static/js/perfect-scrollbar-0.6.5.jquery.js b/web/static/js/perfect-scrollbar-0.6.7.jquery.js index 1473db9ad..9e93de017 100755..100644 --- a/web/static/js/perfect-scrollbar-0.6.5.jquery.js +++ b/web/static/js/perfect-scrollbar-0.6.7.jquery.js @@ -1,4 +1,4 @@ -/* perfect-scrollbar v0.6.5-1 */ +/* perfect-scrollbar v0.6.7 */ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ /* Copyright (c) 2015 Hyunje Alex Jun and other contributors * Licensed under the MIT License @@ -88,7 +88,7 @@ exports.remove = function (element, className) { exports.list = function (element) { if (element.classList) { - return element.classList; + return Array.prototype.slice.apply(element.classList); } else { return element.className.split(' '); } @@ -379,25 +379,26 @@ module.exports = { destroy: destroy }; -},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":20}],8:[function(require,module,exports){ +},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(require,module,exports){ /* Copyright (c) 2015 Hyunje Alex Jun and other contributors * Licensed under the MIT License */ 'use strict'; module.exports = { - wheelSpeed: 1, - wheelPropagation: false, - swipePropagation: true, - minScrollbarLength: null, maxScrollbarLength: null, - useBothWheelAxes: false, - useKeyboard: true, - suppressScrollX: false, - suppressScrollY: false, + minScrollbarLength: null, scrollXMarginOffset: 0, scrollYMarginOffset: 0, - stopPropagationOnClick: true + stopPropagationOnClick: true, + suppressScrollX: false, + suppressScrollY: false, + swipePropagation: true, + useBothWheelAxes: false, + useKeyboard: true, + useSelectionScroll: false, + wheelPropagation: false, + wheelSpeed: 1 }; },{}],9:[function(require,module,exports){ @@ -435,17 +436,17 @@ module.exports = function (element) { var h = require('../../lib/helper') , instances = require('../instances') - , updateGeometry = require('../update-geometry'); + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); function bindClickRailHandler(element, i) { function pageOffset(el) { return el.getBoundingClientRect(); } + var stopPropagation = window.Event.prototype.stopPropagation.bind; if (i.settings.stopPropagationOnClick) { - i.event.bind(i.scrollbarY, 'click', function (e) { - e.stopPropagation(); - }); + i.event.bind(i.scrollbarY, 'click', stopPropagation); } i.event.bind(i.scrollbarYRail, 'click', function (e) { var halfOfScrollbarLength = h.toInt(i.scrollbarYHeight / 2); @@ -459,16 +460,14 @@ function bindClickRailHandler(element, i) { positionRatio = 1; } - element.scrollTop = (i.contentHeight - i.containerHeight) * positionRatio; + updateScroll(element, 'top', (i.contentHeight - i.containerHeight) * positionRatio); updateGeometry(element); e.stopPropagation(); }); if (i.settings.stopPropagationOnClick) { - i.event.bind(i.scrollbarY, 'click', function (e) { - e.stopPropagation(); - }); + i.event.bind(i.scrollbarX, 'click', stopPropagation); } i.event.bind(i.scrollbarXRail, 'click', function (e) { var halfOfScrollbarLength = h.toInt(i.scrollbarXWidth / 2); @@ -482,7 +481,7 @@ function bindClickRailHandler(element, i) { positionRatio = 1; } - element.scrollLeft = ((i.contentWidth - i.containerWidth) * positionRatio) - i.negativeScrollAdjustment; + updateScroll(element, 'left', ((i.contentWidth - i.containerWidth) * positionRatio) - i.negativeScrollAdjustment); updateGeometry(element); e.stopPropagation(); @@ -494,7 +493,7 @@ module.exports = function (element) { bindClickRailHandler(element, i); }; -},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(require,module,exports){ +},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){ /* Copyright (c) 2015 Hyunje Alex Jun and other contributors * Licensed under the MIT License */ @@ -503,7 +502,8 @@ module.exports = function (element) { var d = require('../../lib/dom') , h = require('../../lib/helper') , instances = require('../instances') - , updateGeometry = require('../update-geometry'); + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); function bindMouseScrollXHandler(element, i) { var currentLeft = null; @@ -522,7 +522,7 @@ function bindMouseScrollXHandler(element, i) { } var scrollLeft = h.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment; - element.scrollLeft = scrollLeft; + updateScroll(element, 'left', scrollLeft); } var mouseMoveHandler = function (e) { @@ -567,7 +567,7 @@ function bindMouseScrollYHandler(element, i) { } var scrollTop = h.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight))); - element.scrollTop = scrollTop; + updateScroll(element, 'top', scrollTop); } var mouseMoveHandler = function (e) { @@ -601,7 +601,7 @@ module.exports = function (element) { bindMouseScrollYHandler(element, i); }; -},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(require,module,exports){ +},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){ /* Copyright (c) 2015 Hyunje Alex Jun and other contributors * Licensed under the MIT License */ @@ -609,7 +609,8 @@ module.exports = function (element) { var h = require('../../lib/helper') , instances = require('../instances') - , updateGeometry = require('../update-geometry'); + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); function bindKeyboardHandler(element, i) { var hovered = false; @@ -711,8 +712,8 @@ function bindKeyboardHandler(element, i) { return; } - element.scrollTop = element.scrollTop - deltaY; - element.scrollLeft = element.scrollLeft + deltaX; + updateScroll(element, 'top', element.scrollTop - deltaY); + updateScroll(element, 'left', element.scrollLeft + deltaX); updateGeometry(element); shouldPrevent = shouldPreventDefault(deltaX, deltaY); @@ -727,7 +728,7 @@ module.exports = function (element) { bindKeyboardHandler(element, i); }; -},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(require,module,exports){ +},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){ /* Copyright (c) 2015 Hyunje Alex Jun and other contributors * Licensed under the MIT License */ @@ -735,7 +736,8 @@ module.exports = function (element) { var h = require('../../lib/helper') , instances = require('../instances') - , updateGeometry = require('../update-geometry'); + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); function bindMouseWheelHandler(element, i) { var shouldPrevent = false; @@ -830,24 +832,24 @@ function bindMouseWheelHandler(element, i) { if (!i.settings.useBothWheelAxes) { // deltaX will only be used for horizontal scrolling and deltaY will // only be used for vertical scrolling - this is the default - element.scrollTop = element.scrollTop - (deltaY * i.settings.wheelSpeed); - element.scrollLeft = element.scrollLeft + (deltaX * i.settings.wheelSpeed); + updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed)); + updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed)); } else if (i.scrollbarYActive && !i.scrollbarXActive) { // only vertical scrollbar is active and useBothWheelAxes option is // active, so let's scroll vertical bar using both mouse wheel axes if (deltaY) { - element.scrollTop = element.scrollTop - (deltaY * i.settings.wheelSpeed); + updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed)); } else { - element.scrollTop = element.scrollTop + (deltaX * i.settings.wheelSpeed); + updateScroll(element, 'top', element.scrollTop + (deltaX * i.settings.wheelSpeed)); } shouldPrevent = true; } else if (i.scrollbarXActive && !i.scrollbarYActive) { // useBothWheelAxes and only horizontal bar is active, so use both // wheel axes for horizontal bar if (deltaX) { - element.scrollLeft = element.scrollLeft + (deltaX * i.settings.wheelSpeed); + updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed)); } else { - element.scrollLeft = element.scrollLeft - (deltaY * i.settings.wheelSpeed); + updateScroll(element, 'left', element.scrollLeft - (deltaY * i.settings.wheelSpeed)); } shouldPrevent = true; } @@ -873,7 +875,7 @@ module.exports = function (element) { bindMouseWheelHandler(element, i); }; -},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(require,module,exports){ +},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(require,module,exports){ /* Copyright (c) 2015 Hyunje Alex Jun and other contributors * Licensed under the MIT License */ @@ -901,7 +903,8 @@ module.exports = function (element) { var h = require('../../lib/helper') , instances = require('../instances') - , updateGeometry = require('../update-geometry'); + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); function bindSelectionHandler(element, i) { function getRangeNode() { @@ -924,8 +927,8 @@ function bindSelectionHandler(element, i) { return; } - element.scrollTop = element.scrollTop + scrollDiff.top; - element.scrollLeft = element.scrollLeft + scrollDiff.left; + updateScroll(element, 'top', element.scrollTop + scrollDiff.top); + updateScroll(element, 'left', element.scrollLeft + scrollDiff.left); updateGeometry(element); }, 50); // every .1 sec } @@ -1006,14 +1009,15 @@ module.exports = function (element) { bindSelectionHandler(element, i); }; -},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(require,module,exports){ +},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){ /* Copyright (c) 2015 Hyunje Alex Jun and other contributors * Licensed under the MIT License */ 'use strict'; var instances = require('../instances') - , updateGeometry = require('../update-geometry'); + , updateGeometry = require('../update-geometry') + , updateScroll = require('../update-scroll'); function bindTouchHandler(element, i, supportsTouch, supportsIePointer) { function shouldPreventDefault(deltaX, deltaY) { @@ -1042,8 +1046,8 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) { } function applyTouchMove(differenceX, differenceY) { - element.scrollTop = element.scrollTop - differenceY; - element.scrollLeft = element.scrollLeft - differenceX; + updateScroll(element, 'top', element.scrollTop - differenceY); + updateScroll(element, 'left', element.scrollLeft - differenceX); updateGeometry(element); } @@ -1178,7 +1182,7 @@ module.exports = function (element, supportsTouch, supportsIePointer) { bindTouchHandler(element, i, supportsTouch, supportsIePointer); }; -},{"../instances":18,"../update-geometry":19}],17:[function(require,module,exports){ +},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(require,module,exports){ /* Copyright (c) 2015 Hyunje Alex Jun and other contributors * Licensed under the MIT License */ @@ -1212,7 +1216,10 @@ module.exports = function (element, userSettings) { dragScrollbarHandler(element); mouseWheelHandler(element); nativeScrollHandler(element); - selectionHandler(element); + + if (i.settings.useSelectionScroll) { + selectionHandler(element); + } if (h.env.supportsTouch || h.env.supportsIePointer) { touchHandler(element, h.env.supportsTouch, h.env.supportsIePointer); @@ -1342,7 +1349,8 @@ exports.get = function (element) { var cls = require('../lib/class') , d = require('../lib/dom') , h = require('../lib/helper') - , instances = require('./instances'); + , instances = require('./instances') + , updateScroll = require('./update-scroll'); function getThumbSize(i, thumbSize) { if (i.settings.minScrollbarLength) { @@ -1439,7 +1447,7 @@ module.exports = function (element) { i.scrollbarYActive = false; i.scrollbarYHeight = 0; i.scrollbarYTop = 0; - element.scrollTop = 0; + updateScroll(element, 'top', 0); } if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) { @@ -1455,7 +1463,114 @@ module.exports = function (element) { cls[i.scrollbarYActive ? 'add' : 'remove'](element, 'ps-active-y'); }; -},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(require,module,exports){ +},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){ +/* Copyright (c) 2015 Hyunje Alex Jun and other contributors + * Licensed under the MIT License + */ +'use strict'; + +var instances = require('./instances'); + +var upEvent = document.createEvent('Event') + , downEvent = document.createEvent('Event') + , leftEvent = document.createEvent('Event') + , rightEvent = document.createEvent('Event') + , yEvent = document.createEvent('Event') + , xEvent = document.createEvent('Event') + , xStartEvent = document.createEvent('Event') + , xEndEvent = document.createEvent('Event') + , yStartEvent = document.createEvent('Event') + , yEndEvent = document.createEvent('Event') + , lastTop + , lastLeft; + +upEvent.initEvent('ps-scroll-up', true, true); +downEvent.initEvent('ps-scroll-down', true, true); +leftEvent.initEvent('ps-scroll-left', true, true); +rightEvent.initEvent('ps-scroll-right', true, true); +yEvent.initEvent('ps-scroll-y', true, true); +xEvent.initEvent('ps-scroll-x', true, true); +xStartEvent.initEvent('ps-x-reach-start', true, true); +xEndEvent.initEvent('ps-x-reach-end', true, true); +yStartEvent.initEvent('ps-y-reach-start', true, true); +yEndEvent.initEvent('ps-y-reach-end', true, true); + +module.exports = function (element, axis, value) { + if (typeof element === 'undefined') { + throw 'You must provide an element to the update-scroll function'; + } + + if (typeof axis === 'undefined') { + throw 'You must provide an axis to the update-scroll function'; + } + + if (typeof value === 'undefined') { + throw 'You must provide a value to the update-scroll function'; + } + + if (axis === 'top' && value <= 0) { + element.scrollTop = 0; + element.dispatchEvent(yStartEvent); + return; // don't allow negative scroll + } + + if (axis === 'left' && value <= 0) { + element.scrollLeft = 0; + element.dispatchEvent(xStartEvent); + return; // don't allow negative scroll + } + + var i = instances.get(element); + + if (axis === 'top' && value > i.contentHeight - i.containerHeight) { + element.scrollTop = i.contentHeight - i.containerHeight; + element.dispatchEvent(yEndEvent); + return; // don't allow scroll past container + } + + if (axis === 'left' && value > i.contentWidth - i.containerWidth) { + element.scrollLeft = i.contentWidth - i.containerWidth; + element.dispatchEvent(xEndEvent); + return; // don't allow scroll past container + } + + if (!lastTop) { + lastTop = element.scrollTop; + } + + if (!lastLeft) { + lastLeft = element.scrollLeft; + } + + if (axis === 'top' && value < lastTop) { + element.dispatchEvent(upEvent); + } + + if (axis === 'top' && value > lastTop) { + element.dispatchEvent(downEvent); + } + + if (axis === 'left' && value < lastLeft) { + element.dispatchEvent(leftEvent); + } + + if (axis === 'left' && value > lastLeft) { + element.dispatchEvent(rightEvent); + } + + if (axis === 'top') { + element.scrollTop = lastTop = value; + element.dispatchEvent(yEvent); + } + + if (axis === 'left') { + element.scrollLeft = lastLeft = value; + element.dispatchEvent(xEvent); + } + +}; + +},{"./instances":18}],21:[function(require,module,exports){ /* Copyright (c) 2015 Hyunje Alex Jun and other contributors * Licensed under the MIT License */ diff --git a/web/static/js/perfect-scrollbar-0.6.7.jquery.min.js b/web/static/js/perfect-scrollbar-0.6.7.jquery.min.js new file mode 100644 index 000000000..ade0c1836 --- /dev/null +++ b/web/static/js/perfect-scrollbar-0.6.7.jquery.min.js @@ -0,0 +1,2 @@ +/* perfect-scrollbar v0.6.7 */ +!function t(e,n,r){function o(l,s){if(!n[l]){if(!e[l]){var a="function"==typeof require&&require;if(!s&&a)return a(l,!0);if(i)return i(l,!0);var c=new Error("Cannot find module '"+l+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[l]={exports:{}};e[l][0].call(u.exports,function(t){var n=e[l][1][t];return o(n?n:t)},u,u.exports,t,e,n,r)}return n[l].exports}for(var i="function"==typeof require&&require,l=0;l<r.length;l++)o(r[l]);return o}({1:[function(t,e,n){"use strict";function r(t){t.fn.perfectScrollbar=function(e){return this.each(function(){if("object"==typeof e||"undefined"==typeof e){var n=e;i.get(this)||o.initialize(this,n)}else{var r=e;"update"===r?o.update(this):"destroy"===r&&o.destroy(this)}return t(this)})}}var o=t("../main"),i=t("../plugin/instances");if("function"==typeof define&&define.amd)define(["jquery"],r);else{var l=window.jQuery?window.jQuery:window.$;"undefined"!=typeof l&&r(l)}e.exports=r},{"../main":7,"../plugin/instances":18}],2:[function(t,e,n){"use strict";function r(t,e){var n=t.className.split(" ");n.indexOf(e)<0&&n.push(e),t.className=n.join(" ")}function o(t,e){var n=t.className.split(" "),r=n.indexOf(e);r>=0&&n.splice(r,1),t.className=n.join(" ")}n.add=function(t,e){t.classList?t.classList.add(e):r(t,e)},n.remove=function(t,e){t.classList?t.classList.remove(e):o(t,e)},n.list=function(t){return t.classList?Array.prototype.slice.apply(t.classList):t.className.split(" ")}},{}],3:[function(t,e,n){"use strict";function r(t,e){return window.getComputedStyle(t)[e]}function o(t,e,n){return"number"==typeof n&&(n=n.toString()+"px"),t.style[e]=n,t}function i(t,e){for(var n in e){var r=e[n];"number"==typeof r&&(r=r.toString()+"px"),t.style[n]=r}return t}var l={};l.e=function(t,e){var n=document.createElement(t);return n.className=e,n},l.appendTo=function(t,e){return e.appendChild(t),t},l.css=function(t,e,n){return"object"==typeof e?i(t,e):"undefined"==typeof n?r(t,e):o(t,e,n)},l.matches=function(t,e){return"undefined"!=typeof t.matches?t.matches(e):"undefined"!=typeof t.matchesSelector?t.matchesSelector(e):"undefined"!=typeof t.webkitMatchesSelector?t.webkitMatchesSelector(e):"undefined"!=typeof t.mozMatchesSelector?t.mozMatchesSelector(e):"undefined"!=typeof t.msMatchesSelector?t.msMatchesSelector(e):void 0},l.remove=function(t){"undefined"!=typeof t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)},l.queryChildren=function(t,e){return Array.prototype.filter.call(t.childNodes,function(t){return l.matches(t,e)})},e.exports=l},{}],4:[function(t,e,n){"use strict";var r=function(t){this.element=t,this.events={}};r.prototype.bind=function(t,e){"undefined"==typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e),this.element.addEventListener(t,e,!1)},r.prototype.unbind=function(t,e){var n="undefined"!=typeof e;this.events[t]=this.events[t].filter(function(r){return n&&r!==e?!0:(this.element.removeEventListener(t,r,!1),!1)},this)},r.prototype.unbindAll=function(){for(var t in this.events)this.unbind(t)};var o=function(){this.eventElements=[]};o.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return"undefined"==typeof e&&(e=new r(t),this.eventElements.push(e)),e},o.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},o.prototype.unbind=function(t,e,n){this.eventElement(t).unbind(e,n)},o.prototype.unbindAll=function(){for(var t=0;t<this.eventElements.length;t++)this.eventElements[t].unbindAll()},o.prototype.once=function(t,e,n){var r=this.eventElement(t),o=function(t){r.unbind(e,o),n(t)};r.bind(e,o)},e.exports=o},{}],5:[function(t,e,n){"use strict";e.exports=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}()},{}],6:[function(t,e,n){"use strict";var r=t("./class"),o=t("./dom");n.toInt=function(t){return parseInt(t,10)||0},n.clone=function(t){if(null===t)return null;if("object"==typeof t){var e={};for(var n in t)e[n]=this.clone(t[n]);return e}return t},n.extend=function(t,e){var n=this.clone(t);for(var r in e)n[r]=this.clone(e[r]);return n},n.isEditable=function(t){return o.matches(t,"input,[contenteditable]")||o.matches(t,"select,[contenteditable]")||o.matches(t,"textarea,[contenteditable]")||o.matches(t,"button,[contenteditable]")},n.removePsClasses=function(t){for(var e=r.list(t),n=0;n<e.length;n++){var o=e[n];0===o.indexOf("ps-")&&r.remove(t,o)}},n.outerWidth=function(t){return this.toInt(o.css(t,"width"))+this.toInt(o.css(t,"paddingLeft"))+this.toInt(o.css(t,"paddingRight"))+this.toInt(o.css(t,"borderLeftWidth"))+this.toInt(o.css(t,"borderRightWidth"))},n.startScrolling=function(t,e){r.add(t,"ps-in-scrolling"),"undefined"!=typeof e?r.add(t,"ps-"+e):(r.add(t,"ps-x"),r.add(t,"ps-y"))},n.stopScrolling=function(t,e){r.remove(t,"ps-in-scrolling"),"undefined"!=typeof e?r.remove(t,"ps-"+e):(r.remove(t,"ps-x"),r.remove(t,"ps-y"))},n.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(t,e,n){"use strict";var r=t("./plugin/destroy"),o=t("./plugin/initialize"),i=t("./plugin/update");e.exports={initialize:o,update:i,destroy:r}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(t,e,n){"use strict";e.exports={maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,stopPropagationOnClick:!0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,useBothWheelAxes:!1,useKeyboard:!0,useSelectionScroll:!1,wheelPropagation:!1,wheelSpeed:1}},{}],9:[function(t,e,n){"use strict";var r=t("../lib/dom"),o=t("../lib/helper"),i=t("./instances");e.exports=function(t){var e=i.get(t);e&&(e.event.unbindAll(),r.remove(e.scrollbarX),r.remove(e.scrollbarY),r.remove(e.scrollbarXRail),r.remove(e.scrollbarYRail),o.removePsClasses(t),i.remove(t))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(t,e,n){"use strict";function r(t,e){function n(t){return t.getBoundingClientRect()}var r=window.Event.prototype.stopPropagation.bind;e.settings.stopPropagationOnClick&&e.event.bind(e.scrollbarY,"click",r),e.event.bind(e.scrollbarYRail,"click",function(r){var i=o.toInt(e.scrollbarYHeight/2),a=e.railYRatio*(r.pageY-window.scrollY-n(e.scrollbarYRail).top-i),c=e.railYRatio*(e.railYHeight-e.scrollbarYHeight),u=a/c;0>u?u=0:u>1&&(u=1),s(t,"top",(e.contentHeight-e.containerHeight)*u),l(t),r.stopPropagation()}),e.settings.stopPropagationOnClick&&e.event.bind(e.scrollbarX,"click",r),e.event.bind(e.scrollbarXRail,"click",function(r){var i=o.toInt(e.scrollbarXWidth/2),a=e.railXRatio*(r.pageX-window.scrollX-n(e.scrollbarXRail).left-i),c=e.railXRatio*(e.railXWidth-e.scrollbarXWidth),u=a/c;0>u?u=0:u>1&&(u=1),s(t,"left",(e.contentWidth-e.containerWidth)*u-e.negativeScrollAdjustment),l(t),r.stopPropagation()})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(t,e,n){"use strict";function r(t,e){function n(n){var o=r+n*e.railXRatio,i=e.scrollbarXRail.getBoundingClientRect().left+e.railXRatio*(e.railXWidth-e.scrollbarXWidth);0>o?e.scrollbarXLeft=0:o>i?e.scrollbarXLeft=i:e.scrollbarXLeft=o;var s=l.toInt(e.scrollbarXLeft*(e.contentWidth-e.containerWidth)/(e.containerWidth-e.railXRatio*e.scrollbarXWidth))-e.negativeScrollAdjustment;c(t,"left",s)}var r=null,o=null,s=function(e){n(e.pageX-o),a(t),e.stopPropagation(),e.preventDefault()},u=function(){l.stopScrolling(t,"x"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarX,"mousedown",function(n){o=n.pageX,r=l.toInt(i.css(e.scrollbarX,"left"))*e.railXRatio,l.startScrolling(t,"x"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}function o(t,e){function n(n){var o=r+n*e.railYRatio,i=e.scrollbarYRail.getBoundingClientRect().top+e.railYRatio*(e.railYHeight-e.scrollbarYHeight);0>o?e.scrollbarYTop=0:o>i?e.scrollbarYTop=i:e.scrollbarYTop=o;var s=l.toInt(e.scrollbarYTop*(e.contentHeight-e.containerHeight)/(e.containerHeight-e.railYRatio*e.scrollbarYHeight));c(t,"top",s)}var r=null,o=null,s=function(e){n(e.pageY-o),a(t),e.stopPropagation(),e.preventDefault()},u=function(){l.stopScrolling(t,"y"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarY,"mousedown",function(n){o=n.pageY,r=l.toInt(i.css(e.scrollbarY,"top"))*e.railYRatio,l.startScrolling(t,"y"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}var i=t("../../lib/dom"),l=t("../../lib/helper"),s=t("../instances"),a=t("../update-geometry"),c=t("../update-scroll");e.exports=function(t){var e=s.get(t);r(t,e),o(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&0>r)return!e.settings.wheelPropagation}var i=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===i&&0>n||i>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}var r=!1;e.event.bind(t,"mouseenter",function(){r=!0}),e.event.bind(t,"mouseleave",function(){r=!1});var i=!1;e.event.bind(e.ownerDocument,"keydown",function(a){if((!a.isDefaultPrevented||!a.isDefaultPrevented())&&r){var c=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(c){for(;c.shadowRoot;)c=c.shadowRoot.activeElement;if(o.isEditable(c))return}var u=0,d=0;switch(a.which){case 37:u=-30;break;case 38:d=30;break;case 39:u=30;break;case 40:d=-30;break;case 33:d=90;break;case 32:d=a.shiftKey?90:-90;break;case 34:d=-90;break;case 35:d=a.ctrlKey?-e.contentHeight:-e.containerHeight;break;case 36:d=a.ctrlKey?t.scrollTop:e.containerHeight;break;default:return}s(t,"top",t.scrollTop-d),s(t,"left",t.scrollLeft+u),l(t),i=n(u,d),i&&a.preventDefault()}})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&0>r)return!e.settings.wheelPropagation}var i=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===i&&0>n||i>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}function r(t){var e=t.deltaX,n=-1*t.deltaY;return("undefined"==typeof e||"undefined"==typeof n)&&(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!==e&&n!==n&&(e=0,n=t.wheelDelta),[e,n]}function i(e,n){var r=t.querySelector("textarea:hover");if(r){var o=r.scrollHeight-r.clientHeight;if(o>0&&!(0===r.scrollTop&&n>0||r.scrollTop===o&&0>n))return!0;var i=r.scrollLeft-r.clientWidth;if(i>0&&!(0===r.scrollLeft&&0>e||r.scrollLeft===i&&e>0))return!0}return!1}function a(a){if(o.env.isWebKit||!t.querySelector("select:focus")){var u=r(a),d=u[0],p=u[1];i(d,p)||(c=!1,e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(p?s(t,"top",t.scrollTop-p*e.settings.wheelSpeed):s(t,"top",t.scrollTop+d*e.settings.wheelSpeed),c=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(d?s(t,"left",t.scrollLeft+d*e.settings.wheelSpeed):s(t,"left",t.scrollLeft-p*e.settings.wheelSpeed),c=!0):(s(t,"top",t.scrollTop-p*e.settings.wheelSpeed),s(t,"left",t.scrollLeft+d*e.settings.wheelSpeed)),l(t),c=c||n(d,p),c&&(a.stopPropagation(),a.preventDefault()))}}var c=!1;"undefined"!=typeof window.onwheel?e.event.bind(t,"wheel",a):"undefined"!=typeof window.onmousewheel&&e.event.bind(t,"mousewheel",a)}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(t,e,n){"use strict";function r(t,e){e.event.bind(t,"scroll",function(){i(t)})}var o=t("../instances"),i=t("../update-geometry");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19}],15:[function(t,e,n){"use strict";function r(t,e){function n(){var t=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===t.toString().length?null:t.getRangeAt(0).commonAncestorContainer}function r(){c||(c=setInterval(function(){return i.get(t)?(s(t,"top",t.scrollTop+u.top),s(t,"left",t.scrollLeft+u.left),void l(t)):void clearInterval(c)},50))}function a(){c&&(clearInterval(c),c=null),o.stopScrolling(t)}var c=null,u={top:0,left:0},d=!1;e.event.bind(e.ownerDocument,"selectionchange",function(){t.contains(n())?d=!0:(d=!1,a())}),e.event.bind(window,"mouseup",function(){d&&(d=!1,a())}),e.event.bind(window,"mousemove",function(e){if(d){var n={x:e.pageX,y:e.pageY},i={left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight};n.x<i.left+3?(u.left=-5,o.startScrolling(t,"x")):n.x>i.right-3?(u.left=5,o.startScrolling(t,"x")):u.left=0,n.y<i.top+3?(i.top+3-n.y<5?u.top=-5:u.top=-20,o.startScrolling(t,"y")):n.y>i.bottom-3?(n.y-i.bottom+3<5?u.top=5:u.top=20,o.startScrolling(t,"y")):u.top=0,0===u.top&&0===u.left?a():r()}})}var o=t("../../lib/helper"),i=t("../instances"),l=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(t,e,n){"use strict";function r(t,e,n,r){function s(n,r){var o=t.scrollTop,i=t.scrollLeft,l=Math.abs(n),s=Math.abs(r);if(s>l){if(0>r&&o===e.contentHeight-e.containerHeight||r>0&&0===o)return!e.settings.swipePropagation}else if(l>s&&(0>n&&i===e.contentWidth-e.containerWidth||n>0&&0===i))return!e.settings.swipePropagation;return!0}function a(e,n){l(t,"top",t.scrollTop-n),l(t,"left",t.scrollLeft-e),i(t)}function c(){Y=!0}function u(){Y=!1}function d(t){return t.targetTouches?t.targetTouches[0]:t}function p(t){return t.targetTouches&&1===t.targetTouches.length?!0:t.pointerType&&"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE?!0:!1}function f(t){if(p(t)){w=!0;var e=d(t);b.pageX=e.pageX,b.pageY=e.pageY,g=(new Date).getTime(),null!==y&&clearInterval(y),t.stopPropagation()}}function h(t){if(!Y&&w&&p(t)){var e=d(t),n={pageX:e.pageX,pageY:e.pageY},r=n.pageX-b.pageX,o=n.pageY-b.pageY;a(r,o),b=n;var i=(new Date).getTime(),l=i-g;l>0&&(m.x=r/l,m.y=o/l,g=i),s(r,o)&&(t.stopPropagation(),t.preventDefault())}}function v(){!Y&&w&&(w=!1,clearInterval(y),y=setInterval(function(){return o.get(t)?Math.abs(m.x)<.01&&Math.abs(m.y)<.01?void clearInterval(y):(a(30*m.x,30*m.y),m.x*=.8,void(m.y*=.8)):void clearInterval(y)},10))}var b={},g=0,m={},y=null,Y=!1,w=!1;n&&(e.event.bind(window,"touchstart",c),e.event.bind(window,"touchend",u),e.event.bind(t,"touchstart",f),e.event.bind(t,"touchmove",h),e.event.bind(t,"touchend",v)),r&&(window.PointerEvent?(e.event.bind(window,"pointerdown",c),e.event.bind(window,"pointerup",u),e.event.bind(t,"pointerdown",f),e.event.bind(t,"pointermove",h),e.event.bind(t,"pointerup",v)):window.MSPointerEvent&&(e.event.bind(window,"MSPointerDown",c),e.event.bind(window,"MSPointerUp",u),e.event.bind(t,"MSPointerDown",f),e.event.bind(t,"MSPointerMove",h),e.event.bind(t,"MSPointerUp",v)))}var o=t("../instances"),i=t("../update-geometry"),l=t("../update-scroll");e.exports=function(t,e,n){var i=o.get(t);r(t,i,e,n)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(t,e,n){"use strict";var r=t("../lib/class"),o=t("../lib/helper"),i=t("./instances"),l=t("./update-geometry"),s=t("./handler/click-rail"),a=t("./handler/drag-scrollbar"),c=t("./handler/keyboard"),u=t("./handler/mouse-wheel"),d=t("./handler/native-scroll"),p=t("./handler/selection"),f=t("./handler/touch");e.exports=function(t,e){e="object"==typeof e?e:{},r.add(t,"ps-container");var n=i.add(t);n.settings=o.extend(n.settings,e),s(t),a(t),u(t),d(t),n.settings.useSelectionScroll&&p(t),(o.env.supportsTouch||o.env.supportsIePointer)&&f(t,o.env.supportsTouch,o.env.supportsIePointer),n.settings.useKeyboard&&c(t),l(t)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(t,e,n){"use strict";function r(t){var e=this;e.settings=d.clone(a),e.containerWidth=null,e.containerHeight=null,e.contentWidth=null,e.contentHeight=null,e.isRtl="rtl"===s.css(t,"direction"),e.isNegativeScroll=function(){var e=t.scrollLeft,n=null;return t.scrollLeft=-1,n=t.scrollLeft<0,t.scrollLeft=e,n}(),e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,e.event=new c,e.ownerDocument=t.ownerDocument||document,e.scrollbarXRail=s.appendTo(s.e("div","ps-scrollbar-x-rail"),t),e.scrollbarX=s.appendTo(s.e("div","ps-scrollbar-x"),e.scrollbarXRail),e.scrollbarXActive=null,e.scrollbarXWidth=null,e.scrollbarXLeft=null,e.scrollbarXBottom=d.toInt(s.css(e.scrollbarXRail,"bottom")),e.isScrollbarXUsingBottom=e.scrollbarXBottom===e.scrollbarXBottom,e.scrollbarXTop=e.isScrollbarXUsingBottom?null:d.toInt(s.css(e.scrollbarXRail,"top")),e.railBorderXWidth=d.toInt(s.css(e.scrollbarXRail,"borderLeftWidth"))+d.toInt(s.css(e.scrollbarXRail,"borderRightWidth")),s.css(e.scrollbarXRail,"display","block"),e.railXMarginWidth=d.toInt(s.css(e.scrollbarXRail,"marginLeft"))+d.toInt(s.css(e.scrollbarXRail,"marginRight")),s.css(e.scrollbarXRail,"display",""),e.railXWidth=null,e.railXRatio=null,e.scrollbarYRail=s.appendTo(s.e("div","ps-scrollbar-y-rail"),t),e.scrollbarY=s.appendTo(s.e("div","ps-scrollbar-y"),e.scrollbarYRail),e.scrollbarYActive=null,e.scrollbarYHeight=null,e.scrollbarYTop=null,e.scrollbarYRight=d.toInt(s.css(e.scrollbarYRail,"right")),e.isScrollbarYUsingRight=e.scrollbarYRight===e.scrollbarYRight,e.scrollbarYLeft=e.isScrollbarYUsingRight?null:d.toInt(s.css(e.scrollbarYRail,"left")),e.scrollbarYOuterWidth=e.isRtl?d.outerWidth(e.scrollbarY):null,e.railBorderYWidth=d.toInt(s.css(e.scrollbarYRail,"borderTopWidth"))+d.toInt(s.css(e.scrollbarYRail,"borderBottomWidth")),s.css(e.scrollbarYRail,"display","block"),e.railYMarginHeight=d.toInt(s.css(e.scrollbarYRail,"marginTop"))+d.toInt(s.css(e.scrollbarYRail,"marginBottom")),s.css(e.scrollbarYRail,"display",""),e.railYHeight=null,e.railYRatio=null}function o(t){return"undefined"==typeof t.dataset?t.getAttribute("data-ps-id"):t.dataset.psId}function i(t,e){"undefined"==typeof t.dataset?t.setAttribute("data-ps-id",e):t.dataset.psId=e}function l(t){"undefined"==typeof t.dataset?t.removeAttribute("data-ps-id"):delete t.dataset.psId}var s=t("../lib/dom"),a=t("./default-setting"),c=t("../lib/event-manager"),u=t("../lib/guid"),d=t("../lib/helper"),p={};n.add=function(t){var e=u();return i(t,e),p[e]=new r(t),p[e]},n.remove=function(t){delete p[o(t)],l(t)},n.get=function(t){return p[o(t)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(t,e,n){"use strict";function r(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function o(t,e){var n={width:e.railXWidth};e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:n.left=t.scrollLeft,e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-t.scrollTop:n.top=e.scrollbarXTop+t.scrollTop,l.css(e.scrollbarXRail,n);var r={top:t.scrollTop,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?r.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth:r.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?r.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:r.left=e.scrollbarYLeft+t.scrollLeft,l.css(e.scrollbarYRail,r),l.css(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),l.css(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}var i=t("../lib/class"),l=t("../lib/dom"),s=t("../lib/helper"),a=t("./instances"),c=t("./update-scroll");e.exports=function(t){var e=a.get(t);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight;var n;t.contains(e.scrollbarXRail)||(n=l.queryChildren(t,".ps-scrollbar-x-rail"),n.length>0&&n.forEach(function(t){l.remove(t)}),l.appendTo(e.scrollbarXRail,t)),t.contains(e.scrollbarYRail)||(n=l.queryChildren(t,".ps-scrollbar-y-rail"),n.length>0&&n.forEach(function(t){l.remove(t)}),l.appendTo(e.scrollbarYRail,t)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=r(e,s.toInt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=s.toInt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):(e.scrollbarXActive=!1,e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=0),!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=r(e,s.toInt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=s.toInt(t.scrollTop*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):(e.scrollbarYActive=!1,e.scrollbarYHeight=0,e.scrollbarYTop=0,c(t,"top",0)),e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),o(t,e),i[e.scrollbarXActive?"add":"remove"](t,"ps-active-x"),i[e.scrollbarYActive?"add":"remove"](t,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(t,e,n){"use strict";var r,o,i=t("./instances"),l=document.createEvent("Event"),s=document.createEvent("Event"),a=document.createEvent("Event"),c=document.createEvent("Event"),u=document.createEvent("Event"),d=document.createEvent("Event"),p=document.createEvent("Event"),f=document.createEvent("Event"),h=document.createEvent("Event"),v=document.createEvent("Event");l.initEvent("ps-scroll-up",!0,!0),s.initEvent("ps-scroll-down",!0,!0),a.initEvent("ps-scroll-left",!0,!0),c.initEvent("ps-scroll-right",!0,!0),u.initEvent("ps-scroll-y",!0,!0),d.initEvent("ps-scroll-x",!0,!0),p.initEvent("ps-x-reach-start",!0,!0),f.initEvent("ps-x-reach-end",!0,!0),h.initEvent("ps-y-reach-start",!0,!0),v.initEvent("ps-y-reach-end",!0,!0),e.exports=function(t,e,n){if("undefined"==typeof t)throw"You must provide an element to the update-scroll function";if("undefined"==typeof e)throw"You must provide an axis to the update-scroll function";if("undefined"==typeof n)throw"You must provide a value to the update-scroll function";if("top"===e&&0>=n)return t.scrollTop=0,void t.dispatchEvent(h);if("left"===e&&0>=n)return t.scrollLeft=0,void t.dispatchEvent(p);var b=i.get(t);return"top"===e&&n>b.contentHeight-b.containerHeight?(t.scrollTop=b.contentHeight-b.containerHeight,void t.dispatchEvent(v)):"left"===e&&n>b.contentWidth-b.containerWidth?(t.scrollLeft=b.contentWidth-b.containerWidth,void t.dispatchEvent(f)):(r||(r=t.scrollTop),o||(o=t.scrollLeft),"top"===e&&r>n&&t.dispatchEvent(l),"top"===e&&n>r&&t.dispatchEvent(s),"left"===e&&o>n&&t.dispatchEvent(a),"left"===e&&n>o&&t.dispatchEvent(c),"top"===e&&(t.scrollTop=r=n,t.dispatchEvent(u)),void("left"===e&&(t.scrollLeft=o=n,t.dispatchEvent(d))))}},{"./instances":18}],21:[function(t,e,n){"use strict";var r=t("../lib/dom"),o=t("../lib/helper"),i=t("./instances"),l=t("./update-geometry");e.exports=function(t){var e=i.get(t);e&&(e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,r.css(e.scrollbarXRail,"display","block"),r.css(e.scrollbarYRail,"display","block"),e.railXMarginWidth=o.toInt(r.css(e.scrollbarXRail,"marginLeft"))+o.toInt(r.css(e.scrollbarXRail,"marginRight")),e.railYMarginHeight=o.toInt(r.css(e.scrollbarYRail,"marginTop"))+o.toInt(r.css(e.scrollbarYRail,"marginBottom")),r.css(e.scrollbarXRail,"display","none"),r.css(e.scrollbarYRail,"display","none"),l(t),r.css(e.scrollbarXRail,"display",""),r.css(e.scrollbarYRail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19}]},{},[1]);
\ No newline at end of file diff --git a/web/static/js/react-with-addons-0.13.3.js b/web/static/js/react-0.14.0.js index c1578b776..7ca7f8e80 100644 --- a/web/static/js/react-with-addons-0.13.3.js +++ b/web/static/js/react-0.14.0.js @@ -1,6 +1,6 @@ -/** - * React (with addons) v0.13.3 - */ + /** + * React v0.14.0 + */ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. @@ -10,52 +10,38 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactWithAddons - */ - -/** - * This module exists purely in the open source project, and is meant as a way - * to create a separate standalone build of React. This build has "addons", or - * functionality we've built and think might be useful but doesn't have a good - * place to live inside React core. + * @providesModule React */ 'use strict'; -var LinkedStateMixin = _dereq_(25); -var React = _dereq_(31); -var ReactComponentWithPureRenderMixin = - _dereq_(42); -var ReactCSSTransitionGroup = _dereq_(34); -var ReactFragment = _dereq_(69); -var ReactTransitionGroup = _dereq_(98); -var ReactUpdates = _dereq_(100); - -var cx = _dereq_(127); -var cloneWithProps = _dereq_(122); -var update = _dereq_(170); - -React.addons = { - CSSTransitionGroup: ReactCSSTransitionGroup, - LinkedStateMixin: LinkedStateMixin, - PureRenderMixin: ReactComponentWithPureRenderMixin, - TransitionGroup: ReactTransitionGroup, - - batchedUpdates: ReactUpdates.batchedUpdates, - classSet: cx, - cloneWithProps: cloneWithProps, - createFragment: ReactFragment.create, - update: update -}; +var ReactDOM = _dereq_(35); +var ReactDOMServer = _dereq_(45); +var ReactIsomorphic = _dereq_(63); -if ("production" !== "development") { - React.addons.Perf = _dereq_(61); - React.addons.TestUtils = _dereq_(95); -} +var assign = _dereq_(23); +var deprecated = _dereq_(105); -module.exports = React; +// `version` will be added here by ReactIsomorphic. +var React = {}; + +assign(React, ReactIsomorphic); -},{"100":100,"122":122,"127":127,"170":170,"25":25,"31":31,"34":34,"42":42,"61":61,"69":69,"95":95,"98":98}],2:[function(_dereq_,module,exports){ +assign(React, { + // ReactDOM + findDOMNode: deprecated('findDOMNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.findDOMNode), + render: deprecated('render', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.render), + unmountComponentAtNode: deprecated('unmountComponentAtNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.unmountComponentAtNode), + + // ReactDOMServer + renderToString: deprecated('renderToString', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToString), + renderToStaticMarkup: deprecated('renderToStaticMarkup', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToStaticMarkup) +}); + +React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOM; + +module.exports = React; +},{"105":105,"23":23,"35":35,"45":45,"63":63}],2:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -64,25 +50,35 @@ module.exports = React; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule AutoFocusMixin + * @providesModule AutoFocusUtils * @typechecks static-only */ 'use strict'; -var focusNode = _dereq_(134); +var ReactMount = _dereq_(65); + +var findDOMNode = _dereq_(107); +var focusNode = _dereq_(137); -var AutoFocusMixin = { - componentDidMount: function() { +var Mixin = { + componentDidMount: function () { if (this.props.autoFocus) { - focusNode(this.getDOMNode()); + focusNode(findDOMNode(this)); } } }; -module.exports = AutoFocusMixin; +var AutoFocusUtils = { + Mixin: Mixin, + + focusDOMComponent: function () { + focusNode(ReactMount.getNode(this._rootNodeID)); + } +}; -},{"134":134}],3:[function(_dereq_,module,exports){ +module.exports = AutoFocusUtils; +},{"107":107,"137":137,"65":65}],3:[function(_dereq_,module,exports){ /** * Copyright 2013-2015 Facebook, Inc. * All rights reserved. @@ -97,22 +93,19 @@ module.exports = AutoFocusMixin; 'use strict'; -var EventConstants = _dereq_(16); -var EventPropagators = _dereq_(21); -var ExecutionEnvironment = _dereq_(22); -var FallbackCompositionState = _dereq_(23); -var SyntheticCompositionEvent = _dereq_(106); -var SyntheticInputEvent = _dereq_(110); +var EventConstants = _dereq_(15); +var EventPropagators = _dereq_(19); +var ExecutionEnvironment = _dereq_(129); +var FallbackCompositionState = _dereq_(20); +var SyntheticCompositionEvent = _dereq_(90); +var SyntheticInputEvent = _dereq_(94); -var keyOf = _dereq_(157); +var keyOf = _dereq_(147); var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space var START_KEYCODE = 229; -var canUseCompositionEvent = ( - ExecutionEnvironment.canUseDOM && - 'CompositionEvent' in window -); +var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; var documentMode = null; if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { @@ -122,22 +115,12 @@ if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { // Webkit offers a very useful `textInput` event that can be used to // directly represent `beforeInput`. The IE `textinput` event is not as // useful, so we don't use it. -var canUseTextInputEvent = ( - ExecutionEnvironment.canUseDOM && - 'TextEvent' in window && - !documentMode && - !isPresto() -); +var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); // In IE9+, we have access to composition events, but the data supplied // by the native compositionend event may be incorrect. Japanese ideographic // spaces, for instance (\u3000) are not recorded correctly. -var useFallbackCompositionData = ( - ExecutionEnvironment.canUseDOM && - ( - (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11) - ) -); +var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); /** * Opera <= 12 includes TextEvent in window, but does not fire @@ -145,11 +128,7 @@ var useFallbackCompositionData = ( */ function isPresto() { var opera = window.opera; - return ( - typeof opera === 'object' && - typeof opera.version === 'function' && - parseInt(opera.version(), 10) <= 12 - ); + return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; } var SPACEBAR_CODE = 32; @@ -161,57 +140,31 @@ var topLevelTypes = EventConstants.topLevelTypes; var eventTypes = { beforeInput: { phasedRegistrationNames: { - bubbled: keyOf({onBeforeInput: null}), - captured: keyOf({onBeforeInputCapture: null}) + bubbled: keyOf({ onBeforeInput: null }), + captured: keyOf({ onBeforeInputCapture: null }) }, - dependencies: [ - topLevelTypes.topCompositionEnd, - topLevelTypes.topKeyPress, - topLevelTypes.topTextInput, - topLevelTypes.topPaste - ] + dependencies: [topLevelTypes.topCompositionEnd, topLevelTypes.topKeyPress, topLevelTypes.topTextInput, topLevelTypes.topPaste] }, compositionEnd: { phasedRegistrationNames: { - bubbled: keyOf({onCompositionEnd: null}), - captured: keyOf({onCompositionEndCapture: null}) + bubbled: keyOf({ onCompositionEnd: null }), + captured: keyOf({ onCompositionEndCapture: null }) }, - dependencies: [ - topLevelTypes.topBlur, - topLevelTypes.topCompositionEnd, - topLevelTypes.topKeyDown, - topLevelTypes.topKeyPress, - topLevelTypes.topKeyUp, - topLevelTypes.topMouseDown - ] + dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionEnd, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown] }, compositionStart: { phasedRegistrationNames: { - bubbled: keyOf({onCompositionStart: null}), - captured: keyOf({onCompositionStartCapture: null}) + bubbled: keyOf({ onCompositionStart: null }), + captured: keyOf({ onCompositionStartCapture: null }) }, - dependencies: [ - topLevelTypes.topBlur, - topLevelTypes.topCompositionStart, - topLevelTypes.topKeyDown, - topLevelTypes.topKeyPress, - topLevelTypes.topKeyUp, - topLevelTypes.topMouseDown - ] + dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionStart, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown] }, compositionUpdate: { phasedRegistrationNames: { - bubbled: keyOf({onCompositionUpdate: null}), - captured: keyOf({onCompositionUpdateCapture: null}) + bubbled: keyOf({ onCompositionUpdate: null }), + captured: keyOf({ onCompositionUpdateCapture: null }) }, - dependencies: [ - topLevelTypes.topBlur, - topLevelTypes.topCompositionUpdate, - topLevelTypes.topKeyDown, - topLevelTypes.topKeyPress, - topLevelTypes.topKeyUp, - topLevelTypes.topMouseDown - ] + dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionUpdate, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown] } }; @@ -224,14 +177,11 @@ var hasSpaceKeypress = false; * (cut, copy, select-all, etc.) even though no character is inserted. */ function isKeypressCommand(nativeEvent) { - return ( - (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && - // ctrlKey && altKey is equivalent to AltGr, and is not a command. - !(nativeEvent.ctrlKey && nativeEvent.altKey) - ); + return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey); } - /** * Translate native top level events into event types. * @@ -258,10 +208,7 @@ function getCompositionEventType(topLevelType) { * @return {boolean} */ function isFallbackCompositionStart(topLevelType, nativeEvent) { - return ( - topLevelType === topLevelTypes.topKeyDown && - nativeEvent.keyCode === START_KEYCODE - ); + return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE; } /** @@ -275,11 +222,11 @@ function isFallbackCompositionEnd(topLevelType, nativeEvent) { switch (topLevelType) { case topLevelTypes.topKeyUp: // Command keys insert or clear IME input. - return (END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1); + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; case topLevelTypes.topKeyDown: // Expect IME keyCode on each keydown. If we get any other // code we must have exited earlier. - return (nativeEvent.keyCode !== START_KEYCODE); + return nativeEvent.keyCode !== START_KEYCODE; case topLevelTypes.topKeyPress: case topLevelTypes.topMouseDown: case topLevelTypes.topBlur: @@ -317,12 +264,7 @@ var currentComposition = null; * @param {object} nativeEvent Native browser event. * @return {?object} A SyntheticCompositionEvent. */ -function extractCompositionEvent( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent -) { +function extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) { var eventType; var fallbackData; @@ -352,11 +294,7 @@ function extractCompositionEvent( } } - var event = SyntheticCompositionEvent.getPooled( - eventType, - topLevelTargetID, - nativeEvent - ); + var event = SyntheticCompositionEvent.getPooled(eventType, topLevelTargetID, nativeEvent, nativeEventTarget); if (fallbackData) { // Inject data generated from fallback path into the synthetic event. @@ -436,10 +374,7 @@ function getFallbackBeforeInputChars(topLevelType, nativeEvent) { // If we are currently composing (IME) and using a fallback to do so, // try to extract the composed characters from the fallback object. if (currentComposition) { - if ( - topLevelType === topLevelTypes.topCompositionEnd || - isFallbackCompositionEnd(topLevelType, nativeEvent) - ) { + if (topLevelType === topLevelTypes.topCompositionEnd || isFallbackCompositionEnd(topLevelType, nativeEvent)) { var chars = currentComposition.getData(); FallbackCompositionState.release(currentComposition); currentComposition = null; @@ -491,12 +426,7 @@ function getFallbackBeforeInputChars(topLevelType, nativeEvent) { * @param {object} nativeEvent Native browser event. * @return {?object} A SyntheticInputEvent. */ -function extractBeforeInputEvent( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent -) { +function extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) { var chars; if (canUseTextInputEvent) { @@ -511,11 +441,7 @@ function extractBeforeInputEvent( return null; } - var event = SyntheticInputEvent.getPooled( - eventTypes.beforeInput, - topLevelTargetID, - nativeEvent - ); + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, topLevelTargetID, nativeEvent, nativeEventTarget); event.data = chars; EventPropagators.accumulateTwoPhaseDispatches(event); @@ -552,142 +478,13 @@ var BeforeInputEventPlugin = { * @return {*} An accumulation of synthetic events. * @see {EventPluginHub.extractEvents} */ - extractEvents: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent - ) { - return [ - extractCompositionEvent( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent - ), - extractBeforeInputEvent( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent - ) - ]; + extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) { + return [extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget)]; } }; module.exports = BeforeInputEventPlugin; - -},{"106":106,"110":110,"157":157,"16":16,"21":21,"22":22,"23":23}],4:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule CSSCore - * @typechecks - */ - -var invariant = _dereq_(150); - -/** - * The CSSCore module specifies the API (and implements most of the methods) - * that should be used when dealing with the display of elements (via their - * CSS classes and visibility on screen. It is an API focused on mutating the - * display and not reading it as no logical state should be encoded in the - * display of elements. - */ - -var CSSCore = { - - /** - * Adds the class passed in to the element if it doesn't already have it. - * - * @param {DOMElement} element the element to set the class on - * @param {string} className the CSS className - * @return {DOMElement} the element passed in - */ - addClass: function(element, className) { - ("production" !== "development" ? invariant( - !/\s/.test(className), - 'CSSCore.addClass takes only a single class name. "%s" contains ' + - 'multiple classes.', className - ) : invariant(!/\s/.test(className))); - - if (className) { - if (element.classList) { - element.classList.add(className); - } else if (!CSSCore.hasClass(element, className)) { - element.className = element.className + ' ' + className; - } - } - return element; - }, - - /** - * Removes the class passed in from the element - * - * @param {DOMElement} element the element to set the class on - * @param {string} className the CSS className - * @return {DOMElement} the element passed in - */ - removeClass: function(element, className) { - ("production" !== "development" ? invariant( - !/\s/.test(className), - 'CSSCore.removeClass takes only a single class name. "%s" contains ' + - 'multiple classes.', className - ) : invariant(!/\s/.test(className))); - - if (className) { - if (element.classList) { - element.classList.remove(className); - } else if (CSSCore.hasClass(element, className)) { - element.className = element.className - .replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1') - .replace(/\s+/g, ' ') // multiple spaces to one - .replace(/^\s*|\s*$/g, ''); // trim the ends - } - } - return element; - }, - - /** - * Helper to add or remove a class from an element based on a condition. - * - * @param {DOMElement} element the element to set the class on - * @param {string} className the CSS className - * @param {*} bool condition to whether to add or remove the class - * @return {DOMElement} the element passed in - */ - conditionClass: function(element, className, bool) { - return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className); - }, - - /** - * Tests whether the element has the class specified. - * - * @param {DOMNode|DOMWindow} element the element to set the class on - * @param {string} className the CSS className - * @return {boolean} true if the element has the class, false if not - */ - hasClass: function(element, className) { - ("production" !== "development" ? invariant( - !/\s/.test(className), - 'CSS.hasClass takes only a single class name.' - ) : invariant(!/\s/.test(className))); - if (element.classList) { - return !!className && element.classList.contains(className); - } - return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1; - } - -}; - -module.exports = CSSCore; - -},{"150":150}],5:[function(_dereq_,module,exports){ +},{"129":129,"147":147,"15":15,"19":19,"20":20,"90":90,"94":94}],4:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -705,26 +502,31 @@ module.exports = CSSCore; * CSS properties which accept numbers but are not in units of "px". */ var isUnitlessNumber = { + animationIterationCount: true, boxFlex: true, boxFlexGroup: true, + boxOrdinalGroup: true, columnCount: true, flex: true, flexGrow: true, flexPositive: true, flexShrink: true, flexNegative: true, + flexOrder: true, fontWeight: true, lineClamp: true, lineHeight: true, opacity: true, order: true, orphans: true, + tabSize: true, widows: true, zIndex: true, zoom: true, // SVG-related properties fillOpacity: true, + stopOpacity: true, strokeDashoffset: true, strokeOpacity: true, strokeWidth: true @@ -748,8 +550,8 @@ var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an // infinite loop, because it iterates over the newly added props too. -Object.keys(isUnitlessNumber).forEach(function(prop) { - prefixes.forEach(function(prefix) { +Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; }); }); @@ -765,10 +567,16 @@ Object.keys(isUnitlessNumber).forEach(function(prop) { */ var shorthandPropertyExpansions = { background: { + backgroundAttachment: true, + backgroundColor: true, backgroundImage: true, - backgroundPosition: true, - backgroundRepeat: true, - backgroundColor: true + backgroundPositionX: true, + backgroundPositionY: true, + backgroundRepeat: true + }, + backgroundPosition: { + backgroundPositionX: true, + backgroundPositionY: true }, border: { borderWidth: true, @@ -802,6 +610,11 @@ var shorthandPropertyExpansions = { fontSize: true, lineHeight: true, fontFamily: true + }, + outline: { + outlineWidth: true, + outlineStyle: true, + outlineColor: true } }; @@ -811,8 +624,7 @@ var CSSProperty = { }; module.exports = CSSProperty; - -},{}],6:[function(_dereq_,module,exports){ +},{}],5:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -827,28 +639,37 @@ module.exports = CSSProperty; 'use strict'; -var CSSProperty = _dereq_(5); -var ExecutionEnvironment = _dereq_(22); +var CSSProperty = _dereq_(4); +var ExecutionEnvironment = _dereq_(129); +var ReactPerf = _dereq_(71); -var camelizeStyleName = _dereq_(121); -var dangerousStyleValue = _dereq_(128); -var hyphenateStyleName = _dereq_(148); -var memoizeStringOnly = _dereq_(159); -var warning = _dereq_(171); +var camelizeStyleName = _dereq_(131); +var dangerousStyleValue = _dereq_(104); +var hyphenateStyleName = _dereq_(142); +var memoizeStringOnly = _dereq_(149); +var warning = _dereq_(154); -var processStyleName = memoizeStringOnly(function(styleName) { +var processStyleName = memoizeStringOnly(function (styleName) { return hyphenateStyleName(styleName); }); +var hasShorthandPropertyBug = false; var styleFloatAccessor = 'cssFloat'; if (ExecutionEnvironment.canUseDOM) { + var tempStyle = document.createElement('div').style; + try { + // IE8 throws "Invalid argument." if resetting shorthand style properties. + tempStyle.font = ''; + } catch (e) { + hasShorthandPropertyBug = true; + } // IE8 only supports accessing cssFloat (standard) as styleFloat if (document.documentElement.style.cssFloat === undefined) { styleFloatAccessor = 'styleFloat'; } } -if ("production" !== "development") { +if ("development" !== 'production') { // 'msTransform' is correct, but the other prefixes should be capitalized var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; @@ -858,54 +679,38 @@ if ("production" !== "development") { var warnedStyleNames = {}; var warnedStyleValues = {}; - var warnHyphenatedStyleName = function(name) { + var warnHyphenatedStyleName = function (name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; - ("production" !== "development" ? warning( - false, - 'Unsupported style property %s. Did you mean %s?', - name, - camelizeStyleName(name) - ) : null); + "development" !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?', name, camelizeStyleName(name)) : undefined; }; - var warnBadVendoredStyleName = function(name) { + var warnBadVendoredStyleName = function (name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; - ("production" !== "development" ? warning( - false, - 'Unsupported vendor-prefixed style property %s. Did you mean %s?', - name, - name.charAt(0).toUpperCase() + name.slice(1) - ) : null); + "development" !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)) : undefined; }; - var warnStyleValueWithSemicolon = function(name, value) { + var warnStyleValueWithSemicolon = function (name, value) { if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { return; } warnedStyleValues[value] = true; - ("production" !== "development" ? warning( - false, - 'Style property values shouldn\'t contain a semicolon. ' + - 'Try "%s: %s" instead.', - name, - value.replace(badStyleValueWithSemicolonPattern, '') - ) : null); + "development" !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon. ' + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')) : undefined; }; /** * @param {string} name * @param {*} value */ - var warnValidStyle = function(name, value) { + var warnValidStyle = function (name, value) { if (name.indexOf('-') > -1) { warnHyphenatedStyleName(name); } else if (badVendoredStyleNamePattern.test(name)) { @@ -933,14 +738,14 @@ var CSSPropertyOperations = { * @param {object} styles * @return {?string} */ - createMarkupForStyles: function(styles) { + createMarkupForStyles: function (styles) { var serialized = ''; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } var styleValue = styles[styleName]; - if ("production" !== "development") { + if ("development" !== 'production') { warnValidStyle(styleName, styleValue); } if (styleValue != null) { @@ -958,13 +763,13 @@ var CSSPropertyOperations = { * @param {DOMElement} node * @param {object} styles */ - setValueForStyles: function(node, styles) { + setValueForStyles: function (node, styles) { var style = node.style; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } - if ("production" !== "development") { + if ("development" !== 'production') { warnValidStyle(styleName, styles[styleName]); } var styleValue = dangerousStyleValue(styleName, styles[styleName]); @@ -974,7 +779,7 @@ var CSSPropertyOperations = { if (styleValue) { style[styleName] = styleValue; } else { - var expansion = CSSProperty.shorthandPropertyExpansions[styleName]; + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; if (expansion) { // Shorthand property that IE8 won't like unsetting, so unset each // component to placate it @@ -990,9 +795,12 @@ var CSSPropertyOperations = { }; -module.exports = CSSPropertyOperations; +ReactPerf.measureMethods(CSSPropertyOperations, 'CSSPropertyOperations', { + setValueForStyles: 'setValueForStyles' +}); -},{"121":121,"128":128,"148":148,"159":159,"171":171,"22":22,"5":5}],7:[function(_dereq_,module,exports){ +module.exports = CSSPropertyOperations; +},{"104":104,"129":129,"131":131,"142":142,"149":149,"154":154,"4":4,"71":71}],6:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -1006,10 +814,10 @@ module.exports = CSSPropertyOperations; 'use strict'; -var PooledClass = _dereq_(30); +var PooledClass = _dereq_(24); -var assign = _dereq_(29); -var invariant = _dereq_(150); +var assign = _dereq_(23); +var invariant = _dereq_(143); /** * A specialized pseudo-event module to help keep track of components waiting to @@ -1036,7 +844,7 @@ assign(CallbackQueue.prototype, { * @param {?object} context Context to call `callback` with. * @internal */ - enqueue: function(callback, context) { + enqueue: function (callback, context) { this._callbacks = this._callbacks || []; this._contexts = this._contexts || []; this._callbacks.push(callback); @@ -1049,17 +857,14 @@ assign(CallbackQueue.prototype, { * * @internal */ - notifyAll: function() { + notifyAll: function () { var callbacks = this._callbacks; var contexts = this._contexts; if (callbacks) { - ("production" !== "development" ? invariant( - callbacks.length === contexts.length, - 'Mismatched list of contexts in callback queue' - ) : invariant(callbacks.length === contexts.length)); + !(callbacks.length === contexts.length) ? "development" !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : invariant(false) : undefined; this._callbacks = null; this._contexts = null; - for (var i = 0, l = callbacks.length; i < l; i++) { + for (var i = 0; i < callbacks.length; i++) { callbacks[i].call(contexts[i]); } callbacks.length = 0; @@ -1072,7 +877,7 @@ assign(CallbackQueue.prototype, { * * @internal */ - reset: function() { + reset: function () { this._callbacks = null; this._contexts = null; }, @@ -1080,7 +885,7 @@ assign(CallbackQueue.prototype, { /** * `PooledClass` looks for this. */ - destructor: function() { + destructor: function () { this.reset(); } @@ -1089,8 +894,7 @@ assign(CallbackQueue.prototype, { PooledClass.addPoolingTo(CallbackQueue); module.exports = CallbackQueue; - -},{"150":150,"29":29,"30":30}],8:[function(_dereq_,module,exports){ +},{"143":143,"23":23,"24":24}],7:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -1104,35 +908,27 @@ module.exports = CallbackQueue; 'use strict'; -var EventConstants = _dereq_(16); -var EventPluginHub = _dereq_(18); -var EventPropagators = _dereq_(21); -var ExecutionEnvironment = _dereq_(22); -var ReactUpdates = _dereq_(100); -var SyntheticEvent = _dereq_(108); +var EventConstants = _dereq_(15); +var EventPluginHub = _dereq_(16); +var EventPropagators = _dereq_(19); +var ExecutionEnvironment = _dereq_(129); +var ReactUpdates = _dereq_(83); +var SyntheticEvent = _dereq_(92); -var isEventSupported = _dereq_(151); -var isTextInputElement = _dereq_(153); -var keyOf = _dereq_(157); +var getEventTarget = _dereq_(113); +var isEventSupported = _dereq_(118); +var isTextInputElement = _dereq_(119); +var keyOf = _dereq_(147); var topLevelTypes = EventConstants.topLevelTypes; var eventTypes = { change: { phasedRegistrationNames: { - bubbled: keyOf({onChange: null}), - captured: keyOf({onChangeCapture: null}) + bubbled: keyOf({ onChange: null }), + captured: keyOf({ onChangeCapture: null }) }, - dependencies: [ - topLevelTypes.topBlur, - topLevelTypes.topChange, - topLevelTypes.topClick, - topLevelTypes.topFocus, - topLevelTypes.topInput, - topLevelTypes.topKeyDown, - topLevelTypes.topKeyUp, - topLevelTypes.topSelectionChange - ] + dependencies: [topLevelTypes.topBlur, topLevelTypes.topChange, topLevelTypes.topClick, topLevelTypes.topFocus, topLevelTypes.topInput, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topSelectionChange] } }; @@ -1148,26 +944,18 @@ var activeElementValueProp = null; * SECTION: handle `change` event */ function shouldUseChangeEvent(elem) { - return ( - elem.nodeName === 'SELECT' || - (elem.nodeName === 'INPUT' && elem.type === 'file') - ); + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; } var doesChangeEventBubble = false; if (ExecutionEnvironment.canUseDOM) { // See `handleChange` comment below - doesChangeEventBubble = isEventSupported('change') && ( - (!('documentMode' in document) || document.documentMode > 8) - ); + doesChangeEventBubble = isEventSupported('change') && (!('documentMode' in document) || document.documentMode > 8); } function manualDispatchChangeEvent(nativeEvent) { - var event = SyntheticEvent.getPooled( - eventTypes.change, - activeElementID, - nativeEvent - ); + var event = SyntheticEvent.getPooled(eventTypes.change, activeElementID, nativeEvent, getEventTarget(nativeEvent)); EventPropagators.accumulateTwoPhaseDispatches(event); // If change and propertychange bubbled, we'd just bind to it like all the @@ -1186,7 +974,7 @@ function manualDispatchChangeEvent(nativeEvent) { function runEventInBatch(event) { EventPluginHub.enqueueEvents(event); - EventPluginHub.processEventQueue(); + EventPluginHub.processEventQueue(false); } function startWatchingForChangeEventIE8(target, targetID) { @@ -1204,18 +992,12 @@ function stopWatchingForChangeEventIE8() { activeElementID = null; } -function getTargetIDForChangeEvent( - topLevelType, - topLevelTarget, - topLevelTargetID) { +function getTargetIDForChangeEvent(topLevelType, topLevelTarget, topLevelTargetID) { if (topLevelType === topLevelTypes.topChange) { return topLevelTargetID; } } -function handleEventsForChangeEventIE8( - topLevelType, - topLevelTarget, - topLevelTargetID) { +function handleEventsForChangeEventIE8(topLevelType, topLevelTarget, topLevelTargetID) { if (topLevelType === topLevelTypes.topFocus) { // stopWatching() should be a noop here but we call it just in case we // missed a blur event somehow. @@ -1226,7 +1008,6 @@ function handleEventsForChangeEventIE8( } } - /** * SECTION: handle `input` event */ @@ -1234,20 +1015,18 @@ var isInputEventSupported = false; if (ExecutionEnvironment.canUseDOM) { // IE9 claims to support the input event but fails to trigger it when // deleting text, so we ignore its input events - isInputEventSupported = isEventSupported('input') && ( - (!('documentMode' in document) || document.documentMode > 9) - ); + isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9); } /** * (For old IE.) Replacement getter/setter for the `value` property that gets * set on the active element. */ -var newValueProp = { - get: function() { +var newValueProp = { + get: function () { return activeElementValueProp.get.call(this); }, - set: function(val) { + set: function (val) { // Cast to a string so we can do equality checks. activeElementValue = '' + val; activeElementValueProp.set.call(this, val); @@ -1263,10 +1042,7 @@ function startWatchingForValueChange(target, targetID) { activeElement = target; activeElementID = targetID; activeElementValue = target.value; - activeElementValueProp = Object.getOwnPropertyDescriptor( - target.constructor.prototype, - 'value' - ); + activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value'); Object.defineProperty(activeElement, 'value', newValueProp); activeElement.attachEvent('onpropertychange', handlePropertyChange); @@ -1311,10 +1087,7 @@ function handlePropertyChange(nativeEvent) { /** * If a `change` event should be fired, returns the target's ID. */ -function getTargetIDForInputEvent( - topLevelType, - topLevelTarget, - topLevelTargetID) { +function getTargetIDForInputEvent(topLevelType, topLevelTarget, topLevelTargetID) { if (topLevelType === topLevelTypes.topInput) { // In modern browsers (i.e., not IE8 or IE9), the input event is exactly // what we want so fall through here and trigger an abstract event @@ -1323,10 +1096,7 @@ function getTargetIDForInputEvent( } // For IE8 and IE9. -function handleEventsForInputEventIE( - topLevelType, - topLevelTarget, - topLevelTargetID) { +function handleEventsForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) { if (topLevelType === topLevelTypes.topFocus) { // In IE8, we can capture almost all .value changes by adding a // propertychange handler and looking for events with propertyName @@ -1349,13 +1119,8 @@ function handleEventsForInputEventIE( } // For IE8 and IE9. -function getTargetIDForInputEventIE( - topLevelType, - topLevelTarget, - topLevelTargetID) { - if (topLevelType === topLevelTypes.topSelectionChange || - topLevelType === topLevelTypes.topKeyUp || - topLevelType === topLevelTypes.topKeyDown) { +function getTargetIDForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) { + if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. // @@ -1373,7 +1138,6 @@ function getTargetIDForInputEventIE( } } - /** * SECTION: handle `click` event */ @@ -1381,16 +1145,10 @@ function shouldUseClickEvent(elem) { // Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. - return ( - elem.nodeName === 'INPUT' && - (elem.type === 'checkbox' || elem.type === 'radio') - ); + return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); } -function getTargetIDForClickEvent( - topLevelType, - topLevelTarget, - topLevelTargetID) { +function getTargetIDForClickEvent(topLevelType, topLevelTarget, topLevelTargetID) { if (topLevelType === topLevelTypes.topClick) { return topLevelTargetID; } @@ -1418,11 +1176,7 @@ var ChangeEventPlugin = { * @return {*} An accumulation of synthetic events. * @see {EventPluginHub.extractEvents} */ - extractEvents: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent) { + extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) { var getTargetIDFunc, handleEventFunc; if (shouldUseChangeEvent(topLevelTarget)) { @@ -1443,36 +1197,24 @@ var ChangeEventPlugin = { } if (getTargetIDFunc) { - var targetID = getTargetIDFunc( - topLevelType, - topLevelTarget, - topLevelTargetID - ); + var targetID = getTargetIDFunc(topLevelType, topLevelTarget, topLevelTargetID); if (targetID) { - var event = SyntheticEvent.getPooled( - eventTypes.change, - targetID, - nativeEvent - ); + var event = SyntheticEvent.getPooled(eventTypes.change, targetID, nativeEvent, nativeEventTarget); + event.type = 'change'; EventPropagators.accumulateTwoPhaseDispatches(event); return event; } } if (handleEventFunc) { - handleEventFunc( - topLevelType, - topLevelTarget, - topLevelTargetID - ); + handleEventFunc(topLevelType, topLevelTarget, topLevelTargetID); } } }; module.exports = ChangeEventPlugin; - -},{"100":100,"108":108,"151":151,"153":153,"157":157,"16":16,"18":18,"21":21,"22":22}],9:[function(_dereq_,module,exports){ +},{"113":113,"118":118,"119":119,"129":129,"147":147,"15":15,"16":16,"19":19,"83":83,"92":92}],8:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -1490,14 +1232,13 @@ module.exports = ChangeEventPlugin; var nextReactRootIndex = 0; var ClientReactRootIndex = { - createReactRootIndex: function() { + createReactRootIndex: function () { return nextReactRootIndex++; } }; module.exports = ClientReactRootIndex; - -},{}],10:[function(_dereq_,module,exports){ +},{}],9:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -1512,11 +1253,13 @@ module.exports = ClientReactRootIndex; 'use strict'; -var Danger = _dereq_(13); -var ReactMultiChildUpdateTypes = _dereq_(79); +var Danger = _dereq_(12); +var ReactMultiChildUpdateTypes = _dereq_(67); +var ReactPerf = _dereq_(71); -var setTextContent = _dereq_(165); -var invariant = _dereq_(150); +var setInnerHTML = _dereq_(123); +var setTextContent = _dereq_(124); +var invariant = _dereq_(143); /** * Inserts `childNode` as a child of `parentNode` at the `index`. @@ -1531,10 +1274,12 @@ function insertChildAt(parentNode, childNode, index) { // rely exclusively on `insertBefore(node, null)` instead of also using // `appendChild(node)`. However, using `undefined` is not allowed by all // browsers so we must replace it with `null`. - parentNode.insertBefore( - childNode, - parentNode.childNodes[index] || null - ); + + // fix render order error in safari + // IE8 will throw error when index out of list size. + var beforeChild = index >= parentNode.childNodes.length ? null : parentNode.childNodes.item(index); + + parentNode.insertBefore(childNode, beforeChild); } /** @@ -1554,7 +1299,7 @@ var DOMChildrenOperations = { * @param {array<string>} markupList List of markup strings. * @internal */ - processUpdates: function(updates, markupList) { + processUpdates: function (updates, markupList) { var update; // Mapping from parent IDs to initial child orderings. var initialChildren = null; @@ -1563,23 +1308,12 @@ var DOMChildrenOperations = { for (var i = 0; i < updates.length; i++) { update = updates[i]; - if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || - update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) { + if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) { var updatedIndex = update.fromIndex; var updatedChild = update.parentNode.childNodes[updatedIndex]; var parentID = update.parentID; - ("production" !== "development" ? invariant( - updatedChild, - 'processUpdates(): Unable to find child %s of element. This ' + - 'probably means the DOM was unexpectedly mutated (e.g., by the ' + - 'browser), usually due to forgetting a <tbody> when using tables, ' + - 'nesting tags like <form>, <p>, or <a>, or using non-SVG elements ' + - 'in an <svg> parent. Try inspecting the child nodes of the element ' + - 'with React ID `%s`.', - updatedIndex, - parentID - ) : invariant(updatedChild)); + !updatedChild ? "development" !== 'production' ? invariant(false, 'processUpdates(): Unable to find child %s of element. This ' + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + 'browser), usually due to forgetting a <tbody> when using tables, ' + 'nesting tags like <form>, <p>, or <a>, or using non-SVG elements ' + 'in an <svg> parent. Try inspecting the child nodes of the element ' + 'with React ID `%s`.', updatedIndex, parentID) : invariant(false) : undefined; initialChildren = initialChildren || {}; initialChildren[parentID] = initialChildren[parentID] || []; @@ -1590,7 +1324,13 @@ var DOMChildrenOperations = { } } - var renderedMarkup = Danger.dangerouslyRenderMarkup(markupList); + var renderedMarkup; + // markupList is either a list of markup or just a list of elements + if (markupList.length && typeof markupList[0] === 'string') { + renderedMarkup = Danger.dangerouslyRenderMarkup(markupList); + } else { + renderedMarkup = markupList; + } // Remove updated children first so that `toIndex` is consistent. if (updatedChildren) { @@ -1603,24 +1343,16 @@ var DOMChildrenOperations = { update = updates[k]; switch (update.type) { case ReactMultiChildUpdateTypes.INSERT_MARKUP: - insertChildAt( - update.parentNode, - renderedMarkup[update.markupIndex], - update.toIndex - ); + insertChildAt(update.parentNode, renderedMarkup[update.markupIndex], update.toIndex); break; case ReactMultiChildUpdateTypes.MOVE_EXISTING: - insertChildAt( - update.parentNode, - initialChildren[update.parentID][update.fromIndex], - update.toIndex - ); + insertChildAt(update.parentNode, initialChildren[update.parentID][update.fromIndex], update.toIndex); + break; + case ReactMultiChildUpdateTypes.SET_MARKUP: + setInnerHTML(update.parentNode, update.content); break; case ReactMultiChildUpdateTypes.TEXT_CONTENT: - setTextContent( - update.parentNode, - update.textContent - ); + setTextContent(update.parentNode, update.content); break; case ReactMultiChildUpdateTypes.REMOVE_NODE: // Already removed by the for-loop above. @@ -1631,9 +1363,12 @@ var DOMChildrenOperations = { }; -module.exports = DOMChildrenOperations; +ReactPerf.measureMethods(DOMChildrenOperations, 'DOMChildrenOperations', { + updateTextContent: 'updateTextContent' +}); -},{"13":13,"150":150,"165":165,"79":79}],11:[function(_dereq_,module,exports){ +module.exports = DOMChildrenOperations; +},{"12":12,"123":123,"124":124,"143":143,"67":67,"71":71}],10:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -1646,11 +1381,9 @@ module.exports = DOMChildrenOperations; * @typechecks static-only */ -/*jslint bitwise: true */ - 'use strict'; -var invariant = _dereq_(150); +var invariant = _dereq_(143); function checkMask(value, bitmask) { return (value & bitmask) === bitmask; @@ -1686,6 +1419,9 @@ var DOMPropertyInjection = { * attribute name. Attribute names not specified use the **lowercase** * normalized name. * + * DOMAttributeNamespaces: object mapping React attribute name to the DOM + * attribute namespace URL. (Attribute names not specified use no namespace.) + * * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. * Property names not specified use the normalized name. * @@ -1694,92 +1430,68 @@ var DOMPropertyInjection = { * * @param {object} domPropertyConfig the config as described above. */ - injectDOMPropertyConfig: function(domPropertyConfig) { + injectDOMPropertyConfig: function (domPropertyConfig) { + var Injection = DOMPropertyInjection; var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; if (domPropertyConfig.isCustomAttribute) { - DOMProperty._isCustomAttributeFunctions.push( - domPropertyConfig.isCustomAttribute - ); + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); } for (var propName in Properties) { - ("production" !== "development" ? invariant( - !DOMProperty.isStandardName.hasOwnProperty(propName), - 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + - '\'%s\' which has already been injected. You may be accidentally ' + - 'injecting the same DOM property config twice, or you may be ' + - 'injecting two configs that have conflicting property names.', - propName - ) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName))); - - DOMProperty.isStandardName[propName] = true; + !!DOMProperty.properties.hasOwnProperty(propName) ? "development" !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + '\'%s\' which has already been injected. You may be accidentally ' + 'injecting the same DOM property config twice, or you may be ' + 'injecting two configs that have conflicting property names.', propName) : invariant(false) : undefined; var lowerCased = propName.toLowerCase(); - DOMProperty.getPossibleStandardName[lowerCased] = propName; + var propConfig = Properties[propName]; + + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, + + mustUseAttribute: checkMask(propConfig, Injection.MUST_USE_ATTRIBUTE), + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasSideEffects: checkMask(propConfig, Injection.HAS_SIDE_EFFECTS), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) + }; + + !(!propertyInfo.mustUseAttribute || !propertyInfo.mustUseProperty) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Cannot require using both attribute and property: %s', propName) : invariant(false) : undefined; + !(propertyInfo.mustUseProperty || !propertyInfo.hasSideEffects) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Properties that have side effects must use property: %s', propName) : invariant(false) : undefined; + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName) : invariant(false) : undefined; + + if ("development" !== 'production') { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } if (DOMAttributeNames.hasOwnProperty(propName)) { var attributeName = DOMAttributeNames[propName]; - DOMProperty.getPossibleStandardName[attributeName] = propName; - DOMProperty.getAttributeName[propName] = attributeName; - } else { - DOMProperty.getAttributeName[propName] = lowerCased; + propertyInfo.attributeName = attributeName; + if ("development" !== 'production') { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } } - DOMProperty.getPropertyName[propName] = - DOMPropertyNames.hasOwnProperty(propName) ? - DOMPropertyNames[propName] : - propName; + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; + } + + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } if (DOMMutationMethods.hasOwnProperty(propName)) { - DOMProperty.getMutationMethod[propName] = DOMMutationMethods[propName]; - } else { - DOMProperty.getMutationMethod[propName] = null; + propertyInfo.mutationMethod = DOMMutationMethods[propName]; } - var propConfig = Properties[propName]; - DOMProperty.mustUseAttribute[propName] = - checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE); - DOMProperty.mustUseProperty[propName] = - checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY); - DOMProperty.hasSideEffects[propName] = - checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS); - DOMProperty.hasBooleanValue[propName] = - checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE); - DOMProperty.hasNumericValue[propName] = - checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE); - DOMProperty.hasPositiveNumericValue[propName] = - checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE); - DOMProperty.hasOverloadedBooleanValue[propName] = - checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE); - - ("production" !== "development" ? invariant( - !DOMProperty.mustUseAttribute[propName] || - !DOMProperty.mustUseProperty[propName], - 'DOMProperty: Cannot require using both attribute and property: %s', - propName - ) : invariant(!DOMProperty.mustUseAttribute[propName] || - !DOMProperty.mustUseProperty[propName])); - ("production" !== "development" ? invariant( - DOMProperty.mustUseProperty[propName] || - !DOMProperty.hasSideEffects[propName], - 'DOMProperty: Properties that have side effects must use property: %s', - propName - ) : invariant(DOMProperty.mustUseProperty[propName] || - !DOMProperty.hasSideEffects[propName])); - ("production" !== "development" ? invariant( - !!DOMProperty.hasBooleanValue[propName] + - !!DOMProperty.hasNumericValue[propName] + - !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1, - 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + - 'numeric value, but not a combination: %s', - propName - ) : invariant(!!DOMProperty.hasBooleanValue[propName] + - !!DOMProperty.hasNumericValue[propName] + - !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1)); + DOMProperty.properties[propName] = propertyInfo; } } }; @@ -1803,87 +1515,49 @@ var DOMProperty = { ID_ATTRIBUTE_NAME: 'data-reactid', /** - * Checks whether a property name is a standard property. - * @type {Object} + * Map from property "standard name" to an object with info about how to set + * the property in the DOM. Each object contains: + * + * attributeName: + * Used when rendering markup or with `*Attribute()`. + * attributeNamespace + * propertyName: + * Used on DOM node instances. (This includes properties that mutate due to + * external factors.) + * mutationMethod: + * If non-null, used instead of the property or `setAttribute()` after + * initial render. + * mustUseAttribute: + * Whether the property must be accessed and mutated using `*Attribute()`. + * (This includes anything that fails `<propName> in <element>`.) + * mustUseProperty: + * Whether the property must be accessed and mutated as an object property. + * hasSideEffects: + * Whether or not setting a value causes side effects such as triggering + * resources to be loaded or text selection changes. If true, we read from + * the DOM before updating to ensure that the value is only set if it has + * changed. + * hasBooleanValue: + * Whether the property should be removed when set to a falsey value. + * hasNumericValue: + * Whether the property must be numeric or parse as a numeric and should be + * removed when set to a falsey value. + * hasPositiveNumericValue: + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * hasOverloadedBooleanValue: + * Whether the property can be used as a flag as well as with a value. + * Removed when strictly equal to false; present without a value when + * strictly equal to true; present with a value otherwise. */ - isStandardName: {}, + properties: {}, /** * Mapping from lowercase property names to the properly cased version, used - * to warn in the case of missing properties. - * @type {Object} - */ - getPossibleStandardName: {}, - - /** - * Mapping from normalized names to attribute names that differ. Attribute - * names are used when rendering markup or with `*Attribute()`. + * to warn in the case of missing properties. Available only in __DEV__. * @type {Object} */ - getAttributeName: {}, - - /** - * Mapping from normalized names to properties on DOM node instances. - * (This includes properties that mutate due to external factors.) - * @type {Object} - */ - getPropertyName: {}, - - /** - * Mapping from normalized names to mutation methods. This will only exist if - * mutation cannot be set simply by the property or `setAttribute()`. - * @type {Object} - */ - getMutationMethod: {}, - - /** - * Whether the property must be accessed and mutated as an object property. - * @type {Object} - */ - mustUseAttribute: {}, - - /** - * Whether the property must be accessed and mutated using `*Attribute()`. - * (This includes anything that fails `<propName> in <element>`.) - * @type {Object} - */ - mustUseProperty: {}, - - /** - * Whether or not setting a value causes side effects such as triggering - * resources to be loaded or text selection changes. We must ensure that - * the value is only set if it has changed. - * @type {Object} - */ - hasSideEffects: {}, - - /** - * Whether the property should be removed when set to a falsey value. - * @type {Object} - */ - hasBooleanValue: {}, - - /** - * Whether the property must be numeric or parse as a - * numeric and should be removed when set to a falsey value. - * @type {Object} - */ - hasNumericValue: {}, - - /** - * Whether the property must be positive numeric or parse as a positive - * numeric and should be removed when set to a falsey value. - * @type {Object} - */ - hasPositiveNumericValue: {}, - - /** - * Whether the property can be used as a flag as well as with a value. Removed - * when strictly equal to false; present without a value when strictly equal - * to true; present with a value otherwise. - * @type {Object} - */ - hasOverloadedBooleanValue: {}, + getPossibleStandardName: "development" !== 'production' ? {} : null, /** * All of the isCustomAttribute() functions that have been injected. @@ -1894,7 +1568,7 @@ var DOMProperty = { * Checks whether a property name is a custom attribute. * @method */ - isCustomAttribute: function(attributeName) { + isCustomAttribute: function (attributeName) { for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; if (isCustomAttributeFn(attributeName)) { @@ -1912,7 +1586,7 @@ var DOMProperty = { * TODO: Is it better to grab all the possible properties when creating an * element to avoid having to create the same element twice? */ - getDefaultValueForProperty: function(nodeName, prop) { + getDefaultValueForProperty: function (nodeName, prop) { var nodeDefaults = defaultValueCache[nodeName]; var testElement; if (!nodeDefaults) { @@ -1929,8 +1603,7 @@ var DOMProperty = { }; module.exports = DOMProperty; - -},{"150":150}],12:[function(_dereq_,module,exports){ +},{"143":143}],11:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -1945,20 +1618,38 @@ module.exports = DOMProperty; 'use strict'; -var DOMProperty = _dereq_(11); +var DOMProperty = _dereq_(10); +var ReactPerf = _dereq_(71); -var quoteAttributeValueForBrowser = _dereq_(163); -var warning = _dereq_(171); +var quoteAttributeValueForBrowser = _dereq_(121); +var warning = _dereq_(154); -function shouldIgnoreValue(name, value) { - return value == null || - (DOMProperty.hasBooleanValue[name] && !value) || - (DOMProperty.hasNumericValue[name] && isNaN(value)) || - (DOMProperty.hasPositiveNumericValue[name] && (value < 1)) || - (DOMProperty.hasOverloadedBooleanValue[name] && value === false); +// Simplified subset +var VALID_ATTRIBUTE_NAME_REGEX = /^[a-zA-Z_][\w\.\-]*$/; +var illegalAttributeNameCache = {}; +var validatedAttributeNameCache = {}; + +function isAttributeNameSafe(attributeName) { + if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { + return true; + } + if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + "development" !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : undefined; + return false; } -if ("production" !== "development") { +function shouldIgnoreValue(propertyInfo, value) { + return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false; +} + +if ("development" !== 'production') { var reactProps = { children: true, dangerouslySetInnerHTML: true, @@ -1967,9 +1658,8 @@ if ("production" !== "development") { }; var warnedProperties = {}; - var warnUnknownProperty = function(name) { - if (reactProps.hasOwnProperty(name) && reactProps[name] || - warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + var warnUnknownProperty = function (name) { + if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { return; } @@ -1977,23 +1667,11 @@ if ("production" !== "development") { var lowerCasedName = name.toLowerCase(); // data-* attributes should be lowercase; suggest the lowercase version - var standardName = ( - DOMProperty.isCustomAttribute(lowerCasedName) ? - lowerCasedName : - DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? - DOMProperty.getPossibleStandardName[lowerCasedName] : - null - ); + var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; // For now, only warn when we have a suggested correction. This prevents // logging too much when using transferPropsTo. - ("production" !== "development" ? warning( - standardName == null, - 'Unknown DOM property %s. Did you mean %s?', - name, - standardName - ) : null); - + "development" !== 'production' ? warning(standardName == null, 'Unknown DOM property %s. Did you mean %s?', name, standardName) : undefined; }; } @@ -2008,9 +1686,12 @@ var DOMPropertyOperations = { * @param {string} id Unescaped ID. * @return {string} Markup string. */ - createMarkupForID: function(id) { - return DOMProperty.ID_ATTRIBUTE_NAME + '=' + - quoteAttributeValueForBrowser(id); + createMarkupForID: function (id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); + }, + + setAttributeForID: function (node, id) { + node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id); }, /** @@ -2020,16 +1701,15 @@ var DOMPropertyOperations = { * @param {*} value * @return {?string} Markup string, or null if the property was invalid. */ - createMarkupForProperty: function(name, value) { - if (DOMProperty.isStandardName.hasOwnProperty(name) && - DOMProperty.isStandardName[name]) { - if (shouldIgnoreValue(name, value)) { + createMarkupForProperty: function (name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + if (shouldIgnoreValue(propertyInfo, value)) { return ''; } - var attributeName = DOMProperty.getAttributeName[name]; - if (DOMProperty.hasBooleanValue[name] || - (DOMProperty.hasOverloadedBooleanValue[name] && value === true)) { - return attributeName; + var attributeName = propertyInfo.attributeName; + if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { + return attributeName + '=""'; } return attributeName + '=' + quoteAttributeValueForBrowser(value); } else if (DOMProperty.isCustomAttribute(name)) { @@ -2037,90 +1717,119 @@ var DOMPropertyOperations = { return ''; } return name + '=' + quoteAttributeValueForBrowser(value); - } else if ("production" !== "development") { + } else if ("development" !== 'production') { warnUnknownProperty(name); } return null; }, /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + createMarkupForCustomAttribute: function (name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + }, + + /** * Sets the value for a property on a node. * * @param {DOMElement} node * @param {string} name * @param {*} value */ - setValueForProperty: function(node, name, value) { - if (DOMProperty.isStandardName.hasOwnProperty(name) && - DOMProperty.isStandardName[name]) { - var mutationMethod = DOMProperty.getMutationMethod[name]; + setValueForProperty: function (node, name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; if (mutationMethod) { mutationMethod(node, value); - } else if (shouldIgnoreValue(name, value)) { + } else if (shouldIgnoreValue(propertyInfo, value)) { this.deleteValueForProperty(node, name); - } else if (DOMProperty.mustUseAttribute[name]) { + } else if (propertyInfo.mustUseAttribute) { + var attributeName = propertyInfo.attributeName; + var namespace = propertyInfo.attributeNamespace; // `setAttribute` with objects becomes only `[object]` in IE8/9, // ('' + value) makes it output the correct toString()-value. - node.setAttribute(DOMProperty.getAttributeName[name], '' + value); + if (namespace) { + node.setAttributeNS(namespace, attributeName, '' + value); + } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { + node.setAttribute(attributeName, ''); + } else { + node.setAttribute(attributeName, '' + value); + } } else { - var propName = DOMProperty.getPropertyName[name]; + var propName = propertyInfo.propertyName; // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the // property type before comparing; only `value` does and is string. - if (!DOMProperty.hasSideEffects[name] || - ('' + node[propName]) !== ('' + value)) { + if (!propertyInfo.hasSideEffects || '' + node[propName] !== '' + value) { // Contrary to `setAttribute`, object properties are properly // `toString`ed by IE8/9. node[propName] = value; } } } else if (DOMProperty.isCustomAttribute(name)) { - if (value == null) { - node.removeAttribute(name); - } else { - node.setAttribute(name, '' + value); - } - } else if ("production" !== "development") { + DOMPropertyOperations.setValueForAttribute(node, name, value); + } else if ("development" !== 'production') { warnUnknownProperty(name); } }, + setValueForAttribute: function (node, name, value) { + if (!isAttributeNameSafe(name)) { + return; + } + if (value == null) { + node.removeAttribute(name); + } else { + node.setAttribute(name, '' + value); + } + }, + /** * Deletes the value for a property on a node. * * @param {DOMElement} node * @param {string} name */ - deleteValueForProperty: function(node, name) { - if (DOMProperty.isStandardName.hasOwnProperty(name) && - DOMProperty.isStandardName[name]) { - var mutationMethod = DOMProperty.getMutationMethod[name]; + deleteValueForProperty: function (node, name) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; if (mutationMethod) { mutationMethod(node, undefined); - } else if (DOMProperty.mustUseAttribute[name]) { - node.removeAttribute(DOMProperty.getAttributeName[name]); + } else if (propertyInfo.mustUseAttribute) { + node.removeAttribute(propertyInfo.attributeName); } else { - var propName = DOMProperty.getPropertyName[name]; - var defaultValue = DOMProperty.getDefaultValueForProperty( - node.nodeName, - propName - ); - if (!DOMProperty.hasSideEffects[name] || - ('' + node[propName]) !== defaultValue) { + var propName = propertyInfo.propertyName; + var defaultValue = DOMProperty.getDefaultValueForProperty(node.nodeName, propName); + if (!propertyInfo.hasSideEffects || '' + node[propName] !== defaultValue) { node[propName] = defaultValue; } } } else if (DOMProperty.isCustomAttribute(name)) { node.removeAttribute(name); - } else if ("production" !== "development") { + } else if ("development" !== 'production') { warnUnknownProperty(name); } } }; -module.exports = DOMPropertyOperations; +ReactPerf.measureMethods(DOMPropertyOperations, 'DOMPropertyOperations', { + setValueForProperty: 'setValueForProperty', + setValueForAttribute: 'setValueForAttribute', + deleteValueForProperty: 'deleteValueForProperty' +}); -},{"11":11,"163":163,"171":171}],13:[function(_dereq_,module,exports){ +module.exports = DOMPropertyOperations; +},{"10":10,"121":121,"154":154,"71":71}],12:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -2133,16 +1842,14 @@ module.exports = DOMPropertyOperations; * @typechecks static-only */ -/*jslint evil: true, sub: true */ - 'use strict'; -var ExecutionEnvironment = _dereq_(22); +var ExecutionEnvironment = _dereq_(129); -var createNodesFromMarkup = _dereq_(126); -var emptyFunction = _dereq_(129); -var getMarkupWrap = _dereq_(142); -var invariant = _dereq_(150); +var createNodesFromMarkup = _dereq_(134); +var emptyFunction = _dereq_(135); +var getMarkupWrap = _dereq_(139); +var invariant = _dereq_(143); var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/; var RESULT_INDEX_ATTR = 'data-danger-index'; @@ -2173,22 +1880,13 @@ var Danger = { * @return {array<DOMElement>} List of rendered nodes. * @internal */ - dangerouslyRenderMarkup: function(markupList) { - ("production" !== "development" ? invariant( - ExecutionEnvironment.canUseDOM, - 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + - 'thread. Make sure `window` and `document` are available globally ' + - 'before requiring React when unit testing or use ' + - 'React.renderToString for server rendering.' - ) : invariant(ExecutionEnvironment.canUseDOM)); + dangerouslyRenderMarkup: function (markupList) { + !ExecutionEnvironment.canUseDOM ? "development" !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString for server rendering.') : invariant(false) : undefined; var nodeName; var markupByNodeName = {}; // Group markup by `nodeName` if a wrap is necessary, else by '*'. for (var i = 0; i < markupList.length; i++) { - ("production" !== "development" ? invariant( - markupList[i], - 'dangerouslyRenderMarkup(...): Missing markup.' - ) : invariant(markupList[i])); + !markupList[i] ? "development" !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(false) : undefined; nodeName = getNodeName(markupList[i]); nodeName = getMarkupWrap(nodeName) ? nodeName : '*'; markupByNodeName[nodeName] = markupByNodeName[nodeName] || []; @@ -2213,61 +1911,41 @@ var Danger = { // Push the requested markup with an additional RESULT_INDEX_ATTR // attribute. If the markup does not start with a < character, it // will be discarded below (with an appropriate console.error). - markupListByNodeName[resultIndex] = markup.replace( - OPEN_TAG_NAME_EXP, - // This index will be parsed back out below. - '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ' - ); + markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP, + // This index will be parsed back out below. + '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" '); } } // Render each group of markup with similar wrapping `nodeName`. - var renderNodes = createNodesFromMarkup( - markupListByNodeName.join(''), - emptyFunction // Do nothing special with <script> tags. + var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with <script> tags. ); for (var j = 0; j < renderNodes.length; ++j) { var renderNode = renderNodes[j]; - if (renderNode.hasAttribute && - renderNode.hasAttribute(RESULT_INDEX_ATTR)) { + if (renderNode.hasAttribute && renderNode.hasAttribute(RESULT_INDEX_ATTR)) { resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR); renderNode.removeAttribute(RESULT_INDEX_ATTR); - ("production" !== "development" ? invariant( - !resultList.hasOwnProperty(resultIndex), - 'Danger: Assigning to an already-occupied result index.' - ) : invariant(!resultList.hasOwnProperty(resultIndex))); + !!resultList.hasOwnProperty(resultIndex) ? "development" !== 'production' ? invariant(false, 'Danger: Assigning to an already-occupied result index.') : invariant(false) : undefined; resultList[resultIndex] = renderNode; // This should match resultList.length and markupList.length when // we're done. resultListAssignmentCount += 1; - - } else if ("production" !== "development") { - console.error( - 'Danger: Discarding unexpected node:', - renderNode - ); + } else if ("development" !== 'production') { + console.error('Danger: Discarding unexpected node:', renderNode); } } } // Although resultList was populated out of order, it should now be a dense // array. - ("production" !== "development" ? invariant( - resultListAssignmentCount === resultList.length, - 'Danger: Did not assign to every index of resultList.' - ) : invariant(resultListAssignmentCount === resultList.length)); - - ("production" !== "development" ? invariant( - resultList.length === markupList.length, - 'Danger: Expected markup to render %s nodes, but rendered %s.', - markupList.length, - resultList.length - ) : invariant(resultList.length === markupList.length)); + !(resultListAssignmentCount === resultList.length) ? "development" !== 'production' ? invariant(false, 'Danger: Did not assign to every index of resultList.') : invariant(false) : undefined; + + !(resultList.length === markupList.length) ? "development" !== 'production' ? invariant(false, 'Danger: Expected markup to render %s nodes, but rendered %s.', markupList.length, resultList.length) : invariant(false) : undefined; return resultList; }, @@ -2280,32 +1958,24 @@ var Danger = { * @param {string} markup Markup to render in place of the child node. * @internal */ - dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) { - ("production" !== "development" ? invariant( - ExecutionEnvironment.canUseDOM, - 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' + - 'worker thread. Make sure `window` and `document` are available ' + - 'globally before requiring React when unit testing or use ' + - 'React.renderToString for server rendering.' - ) : invariant(ExecutionEnvironment.canUseDOM)); - ("production" !== "development" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup)); - ("production" !== "development" ? invariant( - oldChild.tagName.toLowerCase() !== 'html', - 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' + - '<html> node. This is because browser quirks make this unreliable ' + - 'and/or slow. If you want to render to the root you must use ' + - 'server rendering. See React.renderToString().' - ) : invariant(oldChild.tagName.toLowerCase() !== 'html')); - - var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { + !ExecutionEnvironment.canUseDOM ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' + 'worker thread. Make sure `window` and `document` are available ' + 'globally before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString() for server rendering.') : invariant(false) : undefined; + !markup ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(false) : undefined; + !(oldChild.tagName.toLowerCase() !== 'html') ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' + '<html> node. This is because browser quirks make this unreliable ' + 'and/or slow. If you want to render to the root you must use ' + 'server rendering. See ReactDOMServer.renderToString().') : invariant(false) : undefined; + + var newChild; + if (typeof markup === 'string') { + newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + } else { + newChild = markup; + } oldChild.parentNode.replaceChild(newChild, oldChild); } }; module.exports = Danger; - -},{"126":126,"129":129,"142":142,"150":150,"22":22}],14:[function(_dereq_,module,exports){ +},{"129":129,"134":134,"135":135,"139":139,"143":143}],13:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -2319,7 +1989,7 @@ module.exports = Danger; 'use strict'; -var keyOf = _dereq_(157); +var keyOf = _dereq_(147); /** * Module that is injectable into `EventPluginHub`, that specifies a @@ -2330,21 +2000,10 @@ var keyOf = _dereq_(157); * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that * preventing default on events is convenient in `SimpleEventPlugin` handlers. */ -var DefaultEventPluginOrder = [ - keyOf({ResponderEventPlugin: null}), - keyOf({SimpleEventPlugin: null}), - keyOf({TapEventPlugin: null}), - keyOf({EnterLeaveEventPlugin: null}), - keyOf({ChangeEventPlugin: null}), - keyOf({SelectEventPlugin: null}), - keyOf({BeforeInputEventPlugin: null}), - keyOf({AnalyticsEventPlugin: null}), - keyOf({MobileSafariClickEventPlugin: null}) -]; +var DefaultEventPluginOrder = [keyOf({ ResponderEventPlugin: null }), keyOf({ SimpleEventPlugin: null }), keyOf({ TapEventPlugin: null }), keyOf({ EnterLeaveEventPlugin: null }), keyOf({ ChangeEventPlugin: null }), keyOf({ SelectEventPlugin: null }), keyOf({ BeforeInputEventPlugin: null })]; module.exports = DefaultEventPluginOrder; - -},{"157":157}],15:[function(_dereq_,module,exports){ +},{"147":147}],14:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -2359,30 +2018,24 @@ module.exports = DefaultEventPluginOrder; 'use strict'; -var EventConstants = _dereq_(16); -var EventPropagators = _dereq_(21); -var SyntheticMouseEvent = _dereq_(112); +var EventConstants = _dereq_(15); +var EventPropagators = _dereq_(19); +var SyntheticMouseEvent = _dereq_(96); -var ReactMount = _dereq_(77); -var keyOf = _dereq_(157); +var ReactMount = _dereq_(65); +var keyOf = _dereq_(147); var topLevelTypes = EventConstants.topLevelTypes; var getFirstReactDOM = ReactMount.getFirstReactDOM; var eventTypes = { mouseEnter: { - registrationName: keyOf({onMouseEnter: null}), - dependencies: [ - topLevelTypes.topMouseOut, - topLevelTypes.topMouseOver - ] + registrationName: keyOf({ onMouseEnter: null }), + dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver] }, mouseLeave: { - registrationName: keyOf({onMouseLeave: null}), - dependencies: [ - topLevelTypes.topMouseOut, - topLevelTypes.topMouseOver - ] + registrationName: keyOf({ onMouseLeave: null }), + dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver] } }; @@ -2406,17 +2059,11 @@ var EnterLeaveEventPlugin = { * @return {*} An accumulation of synthetic events. * @see {EventPluginHub.extractEvents} */ - extractEvents: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent) { - if (topLevelType === topLevelTypes.topMouseOver && - (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) { + if (topLevelType === topLevelTypes.topMouseOver && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { return null; } - if (topLevelType !== topLevelTypes.topMouseOut && - topLevelType !== topLevelTypes.topMouseOver) { + if (topLevelType !== topLevelTypes.topMouseOut && topLevelType !== topLevelTypes.topMouseOver) { // Must not be a mouse in or mouse out - ignoring. return null; } @@ -2435,15 +2082,24 @@ var EnterLeaveEventPlugin = { } } - var from, to; + var from; + var to; + var fromID = ''; + var toID = ''; if (topLevelType === topLevelTypes.topMouseOut) { from = topLevelTarget; - to = - getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement) || - win; + fromID = topLevelTargetID; + to = getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement); + if (to) { + toID = ReactMount.getID(to); + } else { + to = win; + } + to = to || win; } else { from = win; to = topLevelTarget; + toID = topLevelTargetID; } if (from === to) { @@ -2451,23 +2107,12 @@ var EnterLeaveEventPlugin = { return null; } - var fromID = from ? ReactMount.getID(from) : ''; - var toID = to ? ReactMount.getID(to) : ''; - - var leave = SyntheticMouseEvent.getPooled( - eventTypes.mouseLeave, - fromID, - nativeEvent - ); + var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, fromID, nativeEvent, nativeEventTarget); leave.type = 'mouseleave'; leave.target = from; leave.relatedTarget = to; - var enter = SyntheticMouseEvent.getPooled( - eventTypes.mouseEnter, - toID, - nativeEvent - ); + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, toID, nativeEvent, nativeEventTarget); enter.type = 'mouseenter'; enter.target = to; enter.relatedTarget = from; @@ -2483,8 +2128,7 @@ var EnterLeaveEventPlugin = { }; module.exports = EnterLeaveEventPlugin; - -},{"112":112,"157":157,"16":16,"21":21,"77":77}],16:[function(_dereq_,module,exports){ +},{"147":147,"15":15,"19":19,"65":65,"96":96}],15:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -2498,15 +2142,18 @@ module.exports = EnterLeaveEventPlugin; 'use strict'; -var keyMirror = _dereq_(156); +var keyMirror = _dereq_(146); -var PropagationPhases = keyMirror({bubbled: null, captured: null}); +var PropagationPhases = keyMirror({ bubbled: null, captured: null }); /** * Types of raw signals from the browser caught at the top level. */ var topLevelTypes = keyMirror({ + topAbort: null, topBlur: null, + topCanPlay: null, + topCanPlayThrough: null, topChange: null, topClick: null, topCompositionEnd: null, @@ -2524,6 +2171,10 @@ var topLevelTypes = keyMirror({ topDragOver: null, topDragStart: null, topDrop: null, + topDurationChange: null, + topEmptied: null, + topEncrypted: null, + topEnded: null, topError: null, topFocus: null, topInput: null, @@ -2531,21 +2182,36 @@ var topLevelTypes = keyMirror({ topKeyPress: null, topKeyUp: null, topLoad: null, + topLoadedData: null, + topLoadedMetadata: null, + topLoadStart: null, topMouseDown: null, topMouseMove: null, topMouseOut: null, topMouseOver: null, topMouseUp: null, topPaste: null, + topPause: null, + topPlay: null, + topPlaying: null, + topProgress: null, + topRateChange: null, topReset: null, topScroll: null, + topSeeked: null, + topSeeking: null, topSelectionChange: null, + topStalled: null, topSubmit: null, + topSuspend: null, topTextInput: null, + topTimeUpdate: null, topTouchCancel: null, topTouchEnd: null, topTouchMove: null, topTouchStart: null, + topVolumeChange: null, + topWaiting: null, topWheel: null }); @@ -2555,96 +2221,7 @@ var EventConstants = { }; module.exports = EventConstants; - -},{"156":156}],17:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule EventListener - * @typechecks - */ - -var emptyFunction = _dereq_(129); - -/** - * Upstream version of event listener. Does not take into account specific - * nature of platform. - */ -var EventListener = { - /** - * Listen to DOM events during the bubble phase. - * - * @param {DOMEventTarget} target DOM element to register listener on. - * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. - * @param {function} callback Callback function. - * @return {object} Object with a `remove` method. - */ - listen: function(target, eventType, callback) { - if (target.addEventListener) { - target.addEventListener(eventType, callback, false); - return { - remove: function() { - target.removeEventListener(eventType, callback, false); - } - }; - } else if (target.attachEvent) { - target.attachEvent('on' + eventType, callback); - return { - remove: function() { - target.detachEvent('on' + eventType, callback); - } - }; - } - }, - - /** - * Listen to DOM events during the capture phase. - * - * @param {DOMEventTarget} target DOM element to register listener on. - * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. - * @param {function} callback Callback function. - * @return {object} Object with a `remove` method. - */ - capture: function(target, eventType, callback) { - if (!target.addEventListener) { - if ("production" !== "development") { - console.error( - 'Attempted to listen to events during the capture phase on a ' + - 'browser that does not support the capture phase. Your application ' + - 'will not receive some events.' - ); - } - return { - remove: emptyFunction - }; - } else { - target.addEventListener(eventType, callback, true); - return { - remove: function() { - target.removeEventListener(eventType, callback, true); - } - }; - } - }, - - registerDefault: function() {} -}; - -module.exports = EventListener; - -},{"129":129}],18:[function(_dereq_,module,exports){ +},{"146":146}],16:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -2658,12 +2235,14 @@ module.exports = EventListener; 'use strict'; -var EventPluginRegistry = _dereq_(19); -var EventPluginUtils = _dereq_(20); +var EventPluginRegistry = _dereq_(17); +var EventPluginUtils = _dereq_(18); +var ReactErrorUtils = _dereq_(56); -var accumulateInto = _dereq_(118); -var forEachAccumulated = _dereq_(135); -var invariant = _dereq_(150); +var accumulateInto = _dereq_(102); +var forEachAccumulated = _dereq_(109); +var invariant = _dereq_(143); +var warning = _dereq_(154); /** * Internal store for event listeners @@ -2680,23 +2259,24 @@ var eventQueue = null; * Dispatches an event and releases it back into the pool, unless persistent. * * @param {?object} event Synthetic event to be dispatched. + * @param {boolean} simulated If the event is simulated (changes exn behavior) * @private */ -var executeDispatchesAndRelease = function(event) { +var executeDispatchesAndRelease = function (event, simulated) { if (event) { - var executeDispatch = EventPluginUtils.executeDispatch; - // Plugins can provide custom behavior when dispatching events. - var PluginModule = EventPluginRegistry.getPluginModuleForEvent(event); - if (PluginModule && PluginModule.executeDispatch) { - executeDispatch = PluginModule.executeDispatch; - } - EventPluginUtils.executeDispatchesInOrder(event, executeDispatch); + EventPluginUtils.executeDispatchesInOrder(event, simulated); if (!event.isPersistent()) { event.constructor.release(event); } } }; +var executeDispatchesAndReleaseSimulated = function (e) { + return executeDispatchesAndRelease(e, true); +}; +var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e, false); +}; /** * - `InstanceHandle`: [required] Module that performs logical traversals of DOM @@ -2705,14 +2285,8 @@ var executeDispatchesAndRelease = function(event) { var InstanceHandle = null; function validateInstanceHandle() { - var valid = - InstanceHandle && - InstanceHandle.traverseTwoPhase && - InstanceHandle.traverseEnterLeave; - ("production" !== "development" ? invariant( - valid, - 'InstanceHandle not injected before use!' - ) : invariant(valid)); + var valid = InstanceHandle && InstanceHandle.traverseTwoPhase && InstanceHandle.traverseEnterLeave; + "development" !== 'production' ? warning(valid, 'InstanceHandle not injected before use!') : undefined; } /** @@ -2754,15 +2328,15 @@ var EventPluginHub = { * @param {object} InjectedInstanceHandle * @public */ - injectInstanceHandle: function(InjectedInstanceHandle) { + injectInstanceHandle: function (InjectedInstanceHandle) { InstanceHandle = InjectedInstanceHandle; - if ("production" !== "development") { + if ("development" !== 'production') { validateInstanceHandle(); } }, - getInstanceHandle: function() { - if ("production" !== "development") { + getInstanceHandle: function () { + if ("development" !== 'production') { validateInstanceHandle(); } return InstanceHandle; @@ -2792,16 +2366,16 @@ var EventPluginHub = { * @param {string} registrationName Name of listener (e.g. `onClick`). * @param {?function} listener The callback to store. */ - putListener: function(id, registrationName, listener) { - ("production" !== "development" ? invariant( - !listener || typeof listener === 'function', - 'Expected %s listener to be a function, instead got type %s', - registrationName, typeof listener - ) : invariant(!listener || typeof listener === 'function')); - - var bankForRegistrationName = - listenerBank[registrationName] || (listenerBank[registrationName] = {}); + putListener: function (id, registrationName, listener) { + !(typeof listener === 'function') ? "development" !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : invariant(false) : undefined; + + var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); bankForRegistrationName[id] = listener; + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.didPutListener) { + PluginModule.didPutListener(id, registrationName, listener); + } }, /** @@ -2809,7 +2383,7 @@ var EventPluginHub = { * @param {string} registrationName Name of listener (e.g. `onClick`). * @return {?function} The stored callback. */ - getListener: function(id, registrationName) { + getListener: function (id, registrationName) { var bankForRegistrationName = listenerBank[registrationName]; return bankForRegistrationName && bankForRegistrationName[id]; }, @@ -2820,8 +2394,14 @@ var EventPluginHub = { * @param {string} id ID of the DOM element. * @param {string} registrationName Name of listener (e.g. `onClick`). */ - deleteListener: function(id, registrationName) { + deleteListener: function (id, registrationName) { + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(id, registrationName); + } + var bankForRegistrationName = listenerBank[registrationName]; + // TODO: This should never be null -- when is it? if (bankForRegistrationName) { delete bankForRegistrationName[id]; } @@ -2832,8 +2412,17 @@ var EventPluginHub = { * * @param {string} id ID of the DOM element. */ - deleteAllListeners: function(id) { + deleteAllListeners: function (id) { for (var registrationName in listenerBank) { + if (!listenerBank[registrationName][id]) { + continue; + } + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(id, registrationName); + } + delete listenerBank[registrationName][id]; } }, @@ -2849,23 +2438,14 @@ var EventPluginHub = { * @return {*} An accumulation of synthetic events. * @internal */ - extractEvents: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent) { + extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) { var events; var plugins = EventPluginRegistry.plugins; - for (var i = 0, l = plugins.length; i < l; i++) { + for (var i = 0; i < plugins.length; i++) { // Not every plugin in the ordering may be loaded at runtime. var possiblePlugin = plugins[i]; if (possiblePlugin) { - var extractedEvents = possiblePlugin.extractEvents( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent - ); + var extractedEvents = possiblePlugin.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget); if (extractedEvents) { events = accumulateInto(events, extractedEvents); } @@ -2881,7 +2461,7 @@ var EventPluginHub = { * @param {*} events An accumulation of synthetic events. * @internal */ - enqueueEvents: function(events) { + enqueueEvents: function (events) { if (events) { eventQueue = accumulateInto(eventQueue, events); } @@ -2892,35 +2472,36 @@ var EventPluginHub = { * * @internal */ - processEventQueue: function() { + processEventQueue: function (simulated) { // Set `eventQueue` to null before processing it so that we can tell if more // events get enqueued while processing. var processingEventQueue = eventQueue; eventQueue = null; - forEachAccumulated(processingEventQueue, executeDispatchesAndRelease); - ("production" !== "development" ? invariant( - !eventQueue, - 'processEventQueue(): Additional events were enqueued while processing ' + - 'an event queue. Support for this has not yet been implemented.' - ) : invariant(!eventQueue)); + if (simulated) { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); + } else { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + } + !!eventQueue ? "development" !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing ' + 'an event queue. Support for this has not yet been implemented.') : invariant(false) : undefined; + // This would be a good time to rethrow if any of the event handlers threw. + ReactErrorUtils.rethrowCaughtError(); }, /** * These are needed for tests only. Do not use! */ - __purge: function() { + __purge: function () { listenerBank = {}; }, - __getListenerBank: function() { + __getListenerBank: function () { return listenerBank; } }; module.exports = EventPluginHub; - -},{"118":118,"135":135,"150":150,"19":19,"20":20}],19:[function(_dereq_,module,exports){ +},{"102":102,"109":109,"143":143,"154":154,"17":17,"18":18,"56":56}],17:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -2935,7 +2516,7 @@ module.exports = EventPluginHub; 'use strict'; -var invariant = _dereq_(150); +var invariant = _dereq_(143); /** * Injectable ordering of event plugins. @@ -2960,38 +2541,15 @@ function recomputePluginOrdering() { for (var pluginName in namesToPlugins) { var PluginModule = namesToPlugins[pluginName]; var pluginIndex = EventPluginOrder.indexOf(pluginName); - ("production" !== "development" ? invariant( - pluginIndex > -1, - 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + - 'the plugin ordering, `%s`.', - pluginName - ) : invariant(pluginIndex > -1)); + !(pluginIndex > -1) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(false) : undefined; if (EventPluginRegistry.plugins[pluginIndex]) { continue; } - ("production" !== "development" ? invariant( - PluginModule.extractEvents, - 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + - 'method, but `%s` does not.', - pluginName - ) : invariant(PluginModule.extractEvents)); + !PluginModule.extractEvents ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(false) : undefined; EventPluginRegistry.plugins[pluginIndex] = PluginModule; var publishedEvents = PluginModule.eventTypes; for (var eventName in publishedEvents) { - ("production" !== "development" ? invariant( - publishEventForPlugin( - publishedEvents[eventName], - PluginModule, - eventName - ), - 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', - eventName, - pluginName - ) : invariant(publishEventForPlugin( - publishedEvents[eventName], - PluginModule, - eventName - ))); + !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(false) : undefined; } } } @@ -3005,12 +2563,7 @@ function recomputePluginOrdering() { * @private */ function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { - ("production" !== "development" ? invariant( - !EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName), - 'EventPluginHub: More than one plugin attempted to publish the same ' + - 'event name, `%s`.', - eventName - ) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName))); + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(false) : undefined; EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; @@ -3018,20 +2571,12 @@ function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { for (var phaseName in phasedRegistrationNames) { if (phasedRegistrationNames.hasOwnProperty(phaseName)) { var phasedRegistrationName = phasedRegistrationNames[phaseName]; - publishRegistrationName( - phasedRegistrationName, - PluginModule, - eventName - ); + publishRegistrationName(phasedRegistrationName, PluginModule, eventName); } } return true; } else if (dispatchConfig.registrationName) { - publishRegistrationName( - dispatchConfig.registrationName, - PluginModule, - eventName - ); + publishRegistrationName(dispatchConfig.registrationName, PluginModule, eventName); return true; } return false; @@ -3046,15 +2591,9 @@ function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { * @private */ function publishRegistrationName(registrationName, PluginModule, eventName) { - ("production" !== "development" ? invariant( - !EventPluginRegistry.registrationNameModules[registrationName], - 'EventPluginHub: More than one plugin attempted to publish the same ' + - 'registration name, `%s`.', - registrationName - ) : invariant(!EventPluginRegistry.registrationNameModules[registrationName])); + !!EventPluginRegistry.registrationNameModules[registrationName] ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(false) : undefined; EventPluginRegistry.registrationNameModules[registrationName] = PluginModule; - EventPluginRegistry.registrationNameDependencies[registrationName] = - PluginModule.eventTypes[eventName].dependencies; + EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies; } /** @@ -3093,12 +2632,8 @@ var EventPluginRegistry = { * @internal * @see {EventPluginHub.injection.injectEventPluginOrder} */ - injectEventPluginOrder: function(InjectedEventPluginOrder) { - ("production" !== "development" ? invariant( - !EventPluginOrder, - 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + - 'once. You are likely trying to load more than one copy of React.' - ) : invariant(!EventPluginOrder)); + injectEventPluginOrder: function (InjectedEventPluginOrder) { + !!EventPluginOrder ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(false) : undefined; // Clone the ordering so it cannot be dynamically mutated. EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder); recomputePluginOrdering(); @@ -3114,21 +2649,15 @@ var EventPluginRegistry = { * @internal * @see {EventPluginHub.injection.injectEventPluginsByName} */ - injectEventPluginsByName: function(injectedNamesToPlugins) { + injectEventPluginsByName: function (injectedNamesToPlugins) { var isOrderingDirty = false; for (var pluginName in injectedNamesToPlugins) { if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { continue; } var PluginModule = injectedNamesToPlugins[pluginName]; - if (!namesToPlugins.hasOwnProperty(pluginName) || - namesToPlugins[pluginName] !== PluginModule) { - ("production" !== "development" ? invariant( - !namesToPlugins[pluginName], - 'EventPluginRegistry: Cannot inject two different event plugins ' + - 'using the same name, `%s`.', - pluginName - ) : invariant(!namesToPlugins[pluginName])); + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) { + !!namesToPlugins[pluginName] ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(false) : undefined; namesToPlugins[pluginName] = PluginModule; isOrderingDirty = true; } @@ -3145,20 +2674,16 @@ var EventPluginRegistry = { * @return {?object} The plugin that created the supplied event. * @internal */ - getPluginModuleForEvent: function(event) { + getPluginModuleForEvent: function (event) { var dispatchConfig = event.dispatchConfig; if (dispatchConfig.registrationName) { - return EventPluginRegistry.registrationNameModules[ - dispatchConfig.registrationName - ] || null; + return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; } for (var phase in dispatchConfig.phasedRegistrationNames) { if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) { continue; } - var PluginModule = EventPluginRegistry.registrationNameModules[ - dispatchConfig.phasedRegistrationNames[phase] - ]; + var PluginModule = EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]]; if (PluginModule) { return PluginModule; } @@ -3170,7 +2695,7 @@ var EventPluginRegistry = { * Exposed for unit testing. * @private */ - _resetEventPlugins: function() { + _resetEventPlugins: function () { EventPluginOrder = null; for (var pluginName in namesToPlugins) { if (namesToPlugins.hasOwnProperty(pluginName)) { @@ -3197,8 +2722,7 @@ var EventPluginRegistry = { }; module.exports = EventPluginRegistry; - -},{"150":150}],20:[function(_dereq_,module,exports){ +},{"143":143}],18:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -3212,9 +2736,11 @@ module.exports = EventPluginRegistry; 'use strict'; -var EventConstants = _dereq_(16); +var EventConstants = _dereq_(15); +var ReactErrorUtils = _dereq_(56); -var invariant = _dereq_(150); +var invariant = _dereq_(143); +var warning = _dereq_(154); /** * Injected dependencies: @@ -3226,14 +2752,10 @@ var invariant = _dereq_(150); */ var injection = { Mount: null, - injectMount: function(InjectedMount) { + injectMount: function (InjectedMount) { injection.Mount = InjectedMount; - if ("production" !== "development") { - ("production" !== "development" ? invariant( - InjectedMount && InjectedMount.getNode, - 'EventPluginUtils.injection.injectMount(...): Injected Mount module ' + - 'is missing getNode.' - ) : invariant(InjectedMount && InjectedMount.getNode)); + if ("development" !== 'production') { + "development" !== 'production' ? warning(InjectedMount && InjectedMount.getNode && InjectedMount.getID, 'EventPluginUtils.injection.injectMount(...): Injected Mount ' + 'module is missing getNode or getID.') : undefined; } } }; @@ -3241,50 +2763,56 @@ var injection = { var topLevelTypes = EventConstants.topLevelTypes; function isEndish(topLevelType) { - return topLevelType === topLevelTypes.topMouseUp || - topLevelType === topLevelTypes.topTouchEnd || - topLevelType === topLevelTypes.topTouchCancel; + return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel; } function isMoveish(topLevelType) { - return topLevelType === topLevelTypes.topMouseMove || - topLevelType === topLevelTypes.topTouchMove; + return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove; } function isStartish(topLevelType) { - return topLevelType === topLevelTypes.topMouseDown || - topLevelType === topLevelTypes.topTouchStart; + return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart; } - var validateEventDispatches; -if ("production" !== "development") { - validateEventDispatches = function(event) { +if ("development" !== 'production') { + validateEventDispatches = function (event) { var dispatchListeners = event._dispatchListeners; var dispatchIDs = event._dispatchIDs; var listenersIsArr = Array.isArray(dispatchListeners); var idsIsArr = Array.isArray(dispatchIDs); var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0; - var listenersLen = listenersIsArr ? - dispatchListeners.length : - dispatchListeners ? 1 : 0; - - ("production" !== "development" ? invariant( - idsIsArr === listenersIsArr && IDsLen === listenersLen, - 'EventPluginUtils: Invalid `event`.' - ) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen)); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + + "development" !== 'production' ? warning(idsIsArr === listenersIsArr && IDsLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : undefined; }; } /** - * Invokes `cb(event, listener, id)`. Avoids using call if no scope is - * provided. The `(listener,id)` pair effectively forms the "dispatch" but are - * kept separate to conserve memory. + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @param {function} listener Application-level callback + * @param {string} domID DOM id to pass to the callback. */ -function forEachEventDispatch(event, cb) { +function executeDispatch(event, simulated, listener, domID) { + var type = event.type || 'unknown-event'; + event.currentTarget = injection.Mount.getNode(domID); + if (simulated) { + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event, domID); + } else { + ReactErrorUtils.invokeGuardedCallback(type, listener, event, domID); + } + event.currentTarget = null; +} + +/** + * Standard/simple iteration through an event's collected dispatches. + */ +function executeDispatchesInOrder(event, simulated) { var dispatchListeners = event._dispatchListeners; var dispatchIDs = event._dispatchIDs; - if ("production" !== "development") { + if ("development" !== 'production') { validateEventDispatches(event); } if (Array.isArray(dispatchListeners)) { @@ -3293,31 +2821,11 @@ function forEachEventDispatch(event, cb) { break; } // Listeners and IDs are two parallel arrays that are always in sync. - cb(event, dispatchListeners[i], dispatchIDs[i]); + executeDispatch(event, simulated, dispatchListeners[i], dispatchIDs[i]); } } else if (dispatchListeners) { - cb(event, dispatchListeners, dispatchIDs); + executeDispatch(event, simulated, dispatchListeners, dispatchIDs); } -} - -/** - * Default implementation of PluginModule.executeDispatch(). - * @param {SyntheticEvent} SyntheticEvent to handle - * @param {function} Application-level callback - * @param {string} domID DOM id to pass to the callback. - */ -function executeDispatch(event, listener, domID) { - event.currentTarget = injection.Mount.getNode(domID); - var returnValue = listener(event, domID); - event.currentTarget = null; - return returnValue; -} - -/** - * Standard/simple iteration through an event's collected dispatches. - */ -function executeDispatchesInOrder(event, cb) { - forEachEventDispatch(event, cb); event._dispatchListeners = null; event._dispatchIDs = null; } @@ -3326,13 +2834,13 @@ function executeDispatchesInOrder(event, cb) { * Standard/simple iteration through an event's collected dispatches, but stops * at the first dispatch execution returning true, and returns that id. * - * @return id of the first dispatch execution who's listener returns true, or - * null if no listener returned true. + * @return {?string} id of the first dispatch execution who's listener returns + * true, or null if no listener returned true. */ function executeDispatchesInOrderStopAtTrueImpl(event) { var dispatchListeners = event._dispatchListeners; var dispatchIDs = event._dispatchIDs; - if ("production" !== "development") { + if ("development" !== 'production') { validateEventDispatches(event); } if (Array.isArray(dispatchListeners)) { @@ -3370,21 +2878,16 @@ function executeDispatchesInOrderStopAtTrue(event) { * return values at each dispatch execution, but it does tend to make sense when * dealing with "direct" dispatches. * - * @return The return value of executing the single dispatch. + * @return {*} The return value of executing the single dispatch. */ function executeDirectDispatch(event) { - if ("production" !== "development") { + if ("development" !== 'production') { validateEventDispatches(event); } var dispatchListener = event._dispatchListeners; var dispatchID = event._dispatchIDs; - ("production" !== "development" ? invariant( - !Array.isArray(dispatchListener), - 'executeDirectDispatch(...): Invalid `event`.' - ) : invariant(!Array.isArray(dispatchListener))); - var res = dispatchListener ? - dispatchListener(event, dispatchID) : - null; + !!Array.isArray(dispatchListener) ? "development" !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : invariant(false) : undefined; + var res = dispatchListener ? dispatchListener(event, dispatchID) : null; event._dispatchListeners = null; event._dispatchIDs = null; return res; @@ -3392,7 +2895,7 @@ function executeDirectDispatch(event) { /** * @param {SyntheticEvent} event - * @return {bool} True iff number of dispatches accumulated is greater than 0. + * @return {boolean} True iff number of dispatches accumulated is greater than 0. */ function hasDispatches(event) { return !!event._dispatchListeners; @@ -3407,17 +2910,22 @@ var EventPluginUtils = { isStartish: isStartish, executeDirectDispatch: executeDirectDispatch, - executeDispatch: executeDispatch, executeDispatchesInOrder: executeDispatchesInOrder, executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, hasDispatches: hasDispatches, - injection: injection, - useTouchEvents: false + + getNode: function (id) { + return injection.Mount.getNode(id); + }, + getID: function (node) { + return injection.Mount.getID(node); + }, + + injection: injection }; module.exports = EventPluginUtils; - -},{"150":150,"16":16}],21:[function(_dereq_,module,exports){ +},{"143":143,"15":15,"154":154,"56":56}],19:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -3431,11 +2939,13 @@ module.exports = EventPluginUtils; 'use strict'; -var EventConstants = _dereq_(16); -var EventPluginHub = _dereq_(18); +var EventConstants = _dereq_(15); +var EventPluginHub = _dereq_(16); -var accumulateInto = _dereq_(118); -var forEachAccumulated = _dereq_(135); +var warning = _dereq_(154); + +var accumulateInto = _dereq_(102); +var forEachAccumulated = _dereq_(109); var PropagationPhases = EventConstants.PropagationPhases; var getListener = EventPluginHub.getListener; @@ -3445,8 +2955,7 @@ var getListener = EventPluginHub.getListener; * "phases" of propagation. This finds listeners by a given phase. */ function listenerAtPhase(id, event, propagationPhase) { - var registrationName = - event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; return getListener(id, registrationName); } @@ -3457,16 +2966,13 @@ function listenerAtPhase(id, event, propagationPhase) { * "dispatch" object that pairs the event with the listener. */ function accumulateDirectionalDispatches(domID, upwards, event) { - if ("production" !== "development") { - if (!domID) { - throw new Error('Dispatching id must not be null'); - } + if ("development" !== 'production') { + "development" !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined; } var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured; var listener = listenerAtPhase(domID, event, phase); if (listener) { - event._dispatchListeners = - accumulateInto(event._dispatchListeners, listener); + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); event._dispatchIDs = accumulateInto(event._dispatchIDs, domID); } } @@ -3474,20 +2980,24 @@ function accumulateDirectionalDispatches(domID, upwards, event) { /** * Collect dispatches (must be entirely collected before dispatching - see unit * tests). Lazily allocate the array to conserve memory. We must loop through - * each event and perform the traversal for each one. We can not perform a + * each event and perform the traversal for each one. We cannot perform a * single traversal for the entire collection of events because each event may * have a different target. */ function accumulateTwoPhaseDispatchesSingle(event) { if (event && event.dispatchConfig.phasedRegistrationNames) { - EventPluginHub.injection.getInstanceHandle().traverseTwoPhase( - event.dispatchMarker, - accumulateDirectionalDispatches, - event - ); + EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(event.dispatchMarker, accumulateDirectionalDispatches, event); } } +/** + * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. + */ +function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginHub.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(event.dispatchMarker, accumulateDirectionalDispatches, event); + } +} /** * Accumulates without regard to direction, does not look for phased @@ -3499,8 +3009,7 @@ function accumulateDispatches(id, ignoredDirection, event) { var registrationName = event.dispatchConfig.registrationName; var listener = getListener(id, registrationName); if (listener) { - event._dispatchListeners = - accumulateInto(event._dispatchListeners, listener); + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); event._dispatchIDs = accumulateInto(event._dispatchIDs, id); } } @@ -3521,23 +3030,18 @@ function accumulateTwoPhaseDispatches(events) { forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); } -function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) { - EventPluginHub.injection.getInstanceHandle().traverseEnterLeave( - fromID, - toID, - accumulateDispatches, - leave, - enter - ); +function accumulateTwoPhaseDispatchesSkipTarget(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); } +function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) { + EventPluginHub.injection.getInstanceHandle().traverseEnterLeave(fromID, toID, accumulateDispatches, leave, enter); +} function accumulateDirectDispatches(events) { forEachAccumulated(events, accumulateDirectDispatchesSingle); } - - /** * A small set of propagation patterns, each of which will accept a small amount * of information, and generate a set of "dispatch ready event objects" - which @@ -3551,57 +3055,13 @@ function accumulateDirectDispatches(events) { */ var EventPropagators = { accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, accumulateDirectDispatches: accumulateDirectDispatches, accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches }; module.exports = EventPropagators; - -},{"118":118,"135":135,"16":16,"18":18}],22:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ExecutionEnvironment - */ - -/*jslint evil: true */ - -"use strict"; - -var canUseDOM = !!( - (typeof window !== 'undefined' && - window.document && window.document.createElement) -); - -/** - * Simple, lightweight module assisting with the detection and context of - * Worker. Helps avoid circular dependencies and allows code to reason about - * whether or not they are in a Worker, even if they never include the main - * `ReactWorker` dependency. - */ -var ExecutionEnvironment = { - - canUseDOM: canUseDOM, - - canUseWorkers: typeof Worker !== 'undefined', - - canUseEventListeners: - canUseDOM && !!(window.addEventListener || window.attachEvent), - - canUseViewport: canUseDOM && !!window.screen, - - isInWorker: !canUseDOM // For now, this is true - might change in the future. - -}; - -module.exports = ExecutionEnvironment; - -},{}],23:[function(_dereq_,module,exports){ +},{"102":102,"109":109,"15":15,"154":154,"16":16}],20:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -3616,10 +3076,10 @@ module.exports = ExecutionEnvironment; 'use strict'; -var PooledClass = _dereq_(30); +var PooledClass = _dereq_(24); -var assign = _dereq_(29); -var getTextContentAccessor = _dereq_(145); +var assign = _dereq_(23); +var getTextContentAccessor = _dereq_(116); /** * This helper class stores information about text content of a target node, @@ -3639,12 +3099,18 @@ function FallbackCompositionState(root) { } assign(FallbackCompositionState.prototype, { + destructor: function () { + this._root = null; + this._startText = null; + this._fallbackText = null; + }, + /** * Get current text of input. * * @return {string} */ - getText: function() { + getText: function () { if ('value' in this._root) { return this._root.value; } @@ -3657,7 +3123,7 @@ assign(FallbackCompositionState.prototype, { * * @return {string} */ - getData: function() { + getData: function () { if (this._fallbackText) { return this._fallbackText; } @@ -3691,8 +3157,7 @@ assign(FallbackCompositionState.prototype, { PooledClass.addPoolingTo(FallbackCompositionState); module.exports = FallbackCompositionState; - -},{"145":145,"29":29,"30":30}],24:[function(_dereq_,module,exports){ +},{"116":116,"23":23,"24":24}],21:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -3704,41 +3169,27 @@ module.exports = FallbackCompositionState; * @providesModule HTMLDOMPropertyConfig */ -/*jslint bitwise: true*/ - 'use strict'; -var DOMProperty = _dereq_(11); -var ExecutionEnvironment = _dereq_(22); +var DOMProperty = _dereq_(10); +var ExecutionEnvironment = _dereq_(129); var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE; var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS; var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; -var HAS_POSITIVE_NUMERIC_VALUE = - DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; -var HAS_OVERLOADED_BOOLEAN_VALUE = - DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; +var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; +var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; var hasSVG; if (ExecutionEnvironment.canUseDOM) { var implementation = document.implementation; - hasSVG = ( - implementation && - implementation.hasFeature && - implementation.hasFeature( - 'http://www.w3.org/TR/SVG11/feature#BasicStructure', - '1.1' - ) - ); + hasSVG = implementation && implementation.hasFeature && implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1'); } - var HTMLDOMPropertyConfig = { - isCustomAttribute: RegExp.prototype.test.bind( - /^(data|aria)-[a-z_][a-z\d_.\-]*$/ - ), + isCustomAttribute: RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/), Properties: { /** * Standard Properties @@ -3752,12 +3203,14 @@ var HTMLDOMPropertyConfig = { alt: null, async: HAS_BOOLEAN_VALUE, autoComplete: null, - // autoFocus is polyfilled/normalized by AutoFocusMixin + // autoFocus is polyfilled/normalized by AutoFocusUtils // autoFocus: HAS_BOOLEAN_VALUE, autoPlay: HAS_BOOLEAN_VALUE, + capture: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, cellPadding: null, cellSpacing: null, charSet: MUST_USE_ATTRIBUTE, + challenge: MUST_USE_ATTRIBUTE, checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, classID: MUST_USE_ATTRIBUTE, // To set className on SVG elements, it's necessary to use .setAttribute; @@ -3799,6 +3252,10 @@ var HTMLDOMPropertyConfig = { httpEquiv: null, icon: null, id: MUST_USE_PROPERTY, + inputMode: MUST_USE_ATTRIBUTE, + is: MUST_USE_ATTRIBUTE, + keyParams: MUST_USE_ATTRIBUTE, + keyType: MUST_USE_ATTRIBUTE, label: null, lang: null, list: MUST_USE_ATTRIBUTE, @@ -3813,6 +3270,7 @@ var HTMLDOMPropertyConfig = { mediaGroup: null, method: null, min: null, + minLength: MUST_USE_ATTRIBUTE, multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, name: null, @@ -3847,6 +3305,7 @@ var HTMLDOMPropertyConfig = { start: HAS_NUMERIC_VALUE, step: null, style: null, + summary: null, tabIndex: null, target: null, title: null, @@ -3855,6 +3314,20 @@ var HTMLDOMPropertyConfig = { value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS, width: MUST_USE_ATTRIBUTE, wmode: MUST_USE_ATTRIBUTE, + wrap: null, + + /** + * RDFa Properties + */ + about: MUST_USE_ATTRIBUTE, + datatype: MUST_USE_ATTRIBUTE, + inlist: MUST_USE_ATTRIBUTE, + prefix: MUST_USE_ATTRIBUTE, + // property is also supported for OpenGraph in meta tags. + property: MUST_USE_ATTRIBUTE, + resource: MUST_USE_ATTRIBUTE, + 'typeof': MUST_USE_ATTRIBUTE, + vocab: MUST_USE_ATTRIBUTE, /** * Non-standard Properties @@ -3863,6 +3336,8 @@ var HTMLDOMPropertyConfig = { // keyboard hints. autoCapitalize: null, autoCorrect: null, + // autoSave allows WebKit/Blink to persist values of input fields on page reloads + autoSave: null, // itemProp, itemScope, itemType are for // Microdata support. See http://schema.org/docs/gs.html itemProp: MUST_USE_ATTRIBUTE, @@ -3873,8 +3348,12 @@ var HTMLDOMPropertyConfig = { // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api itemID: MUST_USE_ATTRIBUTE, itemRef: MUST_USE_ATTRIBUTE, - // property is supported for OpenGraph in meta tags. - property: null, + // results show looking glass icon and recent searches on input + // search fields in WebKit/Blink + results: null, + // IE-only attribute that specifies security restrictions on an iframe + // as an alternative to the sandbox attribute on IE<10 + security: MUST_USE_ATTRIBUTE, // IE-only attribute that controls focus behavior unselectable: MUST_USE_ATTRIBUTE }, @@ -3890,6 +3369,7 @@ var HTMLDOMPropertyConfig = { autoCorrect: 'autocorrect', autoFocus: 'autofocus', autoPlay: 'autoplay', + autoSave: 'autosave', // `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter. // http://www.w3.org/TR/html5/forms.html#dom-fs-encoding encType: 'encoding', @@ -3902,49 +3382,7 @@ var HTMLDOMPropertyConfig = { }; module.exports = HTMLDOMPropertyConfig; - -},{"11":11,"22":22}],25:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule LinkedStateMixin - * @typechecks static-only - */ - -'use strict'; - -var ReactLink = _dereq_(75); -var ReactStateSetters = _dereq_(94); - -/** - * A simple mixin around ReactLink.forState(). - */ -var LinkedStateMixin = { - /** - * Create a ReactLink that's linked to part of this component's state. The - * ReactLink will have the current value of this.state[key] and will call - * setState() when a change is requested. - * - * @param {string} key state key to update. Note: you may want to use keyOf() - * if you're using Google Closure Compiler advanced mode. - * @return {ReactLink} ReactLink instance linking to the state. - */ - linkState: function(key) { - return new ReactLink( - this.state[key], - ReactStateSetters.createStateKeySetter(this, key) - ); - } -}; - -module.exports = LinkedStateMixin; - -},{"75":75,"94":94}],26:[function(_dereq_,module,exports){ +},{"10":10,"129":129}],22:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -3959,9 +3397,11 @@ module.exports = LinkedStateMixin; 'use strict'; -var ReactPropTypes = _dereq_(86); +var ReactPropTypes = _dereq_(74); +var ReactPropTypeLocations = _dereq_(73); -var invariant = _dereq_(150); +var invariant = _dereq_(143); +var warning = _dereq_(154); var hasReadOnlyValue = { 'button': true, @@ -3973,46 +3413,44 @@ var hasReadOnlyValue = { 'submit': true }; -function _assertSingleLink(input) { - ("production" !== "development" ? invariant( - input.props.checkedLink == null || input.props.valueLink == null, - 'Cannot provide a checkedLink and a valueLink. If you want to use ' + - 'checkedLink, you probably don\'t want to use valueLink and vice versa.' - ) : invariant(input.props.checkedLink == null || input.props.valueLink == null)); +function _assertSingleLink(inputProps) { + !(inputProps.checkedLink == null || inputProps.valueLink == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use ' + 'checkedLink, you probably don\'t want to use valueLink and vice versa.') : invariant(false) : undefined; } -function _assertValueLink(input) { - _assertSingleLink(input); - ("production" !== "development" ? invariant( - input.props.value == null && input.props.onChange == null, - 'Cannot provide a valueLink and a value or onChange event. If you want ' + - 'to use value or onChange, you probably don\'t want to use valueLink.' - ) : invariant(input.props.value == null && input.props.onChange == null)); +function _assertValueLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.value == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want ' + 'to use value or onChange, you probably don\'t want to use valueLink.') : invariant(false) : undefined; } -function _assertCheckedLink(input) { - _assertSingleLink(input); - ("production" !== "development" ? invariant( - input.props.checked == null && input.props.onChange == null, - 'Cannot provide a checkedLink and a checked property or onChange event. ' + - 'If you want to use checked or onChange, you probably don\'t want to ' + - 'use checkedLink' - ) : invariant(input.props.checked == null && input.props.onChange == null)); +function _assertCheckedLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.checked == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. ' + 'If you want to use checked or onChange, you probably don\'t want to ' + 'use checkedLink') : invariant(false) : undefined; } -/** - * @param {SyntheticEvent} e change event to handle - */ -function _handleLinkedValueChange(e) { - /*jshint validthis:true */ - this.props.valueLink.requestChange(e.target.value); -} +var propTypes = { + value: function (props, propName, componentName) { + if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + }, + checked: function (props, propName, componentName) { + if (!props[propName] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + }, + onChange: ReactPropTypes.func +}; -/** - * @param {SyntheticEvent} e change event to handle - */ -function _handleLinkedCheckChange(e) { - /*jshint validthis:true */ - this.props.checkedLink.requestChange(e.target.checked); +var loggedTypeFailures = {}; +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; } /** @@ -4020,198 +3458,66 @@ function _handleLinkedCheckChange(e) { * this outside of the ReactDOM controlled form components. */ var LinkedValueUtils = { - Mixin: { - propTypes: { - value: function(props, propName, componentName) { - if (!props[propName] || - hasReadOnlyValue[props.type] || - props.onChange || - props.readOnly || - props.disabled) { - return null; - } - return new Error( - 'You provided a `value` prop to a form field without an ' + - '`onChange` handler. This will render a read-only field. If ' + - 'the field should be mutable use `defaultValue`. Otherwise, ' + - 'set either `onChange` or `readOnly`.' - ); - }, - checked: function(props, propName, componentName) { - if (!props[propName] || - props.onChange || - props.readOnly || - props.disabled) { - return null; - } - return new Error( - 'You provided a `checked` prop to a form field without an ' + - '`onChange` handler. This will render a read-only field. If ' + - 'the field should be mutable use `defaultChecked`. Otherwise, ' + - 'set either `onChange` or `readOnly`.' - ); - }, - onChange: ReactPropTypes.func + checkPropTypes: function (tagName, props, owner) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error = propTypes[propName](props, propName, tagName, ReactPropTypeLocations.prop); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var addendum = getDeclarationErrorAddendum(owner); + "development" !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : undefined; + } } }, /** - * @param {ReactComponent} input Form component + * @param {object} inputProps Props for form component * @return {*} current value of the input either from value prop or link. */ - getValue: function(input) { - if (input.props.valueLink) { - _assertValueLink(input); - return input.props.valueLink.value; + getValue: function (inputProps) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.value; } - return input.props.value; + return inputProps.value; }, /** - * @param {ReactComponent} input Form component + * @param {object} inputProps Props for form component * @return {*} current checked status of the input either from checked prop * or link. */ - getChecked: function(input) { - if (input.props.checkedLink) { - _assertCheckedLink(input); - return input.props.checkedLink.value; + getChecked: function (inputProps) { + if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.value; } - return input.props.checked; + return inputProps.checked; }, /** - * @param {ReactComponent} input Form component - * @return {function} change callback either from onChange prop or link. + * @param {object} inputProps Props for form component + * @param {SyntheticEvent} event change event to handle */ - getOnChange: function(input) { - if (input.props.valueLink) { - _assertValueLink(input); - return _handleLinkedValueChange; - } else if (input.props.checkedLink) { - _assertCheckedLink(input); - return _handleLinkedCheckChange; + executeOnChange: function (inputProps, event) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.requestChange(event.target.value); + } else if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.requestChange(event.target.checked); + } else if (inputProps.onChange) { + return inputProps.onChange.call(undefined, event); } - return input.props.onChange; } }; module.exports = LinkedValueUtils; - -},{"150":150,"86":86}],27:[function(_dereq_,module,exports){ -/** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule LocalEventTrapMixin - */ - -'use strict'; - -var ReactBrowserEventEmitter = _dereq_(33); - -var accumulateInto = _dereq_(118); -var forEachAccumulated = _dereq_(135); -var invariant = _dereq_(150); - -function remove(event) { - event.remove(); -} - -var LocalEventTrapMixin = { - trapBubbledEvent:function(topLevelType, handlerBaseName) { - ("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted())); - // If a component renders to null or if another component fatals and causes - // the state of the tree to be corrupted, `node` here can be null. - var node = this.getDOMNode(); - ("production" !== "development" ? invariant( - node, - 'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.' - ) : invariant(node)); - var listener = ReactBrowserEventEmitter.trapBubbledEvent( - topLevelType, - handlerBaseName, - node - ); - this._localEventListeners = - accumulateInto(this._localEventListeners, listener); - }, - - // trapCapturedEvent would look nearly identical. We don't implement that - // method because it isn't currently needed. - - componentWillUnmount:function() { - if (this._localEventListeners) { - forEachAccumulated(this._localEventListeners, remove); - } - } -}; - -module.exports = LocalEventTrapMixin; - -},{"118":118,"135":135,"150":150,"33":33}],28:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule MobileSafariClickEventPlugin - * @typechecks static-only - */ - -'use strict'; - -var EventConstants = _dereq_(16); - -var emptyFunction = _dereq_(129); - -var topLevelTypes = EventConstants.topLevelTypes; - -/** - * Mobile Safari does not fire properly bubble click events on non-interactive - * elements, which means delegated click listeners do not fire. The workaround - * for this bug involves attaching an empty click listener on the target node. - * - * This particular plugin works around the bug by attaching an empty click - * listener on `touchstart` (which does fire on every element). - */ -var MobileSafariClickEventPlugin = { - - eventTypes: null, - - /** - * @param {string} topLevelType Record from `EventConstants`. - * @param {DOMEventTarget} topLevelTarget The listening component root node. - * @param {string} topLevelTargetID ID of `topLevelTarget`. - * @param {object} nativeEvent Native browser event. - * @return {*} An accumulation of synthetic events. - * @see {EventPluginHub.extractEvents} - */ - extractEvents: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent) { - if (topLevelType === topLevelTypes.topTouchStart) { - var target = nativeEvent.target; - if (target && !target.onclick) { - target.onclick = emptyFunction; - } - } - } - -}; - -module.exports = MobileSafariClickEventPlugin; - -},{"129":129,"16":16}],29:[function(_dereq_,module,exports){ +},{"143":143,"154":154,"73":73,"74":74}],23:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -4259,8 +3565,7 @@ function assign(target, sources) { } module.exports = assign; - -},{}],30:[function(_dereq_,module,exports){ +},{}],24:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -4274,7 +3579,7 @@ module.exports = assign; 'use strict'; -var invariant = _dereq_(150); +var invariant = _dereq_(143); /** * Static poolers. Several custom versions for each potential number of @@ -4283,7 +3588,7 @@ var invariant = _dereq_(150); * the Class itself, not an instance. If any others are needed, simply add them * here, or in their own files. */ -var oneArgumentPooler = function(copyFieldsFrom) { +var oneArgumentPooler = function (copyFieldsFrom) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -4294,7 +3599,7 @@ var oneArgumentPooler = function(copyFieldsFrom) { } }; -var twoArgumentPooler = function(a1, a2) { +var twoArgumentPooler = function (a1, a2) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -4305,7 +3610,7 @@ var twoArgumentPooler = function(a1, a2) { } }; -var threeArgumentPooler = function(a1, a2, a3) { +var threeArgumentPooler = function (a1, a2, a3) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -4316,7 +3621,18 @@ var threeArgumentPooler = function(a1, a2, a3) { } }; -var fiveArgumentPooler = function(a1, a2, a3, a4, a5) { +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; + +var fiveArgumentPooler = function (a1, a2, a3, a4, a5) { var Klass = this; if (Klass.instancePool.length) { var instance = Klass.instancePool.pop(); @@ -4327,15 +3643,10 @@ var fiveArgumentPooler = function(a1, a2, a3, a4, a5) { } }; -var standardReleaser = function(instance) { +var standardReleaser = function (instance) { var Klass = this; - ("production" !== "development" ? invariant( - instance instanceof Klass, - 'Trying to release an instance into a pool of a different type.' - ) : invariant(instance instanceof Klass)); - if (instance.destructor) { - instance.destructor(); - } + !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : invariant(false) : undefined; + instance.destructor(); if (Klass.instancePool.length < Klass.poolSize) { Klass.instancePool.push(instance); } @@ -4353,7 +3664,7 @@ var DEFAULT_POOLER = oneArgumentPooler; * @param {Function} CopyConstructor Constructor that can be used to reset. * @param {Function} pooler Customizable pooler. */ -var addPoolingTo = function(CopyConstructor, pooler) { +var addPoolingTo = function (CopyConstructor, pooler) { var NewKlass = CopyConstructor; NewKlass.instancePool = []; NewKlass.getPooled = pooler || DEFAULT_POOLER; @@ -4369,12 +3680,12 @@ var PooledClass = { oneArgumentPooler: oneArgumentPooler, twoArgumentPooler: twoArgumentPooler, threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler, fiveArgumentPooler: fiveArgumentPooler }; module.exports = PooledClass; - -},{"150":150}],31:[function(_dereq_,module,exports){ +},{"143":143}],25:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -4383,162 +3694,17 @@ module.exports = PooledClass; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule React + * @providesModule ReactBrowserComponentMixin */ -/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ - 'use strict'; -var EventPluginUtils = _dereq_(20); -var ReactChildren = _dereq_(37); -var ReactComponent = _dereq_(39); -var ReactClass = _dereq_(38); -var ReactContext = _dereq_(44); -var ReactCurrentOwner = _dereq_(45); -var ReactElement = _dereq_(63); -var ReactElementValidator = _dereq_(64); -var ReactDOM = _dereq_(46); -var ReactDOMTextComponent = _dereq_(57); -var ReactDefaultInjection = _dereq_(60); -var ReactInstanceHandles = _dereq_(72); -var ReactMount = _dereq_(77); -var ReactPerf = _dereq_(82); -var ReactPropTypes = _dereq_(86); -var ReactReconciler = _dereq_(89); -var ReactServerRendering = _dereq_(92); - -var assign = _dereq_(29); -var findDOMNode = _dereq_(132); -var onlyChild = _dereq_(160); - -ReactDefaultInjection.inject(); - -var createElement = ReactElement.createElement; -var createFactory = ReactElement.createFactory; -var cloneElement = ReactElement.cloneElement; - -if ("production" !== "development") { - createElement = ReactElementValidator.createElement; - createFactory = ReactElementValidator.createFactory; - cloneElement = ReactElementValidator.cloneElement; -} - -var render = ReactPerf.measure('React', 'render', ReactMount.render); - -var React = { - Children: { - map: ReactChildren.map, - forEach: ReactChildren.forEach, - count: ReactChildren.count, - only: onlyChild - }, - Component: ReactComponent, - DOM: ReactDOM, - PropTypes: ReactPropTypes, - initializeTouchEvents: function(shouldUseTouch) { - EventPluginUtils.useTouchEvents = shouldUseTouch; - }, - createClass: ReactClass.createClass, - createElement: createElement, - cloneElement: cloneElement, - createFactory: createFactory, - createMixin: function(mixin) { - // Currently a noop. Will be used to validate and trace mixins. - return mixin; - }, - constructAndRenderComponent: ReactMount.constructAndRenderComponent, - constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID, - findDOMNode: findDOMNode, - render: render, - renderToString: ReactServerRendering.renderToString, - renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup, - unmountComponentAtNode: ReactMount.unmountComponentAtNode, - isValidElement: ReactElement.isValidElement, - withContext: ReactContext.withContext, - - // Hook for JSX spread, don't use this for anything else. - __spread: assign -}; - -// Inject the runtime into a devtools global hook regardless of browser. -// Allows for debugging when the hook is injected on the page. -if ( - typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && - typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { - __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ - CurrentOwner: ReactCurrentOwner, - InstanceHandles: ReactInstanceHandles, - Mount: ReactMount, - Reconciler: ReactReconciler, - TextComponent: ReactDOMTextComponent - }); -} - -if ("production" !== "development") { - var ExecutionEnvironment = _dereq_(22); - if (ExecutionEnvironment.canUseDOM && window.top === window.self) { - - // If we're in Chrome, look for the devtools marker and provide a download - // link if not installed. - if (navigator.userAgent.indexOf('Chrome') > -1) { - if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { - console.debug( - 'Download the React DevTools for a better development experience: ' + - 'https://fb.me/react-devtools' - ); - } - } - - var expectedFeatures = [ - // shims - Array.isArray, - Array.prototype.every, - Array.prototype.forEach, - Array.prototype.indexOf, - Array.prototype.map, - Date.now, - Function.prototype.bind, - Object.keys, - String.prototype.split, - String.prototype.trim, - - // shams - Object.create, - Object.freeze - ]; - - for (var i = 0; i < expectedFeatures.length; i++) { - if (!expectedFeatures[i]) { - console.error( - 'One or more ES5 shim/shams expected by React are not available: ' + - 'https://fb.me/react-warning-polyfills' - ); - break; - } - } - } -} - -React.version = '0.13.3'; +var ReactInstanceMap = _dereq_(62); -module.exports = React; - -},{"132":132,"160":160,"20":20,"22":22,"29":29,"37":37,"38":38,"39":39,"44":44,"45":45,"46":46,"57":57,"60":60,"63":63,"64":64,"72":72,"77":77,"82":82,"86":86,"89":89,"92":92}],32:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactBrowserComponentMixin - */ - -'use strict'; +var findDOMNode = _dereq_(107); +var warning = _dereq_(154); -var findDOMNode = _dereq_(132); +var didWarnKey = '_getDOMNodeDidWarn'; var ReactBrowserComponentMixin = { /** @@ -4548,14 +3714,15 @@ var ReactBrowserComponentMixin = { * @final * @protected */ - getDOMNode: function() { + getDOMNode: function () { + "development" !== 'production' ? warning(this.constructor[didWarnKey], '%s.getDOMNode(...) is deprecated. Please use ' + 'ReactDOM.findDOMNode(instance) instead.', ReactInstanceMap.get(this).getName() || this.tagName || 'Unknown') : undefined; + this.constructor[didWarnKey] = true; return findDOMNode(this); } }; module.exports = ReactBrowserComponentMixin; - -},{"132":132}],33:[function(_dereq_,module,exports){ +},{"107":107,"154":154,"62":62}],26:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -4570,14 +3737,15 @@ module.exports = ReactBrowserComponentMixin; 'use strict'; -var EventConstants = _dereq_(16); -var EventPluginHub = _dereq_(18); -var EventPluginRegistry = _dereq_(19); -var ReactEventEmitterMixin = _dereq_(67); -var ViewportMetrics = _dereq_(117); +var EventConstants = _dereq_(15); +var EventPluginHub = _dereq_(16); +var EventPluginRegistry = _dereq_(17); +var ReactEventEmitterMixin = _dereq_(57); +var ReactPerf = _dereq_(71); +var ViewportMetrics = _dereq_(101); -var assign = _dereq_(29); -var isEventSupported = _dereq_(151); +var assign = _dereq_(23); +var isEventSupported = _dereq_(118); /** * Summary of `ReactBrowserEventEmitter` event handling: @@ -4642,7 +3810,10 @@ var reactTopListenersCounter = 0; // lower node than `document`), binding at `document` would cause duplicate // events so we don't include them here var topEventMapping = { + topAbort: 'abort', topBlur: 'blur', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', topChange: 'change', topClick: 'click', topCompositionEnd: 'compositionend', @@ -4660,24 +3831,44 @@ var topEventMapping = { topDragOver: 'dragover', topDragStart: 'dragstart', topDrop: 'drop', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', topFocus: 'focus', topInput: 'input', topKeyDown: 'keydown', topKeyPress: 'keypress', topKeyUp: 'keyup', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', topMouseDown: 'mousedown', topMouseMove: 'mousemove', topMouseOut: 'mouseout', topMouseOver: 'mouseover', topMouseUp: 'mouseup', topPaste: 'paste', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', topScroll: 'scroll', + topSeeked: 'seeked', + topSeeking: 'seeking', topSelectionChange: 'selectionchange', + topStalled: 'stalled', + topSuspend: 'suspend', topTextInput: 'textInput', + topTimeUpdate: 'timeupdate', topTouchCancel: 'touchcancel', topTouchEnd: 'touchend', topTouchMove: 'touchmove', topTouchStart: 'touchstart', + topVolumeChange: 'volumechange', + topWaiting: 'waiting', topWheel: 'wheel' }; @@ -4717,10 +3908,8 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { /** * @param {object} ReactEventListener */ - injectReactEventListener: function(ReactEventListener) { - ReactEventListener.setHandleTopLevel( - ReactBrowserEventEmitter.handleTopLevel - ); + injectReactEventListener: function (ReactEventListener) { + ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; } }, @@ -4730,7 +3919,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { * * @param {boolean} enabled True if callbacks should be enabled. */ - setEnabled: function(enabled) { + setEnabled: function (enabled) { if (ReactBrowserEventEmitter.ReactEventListener) { ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); } @@ -4739,10 +3928,8 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { /** * @return {boolean} True if callbacks are enabled. */ - isEnabled: function() { - return !!( - (ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()) - ); + isEnabled: function () { + return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()); }, /** @@ -4766,93 +3953,49 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { * @param {string} registrationName Name of listener (e.g. `onClick`). * @param {object} contentDocumentHandle Document which owns the container */ - listenTo: function(registrationName, contentDocumentHandle) { + listenTo: function (registrationName, contentDocumentHandle) { var mountAt = contentDocumentHandle; var isListening = getListeningForDocument(mountAt); - var dependencies = EventPluginRegistry. - registrationNameDependencies[registrationName]; + var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; var topLevelTypes = EventConstants.topLevelTypes; - for (var i = 0, l = dependencies.length; i < l; i++) { + for (var i = 0; i < dependencies.length; i++) { var dependency = dependencies[i]; - if (!( - (isListening.hasOwnProperty(dependency) && isListening[dependency]) - )) { + if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { if (dependency === topLevelTypes.topWheel) { if (isEventSupported('wheel')) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( - topLevelTypes.topWheel, - 'wheel', - mountAt - ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'wheel', mountAt); } else if (isEventSupported('mousewheel')) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( - topLevelTypes.topWheel, - 'mousewheel', - mountAt - ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'mousewheel', mountAt); } else { // Firefox needs to capture a different mouse scroll event. // @see http://www.quirksmode.org/dom/events/tests/scroll.html - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( - topLevelTypes.topWheel, - 'DOMMouseScroll', - mountAt - ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'DOMMouseScroll', mountAt); } } else if (dependency === topLevelTypes.topScroll) { if (isEventSupported('scroll', true)) { - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( - topLevelTypes.topScroll, - 'scroll', - mountAt - ); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, 'scroll', mountAt); } else { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( - topLevelTypes.topScroll, - 'scroll', - ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE - ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); } - } else if (dependency === topLevelTypes.topFocus || - dependency === topLevelTypes.topBlur) { + } else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) { if (isEventSupported('focus', true)) { - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( - topLevelTypes.topFocus, - 'focus', - mountAt - ); - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( - topLevelTypes.topBlur, - 'blur', - mountAt - ); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, 'focus', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, 'blur', mountAt); } else if (isEventSupported('focusin')) { // IE has `focusin` and `focusout` events which bubble. // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( - topLevelTypes.topFocus, - 'focusin', - mountAt - ); - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( - topLevelTypes.topBlur, - 'focusout', - mountAt - ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, 'focusin', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, 'focusout', mountAt); } // to make sure blur and focus event listeners are only attached once isListening[topLevelTypes.topBlur] = true; isListening[topLevelTypes.topFocus] = true; } else if (topEventMapping.hasOwnProperty(dependency)) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( - dependency, - topEventMapping[dependency], - mountAt - ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt); } isListening[dependency] = true; @@ -4860,20 +4003,12 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { } }, - trapBubbledEvent: function(topLevelType, handlerBaseName, handle) { - return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( - topLevelType, - handlerBaseName, - handle - ); + trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle); }, - trapCapturedEvent: function(topLevelType, handlerBaseName, handle) { - return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( - topLevelType, - handlerBaseName, - handle - ); + trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle); }, /** @@ -4884,7 +4019,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { * * @see http://www.quirksmode.org/dom/events/scroll.html */ - ensureScrollValueMonitoring: function() { + ensureScrollValueMonitoring: function () { if (!isMonitoringScrollValue) { var refresh = ViewportMetrics.refreshScrollValues; ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); @@ -4906,225 +4041,13 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { }); -module.exports = ReactBrowserEventEmitter; - -},{"117":117,"151":151,"16":16,"18":18,"19":19,"29":29,"67":67}],34:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks - * @providesModule ReactCSSTransitionGroup - */ - -'use strict'; - -var React = _dereq_(31); - -var assign = _dereq_(29); - -var ReactTransitionGroup = React.createFactory( - _dereq_(98) -); -var ReactCSSTransitionGroupChild = React.createFactory( - _dereq_(35) -); - -var ReactCSSTransitionGroup = React.createClass({ - displayName: 'ReactCSSTransitionGroup', - - propTypes: { - transitionName: React.PropTypes.string.isRequired, - transitionAppear: React.PropTypes.bool, - transitionEnter: React.PropTypes.bool, - transitionLeave: React.PropTypes.bool - }, - - getDefaultProps: function() { - return { - transitionAppear: false, - transitionEnter: true, - transitionLeave: true - }; - }, - - _wrapChild: function(child) { - // We need to provide this childFactory so that - // ReactCSSTransitionGroupChild can receive updates to name, enter, and - // leave while it is leaving. - return ReactCSSTransitionGroupChild( - { - name: this.props.transitionName, - appear: this.props.transitionAppear, - enter: this.props.transitionEnter, - leave: this.props.transitionLeave - }, - child - ); - }, - - render: function() { - return ( - ReactTransitionGroup( - assign({}, this.props, {childFactory: this._wrapChild}) - ) - ); - } +ReactPerf.measureMethods(ReactBrowserEventEmitter, 'ReactBrowserEventEmitter', { + putListener: 'putListener', + deleteListener: 'deleteListener' }); -module.exports = ReactCSSTransitionGroup; - -},{"29":29,"31":31,"35":35,"98":98}],35:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks - * @providesModule ReactCSSTransitionGroupChild - */ - -'use strict'; - -var React = _dereq_(31); - -var CSSCore = _dereq_(4); -var ReactTransitionEvents = _dereq_(97); - -var onlyChild = _dereq_(160); -var warning = _dereq_(171); - -// We don't remove the element from the DOM until we receive an animationend or -// transitionend event. If the user screws up and forgets to add an animation -// their node will be stuck in the DOM forever, so we detect if an animation -// does not start and if it doesn't, we just call the end listener immediately. -var TICK = 17; -var NO_EVENT_TIMEOUT = 5000; - -var noEventListener = null; - - -if ("production" !== "development") { - noEventListener = function() { - ("production" !== "development" ? warning( - false, - 'transition(): tried to perform an animation without ' + - 'an animationend or transitionend event after timeout (' + - '%sms). You should either disable this ' + - 'transition in JS or add a CSS animation/transition.', - NO_EVENT_TIMEOUT - ) : null); - }; -} - -var ReactCSSTransitionGroupChild = React.createClass({ - displayName: 'ReactCSSTransitionGroupChild', - - transition: function(animationType, finishCallback) { - var node = this.getDOMNode(); - var className = this.props.name + '-' + animationType; - var activeClassName = className + '-active'; - var noEventTimeout = null; - - var endListener = function(e) { - if (e && e.target !== node) { - return; - } - if ("production" !== "development") { - clearTimeout(noEventTimeout); - } - - CSSCore.removeClass(node, className); - CSSCore.removeClass(node, activeClassName); - - ReactTransitionEvents.removeEndEventListener(node, endListener); - - // Usually this optional callback is used for informing an owner of - // a leave animation and telling it to remove the child. - if (finishCallback) { - finishCallback(); - } - }; - - ReactTransitionEvents.addEndEventListener(node, endListener); - - CSSCore.addClass(node, className); - - // Need to do this to actually trigger a transition. - this.queueClass(activeClassName); - - if ("production" !== "development") { - noEventTimeout = setTimeout(noEventListener, NO_EVENT_TIMEOUT); - } - }, - - queueClass: function(className) { - this.classNameQueue.push(className); - - if (!this.timeout) { - this.timeout = setTimeout(this.flushClassNameQueue, TICK); - } - }, - - flushClassNameQueue: function() { - if (this.isMounted()) { - this.classNameQueue.forEach( - CSSCore.addClass.bind(CSSCore, this.getDOMNode()) - ); - } - this.classNameQueue.length = 0; - this.timeout = null; - }, - - componentWillMount: function() { - this.classNameQueue = []; - }, - - componentWillUnmount: function() { - if (this.timeout) { - clearTimeout(this.timeout); - } - }, - - componentWillAppear: function(done) { - if (this.props.appear) { - this.transition('appear', done); - } else { - done(); - } - }, - - componentWillEnter: function(done) { - if (this.props.enter) { - this.transition('enter', done); - } else { - done(); - } - }, - - componentWillLeave: function(done) { - if (this.props.leave) { - this.transition('leave', done); - } else { - done(); - } - }, - - render: function() { - return onlyChild(this.props.children); - } -}); - -module.exports = ReactCSSTransitionGroupChild; - -},{"160":160,"171":171,"31":31,"4":4,"97":97}],36:[function(_dereq_,module,exports){ +module.exports = ReactBrowserEventEmitter; +},{"101":101,"118":118,"15":15,"16":16,"17":17,"23":23,"57":57,"71":71}],27:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -5139,11 +4062,23 @@ module.exports = ReactCSSTransitionGroupChild; 'use strict'; -var ReactReconciler = _dereq_(89); +var ReactReconciler = _dereq_(76); -var flattenChildren = _dereq_(133); -var instantiateReactComponent = _dereq_(149); -var shouldUpdateReactComponent = _dereq_(167); +var instantiateReactComponent = _dereq_(117); +var shouldUpdateReactComponent = _dereq_(125); +var traverseAllChildren = _dereq_(126); +var warning = _dereq_(154); + +function instantiateChild(childInstances, child, name) { + // We found a component instance. + var keyUnique = childInstances[name] === undefined; + if ("development" !== 'production') { + "development" !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.', name) : undefined; + } + if (child != null && keyUnique) { + childInstances[name] = instantiateReactComponent(child, null); + } +} /** * ReactChildReconciler provides helpers for initializing or updating a set of @@ -5151,7 +4086,6 @@ var shouldUpdateReactComponent = _dereq_(167); * does diffed reordering and insertion. */ var ReactChildReconciler = { - /** * Generates a "mount image" for each of the supplied children. In the case * of `ReactDOMComponent`, a mount image is a string of markup. @@ -5160,41 +4094,31 @@ var ReactChildReconciler = { * @return {?object} A set of child instances. * @internal */ - instantiateChildren: function(nestedChildNodes, transaction, context) { - var children = flattenChildren(nestedChildNodes); - for (var name in children) { - if (children.hasOwnProperty(name)) { - var child = children[name]; - // The rendered children must be turned into instances as they're - // mounted. - var childInstance = instantiateReactComponent(child, null); - children[name] = childInstance; - } + instantiateChildren: function (nestedChildNodes, transaction, context) { + if (nestedChildNodes == null) { + return null; } - return children; + var childInstances = {}; + traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); + return childInstances; }, /** * Updates the rendered children and returns a new set of children. * * @param {?object} prevChildren Previously initialized set of children. - * @param {?object} nextNestedChildNodes Nested child maps. + * @param {?object} nextChildren Flat child element maps. * @param {ReactReconcileTransaction} transaction * @param {object} context * @return {?object} A new set of child instances. * @internal */ - updateChildren: function( - prevChildren, - nextNestedChildNodes, - transaction, - context) { + updateChildren: function (prevChildren, nextChildren, transaction, context) { // We currently don't have a way to track moves here but if we use iterators // instead of for..in we can zip the iterators and check if an item has // moved. // TODO: If nothing has changed, return the prevChildren object so that we // can quickly bailout if nothing has changed. - var nextChildren = flattenChildren(nextNestedChildNodes); if (!nextChildren && !prevChildren) { return null; } @@ -5206,27 +4130,21 @@ var ReactChildReconciler = { var prevChild = prevChildren && prevChildren[name]; var prevElement = prevChild && prevChild._currentElement; var nextElement = nextChildren[name]; - if (shouldUpdateReactComponent(prevElement, nextElement)) { - ReactReconciler.receiveComponent( - prevChild, nextElement, transaction, context - ); + if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { + ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); nextChildren[name] = prevChild; } else { if (prevChild) { ReactReconciler.unmountComponent(prevChild, name); } // The child must be instantiated before it's mounted. - var nextChildInstance = instantiateReactComponent( - nextElement, - null - ); + var nextChildInstance = instantiateReactComponent(nextElement, null); nextChildren[name] = nextChildInstance; } } // Unmount children that are no longer present. for (name in prevChildren) { - if (prevChildren.hasOwnProperty(name) && - !(nextChildren && nextChildren.hasOwnProperty(name))) { + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { ReactReconciler.unmountComponent(prevChildren[name]); } } @@ -5240,18 +4158,19 @@ var ReactChildReconciler = { * @param {?object} renderedChildren Previously initialized set of children. * @internal */ - unmountChildren: function(renderedChildren) { + unmountChildren: function (renderedChildren) { for (var name in renderedChildren) { - var renderedChild = renderedChildren[name]; - ReactReconciler.unmountComponent(renderedChild); + if (renderedChildren.hasOwnProperty(name)) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild); + } } } }; module.exports = ReactChildReconciler; - -},{"133":133,"149":149,"167":167,"89":89}],37:[function(_dereq_,module,exports){ +},{"117":117,"125":125,"126":126,"154":154,"76":76}],28:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -5265,14 +4184,19 @@ module.exports = ReactChildReconciler; 'use strict'; -var PooledClass = _dereq_(30); -var ReactFragment = _dereq_(69); +var PooledClass = _dereq_(24); +var ReactElement = _dereq_(52); -var traverseAllChildren = _dereq_(169); -var warning = _dereq_(171); +var emptyFunction = _dereq_(135); +var traverseAllChildren = _dereq_(126); var twoArgumentPooler = PooledClass.twoArgumentPooler; -var threeArgumentPooler = PooledClass.threeArgumentPooler; +var fourArgumentPooler = PooledClass.fourArgumentPooler; + +var userProvidedKeyEscapeRegex = /\/(?!\/)/g; +function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '//'); +} /** * PooledClass representing the bookkeeping associated with performing a child @@ -5283,15 +4207,22 @@ var threeArgumentPooler = PooledClass.threeArgumentPooler; * @param {?*} forEachContext Context to perform context with. */ function ForEachBookKeeping(forEachFunction, forEachContext) { - this.forEachFunction = forEachFunction; - this.forEachContext = forEachContext; -} + this.func = forEachFunction; + this.context = forEachContext; + this.count = 0; +} +ForEachBookKeeping.prototype.destructor = function () { + this.func = null; + this.context = null; + this.count = 0; +}; PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); -function forEachSingleChild(traverseContext, child, name, i) { - var forEachBookKeeping = traverseContext; - forEachBookKeeping.forEachFunction.call( - forEachBookKeeping.forEachContext, child, i); +function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func; + var context = bookKeeping.context; + + func.call(context, child, bookKeeping.count++); } /** @@ -5301,16 +4232,14 @@ function forEachSingleChild(traverseContext, child, name, i) { * leaf child. * * @param {?*} children Children tree container. - * @param {function(*, int)} forEachFunc. + * @param {function(*, int)} forEachFunc * @param {*} forEachContext Context for forEachContext. */ function forEachChildren(children, forEachFunc, forEachContext) { if (children == null) { return children; } - - var traverseContext = - ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); traverseAllChildren(children, forEachSingleChild, traverseContext); ForEachBookKeeping.release(traverseContext); } @@ -5324,33 +4253,50 @@ function forEachChildren(children, forEachFunc, forEachContext) { * @param {!function} mapFunction Function to perform mapping with. * @param {?*} mapContext Context to perform mapping with. */ -function MapBookKeeping(mapResult, mapFunction, mapContext) { - this.mapResult = mapResult; - this.mapFunction = mapFunction; - this.mapContext = mapContext; -} -PooledClass.addPoolingTo(MapBookKeeping, threeArgumentPooler); +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; +} +MapBookKeeping.prototype.destructor = function () { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); -function mapSingleChildIntoContext(traverseContext, child, name, i) { - var mapBookKeeping = traverseContext; - var mapResult = mapBookKeeping.mapResult; +function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result; + var keyPrefix = bookKeeping.keyPrefix; + var func = bookKeeping.func; + var context = bookKeeping.context; - var keyUnique = !mapResult.hasOwnProperty(name); - if ("production" !== "development") { - ("production" !== "development" ? warning( - keyUnique, - 'ReactChildren.map(...): Encountered two children with the same key, ' + - '`%s`. Child keys must be unique; when two children share a key, only ' + - 'the first child will be used.', - name - ) : null); + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + } else if (mappedChild != null) { + if (ReactElement.isValidElement(mappedChild)) { + mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + (mappedChild !== child ? escapeUserProvidedKey(mappedChild.key || '') + '/' : '') + childKey); + } + result.push(mappedChild); } +} - if (keyUnique) { - var mappedChild = - mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i); - mapResult[name] = mappedChild; +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; } + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); } /** @@ -5359,27 +4305,21 @@ function mapSingleChildIntoContext(traverseContext, child, name, i) { * The provided mapFunction(child, key, index) will be called for each * leaf child. * - * TODO: This may likely break any calls to `ReactChildren.map` that were - * previously relying on the fact that we guarded against null children. - * * @param {?*} children Children tree container. - * @param {function(*, int)} mapFunction. - * @param {*} mapContext Context for mapFunction. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. * @return {object} Object containing the ordered map of results. */ function mapChildren(children, func, context) { if (children == null) { return children; } - - var mapResult = {}; - var traverseContext = MapBookKeeping.getPooled(mapResult, func, context); - traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); - MapBookKeeping.release(traverseContext); - return ReactFragment.create(mapResult); + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; } -function forEachSingleChildDummy(traverseContext, child, name, i) { +function forEachSingleChildDummy(traverseContext, child, name) { return null; } @@ -5394,15 +4334,26 @@ function countChildren(children, context) { return traverseAllChildren(children, forEachSingleChildDummy, null); } +/** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + */ +function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + return result; +} + var ReactChildren = { forEach: forEachChildren, map: mapChildren, - count: countChildren + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray }; module.exports = ReactChildren; - -},{"169":169,"171":171,"30":30,"69":69}],38:[function(_dereq_,module,exports){ +},{"126":126,"135":135,"24":24,"52":52}],29:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -5416,23 +4367,20 @@ module.exports = ReactChildren; 'use strict'; -var ReactComponent = _dereq_(39); -var ReactCurrentOwner = _dereq_(45); -var ReactElement = _dereq_(63); -var ReactErrorUtils = _dereq_(66); -var ReactInstanceMap = _dereq_(73); -var ReactLifeCycle = _dereq_(74); -var ReactPropTypeLocations = _dereq_(85); -var ReactPropTypeLocationNames = _dereq_(84); -var ReactUpdateQueue = _dereq_(99); +var ReactComponent = _dereq_(30); +var ReactElement = _dereq_(52); +var ReactPropTypeLocations = _dereq_(73); +var ReactPropTypeLocationNames = _dereq_(72); +var ReactNoopUpdateQueue = _dereq_(69); -var assign = _dereq_(29); -var invariant = _dereq_(150); -var keyMirror = _dereq_(156); -var keyOf = _dereq_(157); -var warning = _dereq_(171); +var assign = _dereq_(23); +var emptyObject = _dereq_(136); +var invariant = _dereq_(143); +var keyMirror = _dereq_(146); +var keyOf = _dereq_(147); +var warning = _dereq_(154); -var MIXINS_KEY = keyOf({mixins: null}); +var MIXINS_KEY = keyOf({ mixins: null }); /** * Policies that describe methods in `ReactClassInterface`. @@ -5459,9 +4407,16 @@ var SpecPolicy = keyMirror({ DEFINE_MANY_MERGED: null }); - var injectedMixins = []; +var warnedSetProps = false; +function warnSetProps() { + if (!warnedSetProps) { + warnedSetProps = true; + "development" !== 'production' ? warning(false, 'setProps(...) and replaceProps(...) are deprecated. ' + 'Instead, call render again at the top level.') : undefined; + } +} + /** * Composite components are higher-level components that compose other composite * or native components. @@ -5479,7 +4434,7 @@ var injectedMixins = []; * The class specification supports a specific protocol of methods that have * special meaning (e.g. `render`). See `ReactClassInterface` for * more the comprehensive protocol. Any other properties and methods in the - * class specification will available on the prototype. + * class specification will be available on the prototype. * * @interface ReactClassInterface * @internal @@ -5581,8 +4536,6 @@ var ReactClassInterface = { */ render: SpecPolicy.DEFINE_ONCE, - - // ==== Delegate methods ==== /** @@ -5693,8 +4646,6 @@ var ReactClassInterface = { */ componentWillUnmount: SpecPolicy.DEFINE_MANY, - - // ==== Advanced methods ==== /** @@ -5721,121 +4672,72 @@ var ReactClassInterface = { * which all other static methods are defined. */ var RESERVED_SPEC_KEYS = { - displayName: function(Constructor, displayName) { + displayName: function (Constructor, displayName) { Constructor.displayName = displayName; }, - mixins: function(Constructor, mixins) { + mixins: function (Constructor, mixins) { if (mixins) { for (var i = 0; i < mixins.length; i++) { mixSpecIntoComponent(Constructor, mixins[i]); } } }, - childContextTypes: function(Constructor, childContextTypes) { - if ("production" !== "development") { - validateTypeDef( - Constructor, - childContextTypes, - ReactPropTypeLocations.childContext - ); + childContextTypes: function (Constructor, childContextTypes) { + if ("development" !== 'production') { + validateTypeDef(Constructor, childContextTypes, ReactPropTypeLocations.childContext); } - Constructor.childContextTypes = assign( - {}, - Constructor.childContextTypes, - childContextTypes - ); - }, - contextTypes: function(Constructor, contextTypes) { - if ("production" !== "development") { - validateTypeDef( - Constructor, - contextTypes, - ReactPropTypeLocations.context - ); + Constructor.childContextTypes = assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if ("development" !== 'production') { + validateTypeDef(Constructor, contextTypes, ReactPropTypeLocations.context); } - Constructor.contextTypes = assign( - {}, - Constructor.contextTypes, - contextTypes - ); + Constructor.contextTypes = assign({}, Constructor.contextTypes, contextTypes); }, /** * Special case getDefaultProps which should move into statics but requires * automatic merging. */ - getDefaultProps: function(Constructor, getDefaultProps) { + getDefaultProps: function (Constructor, getDefaultProps) { if (Constructor.getDefaultProps) { - Constructor.getDefaultProps = createMergedResultFunction( - Constructor.getDefaultProps, - getDefaultProps - ); + Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps); } else { Constructor.getDefaultProps = getDefaultProps; } }, - propTypes: function(Constructor, propTypes) { - if ("production" !== "development") { - validateTypeDef( - Constructor, - propTypes, - ReactPropTypeLocations.prop - ); + propTypes: function (Constructor, propTypes) { + if ("development" !== 'production') { + validateTypeDef(Constructor, propTypes, ReactPropTypeLocations.prop); } - Constructor.propTypes = assign( - {}, - Constructor.propTypes, - propTypes - ); + Constructor.propTypes = assign({}, Constructor.propTypes, propTypes); }, - statics: function(Constructor, statics) { + statics: function (Constructor, statics) { mixStaticSpecIntoComponent(Constructor, statics); - } -}; + }, + autobind: function () {} }; +// noop function validateTypeDef(Constructor, typeDef, location) { for (var propName in typeDef) { if (typeDef.hasOwnProperty(propName)) { // use a warning instead of an invariant so components // don't show up in prod but not in __DEV__ - ("production" !== "development" ? warning( - typeof typeDef[propName] === 'function', - '%s: %s type `%s` is invalid; it must be a function, usually from ' + - 'React.PropTypes.', - Constructor.displayName || 'ReactClass', - ReactPropTypeLocationNames[location], - propName - ) : null); + "development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : undefined; } } } function validateMethodOverride(proto, name) { - var specPolicy = ReactClassInterface.hasOwnProperty(name) ? - ReactClassInterface[name] : - null; + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; // Disallow overriding of base class methods unless explicitly allowed. if (ReactClassMixin.hasOwnProperty(name)) { - ("production" !== "development" ? invariant( - specPolicy === SpecPolicy.OVERRIDE_BASE, - 'ReactClassInterface: You are attempting to override ' + - '`%s` from your class specification. Ensure that your method names ' + - 'do not overlap with React methods.', - name - ) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE)); + !(specPolicy === SpecPolicy.OVERRIDE_BASE) ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name) : invariant(false) : undefined; } // Disallow defining methods more than once unless explicitly allowed. if (proto.hasOwnProperty(name)) { - ("production" !== "development" ? invariant( - specPolicy === SpecPolicy.DEFINE_MANY || - specPolicy === SpecPolicy.DEFINE_MANY_MERGED, - 'ReactClassInterface: You are attempting to define ' + - '`%s` on your component more than once. This conflict may be due ' + - 'to a mixin.', - name - ) : invariant(specPolicy === SpecPolicy.DEFINE_MANY || - specPolicy === SpecPolicy.DEFINE_MANY_MERGED)); + !(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED) ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name) : invariant(false) : undefined; } } @@ -5848,16 +4750,8 @@ function mixSpecIntoComponent(Constructor, spec) { return; } - ("production" !== "development" ? invariant( - typeof spec !== 'function', - 'ReactClass: You\'re attempting to ' + - 'use a component class as a mixin. Instead, just use a regular object.' - ) : invariant(typeof spec !== 'function')); - ("production" !== "development" ? invariant( - !ReactElement.isValidElement(spec), - 'ReactClass: You\'re attempting to ' + - 'use a component as a mixin. Instead, just use a regular object.' - ) : invariant(!ReactElement.isValidElement(spec))); + !(typeof spec !== 'function') ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component class as a mixin. Instead, just use a regular object.') : invariant(false) : undefined; + !!ReactElement.isValidElement(spec) ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.') : invariant(false) : undefined; var proto = Constructor.prototype; @@ -5874,7 +4768,7 @@ function mixSpecIntoComponent(Constructor, spec) { } if (name === MIXINS_KEY) { - // We have already handled mixins in a special case above + // We have already handled mixins in a special case above. continue; } @@ -5888,16 +4782,10 @@ function mixSpecIntoComponent(Constructor, spec) { // The following member methods should not be automatically bound: // 1. Expected ReactClass methods (in the "interface"). // 2. Overridden methods (that were mixed in). - var isReactClassMethod = - ReactClassInterface.hasOwnProperty(name); + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); var isAlreadyDefined = proto.hasOwnProperty(name); - var markedDontBind = property && property.__reactDontBind; var isFunction = typeof property === 'function'; - var shouldAutoBind = - isFunction && - !isReactClassMethod && - !isAlreadyDefined && - !markedDontBind; + var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; if (shouldAutoBind) { if (!proto.__reactAutoBindMap) { @@ -5909,18 +4797,8 @@ function mixSpecIntoComponent(Constructor, spec) { if (isAlreadyDefined) { var specPolicy = ReactClassInterface[name]; - // These cases should already be caught by validateMethodOverride - ("production" !== "development" ? invariant( - isReactClassMethod && ( - (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) - ), - 'ReactClass: Unexpected spec policy %s for key %s ' + - 'when mixing in component specs.', - specPolicy, - name - ) : invariant(isReactClassMethod && ( - (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) - ))); + // These cases should already be caught by validateMethodOverride. + !(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)) ? "development" !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name) : invariant(false) : undefined; // For methods which are defined more than once, call the existing // methods before calling the new property, merging if appropriate. @@ -5931,7 +4809,7 @@ function mixSpecIntoComponent(Constructor, spec) { } } else { proto[name] = property; - if ("production" !== "development") { + if ("development" !== 'production') { // Add verbose displayName to the function, which helps when looking // at profiling tools. if (typeof property === 'function' && spec.displayName) { @@ -5954,24 +4832,11 @@ function mixStaticSpecIntoComponent(Constructor, statics) { continue; } - var isReserved = name in RESERVED_SPEC_KEYS; - ("production" !== "development" ? invariant( - !isReserved, - 'ReactClass: You are attempting to define a reserved ' + - 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + - 'as an instance property instead; it will still be accessible on the ' + - 'constructor.', - name - ) : invariant(!isReserved)); - - var isInherited = name in Constructor; - ("production" !== "development" ? invariant( - !isInherited, - 'ReactClass: You are attempting to define ' + - '`%s` on your component more than once. This conflict may be ' + - 'due to a mixin.', - name - ) : invariant(!isInherited)); + var isReserved = (name in RESERVED_SPEC_KEYS); + !!isReserved ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name) : invariant(false) : undefined; + + var isInherited = (name in Constructor); + !!isInherited ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name) : invariant(false) : undefined; Constructor[name] = property; } } @@ -5984,22 +4849,11 @@ function mixStaticSpecIntoComponent(Constructor, statics) { * @return {object} one after it has been mutated to contain everything in two. */ function mergeIntoWithNoDuplicateKeys(one, two) { - ("production" !== "development" ? invariant( - one && two && typeof one === 'object' && typeof two === 'object', - 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' - ) : invariant(one && two && typeof one === 'object' && typeof two === 'object')); + !(one && two && typeof one === 'object' && typeof two === 'object') ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : invariant(false) : undefined; for (var key in two) { if (two.hasOwnProperty(key)) { - ("production" !== "development" ? invariant( - one[key] === undefined, - 'mergeIntoWithNoDuplicateKeys(): ' + - 'Tried to merge two objects with the same key: `%s`. This conflict ' + - 'may be due to a mixin; in particular, this may be caused by two ' + - 'getInitialState() or getDefaultProps() methods returning objects ' + - 'with clashing keys.', - key - ) : invariant(one[key] === undefined)); + !(one[key] === undefined) ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key) : invariant(false) : undefined; one[key] = two[key]; } } @@ -6054,32 +4908,25 @@ function createChainedFunction(one, two) { */ function bindAutoBindMethod(component, method) { var boundMethod = method.bind(component); - if ("production" !== "development") { + if ("development" !== 'production') { boundMethod.__reactBoundContext = component; boundMethod.__reactBoundMethod = method; boundMethod.__reactBoundArguments = null; var componentName = component.constructor.displayName; var _bind = boundMethod.bind; /* eslint-disable block-scoped-var, no-undef */ - boundMethod.bind = function(newThis ) {for (var args=[],$__0=1,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); + boundMethod.bind = function (newThis) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so // let's warn. if (newThis !== component && newThis !== null) { - ("production" !== "development" ? warning( - false, - 'bind(): React component methods may only be bound to the ' + - 'component instance. See %s', - componentName - ) : null); + "development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : undefined; } else if (!args.length) { - ("production" !== "development" ? warning( - false, - 'bind(): You are binding a component method to the component. ' + - 'React does this for you automatically in a high-performance ' + - 'way, so you can safely remove this call. See %s', - componentName - ) : null); + "development" !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : undefined; return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); @@ -6102,34 +4949,11 @@ function bindAutoBindMethods(component) { for (var autoBindKey in component.__reactAutoBindMap) { if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) { var method = component.__reactAutoBindMap[autoBindKey]; - component[autoBindKey] = bindAutoBindMethod( - component, - ReactErrorUtils.guard( - method, - component.constructor.displayName + '.' + autoBindKey - ) - ); + component[autoBindKey] = bindAutoBindMethod(component, method); } } } -var typeDeprecationDescriptor = { - enumerable: false, - get: function() { - var displayName = this.displayName || this.name || 'Component'; - ("production" !== "development" ? warning( - false, - '%s.type is deprecated. Use %s directly to access the class.', - displayName, - displayName - ) : null); - Object.defineProperty(this, 'type', { - value: this - }); - return this; - } -}; - /** * Add more to the ReactClass base class. These are all legacy features and * therefore not already part of the modern ReactComponent. @@ -6140,10 +4964,10 @@ var ReactClassMixin = { * TODO: This will be deprecated because state should always keep a consistent * type signature and the only use case for this, is to avoid that. */ - replaceState: function(newState, callback) { - ReactUpdateQueue.enqueueReplaceState(this, newState); + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState); if (callback) { - ReactUpdateQueue.enqueueCallback(this, callback); + this.updater.enqueueCallback(this, callback); } }, @@ -6153,27 +4977,8 @@ var ReactClassMixin = { * @protected * @final */ - isMounted: function() { - if ("production" !== "development") { - var owner = ReactCurrentOwner.current; - if (owner !== null) { - ("production" !== "development" ? warning( - owner._warnedAboutRefsInRender, - '%s is accessing isMounted inside its render() function. ' + - 'render() should be a pure function of props and state. It should ' + - 'never access something that requires stale data from the previous ' + - 'render, such as refs. Move this logic to componentDidMount and ' + - 'componentDidUpdate instead.', - owner.getName() || 'A component' - ) : null); - owner._warnedAboutRefsInRender = true; - } - } - var internalInstance = ReactInstanceMap.get(this); - return ( - internalInstance && - internalInstance !== ReactLifeCycle.currentlyMountingInstance - ); + isMounted: function () { + return this.updater.isMounted(this); }, /** @@ -6185,10 +4990,13 @@ var ReactClassMixin = { * @public * @deprecated */ - setProps: function(partialProps, callback) { - ReactUpdateQueue.enqueueSetProps(this, partialProps); + setProps: function (partialProps, callback) { + if ("development" !== 'production') { + warnSetProps(); + } + this.updater.enqueueSetProps(this, partialProps); if (callback) { - ReactUpdateQueue.enqueueCallback(this, callback); + this.updater.enqueueCallback(this, callback); } }, @@ -6201,20 +5009,19 @@ var ReactClassMixin = { * @public * @deprecated */ - replaceProps: function(newProps, callback) { - ReactUpdateQueue.enqueueReplaceProps(this, newProps); + replaceProps: function (newProps, callback) { + if ("development" !== 'production') { + warnSetProps(); + } + this.updater.enqueueReplaceProps(this, newProps); if (callback) { - ReactUpdateQueue.enqueueCallback(this, callback); + this.updater.enqueueCallback(this, callback); } } }; -var ReactClassComponent = function() {}; -assign( - ReactClassComponent.prototype, - ReactComponent.prototype, - ReactClassMixin -); +var ReactClassComponent = function () {}; +assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); /** * Module for creating composite components. @@ -6230,17 +5037,13 @@ var ReactClass = { * @return {function} Component constructor function. * @public */ - createClass: function(spec) { - var Constructor = function(props, context) { + createClass: function (spec) { + var Constructor = function (props, context, updater) { // This constructor is overridden by mocks. The argument is used // by mocks to assert on what gets mounted. - if ("production" !== "development") { - ("production" !== "development" ? warning( - this instanceof Constructor, - 'Something is calling a React component directly. Use a factory or ' + - 'JSX instead. See: https://fb.me/react-legacyfactory' - ) : null); + if ("development" !== 'production') { + "development" !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : undefined; } // Wire up auto-binding @@ -6250,44 +5053,40 @@ var ReactClass = { this.props = props; this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + this.state = null; // ReactClasses doesn't have constructors. Instead, they use the // getInitialState and componentWillMount methods for initialization. var initialState = this.getInitialState ? this.getInitialState() : null; - if ("production" !== "development") { + if ("development" !== 'production') { // We allow auto-mocks to proceed as if they're returning null. - if (typeof initialState === 'undefined' && - this.getInitialState._isMockFunction) { + if (typeof initialState === 'undefined' && this.getInitialState._isMockFunction) { // This is probably bad practice. Consider warning here and // deprecating this convenience. initialState = null; } } - ("production" !== "development" ? invariant( - typeof initialState === 'object' && !Array.isArray(initialState), - '%s.getInitialState(): must return an object or null', - Constructor.displayName || 'ReactCompositeComponent' - ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : invariant(false) : undefined; this.state = initialState; }; Constructor.prototype = new ReactClassComponent(); Constructor.prototype.constructor = Constructor; - injectedMixins.forEach( - mixSpecIntoComponent.bind(null, Constructor) - ); + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); mixSpecIntoComponent(Constructor, spec); - // Initialize the defaultProps property after all mixins have been merged + // Initialize the defaultProps property after all mixins have been merged. if (Constructor.getDefaultProps) { Constructor.defaultProps = Constructor.getDefaultProps(); } - if ("production" !== "development") { + if ("development" !== 'production') { // This is a tag to indicate that the use of these method names is ok, // since it's used with createClass. If it's not, then it's likely a // mistake so we'll warn you to use the static property, property @@ -6300,20 +5099,11 @@ var ReactClass = { } } - ("production" !== "development" ? invariant( - Constructor.prototype.render, - 'createClass(...): Class specification must implement a `render` method.' - ) : invariant(Constructor.prototype.render)); + !Constructor.prototype.render ? "development" !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : invariant(false) : undefined; - if ("production" !== "development") { - ("production" !== "development" ? warning( - !Constructor.prototype.componentShouldUpdate, - '%s has a method called ' + - 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + - 'The name is phrased as a question because the function is ' + - 'expected to return a value.', - spec.displayName || 'A component' - ) : null); + if ("development" !== 'production') { + "development" !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : undefined; + "development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : undefined; } // Reduce time spent doing lookups by setting these on the prototype. @@ -6323,21 +5113,11 @@ var ReactClass = { } } - // Legacy hook - Constructor.type = Constructor; - if ("production" !== "development") { - try { - Object.defineProperty(Constructor, 'type', typeDeprecationDescriptor); - } catch (x) { - // IE will fail on defineProperty (es5-shim/sham too) - } - } - return Constructor; }, injection: { - injectMixin: function(mixin) { + injectMixin: function (mixin) { injectedMixins.push(mixin); } } @@ -6345,8 +5125,7 @@ var ReactClass = { }; module.exports = ReactClass; - -},{"150":150,"156":156,"157":157,"171":171,"29":29,"39":39,"45":45,"63":63,"66":66,"73":73,"74":74,"84":84,"85":85,"99":99}],39:[function(_dereq_,module,exports){ +},{"136":136,"143":143,"146":146,"147":147,"154":154,"23":23,"30":30,"52":52,"69":69,"72":72,"73":73}],30:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -6360,19 +5139,26 @@ module.exports = ReactClass; 'use strict'; -var ReactUpdateQueue = _dereq_(99); +var ReactNoopUpdateQueue = _dereq_(69); -var invariant = _dereq_(150); -var warning = _dereq_(171); +var emptyObject = _dereq_(136); +var invariant = _dereq_(143); +var warning = _dereq_(154); /** * Base class helpers for the updating state of a component. */ -function ReactComponent(props, context) { +function ReactComponent(props, context, updater) { this.props = props; this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; } +ReactComponent.prototype.isReactComponent = {}; + /** * Sets a subset of the state. Always use this to mutate * state. You should treat `this.state` as immutable. @@ -6398,26 +5184,14 @@ function ReactComponent(props, context) { * @final * @protected */ -ReactComponent.prototype.setState = function(partialState, callback) { - ("production" !== "development" ? invariant( - typeof partialState === 'object' || - typeof partialState === 'function' || - partialState == null, - 'setState(...): takes an object of state variables to update or a ' + - 'function which returns an object of state variables.' - ) : invariant(typeof partialState === 'object' || - typeof partialState === 'function' || - partialState == null)); - if ("production" !== "development") { - ("production" !== "development" ? warning( - partialState != null, - 'setState(...): You passed an undefined or null state object; ' + - 'instead, use forceUpdate().' - ) : null); - } - ReactUpdateQueue.enqueueSetState(this, partialState); +ReactComponent.prototype.setState = function (partialState, callback) { + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? "development" !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.') : invariant(false) : undefined; + if ("development" !== 'production') { + "development" !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : undefined; + } + this.updater.enqueueSetState(this, partialState); if (callback) { - ReactUpdateQueue.enqueueCallback(this, callback); + this.updater.enqueueCallback(this, callback); } }; @@ -6435,10 +5209,10 @@ ReactComponent.prototype.setState = function(partialState, callback) { * @final * @protected */ -ReactComponent.prototype.forceUpdate = function(callback) { - ReactUpdateQueue.enqueueForceUpdate(this); +ReactComponent.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this); if (callback) { - ReactUpdateQueue.enqueueCallback(this, callback); + this.updater.enqueueCallback(this, callback); } }; @@ -6447,41 +5221,19 @@ ReactComponent.prototype.forceUpdate = function(callback) { * we would like to deprecate them, we're not going to move them over to this * modern base class. Instead, we define a getter that warns if it's accessed. */ -if ("production" !== "development") { +if ("development" !== 'production') { var deprecatedAPIs = { - getDOMNode: [ - 'getDOMNode', - 'Use React.findDOMNode(component) instead.' - ], - isMounted: [ - 'isMounted', - 'Instead, make sure to clean up subscriptions and pending requests in ' + - 'componentWillUnmount to prevent memory leaks.' - ], - replaceProps: [ - 'replaceProps', - 'Instead call React.render again at the top level.' - ], - replaceState: [ - 'replaceState', - 'Refactor your code to use setState instead (see ' + - 'https://github.com/facebook/react/issues/3236).' - ], - setProps: [ - 'setProps', - 'Instead call React.render again at the top level.' - ] + getDOMNode: ['getDOMNode', 'Use ReactDOM.findDOMNode(component) instead.'], + isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], + replaceProps: ['replaceProps', 'Instead, call render again at the top level.'], + replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'], + setProps: ['setProps', 'Instead, call render again at the top level.'] }; - var defineDeprecationWarning = function(methodName, info) { + var defineDeprecationWarning = function (methodName, info) { try { Object.defineProperty(ReactComponent.prototype, methodName, { - get: function() { - ("production" !== "development" ? warning( - false, - '%s(...) is deprecated in plain JavaScript React classes. %s', - info[0], - info[1] - ) : null); + get: function () { + "development" !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : undefined; return undefined; } }); @@ -6497,8 +5249,7 @@ if ("production" !== "development") { } module.exports = ReactComponent; - -},{"150":150,"171":171,"99":99}],40:[function(_dereq_,module,exports){ +},{"136":136,"143":143,"154":154,"69":69}],31:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -6510,12 +5261,10 @@ module.exports = ReactComponent; * @providesModule ReactComponentBrowserEnvironment */ -/*jslint evil: true */ - 'use strict'; -var ReactDOMIDOperations = _dereq_(50); -var ReactMount = _dereq_(77); +var ReactDOMIDOperations = _dereq_(40); +var ReactMount = _dereq_(65); /** * Abstracts away all functionality of the reconciler that requires knowledge of @@ -6524,11 +5273,9 @@ var ReactMount = _dereq_(77); */ var ReactComponentBrowserEnvironment = { - processChildrenUpdates: - ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, - replaceNodeWithMarkupByID: - ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID, + replaceNodeWithMarkupByID: ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID, /** * If a particular environment requires that some resources be cleaned up, @@ -6537,15 +5284,14 @@ var ReactComponentBrowserEnvironment = { * * @private */ - unmountIDFromEnvironment: function(rootNodeID) { + unmountIDFromEnvironment: function (rootNodeID) { ReactMount.purgeID(rootNodeID); } }; module.exports = ReactComponentBrowserEnvironment; - -},{"50":50,"77":77}],41:[function(_dereq_,module,exports){ +},{"40":40,"65":65}],32:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -6559,7 +5305,7 @@ module.exports = ReactComponentBrowserEnvironment; 'use strict'; -var invariant = _dereq_(150); +var invariant = _dereq_(143); var injected = false; @@ -6585,17 +5331,11 @@ var ReactComponentEnvironment = { processChildrenUpdates: null, injection: { - injectEnvironment: function(environment) { - ("production" !== "development" ? invariant( - !injected, - 'ReactCompositeComponent: injectEnvironment() can only be called once.' - ) : invariant(!injected)); - ReactComponentEnvironment.unmountIDFromEnvironment = - environment.unmountIDFromEnvironment; - ReactComponentEnvironment.replaceNodeWithMarkupByID = - environment.replaceNodeWithMarkupByID; - ReactComponentEnvironment.processChildrenUpdates = - environment.processChildrenUpdates; + injectEnvironment: function (environment) { + !!injected ? "development" !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : invariant(false) : undefined; + ReactComponentEnvironment.unmountIDFromEnvironment = environment.unmountIDFromEnvironment; + ReactComponentEnvironment.replaceNodeWithMarkupByID = environment.replaceNodeWithMarkupByID; + ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; injected = true; } } @@ -6603,57 +5343,7 @@ var ReactComponentEnvironment = { }; module.exports = ReactComponentEnvironment; - -},{"150":150}],42:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * -* @providesModule ReactComponentWithPureRenderMixin -*/ - -'use strict'; - -var shallowEqual = _dereq_(166); - -/** - * If your React component's render function is "pure", e.g. it will render the - * same result given the same props and state, provide this Mixin for a - * considerable performance boost. - * - * Most React components have pure render functions. - * - * Example: - * - * var ReactComponentWithPureRenderMixin = - * require('ReactComponentWithPureRenderMixin'); - * React.createClass({ - * mixins: [ReactComponentWithPureRenderMixin], - * - * render: function() { - * return <div className={this.props.className}>foo</div>; - * } - * }); - * - * Note: This only checks shallow equality for props and state. If these contain - * complex data structures this mixin may have false-negatives for deeper - * differences. Only mixin to components which have simple props and state, or - * use `forceUpdate()` when you know deep data structures have changed. - */ -var ReactComponentWithPureRenderMixin = { - shouldComponentUpdate: function(nextProps, nextState) { - return !shallowEqual(this.props, nextProps) || - !shallowEqual(this.state, nextState); - } -}; - -module.exports = ReactComponentWithPureRenderMixin; - -},{"166":166}],43:[function(_dereq_,module,exports){ +},{"143":143}],33:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -6667,25 +5357,21 @@ module.exports = ReactComponentWithPureRenderMixin; 'use strict'; -var ReactComponentEnvironment = _dereq_(41); -var ReactContext = _dereq_(44); -var ReactCurrentOwner = _dereq_(45); -var ReactElement = _dereq_(63); -var ReactElementValidator = _dereq_(64); -var ReactInstanceMap = _dereq_(73); -var ReactLifeCycle = _dereq_(74); -var ReactNativeComponent = _dereq_(80); -var ReactPerf = _dereq_(82); -var ReactPropTypeLocations = _dereq_(85); -var ReactPropTypeLocationNames = _dereq_(84); -var ReactReconciler = _dereq_(89); -var ReactUpdates = _dereq_(100); - -var assign = _dereq_(29); -var emptyObject = _dereq_(130); -var invariant = _dereq_(150); -var shouldUpdateReactComponent = _dereq_(167); -var warning = _dereq_(171); +var ReactComponentEnvironment = _dereq_(32); +var ReactCurrentOwner = _dereq_(34); +var ReactElement = _dereq_(52); +var ReactInstanceMap = _dereq_(62); +var ReactPerf = _dereq_(71); +var ReactPropTypeLocations = _dereq_(73); +var ReactPropTypeLocationNames = _dereq_(72); +var ReactReconciler = _dereq_(76); +var ReactUpdateQueue = _dereq_(82); + +var assign = _dereq_(23); +var emptyObject = _dereq_(136); +var invariant = _dereq_(143); +var shouldUpdateReactComponent = _dereq_(125); +var warning = _dereq_(154); function getDeclarationErrorAddendum(component) { var owner = component._currentElement._owner || null; @@ -6698,6 +5384,12 @@ function getDeclarationErrorAddendum(component) { return ''; } +function StatelessComponent(Component) {} +StatelessComponent.prototype.render = function () { + var Component = ReactInstanceMap.get(this)._currentElement.type; + return Component(this.props, this.context, this.updater); +}; + /** * ------------------ The Life-Cycle of a Composite Component ------------------ * @@ -6745,7 +5437,7 @@ var ReactCompositeComponentMixin = { * @final * @internal */ - construct: function(element) { + construct: function (element) { this._currentElement = element; this._rootNodeID = null; this._instance = null; @@ -6760,7 +5452,7 @@ var ReactCompositeComponentMixin = { this._context = null; this._mountOrder = 0; - this._isTopLevel = false; + this._topLevelWrapper = null; // See ReactUpdates and ReactUpdateQueue. this._pendingCallbacks = null; @@ -6775,32 +5467,54 @@ var ReactCompositeComponentMixin = { * @final * @internal */ - mountComponent: function(rootID, transaction, context) { + mountComponent: function (rootID, transaction, context) { this._context = context; this._mountOrder = nextMountID++; this._rootNodeID = rootID; var publicProps = this._processProps(this._currentElement.props); - var publicContext = this._processContext(this._currentElement._context); + var publicContext = this._processContext(context); - var Component = ReactNativeComponent.getComponentClassForElement( - this._currentElement - ); + var Component = this._currentElement.type; // Initialize the public class - var inst = new Component(publicProps, publicContext); + var inst; + var renderedElement; + + // This is a way to detect if Component is a stateless arrow function + // component, which is not newable. It might not be 100% reliable but is + // something we can do until we start detecting that Component extends + // React.Component. We already assume that typeof Component === 'function'. + var canInstantiate = ('prototype' in Component); - if ("production" !== "development") { + if (canInstantiate) { + if ("development" !== 'production') { + ReactCurrentOwner.current = this; + try { + inst = new Component(publicProps, publicContext, ReactUpdateQueue); + } finally { + ReactCurrentOwner.current = null; + } + } else { + inst = new Component(publicProps, publicContext, ReactUpdateQueue); + } + } + + if (!canInstantiate || inst === null || inst === false || ReactElement.isValidElement(inst)) { + renderedElement = inst; + inst = new StatelessComponent(Component); + } + + if ("development" !== 'production') { // This will throw later in _renderValidatedComponent, but add an early // warning now to help debugging - ("production" !== "development" ? warning( - inst.render != null, - '%s(...): No `render` method found on the returned component ' + - 'instance: you may have forgotten to define `render` in your ' + - 'component or you may have accidentally tried to render an element ' + - 'whose type is a function that isn\'t a React component.', - Component.displayName || Component.name || 'Component' - ) : null); + if (inst.render == null) { + "development" !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`, returned ' + 'null/false from a stateless component, or tried to render an ' + 'element whose type is a function that isn\'t a React component.', Component.displayName || Component.name || 'Component') : undefined; + } else { + // We support ES6 inheriting from React.Component, the module pattern, + // and stateless components, but not ES6 classes that don't extend + "development" !== 'production' ? warning(Component.prototype && Component.prototype.isReactComponent || !canInstantiate || !(inst instanceof Component), '%s(...): React component classes must extend React.Component.', Component.displayName || Component.name || 'Component') : undefined; + } } // These should be set up in the constructor, but as a convenience for @@ -6808,104 +5522,53 @@ var ReactCompositeComponentMixin = { inst.props = publicProps; inst.context = publicContext; inst.refs = emptyObject; + inst.updater = ReactUpdateQueue; this._instance = inst; // Store a reference from the instance back to the internal representation ReactInstanceMap.set(inst, this); - if ("production" !== "development") { - this._warnIfContextsDiffer(this._currentElement._context, context); - } - - if ("production" !== "development") { + if ("development" !== 'production') { // Since plain JS classes are defined without any special initialization // logic, we can not catch common errors early. Therefore, we have to // catch them here, at initialization time, instead. - ("production" !== "development" ? warning( - !inst.getInitialState || - inst.getInitialState.isReactClassApproved, - 'getInitialState was defined on %s, a plain JavaScript class. ' + - 'This is only supported for classes created using React.createClass. ' + - 'Did you mean to define a state property instead?', - this.getName() || 'a component' - ) : null); - ("production" !== "development" ? warning( - !inst.getDefaultProps || - inst.getDefaultProps.isReactClassApproved, - 'getDefaultProps was defined on %s, a plain JavaScript class. ' + - 'This is only supported for classes created using React.createClass. ' + - 'Use a static property to define defaultProps instead.', - this.getName() || 'a component' - ) : null); - ("production" !== "development" ? warning( - !inst.propTypes, - 'propTypes was defined as an instance property on %s. Use a static ' + - 'property to define propTypes instead.', - this.getName() || 'a component' - ) : null); - ("production" !== "development" ? warning( - !inst.contextTypes, - 'contextTypes was defined as an instance property on %s. Use a ' + - 'static property to define contextTypes instead.', - this.getName() || 'a component' - ) : null); - ("production" !== "development" ? warning( - typeof inst.componentShouldUpdate !== 'function', - '%s has a method called ' + - 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + - 'The name is phrased as a question because the function is ' + - 'expected to return a value.', - (this.getName() || 'A component') - ) : null); + "development" !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : undefined; + "development" !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : undefined; + "development" !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : undefined; + "development" !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : undefined; + "development" !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : undefined; + "development" !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : undefined; + "development" !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : undefined; } var initialState = inst.state; if (initialState === undefined) { inst.state = initialState = null; } - ("production" !== "development" ? invariant( - typeof initialState === 'object' && !Array.isArray(initialState), - '%s.state: must be set to an object or null', - this.getName() || 'ReactCompositeComponent' - ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined; this._pendingStateQueue = null; this._pendingReplaceState = false; this._pendingForceUpdate = false; - var childContext; - var renderedElement; - - var previouslyMounting = ReactLifeCycle.currentlyMountingInstance; - ReactLifeCycle.currentlyMountingInstance = this; - try { - if (inst.componentWillMount) { - inst.componentWillMount(); - // When mounting, calls to `setState` by `componentWillMount` will set - // `this._pendingStateQueue` without triggering a re-render. - if (this._pendingStateQueue) { - inst.state = this._processPendingState(inst.props, inst.context); - } + if (inst.componentWillMount) { + inst.componentWillMount(); + // When mounting, calls to `setState` by `componentWillMount` will set + // `this._pendingStateQueue` without triggering a re-render. + if (this._pendingStateQueue) { + inst.state = this._processPendingState(inst.props, inst.context); } + } - childContext = this._getValidatedChildContext(context); - renderedElement = this._renderValidatedComponent(childContext); - } finally { - ReactLifeCycle.currentlyMountingInstance = previouslyMounting; + // If not a stateless component, we now render + if (renderedElement === undefined) { + renderedElement = this._renderValidatedComponent(); } - this._renderedComponent = this._instantiateReactComponent( - renderedElement, - this._currentElement.type // The wrapping type - ); + this._renderedComponent = this._instantiateReactComponent(renderedElement); - var markup = ReactReconciler.mountComponent( - this._renderedComponent, - rootID, - transaction, - this._mergeChildContext(context, childContext) - ); + var markup = ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, this._processChildContext(context)); if (inst.componentDidMount) { transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); } @@ -6919,23 +5582,20 @@ var ReactCompositeComponentMixin = { * @final * @internal */ - unmountComponent: function() { + unmountComponent: function () { var inst = this._instance; if (inst.componentWillUnmount) { - var previouslyUnmounting = ReactLifeCycle.currentlyUnmountingInstance; - ReactLifeCycle.currentlyUnmountingInstance = this; - try { - inst.componentWillUnmount(); - } finally { - ReactLifeCycle.currentlyUnmountingInstance = previouslyUnmounting; - } + inst.componentWillUnmount(); } ReactReconciler.unmountComponent(this._renderedComponent); this._renderedComponent = null; + this._instance = null; // Reset pending fields + // Even if this component is scheduled for another update in ReactUpdates, + // it would still be ignored because these fields are reset. this._pendingStateQueue = null; this._pendingReplaceState = false; this._pendingForceUpdate = false; @@ -6946,6 +5606,7 @@ var ReactCompositeComponentMixin = { // longer accessible. this._context = null; this._rootNodeID = null; + this._topLevelWrapper = null; // Delete the reference from the instance to this internal representation // which allow the internals to be properly cleaned up even if the user @@ -6960,25 +5621,6 @@ var ReactCompositeComponentMixin = { }, /** - * Schedule a partial update to the props. Only used for internal testing. - * - * @param {object} partialProps Subset of the next props. - * @param {?function} callback Called after props are updated. - * @final - * @internal - */ - _setPropsInternal: function(partialProps, callback) { - // This is a deoptimized path. We optimize for always having an element. - // This creates an extra internal element. - var element = this._pendingElement || this._currentElement; - this._pendingElement = ReactElement.cloneAndReplaceProps( - element, - assign({}, element.props, partialProps) - ); - ReactUpdates.enqueueUpdate(this, callback); - }, - - /** * Filters the context object to only contain keys specified in * `contextTypes` * @@ -6986,14 +5628,10 @@ var ReactCompositeComponentMixin = { * @return {?object} * @private */ - _maskContext: function(context) { + _maskContext: function (context) { var maskedContext = null; - // This really should be getting the component class for the element, - // but we know that we're not going to need it for built-ins. - if (typeof this._currentElement.type === 'string') { - return emptyObject; - } - var contextTypes = this._currentElement.type.contextTypes; + var Component = this._currentElement.type; + var contextTypes = Component.contextTypes; if (!contextTypes) { return emptyObject; } @@ -7012,18 +5650,12 @@ var ReactCompositeComponentMixin = { * @return {?object} * @private */ - _processContext: function(context) { + _processContext: function (context) { var maskedContext = this._maskContext(context); - if ("production" !== "development") { - var Component = ReactNativeComponent.getComponentClassForElement( - this._currentElement - ); + if ("development" !== 'production') { + var Component = this._currentElement.type; if (Component.contextTypes) { - this._checkPropTypes( - Component.contextTypes, - maskedContext, - ReactPropTypeLocations.context - ); + this._checkPropTypes(Component.contextTypes, maskedContext, ReactPropTypeLocations.context); } } return maskedContext; @@ -7034,38 +5666,18 @@ var ReactCompositeComponentMixin = { * @return {object} * @private */ - _getValidatedChildContext: function(currentContext) { + _processChildContext: function (currentContext) { + var Component = this._currentElement.type; var inst = this._instance; var childContext = inst.getChildContext && inst.getChildContext(); if (childContext) { - ("production" !== "development" ? invariant( - typeof inst.constructor.childContextTypes === 'object', - '%s.getChildContext(): childContextTypes must be defined in order to ' + - 'use getChildContext().', - this.getName() || 'ReactCompositeComponent' - ) : invariant(typeof inst.constructor.childContextTypes === 'object')); - if ("production" !== "development") { - this._checkPropTypes( - inst.constructor.childContextTypes, - childContext, - ReactPropTypeLocations.childContext - ); + !(typeof Component.childContextTypes === 'object') ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined; + if ("development" !== 'production') { + this._checkPropTypes(Component.childContextTypes, childContext, ReactPropTypeLocations.childContext); } for (var name in childContext) { - ("production" !== "development" ? invariant( - name in inst.constructor.childContextTypes, - '%s.getChildContext(): key "%s" is not defined in childContextTypes.', - this.getName() || 'ReactCompositeComponent', - name - ) : invariant(name in inst.constructor.childContextTypes)); + !(name in Component.childContextTypes) ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : invariant(false) : undefined; } - return childContext; - } - return null; - }, - - _mergeChildContext: function(currentContext, childContext) { - if (childContext) { return assign({}, currentContext, childContext); } return currentContext; @@ -7080,17 +5692,11 @@ var ReactCompositeComponentMixin = { * @return {object} * @private */ - _processProps: function(newProps) { - if ("production" !== "development") { - var Component = ReactNativeComponent.getComponentClassForElement( - this._currentElement - ); + _processProps: function (newProps) { + if ("development" !== 'production') { + var Component = this._currentElement.type; if (Component.propTypes) { - this._checkPropTypes( - Component.propTypes, - newProps, - ReactPropTypeLocations.prop - ); + this._checkPropTypes(Component.propTypes, newProps, ReactPropTypeLocations.prop); } } return newProps; @@ -7104,7 +5710,7 @@ var ReactCompositeComponentMixin = { * @param {string} location e.g. "prop", "context", "child context" * @private */ - _checkPropTypes: function(propTypes, props, location) { + _checkPropTypes: function (propTypes, props, location) { // TODO: Stop validating prop types here and only use the element // validation. var componentName = this.getName(); @@ -7114,58 +5720,35 @@ var ReactCompositeComponentMixin = { try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. - ("production" !== "development" ? invariant( - typeof propTypes[propName] === 'function', - '%s: %s type `%s` is invalid; it must be a function, usually ' + - 'from React.PropTypes.', - componentName || 'React class', - ReactPropTypeLocationNames[location], - propName - ) : invariant(typeof propTypes[propName] === 'function')); + !(typeof propTypes[propName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually ' + 'from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(false) : undefined; error = propTypes[propName](props, propName, componentName, location); } catch (ex) { error = ex; } if (error instanceof Error) { // We may want to extend this logic for similar errors in - // React.render calls, so I'm abstracting it away into + // top-level render calls, so I'm abstracting it away into // a function to minimize refactoring in the future var addendum = getDeclarationErrorAddendum(this); if (location === ReactPropTypeLocations.prop) { // Preface gives us something to blacklist in warning module - ("production" !== "development" ? warning( - false, - 'Failed Composite propType: %s%s', - error.message, - addendum - ) : null); + "development" !== 'production' ? warning(false, 'Failed Composite propType: %s%s', error.message, addendum) : undefined; } else { - ("production" !== "development" ? warning( - false, - 'Failed Context Types: %s%s', - error.message, - addendum - ) : null); + "development" !== 'production' ? warning(false, 'Failed Context Types: %s%s', error.message, addendum) : undefined; } } } } }, - receiveComponent: function(nextElement, transaction, nextContext) { + receiveComponent: function (nextElement, transaction, nextContext) { var prevElement = this._currentElement; var prevContext = this._context; this._pendingElement = null; - this.updateComponent( - transaction, - prevElement, - nextElement, - prevContext, - nextContext - ); + this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); }, /** @@ -7175,54 +5758,13 @@ var ReactCompositeComponentMixin = { * @param {ReactReconcileTransaction} transaction * @internal */ - performUpdateIfNecessary: function(transaction) { + performUpdateIfNecessary: function (transaction) { if (this._pendingElement != null) { - ReactReconciler.receiveComponent( - this, - this._pendingElement || this._currentElement, - transaction, - this._context - ); + ReactReconciler.receiveComponent(this, this._pendingElement || this._currentElement, transaction, this._context); } if (this._pendingStateQueue !== null || this._pendingForceUpdate) { - if ("production" !== "development") { - ReactElementValidator.checkAndWarnForMutatedProps( - this._currentElement - ); - } - - this.updateComponent( - transaction, - this._currentElement, - this._currentElement, - this._context, - this._context - ); - } - }, - - /** - * Compare two contexts, warning if they are different - * TODO: Remove this check when owner-context is removed - */ - _warnIfContextsDiffer: function(ownerBasedContext, parentBasedContext) { - ownerBasedContext = this._maskContext(ownerBasedContext); - parentBasedContext = this._maskContext(parentBasedContext); - var parentKeys = Object.keys(parentBasedContext).sort(); - var displayName = this.getName() || 'ReactCompositeComponent'; - for (var i = 0; i < parentKeys.length; i++) { - var key = parentKeys[i]; - ("production" !== "development" ? warning( - ownerBasedContext[key] === parentBasedContext[key], - 'owner-based and parent-based contexts differ ' + - '(values: `%s` vs `%s`) for key (%s) while mounting %s ' + - '(see: http://fb.me/react-context-by-parent)', - ownerBasedContext[key], - parentBasedContext[key], - key, - displayName - ) : null); + this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); } }, @@ -7241,32 +5783,19 @@ var ReactCompositeComponentMixin = { * @internal * @overridable */ - updateComponent: function( - transaction, - prevParentElement, - nextParentElement, - prevUnmaskedContext, - nextUnmaskedContext - ) { + updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { var inst = this._instance; - var nextContext = inst.context; - var nextProps = inst.props; + var nextContext = this._context === nextUnmaskedContext ? inst.context : this._processContext(nextUnmaskedContext); + var nextProps; // Distinguish between a props update versus a simple state update - if (prevParentElement !== nextParentElement) { - nextContext = this._processContext(nextParentElement._context); + if (prevParentElement === nextParentElement) { + // Skip checking prop types again -- we don't read inst.props to avoid + // warning for DOM component props in this upgrade + nextProps = nextParentElement.props; + } else { nextProps = this._processProps(nextParentElement.props); - - if ("production" !== "development") { - if (nextUnmaskedContext != null) { - this._warnIfContextsDiffer( - nextParentElement._context, - nextUnmaskedContext - ); - } - } - // An update here will schedule an update but immediately set // _pendingStateQueue which will ensure that any state updates gets // immediately reconciled instead of waiting for the next batch. @@ -7278,31 +5807,16 @@ var ReactCompositeComponentMixin = { var nextState = this._processPendingState(nextProps, nextContext); - var shouldUpdate = - this._pendingForceUpdate || - !inst.shouldComponentUpdate || - inst.shouldComponentUpdate(nextProps, nextState, nextContext); + var shouldUpdate = this._pendingForceUpdate || !inst.shouldComponentUpdate || inst.shouldComponentUpdate(nextProps, nextState, nextContext); - if ("production" !== "development") { - ("production" !== "development" ? warning( - typeof shouldUpdate !== 'undefined', - '%s.shouldComponentUpdate(): Returned undefined instead of a ' + - 'boolean value. Make sure to return true or false.', - this.getName() || 'ReactCompositeComponent' - ) : null); + if ("development" !== 'production') { + "development" !== 'production' ? warning(typeof shouldUpdate !== 'undefined', '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : undefined; } if (shouldUpdate) { this._pendingForceUpdate = false; // Will set `this.props`, `this.state` and `this.context`. - this._performComponentUpdate( - nextParentElement, - nextProps, - nextState, - nextContext, - transaction, - nextUnmaskedContext - ); + this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); } else { // If it's determined that a component should not update, we still want // to set props and state but we shortcut the rest of the update. @@ -7314,7 +5828,7 @@ var ReactCompositeComponentMixin = { } }, - _processPendingState: function(props, context) { + _processPendingState: function (props, context) { var inst = this._instance; var queue = this._pendingStateQueue; var replace = this._pendingReplaceState; @@ -7332,12 +5846,7 @@ var ReactCompositeComponentMixin = { var nextState = assign({}, replace ? queue[0] : inst.state); for (var i = replace ? 1 : 0; i < queue.length; i++) { var partial = queue[i]; - assign( - nextState, - typeof partial === 'function' ? - partial.call(inst, nextState, props, context) : - partial - ); + assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); } return nextState; @@ -7355,19 +5864,18 @@ var ReactCompositeComponentMixin = { * @param {?object} unmaskedContext * @private */ - _performComponentUpdate: function( - nextElement, - nextProps, - nextState, - nextContext, - transaction, - unmaskedContext - ) { + _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { var inst = this._instance; - var prevProps = inst.props; - var prevState = inst.state; - var prevContext = inst.context; + var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); + var prevProps; + var prevState; + var prevContext; + if (hasComponentDidUpdate) { + prevProps = inst.props; + prevState = inst.state; + prevContext = inst.context; + } if (inst.componentWillUpdate) { inst.componentWillUpdate(nextProps, nextState, nextContext); @@ -7381,11 +5889,8 @@ var ReactCompositeComponentMixin = { this._updateRenderedComponent(transaction, unmaskedContext); - if (inst.componentDidUpdate) { - transaction.getReactMountReady().enqueue( - inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), - inst - ); + if (hasComponentDidUpdate) { + transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); } }, @@ -7395,34 +5900,20 @@ var ReactCompositeComponentMixin = { * @param {ReactReconcileTransaction} transaction * @internal */ - _updateRenderedComponent: function(transaction, context) { + _updateRenderedComponent: function (transaction, context) { var prevComponentInstance = this._renderedComponent; var prevRenderedElement = prevComponentInstance._currentElement; - var childContext = this._getValidatedChildContext(); - var nextRenderedElement = this._renderValidatedComponent(childContext); + var nextRenderedElement = this._renderValidatedComponent(); if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { - ReactReconciler.receiveComponent( - prevComponentInstance, - nextRenderedElement, - transaction, - this._mergeChildContext(context, childContext) - ); + ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); } else { // These two IDs are actually the same! But nothing should rely on that. var thisID = this._rootNodeID; var prevComponentID = prevComponentInstance._rootNodeID; ReactReconciler.unmountComponent(prevComponentInstance); - this._renderedComponent = this._instantiateReactComponent( - nextRenderedElement, - this._currentElement.type - ); - var nextMarkup = ReactReconciler.mountComponent( - this._renderedComponent, - thisID, - transaction, - this._mergeChildContext(context, childContext) - ); + this._renderedComponent = this._instantiateReactComponent(nextRenderedElement); + var nextMarkup = ReactReconciler.mountComponent(this._renderedComponent, thisID, transaction, this._processChildContext(context)); this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup); } }, @@ -7430,23 +5921,19 @@ var ReactCompositeComponentMixin = { /** * @protected */ - _replaceNodeWithMarkupByID: function(prevComponentID, nextMarkup) { - ReactComponentEnvironment.replaceNodeWithMarkupByID( - prevComponentID, - nextMarkup - ); + _replaceNodeWithMarkupByID: function (prevComponentID, nextMarkup) { + ReactComponentEnvironment.replaceNodeWithMarkupByID(prevComponentID, nextMarkup); }, /** * @protected */ - _renderValidatedComponentWithoutOwnerOrContext: function() { + _renderValidatedComponentWithoutOwnerOrContext: function () { var inst = this._instance; var renderedComponent = inst.render(); - if ("production" !== "development") { + if ("development" !== 'production') { // We allow auto-mocks to proceed as if they're returning null. - if (typeof renderedComponent === 'undefined' && - inst.render._isMockFunction) { + if (typeof renderedComponent === 'undefined' && inst.render._isMockFunction) { // This is probably bad practice. Consider warning here and // deprecating this convenience. renderedComponent = null; @@ -7459,31 +5946,17 @@ var ReactCompositeComponentMixin = { /** * @private */ - _renderValidatedComponent: function(childContext) { + _renderValidatedComponent: function () { var renderedComponent; - var previousContext = ReactContext.current; - ReactContext.current = this._mergeChildContext( - this._currentElement._context, - childContext - ); ReactCurrentOwner.current = this; try { - renderedComponent = - this._renderValidatedComponentWithoutOwnerOrContext(); + renderedComponent = this._renderValidatedComponentWithoutOwnerOrContext(); } finally { - ReactContext.current = previousContext; ReactCurrentOwner.current = null; } - ("production" !== "development" ? invariant( - // TODO: An `isValidNode` function would probably be more appropriate - renderedComponent === null || renderedComponent === false || - ReactElement.isValidElement(renderedComponent), - '%s.render(): A valid ReactComponent must be returned. You may have ' + - 'returned undefined, an array or some other invalid object.', - this.getName() || 'ReactCompositeComponent' - ) : invariant(// TODO: An `isValidNode` function would probably be more appropriate - renderedComponent === null || renderedComponent === false || - ReactElement.isValidElement(renderedComponent))); + !( + // TODO: An `isValidNode` function would probably be more appropriate + renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent)) ? "development" !== 'production' ? invariant(false, '%s.render(): A valid ReactComponent must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined; return renderedComponent; }, @@ -7495,10 +5968,16 @@ var ReactCompositeComponentMixin = { * @final * @private */ - attachRef: function(ref, component) { + attachRef: function (ref, component) { var inst = this.getPublicInstance(); - var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs; - refs[ref] = component.getPublicInstance(); + !(inst != null) ? "development" !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : invariant(false) : undefined; + var publicComponentInstance = component.getPublicInstance(); + if ("development" !== 'production') { + var componentName = component && component.getName ? component.getName() : 'a component'; + "development" !== 'production' ? warning(publicComponentInstance != null, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : undefined; + } + var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; + refs[ref] = publicComponentInstance; }, /** @@ -7508,7 +5987,7 @@ var ReactCompositeComponentMixin = { * @final * @private */ - detachRef: function(ref) { + detachRef: function (ref) { var refs = this.getPublicInstance().refs; delete refs[ref]; }, @@ -7519,26 +5998,26 @@ var ReactCompositeComponentMixin = { * @return {string} The name or null. * @internal */ - getName: function() { + getName: function () { var type = this._currentElement.type; var constructor = this._instance && this._instance.constructor; - return ( - type.displayName || (constructor && constructor.displayName) || - type.name || (constructor && constructor.name) || - null - ); + return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; }, /** * Get the publicly accessible representation of this component - i.e. what - * is exposed by refs and returned by React.render. Can be null for stateless + * is exposed by refs and returned by render. Can be null for stateless * components. * * @return {ReactComponent} the public component instance. * @internal */ - getPublicInstance: function() { - return this._instance; + getPublicInstance: function () { + var inst = this._instance; + if (inst instanceof StatelessComponent) { + return null; + } + return inst; }, // Stub @@ -7546,15 +6025,11 @@ var ReactCompositeComponentMixin = { }; -ReactPerf.measureMethods( - ReactCompositeComponentMixin, - 'ReactCompositeComponent', - { - mountComponent: 'mountComponent', - updateComponent: 'updateComponent', - _renderValidatedComponent: '_renderValidatedComponent' - } -); +ReactPerf.measureMethods(ReactCompositeComponentMixin, 'ReactCompositeComponent', { + mountComponent: 'mountComponent', + updateComponent: 'updateComponent', + _renderValidatedComponent: '_renderValidatedComponent' +}); var ReactCompositeComponent = { @@ -7563,84 +6038,7 @@ var ReactCompositeComponent = { }; module.exports = ReactCompositeComponent; - -},{"100":100,"130":130,"150":150,"167":167,"171":171,"29":29,"41":41,"44":44,"45":45,"63":63,"64":64,"73":73,"74":74,"80":80,"82":82,"84":84,"85":85,"89":89}],44:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactContext - */ - -'use strict'; - -var assign = _dereq_(29); -var emptyObject = _dereq_(130); -var warning = _dereq_(171); - -var didWarn = false; - -/** - * Keeps track of the current context. - * - * The context is automatically passed down the component ownership hierarchy - * and is accessible via `this.context` on ReactCompositeComponents. - */ -var ReactContext = { - - /** - * @internal - * @type {object} - */ - current: emptyObject, - - /** - * Temporarily extends the current context while executing scopedCallback. - * - * A typical use case might look like - * - * render: function() { - * var children = ReactContext.withContext({foo: 'foo'}, () => ( - * - * )); - * return <div>{children}</div>; - * } - * - * @param {object} newContext New context to merge into the existing context - * @param {function} scopedCallback Callback to run with the new context - * @return {ReactComponent|array<ReactComponent>} - */ - withContext: function(newContext, scopedCallback) { - if ("production" !== "development") { - ("production" !== "development" ? warning( - didWarn, - 'withContext is deprecated and will be removed in a future version. ' + - 'Use a wrapper component with getChildContext instead.' - ) : null); - - didWarn = true; - } - - var result; - var previousContext = ReactContext.current; - ReactContext.current = assign({}, previousContext, newContext); - try { - result = scopedCallback(); - } finally { - ReactContext.current = previousContext; - } - return result; - } - -}; - -module.exports = ReactContext; - -},{"130":130,"171":171,"29":29}],45:[function(_dereq_,module,exports){ +},{"125":125,"136":136,"143":143,"154":154,"23":23,"32":32,"34":34,"52":52,"62":62,"71":71,"72":72,"73":73,"76":76,"82":82}],34:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -7659,8 +6057,6 @@ module.exports = ReactContext; * * The current owner is the component who should own any components that are * currently being constructed. - * - * The depth indicate how many composite components are above this render level. */ var ReactCurrentOwner = { @@ -7673,8 +6069,7 @@ var ReactCurrentOwner = { }; module.exports = ReactCurrentOwner; - -},{}],46:[function(_dereq_,module,exports){ +},{}],35:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -7684,174 +6079,90 @@ module.exports = ReactCurrentOwner; * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactDOM - * @typechecks static-only */ +/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + 'use strict'; -var ReactElement = _dereq_(63); -var ReactElementValidator = _dereq_(64); +var ReactCurrentOwner = _dereq_(34); +var ReactDOMTextComponent = _dereq_(46); +var ReactDefaultInjection = _dereq_(49); +var ReactInstanceHandles = _dereq_(61); +var ReactMount = _dereq_(65); +var ReactPerf = _dereq_(71); +var ReactReconciler = _dereq_(76); +var ReactUpdates = _dereq_(83); +var ReactVersion = _dereq_(84); -var mapObject = _dereq_(158); +var findDOMNode = _dereq_(107); +var renderSubtreeIntoContainer = _dereq_(122); +var warning = _dereq_(154); -/** - * Create a factory that creates HTML tag elements. - * - * @param {string} tag Tag name (e.g. `div`). - * @private - */ -function createDOMFactory(tag) { - if ("production" !== "development") { - return ReactElementValidator.createFactory(tag); - } - return ReactElement.createFactory(tag); +ReactDefaultInjection.inject(); + +var render = ReactPerf.measure('React', 'render', ReactMount.render); + +var React = { + findDOMNode: findDOMNode, + render: render, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + version: ReactVersion, + + /* eslint-disable camelcase */ + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer +}; + +// Inject the runtime into a devtools global hook regardless of browser. +// Allows for debugging when the hook is injected on the page. +/* eslint-enable camelcase */ +if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + CurrentOwner: ReactCurrentOwner, + InstanceHandles: ReactInstanceHandles, + Mount: ReactMount, + Reconciler: ReactReconciler, + TextComponent: ReactDOMTextComponent + }); } -/** - * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. - * This is also accessible via `React.DOM`. - * - * @public - */ -var ReactDOM = mapObject({ - a: 'a', - abbr: 'abbr', - address: 'address', - area: 'area', - article: 'article', - aside: 'aside', - audio: 'audio', - b: 'b', - base: 'base', - bdi: 'bdi', - bdo: 'bdo', - big: 'big', - blockquote: 'blockquote', - body: 'body', - br: 'br', - button: 'button', - canvas: 'canvas', - caption: 'caption', - cite: 'cite', - code: 'code', - col: 'col', - colgroup: 'colgroup', - data: 'data', - datalist: 'datalist', - dd: 'dd', - del: 'del', - details: 'details', - dfn: 'dfn', - dialog: 'dialog', - div: 'div', - dl: 'dl', - dt: 'dt', - em: 'em', - embed: 'embed', - fieldset: 'fieldset', - figcaption: 'figcaption', - figure: 'figure', - footer: 'footer', - form: 'form', - h1: 'h1', - h2: 'h2', - h3: 'h3', - h4: 'h4', - h5: 'h5', - h6: 'h6', - head: 'head', - header: 'header', - hr: 'hr', - html: 'html', - i: 'i', - iframe: 'iframe', - img: 'img', - input: 'input', - ins: 'ins', - kbd: 'kbd', - keygen: 'keygen', - label: 'label', - legend: 'legend', - li: 'li', - link: 'link', - main: 'main', - map: 'map', - mark: 'mark', - menu: 'menu', - menuitem: 'menuitem', - meta: 'meta', - meter: 'meter', - nav: 'nav', - noscript: 'noscript', - object: 'object', - ol: 'ol', - optgroup: 'optgroup', - option: 'option', - output: 'output', - p: 'p', - param: 'param', - picture: 'picture', - pre: 'pre', - progress: 'progress', - q: 'q', - rp: 'rp', - rt: 'rt', - ruby: 'ruby', - s: 's', - samp: 'samp', - script: 'script', - section: 'section', - select: 'select', - small: 'small', - source: 'source', - span: 'span', - strong: 'strong', - style: 'style', - sub: 'sub', - summary: 'summary', - sup: 'sup', - table: 'table', - tbody: 'tbody', - td: 'td', - textarea: 'textarea', - tfoot: 'tfoot', - th: 'th', - thead: 'thead', - time: 'time', - title: 'title', - tr: 'tr', - track: 'track', - u: 'u', - ul: 'ul', - 'var': 'var', - video: 'video', - wbr: 'wbr', +if ("development" !== 'production') { + var ExecutionEnvironment = _dereq_(129); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { - // SVG - circle: 'circle', - clipPath: 'clipPath', - defs: 'defs', - ellipse: 'ellipse', - g: 'g', - line: 'line', - linearGradient: 'linearGradient', - mask: 'mask', - path: 'path', - pattern: 'pattern', - polygon: 'polygon', - polyline: 'polyline', - radialGradient: 'radialGradient', - rect: 'rect', - stop: 'stop', - svg: 'svg', - text: 'text', - tspan: 'tspan' + // First check if devtools is not installed + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // If we're in Chrome or Firefox, provide a download link if not installed. + if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { + console.debug('Download the React DevTools for a better development experience: ' + 'https://fb.me/react-devtools'); + } + } -}, createDOMFactory); + // If we're in IE8, check to see if we are in compatibility mode and provide + // information on preventing compatibility mode + var ieCompatibilityMode = document.documentMode && document.documentMode < 8; + + "development" !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : undefined; -module.exports = ReactDOM; + var expectedFeatures = [ + // shims + Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim, + + // shams + Object.create, Object.freeze]; -},{"158":158,"63":63,"64":64}],47:[function(_dereq_,module,exports){ + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + console.error('One or more ES5 shim/shams expected by React are not available: ' + 'https://fb.me/react-warning-polyfills'); + break; + } + } + } +} + +module.exports = React; +},{"107":107,"122":122,"129":129,"154":154,"34":34,"46":46,"49":49,"61":61,"65":65,"71":71,"76":76,"83":83,"84":84}],36:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -7865,57 +6176,44 @@ module.exports = ReactDOM; 'use strict'; -var AutoFocusMixin = _dereq_(2); -var ReactBrowserComponentMixin = _dereq_(32); -var ReactClass = _dereq_(38); -var ReactElement = _dereq_(63); - -var keyMirror = _dereq_(156); - -var button = ReactElement.createFactory('button'); - -var mouseListenerNames = keyMirror({ +var mouseListenerNames = { onClick: true, onDoubleClick: true, onMouseDown: true, onMouseMove: true, onMouseUp: true, + onClickCapture: true, onDoubleClickCapture: true, onMouseDownCapture: true, onMouseMoveCapture: true, onMouseUpCapture: true -}); +}; /** * Implements a <button> native component that does not receive mouse events * when `disabled` is set. */ -var ReactDOMButton = ReactClass.createClass({ - displayName: 'ReactDOMButton', - tagName: 'BUTTON', - - mixins: [AutoFocusMixin, ReactBrowserComponentMixin], - - render: function() { - var props = {}; +var ReactDOMButton = { + getNativeProps: function (inst, props, context) { + if (!props.disabled) { + return props; + } - // Copy the props; except the mouse listeners if we're disabled - for (var key in this.props) { - if (this.props.hasOwnProperty(key) && - (!this.props.disabled || !mouseListenerNames[key])) { - props[key] = this.props[key]; + // Copy the props, except the mouse listeners + var nativeProps = {}; + for (var key in props) { + if (props.hasOwnProperty(key) && !mouseListenerNames[key]) { + nativeProps[key] = props[key]; } } - return button(props, this.props.children); + return nativeProps; } - -}); +}; module.exports = ReactDOMButton; - -},{"156":156,"2":2,"32":32,"38":38,"63":63}],48:[function(_dereq_,module,exports){ +},{}],37:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -7932,104 +6230,296 @@ module.exports = ReactDOMButton; 'use strict'; -var CSSPropertyOperations = _dereq_(6); -var DOMProperty = _dereq_(11); -var DOMPropertyOperations = _dereq_(12); -var ReactBrowserEventEmitter = _dereq_(33); -var ReactComponentBrowserEnvironment = - _dereq_(40); -var ReactMount = _dereq_(77); -var ReactMultiChild = _dereq_(78); -var ReactPerf = _dereq_(82); - -var assign = _dereq_(29); -var escapeTextContentForBrowser = _dereq_(131); -var invariant = _dereq_(150); -var isEventSupported = _dereq_(151); -var keyOf = _dereq_(157); -var warning = _dereq_(171); +var AutoFocusUtils = _dereq_(2); +var CSSPropertyOperations = _dereq_(5); +var DOMProperty = _dereq_(10); +var DOMPropertyOperations = _dereq_(11); +var EventConstants = _dereq_(15); +var ReactBrowserEventEmitter = _dereq_(26); +var ReactComponentBrowserEnvironment = _dereq_(31); +var ReactDOMButton = _dereq_(36); +var ReactDOMInput = _dereq_(41); +var ReactDOMOption = _dereq_(42); +var ReactDOMSelect = _dereq_(43); +var ReactDOMTextarea = _dereq_(47); +var ReactMount = _dereq_(65); +var ReactMultiChild = _dereq_(66); +var ReactPerf = _dereq_(71); +var ReactUpdateQueue = _dereq_(82); + +var assign = _dereq_(23); +var escapeTextContentForBrowser = _dereq_(106); +var invariant = _dereq_(143); +var isEventSupported = _dereq_(118); +var keyOf = _dereq_(147); +var setInnerHTML = _dereq_(123); +var setTextContent = _dereq_(124); +var shallowEqual = _dereq_(152); +var validateDOMNesting = _dereq_(127); +var warning = _dereq_(154); var deleteListener = ReactBrowserEventEmitter.deleteListener; var listenTo = ReactBrowserEventEmitter.listenTo; var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules; // For quickly matching children type, to test if can be treated as content. -var CONTENT_TYPES = {'string': true, 'number': true}; +var CONTENT_TYPES = { 'string': true, 'number': true }; -var STYLE = keyOf({style: null}); +var STYLE = keyOf({ style: null }); var ELEMENT_NODE_TYPE = 1; -/** - * Optionally injectable operations for mutating the DOM - */ -var BackendIDOperations = null; +var canDefineProperty = false; +try { + Object.defineProperty({}, 'test', { get: function () {} }); + canDefineProperty = true; +} catch (e) {} + +function getDeclarationErrorAddendum(internalInstance) { + if (internalInstance) { + var owner = internalInstance._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) { + return ' This DOM node was rendered by `' + name + '`.'; + } + } + } + return ''; +} + +var legacyPropsDescriptor; +if ("development" !== 'production') { + legacyPropsDescriptor = { + props: { + enumerable: false, + get: function () { + var component = this._reactInternalComponent; + "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .props of a DOM node; instead, ' + 'recreate the props as `render` did originally or read the DOM ' + 'properties/attributes directly from this node (e.g., ' + 'this.refs.box.className).%s', getDeclarationErrorAddendum(component)) : undefined; + return component._currentElement.props; + } + } + }; +} + +function legacyGetDOMNode() { + if ("development" !== 'production') { + var component = this._reactInternalComponent; + "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .getDOMNode() of a DOM node; ' + 'instead, use the node directly.%s', getDeclarationErrorAddendum(component)) : undefined; + } + return this; +} + +function legacyIsMounted() { + var component = this._reactInternalComponent; + if ("development" !== 'production') { + "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .isMounted() of a DOM node.%s', getDeclarationErrorAddendum(component)) : undefined; + } + return !!component; +} + +function legacySetStateEtc() { + if ("development" !== 'production') { + var component = this._reactInternalComponent; + "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .setState(), .replaceState(), or ' + '.forceUpdate() of a DOM node. This is a no-op.%s', getDeclarationErrorAddendum(component)) : undefined; + } +} + +function legacySetProps(partialProps, callback) { + var component = this._reactInternalComponent; + if ("development" !== 'production') { + "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .setProps() of a DOM node. ' + 'Instead, call ReactDOM.render again at the top level.%s', getDeclarationErrorAddendum(component)) : undefined; + } + if (!component) { + return; + } + ReactUpdateQueue.enqueueSetPropsInternal(component, partialProps); + if (callback) { + ReactUpdateQueue.enqueueCallbackInternal(component, callback); + } +} + +function legacyReplaceProps(partialProps, callback) { + var component = this._reactInternalComponent; + if ("development" !== 'production') { + "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .replaceProps() of a DOM node. ' + 'Instead, call ReactDOM.render again at the top level.%s', getDeclarationErrorAddendum(component)) : undefined; + } + if (!component) { + return; + } + ReactUpdateQueue.enqueueReplacePropsInternal(component, partialProps); + if (callback) { + ReactUpdateQueue.enqueueCallbackInternal(component, callback); + } +} + +function friendlyStringify(obj) { + if (typeof obj === 'object') { + if (Array.isArray(obj)) { + return '[' + obj.map(friendlyStringify).join(', ') + ']'; + } else { + var pairs = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); + pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); + } + } + return '{' + pairs.join(', ') + '}'; + } + } else if (typeof obj === 'string') { + return JSON.stringify(obj); + } else if (typeof obj === 'function') { + return '[function object]'; + } + // Differs from JSON.stringify in that undefined becauses undefined and that + // inf and nan don't become null + return String(obj); +} + +var styleMutationWarning = {}; + +function checkAndWarnForMutatedStyle(style1, style2, component) { + if (style1 == null || style2 == null) { + return; + } + if (shallowEqual(style1, style2)) { + return; + } + + var componentName = component._tag; + var owner = component._currentElement._owner; + var ownerName; + if (owner) { + ownerName = owner.getName(); + } + + var hash = ownerName + '|' + componentName; + + if (styleMutationWarning.hasOwnProperty(hash)) { + return; + } + + styleMutationWarning[hash] = true; + + "development" !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : undefined; +} /** + * @param {object} component * @param {?object} props */ -function assertValidProps(props) { +function assertValidProps(component, props) { if (!props) { return; } // Note the use of `==` which checks for null or undefined. + if ("development" !== 'production') { + if (voidElementTags[component._tag]) { + "development" !== 'production' ? warning(props.children == null && props.dangerouslySetInnerHTML == null, '%s is a void element tag and must not have `children` or ' + 'use `props.dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : undefined; + } + } if (props.dangerouslySetInnerHTML != null) { - ("production" !== "development" ? invariant( - props.children == null, - 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.' - ) : invariant(props.children == null)); - ("production" !== "development" ? invariant( - typeof props.dangerouslySetInnerHTML === 'object' && - '__html' in props.dangerouslySetInnerHTML, - '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + - 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + - 'for more information.' - ) : invariant(typeof props.dangerouslySetInnerHTML === 'object' && - '__html' in props.dangerouslySetInnerHTML)); - } - if ("production" !== "development") { - ("production" !== "development" ? warning( - props.innerHTML == null, - 'Directly setting property `innerHTML` is not permitted. ' + - 'For more information, lookup documentation on `dangerouslySetInnerHTML`.' - ) : null); - ("production" !== "development" ? warning( - !props.contentEditable || props.children == null, - 'A component is `contentEditable` and contains `children` managed by ' + - 'React. It is now your responsibility to guarantee that none of ' + - 'those nodes are unexpectedly modified or duplicated. This is ' + - 'probably not intentional.' - ) : null); - } - ("production" !== "development" ? invariant( - props.style == null || typeof props.style === 'object', - 'The `style` prop expects a mapping from style properties to values, ' + - 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + - 'using JSX.' - ) : invariant(props.style == null || typeof props.style === 'object')); -} - -function putListener(id, registrationName, listener, transaction) { - if ("production" !== "development") { + !(props.children == null) ? "development" !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : invariant(false) : undefined; + !(typeof props.dangerouslySetInnerHTML === 'object' && '__html' in props.dangerouslySetInnerHTML) ? "development" !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + 'for more information.') : invariant(false) : undefined; + } + if ("development" !== 'production') { + "development" !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : undefined; + "development" !== 'production' ? warning(!props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : undefined; + } + !(props.style == null || typeof props.style === 'object') ? "development" !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, ' + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + 'using JSX.%s', getDeclarationErrorAddendum(component)) : invariant(false) : undefined; +} + +function enqueuePutListener(id, registrationName, listener, transaction) { + if ("development" !== 'production') { // IE8 has no API for event capturing and the `onScroll` event doesn't // bubble. - ("production" !== "development" ? warning( - registrationName !== 'onScroll' || isEventSupported('scroll', true), - 'This browser doesn\'t support the `onScroll` event' - ) : null); + "development" !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : undefined; } var container = ReactMount.findReactContainerForID(id); if (container) { - var doc = container.nodeType === ELEMENT_NODE_TYPE ? - container.ownerDocument : - container; + var doc = container.nodeType === ELEMENT_NODE_TYPE ? container.ownerDocument : container; listenTo(registrationName, doc); } - transaction.getPutListenerQueue().enqueuePutListener( - id, - registrationName, - listener - ); + transaction.getReactMountReady().enqueue(putListener, { + id: id, + registrationName: registrationName, + listener: listener + }); +} + +function putListener() { + var listenerToPut = this; + ReactBrowserEventEmitter.putListener(listenerToPut.id, listenerToPut.registrationName, listenerToPut.listener); +} + +// There are so many media events, it makes sense to just +// maintain a list rather than create a `trapBubbledEvent` for each +var mediaEvents = { + topAbort: 'abort', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topSeeked: 'seeked', + topSeeking: 'seeking', + topStalled: 'stalled', + topSuspend: 'suspend', + topTimeUpdate: 'timeupdate', + topVolumeChange: 'volumechange', + topWaiting: 'waiting' +}; + +function trapBubbledEventsLocal() { + var inst = this; + // If a component renders to null or if another component fatals and causes + // the state of the tree to be corrupted, `node` here can be null. + !inst._rootNodeID ? "development" !== 'production' ? invariant(false, 'Must be mounted to trap events') : invariant(false) : undefined; + var node = ReactMount.getNode(inst._rootNodeID); + !node ? "development" !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : invariant(false) : undefined; + + switch (inst._tag) { + case 'iframe': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)]; + break; + case 'video': + case 'audio': + + inst._wrapperState.listeners = []; + // create listener for each media event + for (var event in mediaEvents) { + if (mediaEvents.hasOwnProperty(event)) { + inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event], mediaEvents[event], node)); + } + } + + break; + case 'img': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)]; + break; + case 'form': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit', node)]; + break; + } +} + +function mountReadyInputWrapper() { + ReactDOMInput.mountReadyWrapper(this); +} + +function postUpdateSelectWrapper() { + ReactDOMSelect.postUpdateWrapper(this); } // For HTML, certain tags should omit their close tag. We keep a whitelist for @@ -8051,24 +6541,49 @@ var omittedCloseTags = { 'source': true, 'track': true, 'wbr': true - // NOTE: menuitem's close tag should be omitted, but that causes problems. }; -// We accept any tag to be rendered but since this gets injected into abitrary +// NOTE: menuitem's close tag should be omitted, but that causes problems. +var newlineEatingTags = { + 'listing': true, + 'pre': true, + 'textarea': true +}; + +// For HTML, certain tags cannot have children. This has the same purpose as +// `omittedCloseTags` except that `menuitem` should still have its closing tag. + +var voidElementTags = assign({ + 'menuitem': true +}, omittedCloseTags); + +// We accept any tag to be rendered but since this gets injected into arbitrary // HTML, we want to make sure that it's a safe tag. // http://www.w3.org/TR/REC-xml/#NT-Name var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset var validatedTagCache = {}; -var hasOwnProperty = {}.hasOwnProperty; +var hasOwnProperty = ({}).hasOwnProperty; function validateDangerousTag(tag) { if (!hasOwnProperty.call(validatedTagCache, tag)) { - ("production" !== "development" ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag))); + !VALID_TAG_REGEX.test(tag) ? "development" !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : invariant(false) : undefined; validatedTagCache[tag] = true; } } +function processChildContextDev(context, inst) { + // Pass down our tag name to child components for validation purposes + context = assign({}, context); + var info = context[validateDOMNesting.ancestorInfoContextKey]; + context[validateDOMNesting.ancestorInfoContextKey] = validateDOMNesting.updatedAncestorInfo(info, inst._tag, inst); + return context; +} + +function isCustomComponent(tagName, props) { + return tagName.indexOf('-') >= 0 || props.is != null; +} + /** * Creates a new React class that is idempotent and capable of containing other * React components. It accepts event listeners and DOM properties that are @@ -8085,17 +6600,25 @@ function validateDangerousTag(tag) { */ function ReactDOMComponent(tag) { validateDangerousTag(tag); - this._tag = tag; + this._tag = tag.toLowerCase(); this._renderedChildren = null; + this._previousStyle = null; this._previousStyleCopy = null; this._rootNodeID = null; + this._wrapperState = null; + this._topLevelWrapper = null; + this._nodeWithLegacyProperties = null; + if ("development" !== 'production') { + this._unprocessedContextDev = null; + this._processedContextDev = null; + } } ReactDOMComponent.displayName = 'ReactDOMComponent'; ReactDOMComponent.Mixin = { - construct: function(element) { + construct: function (element) { this._currentElement = element; }, @@ -8106,17 +6629,94 @@ ReactDOMComponent.Mixin = { * @internal * @param {string} rootID The root DOM ID for this node. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context * @return {string} The computed markup. */ - mountComponent: function(rootID, transaction, context) { + mountComponent: function (rootID, transaction, context) { this._rootNodeID = rootID; - assertValidProps(this._currentElement.props); - var closeTag = omittedCloseTags[this._tag] ? '' : '</' + this._tag + '>'; - return ( - this._createOpenTagMarkupAndPutListeners(transaction) + - this._createContentMarkup(transaction, context) + - closeTag - ); + + var props = this._currentElement.props; + + switch (this._tag) { + case 'iframe': + case 'img': + case 'form': + case 'video': + case 'audio': + this._wrapperState = { + listeners: null + }; + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'button': + props = ReactDOMButton.getNativeProps(this, props, context); + break; + case 'input': + ReactDOMInput.mountWrapper(this, props, context); + props = ReactDOMInput.getNativeProps(this, props, context); + break; + case 'option': + ReactDOMOption.mountWrapper(this, props, context); + props = ReactDOMOption.getNativeProps(this, props, context); + break; + case 'select': + ReactDOMSelect.mountWrapper(this, props, context); + props = ReactDOMSelect.getNativeProps(this, props, context); + context = ReactDOMSelect.processChildContext(this, props, context); + break; + case 'textarea': + ReactDOMTextarea.mountWrapper(this, props, context); + props = ReactDOMTextarea.getNativeProps(this, props, context); + break; + } + + assertValidProps(this, props); + if ("development" !== 'production') { + if (context[validateDOMNesting.ancestorInfoContextKey]) { + validateDOMNesting(this._tag, this, context[validateDOMNesting.ancestorInfoContextKey]); + } + } + + if ("development" !== 'production') { + this._unprocessedContextDev = context; + this._processedContextDev = processChildContextDev(context, this); + context = this._processedContextDev; + } + + var mountImage; + if (transaction.useCreateElement) { + var ownerDocument = context[ReactMount.ownerDocumentContextKey]; + var el = ownerDocument.createElement(this._currentElement.type); + DOMPropertyOperations.setAttributeForID(el, this._rootNodeID); + // Populate node cache + ReactMount.getID(el); + this._updateDOMProperties({}, props, transaction, el); + this._createInitialChildren(transaction, props, context, el); + mountImage = el; + } else { + var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); + var tagContent = this._createContentMarkup(transaction, props, context); + if (!tagContent && omittedCloseTags[this._tag]) { + mountImage = tagOpen + '/>'; + } else { + mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; + } + } + + switch (this._tag) { + case 'input': + transaction.getReactMountReady().enqueue(mountReadyInputWrapper, this); + // falls through + case 'button': + case 'select': + case 'textarea': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + } + + return mountImage; }, /** @@ -8129,11 +6729,11 @@ ReactDOMComponent.Mixin = { * * @private * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props * @return {string} Markup of opening tag. */ - _createOpenTagMarkupAndPutListeners: function(transaction) { - var props = this._currentElement.props; - var ret = '<' + this._tag; + _createOpenTagMarkupAndPutListeners: function (transaction, props) { + var ret = '<' + this._currentElement.type; for (var propKey in props) { if (!props.hasOwnProperty(propKey)) { @@ -8144,16 +6744,26 @@ ReactDOMComponent.Mixin = { continue; } if (registrationNameModules.hasOwnProperty(propKey)) { - putListener(this._rootNodeID, propKey, propValue, transaction); + if (propValue) { + enqueuePutListener(this._rootNodeID, propKey, propValue, transaction); + } } else { if (propKey === STYLE) { if (propValue) { + if ("development" !== 'production') { + // See `_updateDOMProperties`. style block + this._previousStyle = propValue; + } propValue = this._previousStyleCopy = assign({}, props.style); } propValue = CSSPropertyOperations.createMarkupForStyles(propValue); } - var markup = - DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + var markup = null; + if (this._tag != null && isCustomComponent(this._tag, props)) { + markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); + } else { + markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + } if (markup) { ret += ' ' + markup; } @@ -8163,11 +6773,11 @@ ReactDOMComponent.Mixin = { // For static pages, no need to put React ID and checksum. Saves lots of // bytes. if (transaction.renderToStaticMarkup) { - return ret + '>'; + return ret; } var markupForID = DOMPropertyOperations.createMarkupForID(this._rootNodeID); - return ret + ' ' + markupForID + '>'; + return ret + ' ' + markupForID; }, /** @@ -8175,47 +6785,78 @@ ReactDOMComponent.Mixin = { * * @private * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props * @param {object} context * @return {string} Content markup. */ - _createContentMarkup: function(transaction, context) { - var prefix = ''; - if (this._tag === 'listing' || - this._tag === 'pre' || - this._tag === 'textarea') { - // Add an initial newline because browsers ignore the first newline in - // a <listing>, <pre>, or <textarea> as an "authoring convenience" -- see - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody. - prefix = '\n'; - } + _createContentMarkup: function (transaction, props, context) { + var ret = ''; - var props = this._currentElement.props; + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + ret = innerHTML.__html; + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + if (contentToUse != null) { + // TODO: Validate that text is allowed as a child of this node + ret = escapeTextContentForBrowser(contentToUse); + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + ret = mountImages.join(''); + } + } + if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + return '\n' + ret; + } else { + return ret; + } + }, + _createInitialChildren: function (transaction, props, context, el) { // Intentional use of != to avoid catching zero/false. var innerHTML = props.dangerouslySetInnerHTML; if (innerHTML != null) { if (innerHTML.__html != null) { - return prefix + innerHTML.__html; + setInnerHTML(el, innerHTML.__html); } } else { - var contentToUse = - CONTENT_TYPES[typeof props.children] ? props.children : null; + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; var childrenToUse = contentToUse != null ? null : props.children; if (contentToUse != null) { - return prefix + escapeTextContentForBrowser(contentToUse); + // TODO: Validate that text is allowed as a child of this node + setTextContent(el, contentToUse); } else if (childrenToUse != null) { - var mountImages = this.mountChildren( - childrenToUse, - transaction, - context - ); - return prefix + mountImages.join(''); + var mountImages = this.mountChildren(childrenToUse, transaction, context); + for (var i = 0; i < mountImages.length; i++) { + el.appendChild(mountImages[i]); + } } } - return prefix; }, - receiveComponent: function(nextElement, transaction, context) { + /** + * Receives a next element and updates the component. + * + * @internal + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context + */ + receiveComponent: function (nextElement, transaction, context) { var prevElement = this._currentElement; this._currentElement = nextElement; this.updateComponent(transaction, prevElement, nextElement, context); @@ -8231,10 +6872,59 @@ ReactDOMComponent.Mixin = { * @internal * @overridable */ - updateComponent: function(transaction, prevElement, nextElement, context) { - assertValidProps(this._currentElement.props); - this._updateDOMProperties(prevElement.props, transaction); - this._updateDOMChildren(prevElement.props, transaction, context); + updateComponent: function (transaction, prevElement, nextElement, context) { + var lastProps = prevElement.props; + var nextProps = this._currentElement.props; + + switch (this._tag) { + case 'button': + lastProps = ReactDOMButton.getNativeProps(this, lastProps); + nextProps = ReactDOMButton.getNativeProps(this, nextProps); + break; + case 'input': + ReactDOMInput.updateWrapper(this); + lastProps = ReactDOMInput.getNativeProps(this, lastProps); + nextProps = ReactDOMInput.getNativeProps(this, nextProps); + break; + case 'option': + lastProps = ReactDOMOption.getNativeProps(this, lastProps); + nextProps = ReactDOMOption.getNativeProps(this, nextProps); + break; + case 'select': + lastProps = ReactDOMSelect.getNativeProps(this, lastProps); + nextProps = ReactDOMSelect.getNativeProps(this, nextProps); + break; + case 'textarea': + ReactDOMTextarea.updateWrapper(this); + lastProps = ReactDOMTextarea.getNativeProps(this, lastProps); + nextProps = ReactDOMTextarea.getNativeProps(this, nextProps); + break; + } + + if ("development" !== 'production') { + // If the context is reference-equal to the old one, pass down the same + // processed object so the update bailout in ReactReconciler behaves + // correctly (and identically in dev and prod). See #5005. + if (this._unprocessedContextDev !== context) { + this._unprocessedContextDev = context; + this._processedContextDev = processChildContextDev(context, this); + } + context = this._processedContextDev; + } + + assertValidProps(this, nextProps); + this._updateDOMProperties(lastProps, nextProps, transaction, null); + this._updateDOMChildren(lastProps, nextProps, transaction, context); + + if (!canDefineProperty && this._nodeWithLegacyProperties) { + this._nodeWithLegacyProperties.props = nextProps; + } + + if (this._tag === 'select') { + // <select> value update needs to occur after <option> children + // reconciliation + transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); + } }, /** @@ -8250,16 +6940,16 @@ ReactDOMComponent.Mixin = { * * @private * @param {object} lastProps + * @param {object} nextProps * @param {ReactReconcileTransaction} transaction + * @param {?DOMElement} node */ - _updateDOMProperties: function(lastProps, transaction) { - var nextProps = this._currentElement.props; + _updateDOMProperties: function (lastProps, nextProps, transaction, node) { var propKey; var styleName; var styleUpdates; for (propKey in lastProps) { - if (nextProps.hasOwnProperty(propKey) || - !lastProps.hasOwnProperty(propKey)) { + if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey)) { continue; } if (propKey === STYLE) { @@ -8272,26 +6962,31 @@ ReactDOMComponent.Mixin = { } this._previousStyleCopy = null; } else if (registrationNameModules.hasOwnProperty(propKey)) { - deleteListener(this._rootNodeID, propKey); - } else if ( - DOMProperty.isStandardName[propKey] || - DOMProperty.isCustomAttribute(propKey)) { - BackendIDOperations.deletePropertyByID( - this._rootNodeID, - propKey - ); + if (lastProps[propKey]) { + // Only call deleteListener if there was a listener previously or + // else willDeleteListener gets called when there wasn't actually a + // listener (e.g., onClick={null}) + deleteListener(this._rootNodeID, propKey); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + if (!node) { + node = ReactMount.getNode(this._rootNodeID); + } + DOMPropertyOperations.deleteValueForProperty(node, propKey); } } for (propKey in nextProps) { var nextProp = nextProps[propKey]; - var lastProp = propKey === STYLE ? - this._previousStyleCopy : - lastProps[propKey]; + var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps[propKey]; if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) { continue; } if (propKey === STYLE) { if (nextProp) { + if ("development" !== 'production') { + checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); + this._previousStyle = nextProp; + } nextProp = this._previousStyleCopy = assign({}, nextProp); } else { this._previousStyleCopy = null; @@ -8299,16 +6994,14 @@ ReactDOMComponent.Mixin = { if (lastProp) { // Unset styles on `lastProp` but not on `nextProp`. for (styleName in lastProp) { - if (lastProp.hasOwnProperty(styleName) && - (!nextProp || !nextProp.hasOwnProperty(styleName))) { + if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { styleUpdates = styleUpdates || {}; styleUpdates[styleName] = ''; } } // Update styles that changed since `lastProp`. for (styleName in nextProp) { - if (nextProp.hasOwnProperty(styleName) && - lastProp[styleName] !== nextProp[styleName]) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { styleUpdates = styleUpdates || {}; styleUpdates[styleName] = nextProp[styleName]; } @@ -8318,22 +7011,35 @@ ReactDOMComponent.Mixin = { styleUpdates = nextProp; } } else if (registrationNameModules.hasOwnProperty(propKey)) { - putListener(this._rootNodeID, propKey, nextProp, transaction); - } else if ( - DOMProperty.isStandardName[propKey] || - DOMProperty.isCustomAttribute(propKey)) { - BackendIDOperations.updatePropertyByID( - this._rootNodeID, - propKey, - nextProp - ); + if (nextProp) { + enqueuePutListener(this._rootNodeID, propKey, nextProp, transaction); + } else if (lastProp) { + deleteListener(this._rootNodeID, propKey); + } + } else if (isCustomComponent(this._tag, nextProps)) { + if (!node) { + node = ReactMount.getNode(this._rootNodeID); + } + DOMPropertyOperations.setValueForAttribute(node, propKey, nextProp); + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + if (!node) { + node = ReactMount.getNode(this._rootNodeID); + } + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertantly setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (nextProp != null) { + DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); + } else { + DOMPropertyOperations.deleteValueForProperty(node, propKey); + } } } if (styleUpdates) { - BackendIDOperations.updateStylesByID( - this._rootNodeID, - styleUpdates - ); + if (!node) { + node = ReactMount.getNode(this._rootNodeID); + } + CSSPropertyOperations.setValueForStyles(node, styleUpdates); } }, @@ -8342,22 +7048,16 @@ ReactDOMComponent.Mixin = { * children content. * * @param {object} lastProps + * @param {object} nextProps * @param {ReactReconcileTransaction} transaction + * @param {object} context */ - _updateDOMChildren: function(lastProps, transaction, context) { - var nextProps = this._currentElement.props; - - var lastContent = - CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; - var nextContent = - CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; + _updateDOMChildren: function (lastProps, nextProps, transaction, context) { + var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; + var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; - var lastHtml = - lastProps.dangerouslySetInnerHTML && - lastProps.dangerouslySetInnerHTML.__html; - var nextHtml = - nextProps.dangerouslySetInnerHTML && - nextProps.dangerouslySetInnerHTML.__html; + var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; + var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; // Note the use of `!=` which checks for null or undefined. var lastChildren = lastContent != null ? null : lastProps.children; @@ -8379,10 +7079,7 @@ ReactDOMComponent.Mixin = { } } else if (nextHtml != null) { if (lastHtml !== nextHtml) { - BackendIDOperations.updateInnerHTMLByID( - this._rootNodeID, - nextHtml - ); + this.updateMarkup('' + nextHtml); } } else if (nextChildren != null) { this.updateChildren(nextChildren, transaction, context); @@ -8395,11 +7092,76 @@ ReactDOMComponent.Mixin = { * * @internal */ - unmountComponent: function() { + unmountComponent: function () { + switch (this._tag) { + case 'iframe': + case 'img': + case 'form': + case 'video': + case 'audio': + var listeners = this._wrapperState.listeners; + if (listeners) { + for (var i = 0; i < listeners.length; i++) { + listeners[i].remove(); + } + } + break; + case 'input': + ReactDOMInput.unmountWrapper(this); + break; + case 'html': + case 'head': + case 'body': + /** + * Components like <html> <head> and <body> can't be removed or added + * easily in a cross-browser way, however it's valuable to be able to + * take advantage of React's reconciliation for styling and <title> + * management. So we just document it and throw in dangerous cases. + */ + !false ? "development" !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is ' + 'impossible to unmount some top-level components (eg <html>, ' + '<head>, and <body>) reliably and efficiently. To fix this, have a ' + 'single top-level component that never unmounts render these ' + 'elements.', this._tag) : invariant(false) : undefined; + break; + } + this.unmountChildren(); ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID); ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); this._rootNodeID = null; + this._wrapperState = null; + if (this._nodeWithLegacyProperties) { + var node = this._nodeWithLegacyProperties; + node._reactInternalComponent = null; + this._nodeWithLegacyProperties = null; + } + }, + + getPublicInstance: function () { + if (!this._nodeWithLegacyProperties) { + var node = ReactMount.getNode(this._rootNodeID); + + node._reactInternalComponent = this; + node.getDOMNode = legacyGetDOMNode; + node.isMounted = legacyIsMounted; + node.setState = legacySetStateEtc; + node.replaceState = legacySetStateEtc; + node.forceUpdate = legacySetStateEtc; + node.setProps = legacySetProps; + node.replaceProps = legacyReplaceProps; + + if ("development" !== 'production') { + if (canDefineProperty) { + Object.defineProperties(node, legacyPropsDescriptor); + } else { + // updateComponent will update this property on subsequent renders + node.props = this._currentElement.props; + } + } else { + // updateComponent will update this property on subsequent renders + node.props = this._currentElement.props; + } + + this._nodeWithLegacyProperties = node; + } + return this._nodeWithLegacyProperties; } }; @@ -8409,21 +7171,10 @@ ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', { updateComponent: 'updateComponent' }); -assign( - ReactDOMComponent.prototype, - ReactDOMComponent.Mixin, - ReactMultiChild.Mixin -); - -ReactDOMComponent.injection = { - injectIDOperations: function(IDOperations) { - ReactDOMComponent.BackendIDOperations = BackendIDOperations = IDOperations; - } -}; +assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); module.exports = ReactDOMComponent; - -},{"11":11,"12":12,"131":131,"150":150,"151":151,"157":157,"171":171,"29":29,"33":33,"40":40,"6":6,"77":77,"78":78,"82":82}],49:[function(_dereq_,module,exports){ +},{"10":10,"106":106,"11":11,"118":118,"123":123,"124":124,"127":127,"143":143,"147":147,"15":15,"152":152,"154":154,"2":2,"23":23,"26":26,"31":31,"36":36,"41":41,"42":42,"43":43,"47":47,"5":5,"65":65,"66":66,"71":71,"82":82}],38:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -8432,47 +7183,195 @@ module.exports = ReactDOMComponent; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactDOMForm + * @providesModule ReactDOMFactories + * @typechecks static-only */ 'use strict'; -var EventConstants = _dereq_(16); -var LocalEventTrapMixin = _dereq_(27); -var ReactBrowserComponentMixin = _dereq_(32); -var ReactClass = _dereq_(38); -var ReactElement = _dereq_(63); +var ReactElement = _dereq_(52); +var ReactElementValidator = _dereq_(53); -var form = ReactElement.createFactory('form'); +var mapObject = _dereq_(148); + +/** + * Create a factory that creates HTML tag elements. + * + * @param {string} tag Tag name (e.g. `div`). + * @private + */ +function createDOMFactory(tag) { + if ("development" !== 'production') { + return ReactElementValidator.createFactory(tag); + } + return ReactElement.createFactory(tag); +} /** - * Since onSubmit doesn't bubble OR capture on the top level in IE8, we need - * to capture it on the <form> element itself. There are lots of hacks we could - * do to accomplish this, but the most reliable is to make <form> a - * composite component and use `componentDidMount` to attach the event handlers. + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * This is also accessible via `React.DOM`. + * + * @public */ -var ReactDOMForm = ReactClass.createClass({ - displayName: 'ReactDOMForm', - tagName: 'FORM', +var ReactDOMFactories = mapObject({ + a: 'a', + abbr: 'abbr', + address: 'address', + area: 'area', + article: 'article', + aside: 'aside', + audio: 'audio', + b: 'b', + base: 'base', + bdi: 'bdi', + bdo: 'bdo', + big: 'big', + blockquote: 'blockquote', + body: 'body', + br: 'br', + button: 'button', + canvas: 'canvas', + caption: 'caption', + cite: 'cite', + code: 'code', + col: 'col', + colgroup: 'colgroup', + data: 'data', + datalist: 'datalist', + dd: 'dd', + del: 'del', + details: 'details', + dfn: 'dfn', + dialog: 'dialog', + div: 'div', + dl: 'dl', + dt: 'dt', + em: 'em', + embed: 'embed', + fieldset: 'fieldset', + figcaption: 'figcaption', + figure: 'figure', + footer: 'footer', + form: 'form', + h1: 'h1', + h2: 'h2', + h3: 'h3', + h4: 'h4', + h5: 'h5', + h6: 'h6', + head: 'head', + header: 'header', + hgroup: 'hgroup', + hr: 'hr', + html: 'html', + i: 'i', + iframe: 'iframe', + img: 'img', + input: 'input', + ins: 'ins', + kbd: 'kbd', + keygen: 'keygen', + label: 'label', + legend: 'legend', + li: 'li', + link: 'link', + main: 'main', + map: 'map', + mark: 'mark', + menu: 'menu', + menuitem: 'menuitem', + meta: 'meta', + meter: 'meter', + nav: 'nav', + noscript: 'noscript', + object: 'object', + ol: 'ol', + optgroup: 'optgroup', + option: 'option', + output: 'output', + p: 'p', + param: 'param', + picture: 'picture', + pre: 'pre', + progress: 'progress', + q: 'q', + rp: 'rp', + rt: 'rt', + ruby: 'ruby', + s: 's', + samp: 'samp', + script: 'script', + section: 'section', + select: 'select', + small: 'small', + source: 'source', + span: 'span', + strong: 'strong', + style: 'style', + sub: 'sub', + summary: 'summary', + sup: 'sup', + table: 'table', + tbody: 'tbody', + td: 'td', + textarea: 'textarea', + tfoot: 'tfoot', + th: 'th', + thead: 'thead', + time: 'time', + title: 'title', + tr: 'tr', + track: 'track', + u: 'u', + ul: 'ul', + 'var': 'var', + video: 'video', + wbr: 'wbr', - mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], + // SVG + circle: 'circle', + clipPath: 'clipPath', + defs: 'defs', + ellipse: 'ellipse', + g: 'g', + image: 'image', + line: 'line', + linearGradient: 'linearGradient', + mask: 'mask', + path: 'path', + pattern: 'pattern', + polygon: 'polygon', + polyline: 'polyline', + radialGradient: 'radialGradient', + rect: 'rect', + stop: 'stop', + svg: 'svg', + text: 'text', + tspan: 'tspan' - render: function() { - // TODO: Instead of using `ReactDOM` directly, we should use JSX. However, - // `jshint` fails to parse JSX so in order for linting to work in the open - // source repo, we need to just use `ReactDOM.form`. - return form(this.props); - }, +}, createDOMFactory); - componentDidMount: function() { - this.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset'); - this.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit'); - } -}); +module.exports = ReactDOMFactories; +},{"148":148,"52":52,"53":53}],39:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMFeatureFlags + */ -module.exports = ReactDOMForm; +'use strict'; + +var ReactDOMFeatureFlags = { + useCreateElement: false +}; -},{"16":16,"27":27,"32":32,"38":38,"63":63}],50:[function(_dereq_,module,exports){ +module.exports = ReactDOMFeatureFlags; +},{}],40:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -8485,34 +7384,28 @@ module.exports = ReactDOMForm; * @typechecks static-only */ -/*jslint evil: true */ - 'use strict'; -var CSSPropertyOperations = _dereq_(6); -var DOMChildrenOperations = _dereq_(10); -var DOMPropertyOperations = _dereq_(12); -var ReactMount = _dereq_(77); -var ReactPerf = _dereq_(82); +var DOMChildrenOperations = _dereq_(9); +var DOMPropertyOperations = _dereq_(11); +var ReactMount = _dereq_(65); +var ReactPerf = _dereq_(71); -var invariant = _dereq_(150); -var setInnerHTML = _dereq_(164); +var invariant = _dereq_(143); /** - * Errors for properties that should not be updated with `updatePropertyById()`. + * Errors for properties that should not be updated with `updatePropertyByID()`. * * @type {object} * @private */ var INVALID_PROPERTY_ERRORS = { - dangerouslySetInnerHTML: - '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.', + dangerouslySetInnerHTML: '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.', style: '`style` must be set using `updateStylesByID()`.' }; /** - * Operations used to process updates to DOM nodes. This is made injectable via - * `ReactDOMComponent.BackendIDOperations`. + * Operations used to process updates to DOM nodes. */ var ReactDOMIDOperations = { @@ -8525,13 +7418,9 @@ var ReactDOMIDOperations = { * @param {*} value New value of the property. * @internal */ - updatePropertyByID: function(id, name, value) { + updatePropertyByID: function (id, name, value) { var node = ReactMount.getNode(id); - ("production" !== "development" ? invariant( - !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), - 'updatePropertyByID(...): %s', - INVALID_PROPERTY_ERRORS[name] - ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); + !!INVALID_PROPERTY_ERRORS.hasOwnProperty(name) ? "development" !== 'production' ? invariant(false, 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(false) : undefined; // If we're updating to null or undefined, we should remove the property // from the DOM node instead of inadvertantly setting to a string. This @@ -8544,61 +7433,6 @@ var ReactDOMIDOperations = { }, /** - * Updates a DOM node to remove a property. This should only be used to remove - * DOM properties in `DOMProperty`. - * - * @param {string} id ID of the node to update. - * @param {string} name A property name to remove, see `DOMProperty`. - * @internal - */ - deletePropertyByID: function(id, name, value) { - var node = ReactMount.getNode(id); - ("production" !== "development" ? invariant( - !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), - 'updatePropertyByID(...): %s', - INVALID_PROPERTY_ERRORS[name] - ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); - DOMPropertyOperations.deleteValueForProperty(node, name, value); - }, - - /** - * Updates a DOM node with new style values. If a value is specified as '', - * the corresponding style property will be unset. - * - * @param {string} id ID of the node to update. - * @param {object} styles Mapping from styles to values. - * @internal - */ - updateStylesByID: function(id, styles) { - var node = ReactMount.getNode(id); - CSSPropertyOperations.setValueForStyles(node, styles); - }, - - /** - * Updates a DOM node's innerHTML. - * - * @param {string} id ID of the node to update. - * @param {string} html An HTML string. - * @internal - */ - updateInnerHTMLByID: function(id, html) { - var node = ReactMount.getNode(id); - setInnerHTML(node, html); - }, - - /** - * Updates a DOM node's text content set by `props.content`. - * - * @param {string} id ID of the node to update. - * @param {string} content Text content. - * @internal - */ - updateTextContentByID: function(id, content) { - var node = ReactMount.getNode(id); - DOMChildrenOperations.updateTextContent(node, content); - }, - - /** * Replaces a DOM node that exists in the document with markup. * * @param {string} id ID of child to be replaced. @@ -8606,7 +7440,7 @@ var ReactDOMIDOperations = { * @internal * @see {Danger.dangerouslyReplaceNodeWithMarkup} */ - dangerouslyReplaceNodeWithMarkupByID: function(id, markup) { + dangerouslyReplaceNodeWithMarkupByID: function (id, markup) { var node = ReactMount.getNode(id); DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup); }, @@ -8618,7 +7452,7 @@ var ReactDOMIDOperations = { * @param {array<string>} markup List of markup strings. * @internal */ - dangerouslyProcessChildrenUpdates: function(updates, markup) { + dangerouslyProcessChildrenUpdates: function (updates, markup) { for (var i = 0; i < updates.length; i++) { updates[i].parentNode = ReactMount.getNode(updates[i].parentID); } @@ -8627,109 +7461,12 @@ var ReactDOMIDOperations = { }; ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', { - updatePropertyByID: 'updatePropertyByID', - deletePropertyByID: 'deletePropertyByID', - updateStylesByID: 'updateStylesByID', - updateInnerHTMLByID: 'updateInnerHTMLByID', - updateTextContentByID: 'updateTextContentByID', dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID', dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates' }); module.exports = ReactDOMIDOperations; - -},{"10":10,"12":12,"150":150,"164":164,"6":6,"77":77,"82":82}],51:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactDOMIframe - */ - -'use strict'; - -var EventConstants = _dereq_(16); -var LocalEventTrapMixin = _dereq_(27); -var ReactBrowserComponentMixin = _dereq_(32); -var ReactClass = _dereq_(38); -var ReactElement = _dereq_(63); - -var iframe = ReactElement.createFactory('iframe'); - -/** - * Since onLoad doesn't bubble OR capture on the top level in IE8, we need to - * capture it on the <iframe> element itself. There are lots of hacks we could - * do to accomplish this, but the most reliable is to make <iframe> a composite - * component and use `componentDidMount` to attach the event handlers. - */ -var ReactDOMIframe = ReactClass.createClass({ - displayName: 'ReactDOMIframe', - tagName: 'IFRAME', - - mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], - - render: function() { - return iframe(this.props); - }, - - componentDidMount: function() { - this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load'); - } -}); - -module.exports = ReactDOMIframe; - -},{"16":16,"27":27,"32":32,"38":38,"63":63}],52:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactDOMImg - */ - -'use strict'; - -var EventConstants = _dereq_(16); -var LocalEventTrapMixin = _dereq_(27); -var ReactBrowserComponentMixin = _dereq_(32); -var ReactClass = _dereq_(38); -var ReactElement = _dereq_(63); - -var img = ReactElement.createFactory('img'); - -/** - * Since onLoad doesn't bubble OR capture on the top level in IE8, we need to - * capture it on the <img> element itself. There are lots of hacks we could do - * to accomplish this, but the most reliable is to make <img> a composite - * component and use `componentDidMount` to attach the event handlers. - */ -var ReactDOMImg = ReactClass.createClass({ - displayName: 'ReactDOMImg', - tagName: 'IMG', - - mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], - - render: function() { - return img(this.props); - }, - - componentDidMount: function() { - this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load'); - this.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error'); - } -}); - -module.exports = ReactDOMImg; - -},{"16":16,"27":27,"32":32,"38":38,"63":63}],53:[function(_dereq_,module,exports){ +},{"11":11,"143":143,"65":65,"71":71,"9":9}],41:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -8743,26 +7480,20 @@ module.exports = ReactDOMImg; 'use strict'; -var AutoFocusMixin = _dereq_(2); -var DOMPropertyOperations = _dereq_(12); -var LinkedValueUtils = _dereq_(26); -var ReactBrowserComponentMixin = _dereq_(32); -var ReactClass = _dereq_(38); -var ReactElement = _dereq_(63); -var ReactMount = _dereq_(77); -var ReactUpdates = _dereq_(100); +var ReactDOMIDOperations = _dereq_(40); +var LinkedValueUtils = _dereq_(22); +var ReactMount = _dereq_(65); +var ReactUpdates = _dereq_(83); -var assign = _dereq_(29); -var invariant = _dereq_(150); - -var input = ReactElement.createFactory('input'); +var assign = _dereq_(23); +var invariant = _dereq_(143); var instancesByReactID = {}; function forceUpdateIfMounted() { - /*jshint validthis:true */ - if (this.isMounted()) { - this.forceUpdate(); + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMInput.updateWrapper(this); } } @@ -8782,129 +7513,114 @@ function forceUpdateIfMounted() { * * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html */ -var ReactDOMInput = ReactClass.createClass({ - displayName: 'ReactDOMInput', - tagName: 'INPUT', - - mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], +var ReactDOMInput = { + getNativeProps: function (inst, props, context) { + var value = LinkedValueUtils.getValue(props); + var checked = LinkedValueUtils.getChecked(props); + + var nativeProps = assign({}, props, { + defaultChecked: undefined, + defaultValue: undefined, + value: value != null ? value : inst._wrapperState.initialValue, + checked: checked != null ? checked : inst._wrapperState.initialChecked, + onChange: inst._wrapperState.onChange + }); - getInitialState: function() { - var defaultValue = this.props.defaultValue; - return { - initialChecked: this.props.defaultChecked || false, - initialValue: defaultValue != null ? defaultValue : null - }; + return nativeProps; }, - render: function() { - // Clone `this.props` so we don't mutate the input. - var props = assign({}, this.props); - - props.defaultChecked = null; - props.defaultValue = null; - - var value = LinkedValueUtils.getValue(this); - props.value = value != null ? value : this.state.initialValue; - - var checked = LinkedValueUtils.getChecked(this); - props.checked = checked != null ? checked : this.state.initialChecked; - - props.onChange = this._handleChange; + mountWrapper: function (inst, props) { + if ("development" !== 'production') { + LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); + } - return input(props, this.props.children); + var defaultValue = props.defaultValue; + inst._wrapperState = { + initialChecked: props.defaultChecked || false, + initialValue: defaultValue != null ? defaultValue : null, + onChange: _handleChange.bind(inst) + }; }, - componentDidMount: function() { - var id = ReactMount.getID(this.getDOMNode()); - instancesByReactID[id] = this; + mountReadyWrapper: function (inst) { + // Can't be in mountWrapper or else server rendering leaks. + instancesByReactID[inst._rootNodeID] = inst; }, - componentWillUnmount: function() { - var rootNode = this.getDOMNode(); - var id = ReactMount.getID(rootNode); - delete instancesByReactID[id]; + unmountWrapper: function (inst) { + delete instancesByReactID[inst._rootNodeID]; }, - componentDidUpdate: function(prevProps, prevState, prevContext) { - var rootNode = this.getDOMNode(); - if (this.props.checked != null) { - DOMPropertyOperations.setValueForProperty( - rootNode, - 'checked', - this.props.checked || false - ); + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + // TODO: Shouldn't this be getChecked(props)? + var checked = props.checked; + if (checked != null) { + ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID, 'checked', checked || false); } - var value = LinkedValueUtils.getValue(this); + var value = LinkedValueUtils.getValue(props); if (value != null) { // Cast `value` to a string to ensure the value is set correctly. While // browsers typically do this as necessary, jsdom doesn't. - DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value); + ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID, 'value', '' + value); } - }, + } +}; - _handleChange: function(event) { - var returnValue; - var onChange = LinkedValueUtils.getOnChange(this); - if (onChange) { - returnValue = onChange.call(this, event); - } - // Here we use asap to wait until all updates have propagated, which - // is important when using controlled components within layers: - // https://github.com/facebook/react/issues/1698 - ReactUpdates.asap(forceUpdateIfMounted, this); +function _handleChange(event) { + var props = this._currentElement.props; - var name = this.props.name; - if (this.props.type === 'radio' && name != null) { - var rootNode = this.getDOMNode(); - var queryRoot = rootNode; + var returnValue = LinkedValueUtils.executeOnChange(props, event); - while (queryRoot.parentNode) { - queryRoot = queryRoot.parentNode; - } + // Here we use asap to wait until all updates have propagated, which + // is important when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + ReactUpdates.asap(forceUpdateIfMounted, this); - // If `rootNode.form` was non-null, then we could try `form.elements`, - // but that sometimes behaves strangely in IE8. We could also try using - // `form.getElementsByName`, but that will only return direct children - // and won't include inputs that use the HTML5 `form=` attribute. Since - // the input might not even be in a form, let's just use the global - // `querySelectorAll` to ensure we don't miss anything. - var group = queryRoot.querySelectorAll( - 'input[name=' + JSON.stringify('' + name) + '][type="radio"]'); - - for (var i = 0, groupLen = group.length; i < groupLen; i++) { - var otherNode = group[i]; - if (otherNode === rootNode || - otherNode.form !== rootNode.form) { - continue; - } - var otherID = ReactMount.getID(otherNode); - ("production" !== "development" ? invariant( - otherID, - 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + - 'same `name` is not supported.' - ) : invariant(otherID)); - var otherInstance = instancesByReactID[otherID]; - ("production" !== "development" ? invariant( - otherInstance, - 'ReactDOMInput: Unknown radio button ID %s.', - otherID - ) : invariant(otherInstance)); - // If this is a controlled radio button group, forcing the input that - // was previously checked to update will cause it to be come re-checked - // as appropriate. - ReactUpdates.asap(forceUpdateIfMounted, otherInstance); - } + var name = props.name; + if (props.type === 'radio' && name != null) { + var rootNode = ReactMount.getNode(this._rootNodeID); + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; } - return returnValue; + // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form, let's just use the global + // `querySelectorAll` to ensure we don't miss anything. + var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React with non-React. + var otherID = ReactMount.getID(otherNode); + !otherID ? "development" !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.') : invariant(false) : undefined; + var otherInstance = instancesByReactID[otherID]; + !otherInstance ? "development" !== 'production' ? invariant(false, 'ReactDOMInput: Unknown radio button ID %s.', otherID) : invariant(false) : undefined; + // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + ReactUpdates.asap(forceUpdateIfMounted, otherInstance); + } } -}); + return returnValue; +} module.exports = ReactDOMInput; - -},{"100":100,"12":12,"150":150,"2":2,"26":26,"29":29,"32":32,"38":38,"63":63,"77":77}],54:[function(_dereq_,module,exports){ +},{"143":143,"22":22,"23":23,"40":40,"65":65,"83":83}],42:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -8918,43 +7634,80 @@ module.exports = ReactDOMInput; 'use strict'; -var ReactBrowserComponentMixin = _dereq_(32); -var ReactClass = _dereq_(38); -var ReactElement = _dereq_(63); +var ReactChildren = _dereq_(28); +var ReactDOMSelect = _dereq_(43); -var warning = _dereq_(171); +var assign = _dereq_(23); +var warning = _dereq_(154); -var option = ReactElement.createFactory('option'); +var valueContextKey = ReactDOMSelect.valueContextKey; /** * Implements an <option> native component that warns when `selected` is set. */ -var ReactDOMOption = ReactClass.createClass({ - displayName: 'ReactDOMOption', - tagName: 'OPTION', - - mixins: [ReactBrowserComponentMixin], - - componentWillMount: function() { +var ReactDOMOption = { + mountWrapper: function (inst, props, context) { // TODO (yungsters): Remove support for `selected` in <option>. - if ("production" !== "development") { - ("production" !== "development" ? warning( - this.props.selected == null, - 'Use the `defaultValue` or `value` props on <select> instead of ' + - 'setting `selected` on <option>.' - ) : null); + if ("development" !== 'production') { + "development" !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : undefined; + } + + // Look up whether this option is 'selected' via context + var selectValue = context[valueContextKey]; + + // If context key is null (e.g., no specified value or after initial mount) + // or missing (e.g., for <datalist>), we don't change props.selected + var selected = null; + if (selectValue != null) { + selected = false; + if (Array.isArray(selectValue)) { + // multiple + for (var i = 0; i < selectValue.length; i++) { + if ('' + selectValue[i] === '' + props.value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === '' + props.value; + } } + + inst._wrapperState = { selected: selected }; }, - render: function() { - return option(this.props, this.props.children); + getNativeProps: function (inst, props, context) { + var nativeProps = assign({ selected: undefined, children: undefined }, props); + + // Read state only from initial mount because <select> updates value + // manually; we need the initial state only for server rendering + if (inst._wrapperState.selected != null) { + nativeProps.selected = inst._wrapperState.selected; + } + + var content = ''; + + // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + ReactChildren.forEach(props.children, function (child) { + if (child == null) { + return; + } + if (typeof child === 'string' || typeof child === 'number') { + content += child; + } else { + "development" !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : undefined; + } + }); + + nativeProps.children = content; + return nativeProps; } -}); +}; module.exports = ReactDOMOption; - -},{"171":171,"32":32,"38":38,"63":63}],55:[function(_dereq_,module,exports){ +},{"154":154,"23":23,"28":28,"43":43}],43:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -8968,68 +7721,77 @@ module.exports = ReactDOMOption; 'use strict'; -var AutoFocusMixin = _dereq_(2); -var LinkedValueUtils = _dereq_(26); -var ReactBrowserComponentMixin = _dereq_(32); -var ReactClass = _dereq_(38); -var ReactElement = _dereq_(63); -var ReactUpdates = _dereq_(100); +var LinkedValueUtils = _dereq_(22); +var ReactMount = _dereq_(65); +var ReactUpdates = _dereq_(83); -var assign = _dereq_(29); +var assign = _dereq_(23); +var warning = _dereq_(154); -var select = ReactElement.createFactory('select'); +var valueContextKey = '__ReactDOMSelect_value$' + Math.random().toString(36).slice(2); function updateOptionsIfPendingUpdateAndMounted() { - /*jshint validthis:true */ - if (this._pendingUpdate) { - this._pendingUpdate = false; - var value = LinkedValueUtils.getValue(this); - if (value != null && this.isMounted()) { - updateOptions(this, value); + if (this._rootNodeID && this._wrapperState.pendingUpdate) { + this._wrapperState.pendingUpdate = false; + + var props = this._currentElement.props; + var value = LinkedValueUtils.getValue(props); + + if (value != null) { + updateOptions(this, props, value); } } } +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +var valuePropNames = ['value', 'defaultValue']; + /** * Validation function for `value` and `defaultValue`. * @private */ -function selectValueType(props, propName, componentName) { - if (props[propName] == null) { - return null; - } - if (props.multiple) { - if (!Array.isArray(props[propName])) { - return new Error( - ("The `" + propName + "` prop supplied to <select> must be an array if ") + - ("`multiple` is true.") - ); +function checkSelectPropTypes(inst, props) { + var owner = inst._currentElement._owner; + LinkedValueUtils.checkPropTypes('select', props, owner); + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + if (props[propName] == null) { + continue; } - } else { - if (Array.isArray(props[propName])) { - return new Error( - ("The `" + propName + "` prop supplied to <select> must be a scalar ") + - ("value if `multiple` is false.") - ); + if (props.multiple) { + "development" !== 'production' ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : undefined; + } else { + "development" !== 'production' ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : undefined; } } } /** - * @param {ReactComponent} component Instance of ReactDOMSelect + * @param {ReactDOMComponent} inst + * @param {boolean} multiple * @param {*} propValue A stringable (with `multiple`, a list of stringables). * @private */ -function updateOptions(component, propValue) { - var selectedValue, i, l; - var options = component.getDOMNode().options; +function updateOptions(inst, multiple, propValue) { + var selectedValue, i; + var options = ReactMount.getNode(inst._rootNodeID).options; - if (component.props.multiple) { + if (multiple) { selectedValue = {}; - for (i = 0, l = propValue.length; i < l; i++) { + for (i = 0; i < propValue.length; i++) { selectedValue['' + propValue[i]] = true; } - for (i = 0, l = options.length; i < l; i++) { + for (i = 0; i < options.length; i++) { var selected = selectedValue.hasOwnProperty(options[i].value); if (options[i].selected !== selected) { options[i].selected = selected; @@ -9039,7 +7801,7 @@ function updateOptions(component, propValue) { // Do not set `select.value` as exact behavior isn't consistent across all // browsers for all cases. selectedValue = '' + propValue; - for (i = 0, l = options.length; i < l; i++) { + for (i = 0; i < options.length; i++) { if (options[i].value === selectedValue) { options[i].selected = true; return; @@ -9066,73 +7828,75 @@ function updateOptions(component, propValue) { * If `defaultValue` is provided, any options with the supplied values will be * selected. */ -var ReactDOMSelect = ReactClass.createClass({ - displayName: 'ReactDOMSelect', - tagName: 'SELECT', - - mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], +var ReactDOMSelect = { + valueContextKey: valueContextKey, - propTypes: { - defaultValue: selectValueType, - value: selectValueType + getNativeProps: function (inst, props, context) { + return assign({}, props, { + onChange: inst._wrapperState.onChange, + value: undefined + }); }, - render: function() { - // Clone `this.props` so we don't mutate the input. - var props = assign({}, this.props); - - props.onChange = this._handleChange; - props.value = null; + mountWrapper: function (inst, props) { + if ("development" !== 'production') { + checkSelectPropTypes(inst, props); + } - return select(props, this.props.children); + var value = LinkedValueUtils.getValue(props); + inst._wrapperState = { + pendingUpdate: false, + initialValue: value != null ? value : props.defaultValue, + onChange: _handleChange.bind(inst), + wasMultiple: Boolean(props.multiple) + }; }, - componentWillMount: function() { - this._pendingUpdate = false; + processChildContext: function (inst, props, context) { + // Pass down initial value so initial generated markup has correct + // `selected` attributes + var childContext = assign({}, context); + childContext[valueContextKey] = inst._wrapperState.initialValue; + return childContext; }, - componentDidMount: function() { - var value = LinkedValueUtils.getValue(this); - if (value != null) { - updateOptions(this, value); - } else if (this.props.defaultValue != null) { - updateOptions(this, this.props.defaultValue); - } - }, + postUpdateWrapper: function (inst) { + var props = inst._currentElement.props; + + // After the initial mount, we control selected-ness manually so don't pass + // the context value down + inst._wrapperState.initialValue = undefined; - componentDidUpdate: function(prevProps) { - var value = LinkedValueUtils.getValue(this); + var wasMultiple = inst._wrapperState.wasMultiple; + inst._wrapperState.wasMultiple = Boolean(props.multiple); + + var value = LinkedValueUtils.getValue(props); if (value != null) { - this._pendingUpdate = false; - updateOptions(this, value); - } else if (!prevProps.multiple !== !this.props.multiple) { + inst._wrapperState.pendingUpdate = false; + updateOptions(inst, Boolean(props.multiple), value); + } else if (wasMultiple !== Boolean(props.multiple)) { // For simplicity, reapply `defaultValue` if `multiple` is toggled. - if (this.props.defaultValue != null) { - updateOptions(this, this.props.defaultValue); + if (props.defaultValue != null) { + updateOptions(inst, Boolean(props.multiple), props.defaultValue); } else { // Revert the select back to its default unselected state. - updateOptions(this, this.props.multiple ? [] : ''); + updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : ''); } } - }, - - _handleChange: function(event) { - var returnValue; - var onChange = LinkedValueUtils.getOnChange(this); - if (onChange) { - returnValue = onChange.call(this, event); - } - - this._pendingUpdate = true; - ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); - return returnValue; } +}; -}); +function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); -module.exports = ReactDOMSelect; + this._wrapperState.pendingUpdate = true; + ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); + return returnValue; +} -},{"100":100,"2":2,"26":26,"29":29,"32":32,"38":38,"63":63}],56:[function(_dereq_,module,exports){ +module.exports = ReactDOMSelect; +},{"154":154,"22":22,"23":23,"65":65,"83":83}],44:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -9146,10 +7910,10 @@ module.exports = ReactDOMSelect; 'use strict'; -var ExecutionEnvironment = _dereq_(22); +var ExecutionEnvironment = _dereq_(129); -var getNodeForCharacterOffset = _dereq_(143); -var getTextContentAccessor = _dereq_(145); +var getNodeForCharacterOffset = _dereq_(115); +var getTextContentAccessor = _dereq_(116); /** * While `isCollapsed` is available on the Selection object and `collapsed` @@ -9211,15 +7975,26 @@ function getModernOffsets(node) { var currentRange = selection.getRangeAt(0); + // In Firefox, range.startContainer and range.endContainer can be "anonymous + // divs", e.g. the up/down buttons on an <input type="number">. Anonymous + // divs do not seem to expose properties, triggering a "Permission denied + // error" if any of its properties are accessed. The only seemingly possible + // way to avoid erroring is to access a property that typically works for + // non-anonymous divs and catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + try { + /* eslint-disable no-unused-expressions */ + currentRange.startContainer.nodeType; + currentRange.endContainer.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + // If the node and offset values are the same, the selection is collapsed. // `Selection.isCollapsed` is available natively, but IE sometimes gets // this value wrong. - var isSelectionCollapsed = isCollapsed( - selection.anchorNode, - selection.anchorOffset, - selection.focusNode, - selection.focusOffset - ); + var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset); var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; @@ -9227,12 +8002,7 @@ function getModernOffsets(node) { tempRange.selectNodeContents(node); tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); - var isTempRangeCollapsed = isCollapsed( - tempRange.startContainer, - tempRange.startOffset, - tempRange.endContainer, - tempRange.endOffset - ); + var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset); var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; var end = start + rangeLength; @@ -9295,8 +8065,7 @@ function setModernOffsets(node, offsets) { var selection = window.getSelection(); var length = node[getTextContentAccessor()].length; var start = Math.min(offsets.start, length); - var end = typeof offsets.end === 'undefined' ? - start : Math.min(offsets.end, length); + var end = typeof offsets.end === 'undefined' ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method. // Flip backward selections, so we can set with a single range. @@ -9324,11 +8093,7 @@ function setModernOffsets(node, offsets) { } } -var useIEOffsets = ( - ExecutionEnvironment.canUseDOM && - 'selection' in document && - !('getSelection' in window) -); +var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); var ReactDOMSelection = { /** @@ -9344,8 +8109,34 @@ var ReactDOMSelection = { }; module.exports = ReactDOMSelection; +},{"115":115,"116":116,"129":129}],45:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMServer + */ + +'use strict'; -},{"143":143,"145":145,"22":22}],57:[function(_dereq_,module,exports){ +var ReactDefaultInjection = _dereq_(49); +var ReactServerRendering = _dereq_(80); +var ReactVersion = _dereq_(84); + +ReactDefaultInjection.inject(); + +var ReactDOMServer = { + renderToString: ReactServerRendering.renderToString, + renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup, + version: ReactVersion +}; + +module.exports = ReactDOMServer; +},{"49":49,"80":80,"84":84}],46:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -9360,13 +8151,15 @@ module.exports = ReactDOMSelection; 'use strict'; -var DOMPropertyOperations = _dereq_(12); -var ReactComponentBrowserEnvironment = - _dereq_(40); -var ReactDOMComponent = _dereq_(48); +var DOMChildrenOperations = _dereq_(9); +var DOMPropertyOperations = _dereq_(11); +var ReactComponentBrowserEnvironment = _dereq_(31); +var ReactMount = _dereq_(65); -var assign = _dereq_(29); -var escapeTextContentForBrowser = _dereq_(131); +var assign = _dereq_(23); +var escapeTextContentForBrowser = _dereq_(106); +var setTextContent = _dereq_(124); +var validateDOMNesting = _dereq_(127); /** * Text nodes violate a couple assumptions that React makes about components: @@ -9383,7 +8176,7 @@ var escapeTextContentForBrowser = _dereq_(131); * @extends ReactComponent * @internal */ -var ReactDOMTextComponent = function(props) { +var ReactDOMTextComponent = function (props) { // This constructor and its argument is currently used by mocks. }; @@ -9393,7 +8186,7 @@ assign(ReactDOMTextComponent.prototype, { * @param {ReactText} text * @internal */ - construct: function(text) { + construct: function (text) { // TODO: This is really a ReactText (ReactNode), not a ReactElement this._currentElement = text; this._stringText = '' + text; @@ -9412,22 +8205,34 @@ assign(ReactDOMTextComponent.prototype, { * @return {string} Markup for this text node. * @internal */ - mountComponent: function(rootID, transaction, context) { + mountComponent: function (rootID, transaction, context) { + if ("development" !== 'production') { + if (context[validateDOMNesting.ancestorInfoContextKey]) { + validateDOMNesting('span', null, context[validateDOMNesting.ancestorInfoContextKey]); + } + } + this._rootNodeID = rootID; - var escapedText = escapeTextContentForBrowser(this._stringText); + if (transaction.useCreateElement) { + var ownerDocument = context[ReactMount.ownerDocumentContextKey]; + var el = ownerDocument.createElement('span'); + DOMPropertyOperations.setAttributeForID(el, rootID); + // Populate node cache + ReactMount.getID(el); + setTextContent(el, this._stringText); + return el; + } else { + var escapedText = escapeTextContentForBrowser(this._stringText); - if (transaction.renderToStaticMarkup) { - // Normally we'd wrap this in a `span` for the reasons stated above, but - // since this is a situation where React won't take over (static pages), - // we can simply return the text as it is. - return escapedText; - } + if (transaction.renderToStaticMarkup) { + // Normally we'd wrap this in a `span` for the reasons stated above, but + // since this is a situation where React won't take over (static pages), + // we can simply return the text as it is. + return escapedText; + } - return ( - '<span ' + DOMPropertyOperations.createMarkupForID(rootID) + '>' + - escapedText + - '</span>' - ); + return '<span ' + DOMPropertyOperations.createMarkupForID(rootID) + '>' + escapedText + '</span>'; + } }, /** @@ -9437,7 +8242,7 @@ assign(ReactDOMTextComponent.prototype, { * @param {ReactReconcileTransaction} transaction * @internal */ - receiveComponent: function(nextText, transaction) { + receiveComponent: function (nextText, transaction) { if (nextText !== this._currentElement) { this._currentElement = nextText; var nextStringText = '' + nextText; @@ -9446,23 +8251,20 @@ assign(ReactDOMTextComponent.prototype, { // and/or updateComponent to do the actual update for consistency with // other component types? this._stringText = nextStringText; - ReactDOMComponent.BackendIDOperations.updateTextContentByID( - this._rootNodeID, - nextStringText - ); + var node = ReactMount.getNode(this._rootNodeID); + DOMChildrenOperations.updateTextContent(node, nextStringText); } } }, - unmountComponent: function() { + unmountComponent: function () { ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); } }); module.exports = ReactDOMTextComponent; - -},{"12":12,"131":131,"29":29,"40":40,"48":48}],58:[function(_dereq_,module,exports){ +},{"106":106,"11":11,"124":124,"127":127,"23":23,"31":31,"65":65,"9":9}],47:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -9476,25 +8278,18 @@ module.exports = ReactDOMTextComponent; 'use strict'; -var AutoFocusMixin = _dereq_(2); -var DOMPropertyOperations = _dereq_(12); -var LinkedValueUtils = _dereq_(26); -var ReactBrowserComponentMixin = _dereq_(32); -var ReactClass = _dereq_(38); -var ReactElement = _dereq_(63); -var ReactUpdates = _dereq_(100); - -var assign = _dereq_(29); -var invariant = _dereq_(150); - -var warning = _dereq_(171); +var LinkedValueUtils = _dereq_(22); +var ReactDOMIDOperations = _dereq_(40); +var ReactUpdates = _dereq_(83); -var textarea = ReactElement.createFactory('textarea'); +var assign = _dereq_(23); +var invariant = _dereq_(143); +var warning = _dereq_(154); function forceUpdateIfMounted() { - /*jshint validthis:true */ - if (this.isMounted()) { - this.forceUpdate(); + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMTextarea.updateWrapper(this); } } @@ -9513,33 +8308,37 @@ function forceUpdateIfMounted() { * The rendered element will be initialized with an empty value, the prop * `defaultValue` if specified, or the children content (deprecated). */ -var ReactDOMTextarea = ReactClass.createClass({ - displayName: 'ReactDOMTextarea', - tagName: 'TEXTAREA', +var ReactDOMTextarea = { + getNativeProps: function (inst, props, context) { + !(props.dangerouslySetInnerHTML == null) ? "development" !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : invariant(false) : undefined; - mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], + // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. + var nativeProps = assign({}, props, { + defaultValue: undefined, + value: undefined, + children: inst._wrapperState.initialValue, + onChange: inst._wrapperState.onChange + }); - getInitialState: function() { - var defaultValue = this.props.defaultValue; + return nativeProps; + }, + + mountWrapper: function (inst, props) { + if ("development" !== 'production') { + LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); + } + + var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>. - var children = this.props.children; + var children = props.children; if (children != null) { - if ("production" !== "development") { - ("production" !== "development" ? warning( - false, - 'Use the `defaultValue` or `value` props instead of setting ' + - 'children on <textarea>.' - ) : null); + if ("development" !== 'production') { + "development" !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : undefined; } - ("production" !== "development" ? invariant( - defaultValue == null, - 'If you supply `defaultValue` on a <textarea>, do not pass children.' - ) : invariant(defaultValue == null)); + !(defaultValue == null) ? "development" !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : invariant(false) : undefined; if (Array.isArray(children)) { - ("production" !== "development" ? invariant( - children.length <= 1, - '<textarea> can only have at most one child.' - ) : invariant(children.length <= 1)); + !(children.length <= 1) ? "development" !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : invariant(false) : undefined; children = children[0]; } @@ -9548,59 +8347,38 @@ var ReactDOMTextarea = ReactClass.createClass({ if (defaultValue == null) { defaultValue = ''; } - var value = LinkedValueUtils.getValue(this); - return { + var value = LinkedValueUtils.getValue(props); + + inst._wrapperState = { // We save the initial value so that `ReactDOMComponent` doesn't update // `textContent` (unnecessary since we update value). // The initial value can be a boolean or object so that's why it's // forced to be a string. - initialValue: '' + (value != null ? value : defaultValue) + initialValue: '' + (value != null ? value : defaultValue), + onChange: _handleChange.bind(inst) }; }, - render: function() { - // Clone `this.props` so we don't mutate the input. - var props = assign({}, this.props); - - ("production" !== "development" ? invariant( - props.dangerouslySetInnerHTML == null, - '`dangerouslySetInnerHTML` does not make sense on <textarea>.' - ) : invariant(props.dangerouslySetInnerHTML == null)); - - props.defaultValue = null; - props.value = null; - props.onChange = this._handleChange; - - // Always set children to the same thing. In IE9, the selection range will - // get reset if `textContent` is mutated. - return textarea(props, this.state.initialValue); - }, - - componentDidUpdate: function(prevProps, prevState, prevContext) { - var value = LinkedValueUtils.getValue(this); + updateWrapper: function (inst) { + var props = inst._currentElement.props; + var value = LinkedValueUtils.getValue(props); if (value != null) { - var rootNode = this.getDOMNode(); // Cast `value` to a string to ensure the value is set correctly. While // browsers typically do this as necessary, jsdom doesn't. - DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value); - } - }, - - _handleChange: function(event) { - var returnValue; - var onChange = LinkedValueUtils.getOnChange(this); - if (onChange) { - returnValue = onChange.call(this, event); + ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID, 'value', '' + value); } - ReactUpdates.asap(forceUpdateIfMounted, this); - return returnValue; } +}; -}); +function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + ReactUpdates.asap(forceUpdateIfMounted, this); + return returnValue; +} module.exports = ReactDOMTextarea; - -},{"100":100,"12":12,"150":150,"171":171,"2":2,"26":26,"29":29,"32":32,"38":38,"63":63}],59:[function(_dereq_,module,exports){ +},{"143":143,"154":154,"22":22,"23":23,"40":40,"83":83}],48:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -9614,15 +8392,15 @@ module.exports = ReactDOMTextarea; 'use strict'; -var ReactUpdates = _dereq_(100); -var Transaction = _dereq_(116); +var ReactUpdates = _dereq_(83); +var Transaction = _dereq_(100); -var assign = _dereq_(29); -var emptyFunction = _dereq_(129); +var assign = _dereq_(23); +var emptyFunction = _dereq_(135); var RESET_BATCHED_UPDATES = { initialize: emptyFunction, - close: function() { + close: function () { ReactDefaultBatchingStrategy.isBatchingUpdates = false; } }; @@ -9638,15 +8416,11 @@ function ReactDefaultBatchingStrategyTransaction() { this.reinitializeTransaction(); } -assign( - ReactDefaultBatchingStrategyTransaction.prototype, - Transaction.Mixin, - { - getTransactionWrappers: function() { - return TRANSACTION_WRAPPERS; - } +assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction.Mixin, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; } -); +}); var transaction = new ReactDefaultBatchingStrategyTransaction(); @@ -9657,23 +8431,22 @@ var ReactDefaultBatchingStrategy = { * Call the provided function in a context within which calls to `setState` * and friends are batched such that components aren't updated unnecessarily. */ - batchedUpdates: function(callback, a, b, c, d) { + batchedUpdates: function (callback, a, b, c, d, e) { var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; ReactDefaultBatchingStrategy.isBatchingUpdates = true; // The code is written this way to avoid extra allocations if (alreadyBatchingUpdates) { - callback(a, b, c, d); + callback(a, b, c, d, e); } else { - transaction.perform(callback, null, a, b, c, d); + transaction.perform(callback, null, a, b, c, d, e); } } }; module.exports = ReactDefaultBatchingStrategy; - -},{"100":100,"116":116,"129":129,"29":29}],60:[function(_dereq_,module,exports){ +},{"100":100,"135":135,"23":23,"83":83}],49:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -9688,62 +8461,39 @@ module.exports = ReactDefaultBatchingStrategy; 'use strict'; var BeforeInputEventPlugin = _dereq_(3); -var ChangeEventPlugin = _dereq_(8); -var ClientReactRootIndex = _dereq_(9); -var DefaultEventPluginOrder = _dereq_(14); -var EnterLeaveEventPlugin = _dereq_(15); -var ExecutionEnvironment = _dereq_(22); -var HTMLDOMPropertyConfig = _dereq_(24); -var MobileSafariClickEventPlugin = _dereq_(28); -var ReactBrowserComponentMixin = _dereq_(32); -var ReactClass = _dereq_(38); -var ReactComponentBrowserEnvironment = - _dereq_(40); -var ReactDefaultBatchingStrategy = _dereq_(59); -var ReactDOMComponent = _dereq_(48); -var ReactDOMButton = _dereq_(47); -var ReactDOMForm = _dereq_(49); -var ReactDOMImg = _dereq_(52); -var ReactDOMIDOperations = _dereq_(50); -var ReactDOMIframe = _dereq_(51); -var ReactDOMInput = _dereq_(53); -var ReactDOMOption = _dereq_(54); -var ReactDOMSelect = _dereq_(55); -var ReactDOMTextarea = _dereq_(58); -var ReactDOMTextComponent = _dereq_(57); -var ReactElement = _dereq_(63); -var ReactEventListener = _dereq_(68); -var ReactInjection = _dereq_(70); -var ReactInstanceHandles = _dereq_(72); -var ReactMount = _dereq_(77); -var ReactReconcileTransaction = _dereq_(88); -var SelectEventPlugin = _dereq_(102); -var ServerReactRootIndex = _dereq_(103); -var SimpleEventPlugin = _dereq_(104); -var SVGDOMPropertyConfig = _dereq_(101); - -var createFullPageComponent = _dereq_(125); - -function autoGenerateWrapperClass(type) { - return ReactClass.createClass({ - tagName: type.toUpperCase(), - render: function() { - return new ReactElement( - type, - null, - null, - null, - null, - this.props - ); - } - }); -} +var ChangeEventPlugin = _dereq_(7); +var ClientReactRootIndex = _dereq_(8); +var DefaultEventPluginOrder = _dereq_(13); +var EnterLeaveEventPlugin = _dereq_(14); +var ExecutionEnvironment = _dereq_(129); +var HTMLDOMPropertyConfig = _dereq_(21); +var ReactBrowserComponentMixin = _dereq_(25); +var ReactComponentBrowserEnvironment = _dereq_(31); +var ReactDefaultBatchingStrategy = _dereq_(48); +var ReactDOMComponent = _dereq_(37); +var ReactDOMTextComponent = _dereq_(46); +var ReactEventListener = _dereq_(58); +var ReactInjection = _dereq_(59); +var ReactInstanceHandles = _dereq_(61); +var ReactMount = _dereq_(65); +var ReactReconcileTransaction = _dereq_(75); +var SelectEventPlugin = _dereq_(86); +var ServerReactRootIndex = _dereq_(87); +var SimpleEventPlugin = _dereq_(88); +var SVGDOMPropertyConfig = _dereq_(85); + +var alreadyInjected = false; function inject() { - ReactInjection.EventEmitter.injectReactEventListener( - ReactEventListener - ); + if (alreadyInjected) { + // TODO: This is currently true because these injections are shared between + // the client and the server package. They should be built independently + // and not share any injection state. Then this problem will be solved. + return; + } + alreadyInjected = true; + + ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); /** * Inject modules for resolving DOM hierarchy and plugin ordering. @@ -9760,67 +8510,32 @@ function inject() { SimpleEventPlugin: SimpleEventPlugin, EnterLeaveEventPlugin: EnterLeaveEventPlugin, ChangeEventPlugin: ChangeEventPlugin, - MobileSafariClickEventPlugin: MobileSafariClickEventPlugin, SelectEventPlugin: SelectEventPlugin, BeforeInputEventPlugin: BeforeInputEventPlugin }); - ReactInjection.NativeComponent.injectGenericComponentClass( - ReactDOMComponent - ); + ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent); - ReactInjection.NativeComponent.injectTextComponentClass( - ReactDOMTextComponent - ); - - ReactInjection.NativeComponent.injectAutoWrapper( - autoGenerateWrapperClass - ); + ReactInjection.NativeComponent.injectTextComponentClass(ReactDOMTextComponent); - // This needs to happen before createFullPageComponent() otherwise the mixin - // won't be included. ReactInjection.Class.injectMixin(ReactBrowserComponentMixin); - ReactInjection.NativeComponent.injectComponentClasses({ - 'button': ReactDOMButton, - 'form': ReactDOMForm, - 'iframe': ReactDOMIframe, - 'img': ReactDOMImg, - 'input': ReactDOMInput, - 'option': ReactDOMOption, - 'select': ReactDOMSelect, - 'textarea': ReactDOMTextarea, - - 'html': createFullPageComponent('html'), - 'head': createFullPageComponent('head'), - 'body': createFullPageComponent('body') - }); - ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); ReactInjection.EmptyComponent.injectEmptyComponent('noscript'); - ReactInjection.Updates.injectReconcileTransaction( - ReactReconcileTransaction - ); - ReactInjection.Updates.injectBatchingStrategy( - ReactDefaultBatchingStrategy - ); + ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); + ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); - ReactInjection.RootIndex.injectCreateReactRootIndex( - ExecutionEnvironment.canUseDOM ? - ClientReactRootIndex.createReactRootIndex : - ServerReactRootIndex.createReactRootIndex - ); + ReactInjection.RootIndex.injectCreateReactRootIndex(ExecutionEnvironment.canUseDOM ? ClientReactRootIndex.createReactRootIndex : ServerReactRootIndex.createReactRootIndex); ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); - ReactInjection.DOMComponent.injectIDOperations(ReactDOMIDOperations); - if ("production" !== "development") { - var url = (ExecutionEnvironment.canUseDOM && window.location.href) || ''; - if ((/[?&]react_perf\b/).test(url)) { - var ReactDefaultPerf = _dereq_(61); + if ("development" !== 'production') { + var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; + if (/[?&]react_perf\b/.test(url)) { + var ReactDefaultPerf = _dereq_(50); ReactDefaultPerf.start(); } } @@ -9829,8 +8544,7 @@ function inject() { module.exports = { inject: inject }; - -},{"101":101,"102":102,"103":103,"104":104,"125":125,"14":14,"15":15,"22":22,"24":24,"28":28,"3":3,"32":32,"38":38,"40":40,"47":47,"48":48,"49":49,"50":50,"51":51,"52":52,"53":53,"54":54,"55":55,"57":57,"58":58,"59":59,"61":61,"63":63,"68":68,"70":70,"72":72,"77":77,"8":8,"88":88,"9":9}],61:[function(_dereq_,module,exports){ +},{"129":129,"13":13,"14":14,"21":21,"25":25,"3":3,"31":31,"37":37,"46":46,"48":48,"50":50,"58":58,"59":59,"61":61,"65":65,"7":7,"75":75,"8":8,"85":85,"86":86,"87":87,"88":88}],50:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -9845,12 +8559,12 @@ module.exports = { 'use strict'; -var DOMProperty = _dereq_(11); -var ReactDefaultPerfAnalysis = _dereq_(62); -var ReactMount = _dereq_(77); -var ReactPerf = _dereq_(82); +var DOMProperty = _dereq_(10); +var ReactDefaultPerfAnalysis = _dereq_(51); +var ReactMount = _dereq_(65); +var ReactPerf = _dereq_(71); -var performanceNow = _dereq_(162); +var performanceNow = _dereq_(151); function roundFloat(val) { return Math.floor(val * 100) / 100; @@ -9865,7 +8579,7 @@ var ReactDefaultPerf = { _mountStack: [0], _injected: false, - start: function() { + start: function () { if (!ReactDefaultPerf._injected) { ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure); } @@ -9874,18 +8588,18 @@ var ReactDefaultPerf = { ReactPerf.enableMeasure = true; }, - stop: function() { + stop: function () { ReactPerf.enableMeasure = false; }, - getLastMeasurements: function() { + getLastMeasurements: function () { return ReactDefaultPerf._allMeasurements; }, - printExclusive: function(measurements) { + printExclusive: function (measurements) { measurements = measurements || ReactDefaultPerf._allMeasurements; var summary = ReactDefaultPerfAnalysis.getExclusiveSummary(measurements); - console.table(summary.map(function(item) { + console.table(summary.map(function (item) { return { 'Component class name': item.componentName, 'Total inclusive time (ms)': roundFloat(item.inclusive), @@ -9900,28 +8614,22 @@ var ReactDefaultPerf = { // number. }, - printInclusive: function(measurements) { + printInclusive: function (measurements) { measurements = measurements || ReactDefaultPerf._allMeasurements; var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements); - console.table(summary.map(function(item) { + console.table(summary.map(function (item) { return { 'Owner > component': item.componentName, 'Inclusive time (ms)': roundFloat(item.time), 'Instances': item.count }; })); - console.log( - 'Total time:', - ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms' - ); - }, - - getMeasurementsSummaryMap: function(measurements) { - var summary = ReactDefaultPerfAnalysis.getInclusiveSummary( - measurements, - true - ); - return summary.map(function(item) { + console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms'); + }, + + getMeasurementsSummaryMap: function (measurements) { + var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements, true); + return summary.map(function (item) { return { 'Owner > component': item.componentName, 'Wasted time (ms)': item.time, @@ -9930,37 +8638,28 @@ var ReactDefaultPerf = { }); }, - printWasted: function(measurements) { + printWasted: function (measurements) { measurements = measurements || ReactDefaultPerf._allMeasurements; console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements)); - console.log( - 'Total time:', - ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms' - ); + console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms'); }, - printDOM: function(measurements) { + printDOM: function (measurements) { measurements = measurements || ReactDefaultPerf._allMeasurements; var summary = ReactDefaultPerfAnalysis.getDOMSummary(measurements); - console.table(summary.map(function(item) { + console.table(summary.map(function (item) { var result = {}; result[DOMProperty.ID_ATTRIBUTE_NAME] = item.id; - result['type'] = item.type; - result['args'] = JSON.stringify(item.args); + result.type = item.type; + result.args = JSON.stringify(item.args); return result; })); - console.log( - 'Total time:', - ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms' - ); + console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms'); }, - _recordWrite: function(id, fnName, totalTime, args) { + _recordWrite: function (id, fnName, totalTime, args) { // TODO: totalTime isn't that useful since it doesn't count paints/reflows - var writes = - ReactDefaultPerf - ._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1] - .writes; + var writes = ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1].writes; writes[id] = writes[id] || []; writes[id].push({ type: fnName, @@ -9969,14 +8668,17 @@ var ReactDefaultPerf = { }); }, - measure: function(moduleName, fnName, func) { - return function() {for (var args=[],$__0=0,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); + measure: function (moduleName, fnName, func) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var totalTime; var rv; var start; - if (fnName === '_renderNewRootComponent' || - fnName === 'flushBatchedUpdates') { + if (fnName === '_renderNewRootComponent' || fnName === 'flushBatchedUpdates') { // A "measurement" is a set of metrics recorded for each flush. We want // to group the metrics for a given flush together so we can look at the // components that rendered and the DOM operations that actually @@ -9988,16 +8690,14 @@ var ReactDefaultPerf = { counts: {}, writes: {}, displayNames: {}, - totalTime: 0 + totalTime: 0, + created: {} }); start = performanceNow(); rv = func.apply(this, args); - ReactDefaultPerf._allMeasurements[ - ReactDefaultPerf._allMeasurements.length - 1 - ].totalTime = performanceNow() - start; + ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1].totalTime = performanceNow() - start; return rv; - } else if (fnName === '_mountImageIntoNode' || - moduleName === 'ReactDOMIDOperations') { + } else if (fnName === '_mountImageIntoNode' || moduleName === 'ReactBrowserEventEmitter' || moduleName === 'ReactDOMIDOperations' || moduleName === 'CSSPropertyOperations' || moduleName === 'DOMChildrenOperations' || moduleName === 'DOMPropertyOperations') { start = performanceNow(); rv = func.apply(this, args); totalTime = performanceNow() - start; @@ -10007,7 +8707,7 @@ var ReactDefaultPerf = { ReactDefaultPerf._recordWrite(mountID, fnName, totalTime, args[0]); } else if (fnName === 'dangerouslyProcessChildrenUpdates') { // special format - args[0].forEach(function(update) { + args[0].forEach(function (update) { var writeArgs = {}; if (update.fromIndex !== null) { writeArgs.fromIndex = update.fromIndex; @@ -10021,46 +8721,35 @@ var ReactDefaultPerf = { if (update.markupIndex !== null) { writeArgs.markup = args[1][update.markupIndex]; } - ReactDefaultPerf._recordWrite( - update.parentID, - update.type, - totalTime, - writeArgs - ); + ReactDefaultPerf._recordWrite(update.parentID, update.type, totalTime, writeArgs); }); } else { // basic format - ReactDefaultPerf._recordWrite( - args[0], - fnName, - totalTime, - Array.prototype.slice.call(args, 1) - ); + var id = args[0]; + if (typeof id === 'object') { + id = ReactMount.getID(args[0]); + } + ReactDefaultPerf._recordWrite(id, fnName, totalTime, Array.prototype.slice.call(args, 1)); } return rv; - } else if (moduleName === 'ReactCompositeComponent' && ( - (// TODO: receiveComponent()? - (fnName === 'mountComponent' || - fnName === 'updateComponent' || fnName === '_renderValidatedComponent')))) { + } else if (moduleName === 'ReactCompositeComponent' && (fnName === 'mountComponent' || fnName === 'updateComponent' || // TODO: receiveComponent()? + fnName === '_renderValidatedComponent')) { - if (typeof this._currentElement.type === 'string') { + if (this._currentElement.type === ReactMount.TopLevelWrapper) { return func.apply(this, args); } - var rootNodeID = fnName === 'mountComponent' ? - args[0] : - this._rootNodeID; + var rootNodeID = fnName === 'mountComponent' ? args[0] : this._rootNodeID; var isRender = fnName === '_renderValidatedComponent'; var isMount = fnName === 'mountComponent'; var mountStack = ReactDefaultPerf._mountStack; - var entry = ReactDefaultPerf._allMeasurements[ - ReactDefaultPerf._allMeasurements.length - 1 - ]; + var entry = ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1]; if (isRender) { addValue(entry.counts, rootNodeID, 1); } else if (isMount) { + entry.created[rootNodeID] = true; mountStack.push(0); } @@ -10081,9 +8770,7 @@ var ReactDefaultPerf = { entry.displayNames[rootNodeID] = { current: this.getName(), - owner: this._currentElement._owner ? - this._currentElement._owner.getName() : - '<root>' + owner: this._currentElement._owner ? this._currentElement._owner.getName() : '<root>' }; return rv; @@ -10095,8 +8782,7 @@ var ReactDefaultPerf = { }; module.exports = ReactDefaultPerf; - -},{"11":11,"162":162,"62":62,"77":77,"82":82}],62:[function(_dereq_,module,exports){ +},{"10":10,"151":151,"51":51,"65":65,"71":71}],51:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -10108,7 +8794,9 @@ module.exports = ReactDefaultPerf; * @providesModule ReactDefaultPerfAnalysis */ -var assign = _dereq_(29); +'use strict'; + +var assign = _dereq_(23); // Don't try to save users less than 1.2ms (a number I made up) var DONT_CARE_THRESHOLD = 1.2; @@ -10117,11 +8805,11 @@ var DOM_OPERATION_TYPES = { INSERT_MARKUP: 'set innerHTML', MOVE_EXISTING: 'move', REMOVE_NODE: 'remove', + SET_MARKUP: 'set innerHTML', TEXT_CONTENT: 'set textContent', - 'updatePropertyByID': 'update attribute', - 'deletePropertyByID': 'delete attribute', - 'updateStylesByID': 'update styles', - 'updateInnerHTMLByID': 'set innerHTML', + 'setValueForProperty': 'update attribute', + 'setValueForAttribute': 'update attribute', + 'deleteValueForProperty': 'remove attribute', 'dangerouslyReplaceNodeWithMarkupByID': 'replace' }; @@ -10140,20 +8828,17 @@ function getTotalTime(measurements) { function getDOMSummary(measurements) { var items = []; - for (var i = 0; i < measurements.length; i++) { - var measurement = measurements[i]; - var id; - - for (id in measurement.writes) { - measurement.writes[id].forEach(function(write) { + measurements.forEach(function (measurement) { + Object.keys(measurement.writes).forEach(function (id) { + measurement.writes[id].forEach(function (write) { items.push({ id: id, type: DOM_OPERATION_TYPES[write.type] || write.type, args: write.args }); }); - } - } + }); + }); return items; } @@ -10163,11 +8848,7 @@ function getExclusiveSummary(measurements) { for (var i = 0; i < measurements.length; i++) { var measurement = measurements[i]; - var allIDs = assign( - {}, - measurement.exclusive, - measurement.inclusive - ); + var allIDs = assign({}, measurement.exclusive, measurement.inclusive); for (var id in allIDs) { displayName = measurement.displayNames[id].current; @@ -10202,7 +8883,7 @@ function getExclusiveSummary(measurements) { } } - arr.sort(function(a, b) { + arr.sort(function (a, b) { return b.exclusive - a.exclusive; }); @@ -10215,11 +8896,7 @@ function getInclusiveSummary(measurements, onlyClean) { for (var i = 0; i < measurements.length; i++) { var measurement = measurements[i]; - var allIDs = assign( - {}, - measurement.exclusive, - measurement.inclusive - ); + var allIDs = assign({}, measurement.exclusive, measurement.inclusive); var cleanComponents; if (onlyClean) { @@ -10261,7 +8938,7 @@ function getInclusiveSummary(measurements, onlyClean) { } } - arr.sort(function(a, b) { + arr.sort(function (a, b) { return b.time - a.time; }); @@ -10286,6 +8963,10 @@ function getUnchangedComponents(measurement) { break; } } + // check if component newly created + if (measurement.created[id]) { + isDirty = true; + } if (!isDirty && measurement.counts[id] > 0) { cleanComponents[id] = true; } @@ -10301,8 +8982,7 @@ var ReactDefaultPerfAnalysis = { }; module.exports = ReactDefaultPerfAnalysis; - -},{"29":29}],63:[function(_dereq_,module,exports){ +},{"23":23}],52:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -10316,70 +8996,26 @@ module.exports = ReactDefaultPerfAnalysis; 'use strict'; -var ReactContext = _dereq_(44); -var ReactCurrentOwner = _dereq_(45); +var ReactCurrentOwner = _dereq_(34); + +var assign = _dereq_(23); -var assign = _dereq_(29); -var warning = _dereq_(171); +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; var RESERVED_PROPS = { key: true, - ref: true + ref: true, + __self: true, + __source: true }; -/** - * Warn for mutations. - * - * @internal - * @param {object} object - * @param {string} key - */ -function defineWarningProperty(object, key) { - Object.defineProperty(object, key, { - - configurable: false, - enumerable: true, - - get: function() { - if (!this._store) { - return null; - } - return this._store[key]; - }, - - set: function(value) { - ("production" !== "development" ? warning( - false, - 'Don\'t set the %s property of the React element. Instead, ' + - 'specify the correct value when initially creating the element.', - key - ) : null); - this._store[key] = value; - } - - }); -} - -/** - * This is updated to true if the membrane is successfully created. - */ -var useMutationMembrane = false; - -/** - * Warn for mutations. - * - * @internal - * @param {object} element - */ -function defineMutationMembrane(prototype) { +var canDefineProperty = false; +if ("development" !== 'production') { try { - var pseudoFrozenProperties = { - props: true - }; - for (var key in pseudoFrozenProperties) { - defineWarningProperty(prototype, key); - } - useMutationMembrane = true; + Object.defineProperty({}, 'x', {}); + canDefineProperty = true; } catch (x) { // IE will fail on defineProperty } @@ -10390,68 +9026,80 @@ function defineMutationMembrane(prototype) { * work with a dynamic instanceof check. Nothing should live on this prototype. * * @param {*} type - * @param {string|object} ref * @param {*} key + * @param {string|object} ref + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @param {*} owner * @param {*} props * @internal */ -var ReactElement = function(type, key, ref, owner, context, props) { - // Built-in properties that belong on the element - this.type = type; - this.key = key; - this.ref = ref; +var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allow us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, - // Record the component responsible for creating this element. - this._owner = owner; + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, - // TODO: Deprecate withContext, and then the context becomes accessible - // through the owner. - this._context = context; + // Record the component responsible for creating this element. + _owner: owner + }; - if ("production" !== "development") { - // The validation flag and props are currently mutative. We put them on + if ("development" !== 'production') { + // The validation flag is currently mutative. We put it on // an external backing store so that we can freeze the whole object. // This can be replaced with a WeakMap once they are implemented in // commonly used development environments. - this._store = {props: props, originalProps: assign({}, props)}; + element._store = {}; // To make comparing ReactElements easier for testing purposes, we make // the validation flag non-enumerable (where possible, which should // include every environment we run tests in), so the test framework // ignores it. - try { - Object.defineProperty(this._store, 'validated', { + if (canDefineProperty) { + Object.defineProperty(element._store, 'validated', { configurable: false, enumerable: false, - writable: true + writable: true, + value: false }); - } catch (x) { - } - this._store.validated = false; - - // We're not allowed to set props directly on the object so we early - // return and rely on the prototype membrane to forward to the backing - // store. - if (useMutationMembrane) { - Object.freeze(this); - return; + // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self + }); + // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + } else { + element._store.validated = false; + element._self = self; + element._source = source; } + Object.freeze(element.props); + Object.freeze(element); } - this.props = props; + return element; }; -// We intentionally don't expose the function on the constructor property. -// ReactElement should be indistinguishable from a plain object. -ReactElement.prototype = { - _isReactElement: true -}; - -if ("production" !== "development") { - defineMutationMembrane(ReactElement.prototype); -} - -ReactElement.createElement = function(type, config, children) { +ReactElement.createElement = function (type, config, children) { var propName; // Reserved names are extracted @@ -10459,14 +9107,17 @@ ReactElement.createElement = function(type, config, children) { var key = null; var ref = null; + var self = null; + var source = null; if (config != null) { ref = config.ref === undefined ? null : config.ref; key = config.key === undefined ? null : '' + config.key; + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object for (propName in config) { - if (config.hasOwnProperty(propName) && - !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } @@ -10495,20 +9146,13 @@ ReactElement.createElement = function(type, config, children) { } } - return new ReactElement( - type, - key, - ref, - ReactCurrentOwner.current, - ReactContext.current, - props - ); + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); }; -ReactElement.createFactory = function(type) { +ReactElement.createFactory = function (type) { var factory = ReactElement.createElement.bind(null, type); // Expose the type on the factory and the prototype so that it can be - // easily accessed on elements. E.g. <Foo />.type === Foo.type. + // easily accessed on elements. E.g. `<Foo />.type === Foo`. // This should not be named `constructor` since this may not be the function // that created the element, and it may not even be a constructor. // Legacy hook TODO: Warn if this is accessed @@ -10516,24 +9160,24 @@ ReactElement.createFactory = function(type) { return factory; }; -ReactElement.cloneAndReplaceProps = function(oldElement, newProps) { - var newElement = new ReactElement( - oldElement.type, - oldElement.key, - oldElement.ref, - oldElement._owner, - oldElement._context, - newProps - ); +ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); - if ("production" !== "development") { + return newElement; +}; + +ReactElement.cloneAndReplaceProps = function (oldElement, newProps) { + var newElement = ReactElement(oldElement.type, oldElement.key, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, newProps); + + if ("development" !== 'production') { // If the key on the original is valid, then the clone is valid newElement._store.validated = oldElement._store.validated; } + return newElement; }; -ReactElement.cloneElement = function(element, config, children) { +ReactElement.cloneElement = function (element, config, children) { var propName; // Original props are copied @@ -10542,6 +9186,12 @@ ReactElement.cloneElement = function(element, config, children) { // Reserved names are extracted var key = element.key; var ref = element.ref; + // Self is preserved since the owner is preserved. + var self = element._self; + // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + var source = element._source; // Owner will be preserved, unless ref is overridden var owner = element._owner; @@ -10557,8 +9207,7 @@ ReactElement.cloneElement = function(element, config, children) { } // Remaining properties override existing props for (propName in config) { - if (config.hasOwnProperty(propName) && - !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } @@ -10577,14 +9226,7 @@ ReactElement.cloneElement = function(element, config, children) { props.children = childArray; } - return new ReactElement( - element.type, - key, - ref, - owner, - element._context, - props - ); + return ReactElement(element.type, key, ref, self, source, owner, props); }; /** @@ -10592,23 +9234,12 @@ ReactElement.cloneElement = function(element, config, children) { * @return {boolean} True if `object` is a valid component. * @final */ -ReactElement.isValidElement = function(object) { - // ReactTestUtils is often used outside of beforeEach where as React is - // within it. This leads to two different instances of React on the same - // page. To identify a element from a different React instance we use - // a flag instead of an instanceof check. - var isElement = !!(object && object._isReactElement); - // if (isElement && !(object instanceof ReactElement)) { - // This is an indicator that you're using multiple versions of React at the - // same time. This will screw with ownership and stuff. Fix it, please. - // TODO: We could possibly warn here. - // } - return isElement; +ReactElement.isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; }; module.exports = ReactElement; - -},{"171":171,"29":29,"44":44,"45":45}],64:[function(_dereq_,module,exports){ +},{"23":23,"34":34}],53:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -10629,16 +9260,14 @@ module.exports = ReactElement; 'use strict'; -var ReactElement = _dereq_(63); -var ReactFragment = _dereq_(69); -var ReactPropTypeLocations = _dereq_(85); -var ReactPropTypeLocationNames = _dereq_(84); -var ReactCurrentOwner = _dereq_(45); -var ReactNativeComponent = _dereq_(80); +var ReactElement = _dereq_(52); +var ReactPropTypeLocations = _dereq_(73); +var ReactPropTypeLocationNames = _dereq_(72); +var ReactCurrentOwner = _dereq_(34); -var getIteratorFn = _dereq_(141); -var invariant = _dereq_(150); -var warning = _dereq_(171); +var getIteratorFn = _dereq_(114); +var invariant = _dereq_(143); +var warning = _dereq_(154); function getDeclarationErrorAddendum() { if (ReactCurrentOwner.current) { @@ -10659,39 +9288,6 @@ var ownerHasKeyUseWarning = {}; var loggedTypeFailures = {}; -var NUMERIC_PROPERTY_REGEX = /^\d+$/; - -/** - * Gets the instance's name for use in warnings. - * - * @internal - * @return {?string} Display name or undefined - */ -function getName(instance) { - var publicInstance = instance && instance.getPublicInstance(); - if (!publicInstance) { - return undefined; - } - var constructor = publicInstance.constructor; - if (!constructor) { - return undefined; - } - return constructor.displayName || constructor.name || undefined; -} - -/** - * Gets the current owner's displayName for use in warnings. - * - * @internal - * @return {?string} Display name or undefined - */ -function getCurrentOwnerDisplayName() { - var current = ReactCurrentOwner.current; - return ( - current && getName(current) || undefined - ); -} - /** * Warn if the element doesn't have an explicit key assigned to it. * This element is in an array. The array could grow and shrink or be @@ -10703,84 +9299,59 @@ function getCurrentOwnerDisplayName() { * @param {*} parentType element's parent's type. */ function validateExplicitKey(element, parentType) { - if (element._store.validated || element.key != null) { + if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; - warnAndMonitorForKeyUse( - 'Each child in an array or iterator should have a unique "key" prop.', - element, - parentType - ); -} - -/** - * Warn if the key is being defined as an object property but has an incorrect - * value. - * - * @internal - * @param {string} name Property name of the key. - * @param {ReactElement} element Component that requires a key. - * @param {*} parentType element's parent's type. - */ -function validatePropertyKey(name, element, parentType) { - if (!NUMERIC_PROPERTY_REGEX.test(name)) { + var addenda = getAddendaForKeyUse('uniqueKey', element, parentType); + if (addenda === null) { + // we already showed the warning return; } - warnAndMonitorForKeyUse( - 'Child objects should have non-numeric keys so ordering is preserved.', - element, - parentType - ); + "development" !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s%s', addenda.parentOrOwner || '', addenda.childOwner || '', addenda.url || '') : undefined; } /** * Shared warning and monitoring code for the key warnings. * * @internal - * @param {string} message The base warning that gets output. + * @param {string} messageType A key used for de-duping warnings. * @param {ReactElement} element Component that requires a key. * @param {*} parentType element's parent's type. + * @returns {?object} A set of addenda to use in the warning message, or null + * if the warning has already been shown before (and shouldn't be shown again). */ -function warnAndMonitorForKeyUse(message, element, parentType) { - var ownerName = getCurrentOwnerDisplayName(); - var parentName = typeof parentType === 'string' ? - parentType : parentType.displayName || parentType.name; +function getAddendaForKeyUse(messageType, element, parentType) { + var addendum = getDeclarationErrorAddendum(); + if (!addendum) { + var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + if (parentName) { + addendum = ' Check the top-level render call using <' + parentName + '>.'; + } + } - var useName = ownerName || parentName; - var memoizer = ownerHasKeyUseWarning[message] || ( - (ownerHasKeyUseWarning[message] = {}) - ); - if (memoizer.hasOwnProperty(useName)) { - return; + var memoizer = ownerHasKeyUseWarning[messageType] || (ownerHasKeyUseWarning[messageType] = {}); + if (memoizer[addendum]) { + return null; } - memoizer[useName] = true; + memoizer[addendum] = true; - var parentOrOwnerAddendum = - ownerName ? (" Check the render method of " + ownerName + ".") : - parentName ? (" Check the React.render call using <" + parentName + ">.") : - ''; + var addenda = { + parentOrOwner: addendum, + url: ' See https://fb.me/react-warning-keys for more information.', + childOwner: null + }; // Usually the current owner is the offender, but if it accepts children as a // property, it may be the creator of the child that's responsible for // assigning it a key. - var childOwnerAddendum = ''; - if (element && - element._owner && - element._owner !== ReactCurrentOwner.current) { - // Name of the component that originally created this child. - var childOwnerName = getName(element._owner); - - childOwnerAddendum = (" It was passed a child from " + childOwnerName + "."); + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + addenda.childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; } - ("production" !== "development" ? warning( - false, - message + '%s%s See https://fb.me/react-warning-keys for more information.', - parentOrOwnerAddendum, - childOwnerAddendum - ) : null); + return addenda; } /** @@ -10793,6 +9364,9 @@ function warnAndMonitorForKeyUse(message, element, parentType) { * @param {*} parentType node's parent's type. */ function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; @@ -10802,7 +9376,9 @@ function validateChildKeys(node, parentType) { } } else if (ReactElement.isValidElement(node)) { // This element was passed in a valid location. - node._store.validated = true; + if (node._store) { + node._store.validated = true; + } } else if (node) { var iteratorFn = getIteratorFn(node); // Entry iterators provide implicit keys. @@ -10816,13 +9392,6 @@ function validateChildKeys(node, parentType) { } } } - } else if (typeof node === 'object') { - var fragment = ReactFragment.extractIfFragment(node); - for (var key in fragment) { - if (fragment.hasOwnProperty(key)) { - validatePropertyKey(key, fragment[key], parentType); - } - } } } } @@ -10846,109 +9415,19 @@ function checkPropTypes(componentName, propTypes, props, location) { try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. - ("production" !== "development" ? invariant( - typeof propTypes[propName] === 'function', - '%s: %s type `%s` is invalid; it must be a function, usually from ' + - 'React.PropTypes.', - componentName || 'React class', - ReactPropTypeLocationNames[location], - propName - ) : invariant(typeof propTypes[propName] === 'function')); + !(typeof propTypes[propName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(false) : undefined; error = propTypes[propName](props, propName, componentName, location); } catch (ex) { error = ex; } + "development" !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], propName, typeof error) : undefined; if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error.message] = true; - var addendum = getDeclarationErrorAddendum(this); - ("production" !== "development" ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null); - } - } - } -} - -var warnedPropsMutations = {}; - -/** - * Warn about mutating props when setting `propName` on `element`. - * - * @param {string} propName The string key within props that was set - * @param {ReactElement} element - */ -function warnForPropsMutation(propName, element) { - var type = element.type; - var elementName = typeof type === 'string' ? type : type.displayName; - var ownerName = element._owner ? - element._owner.getPublicInstance().constructor.displayName : null; - - var warningKey = propName + '|' + elementName + '|' + ownerName; - if (warnedPropsMutations.hasOwnProperty(warningKey)) { - return; - } - warnedPropsMutations[warningKey] = true; - - var elementInfo = ''; - if (elementName) { - elementInfo = ' <' + elementName + ' />'; - } - var ownerInfo = ''; - if (ownerName) { - ownerInfo = ' The element was created by ' + ownerName + '.'; - } - - ("production" !== "development" ? warning( - false, - 'Don\'t set .props.%s of the React component%s. Instead, specify the ' + - 'correct value when initially creating the element or use ' + - 'React.cloneElement to make a new element with updated props.%s', - propName, - elementInfo, - ownerInfo - ) : null); -} - -// Inline Object.is polyfill -function is(a, b) { - if (a !== a) { - // NaN - return b !== b; - } - if (a === 0 && b === 0) { - // +-0 - return 1 / a === 1 / b; - } - return a === b; -} - -/** - * Given an element, check if its props have been mutated since element - * creation (or the last call to this function). In particular, check if any - * new props have been added, which we can't directly catch by defining warning - * properties on the props object. - * - * @param {ReactElement} element - */ -function checkAndWarnForMutatedProps(element) { - if (!element._store) { - // Element was created using `new ReactElement` directly or with - // `ReactElement.createElement`; skip mutation checking - return; - } - - var originalProps = element._store.originalProps; - var props = element.props; - - for (var propName in props) { - if (props.hasOwnProperty(propName)) { - if (!originalProps.hasOwnProperty(propName) || - !is(originalProps[propName], props[propName])) { - warnForPropsMutation(propName, element); - - // Copy over the new value so that the two props objects match again - originalProps[propName] = props[propName]; + var addendum = getDeclarationErrorAddendum(); + "development" !== 'production' ? warning(false, 'Failed propType: %s%s', error.message, addendum) : undefined; } } } @@ -10961,48 +9440,26 @@ function checkAndWarnForMutatedProps(element) { * @param {ReactElement} element */ function validatePropTypes(element) { - if (element.type == null) { - // This has already warned. Don't throw. + var componentClass = element.type; + if (typeof componentClass !== 'function') { return; } - // Extract the component class from the element. Converts string types - // to a composite class which may have propTypes. - // TODO: Validating a string's propTypes is not decoupled from the - // rendering target which is problematic. - var componentClass = ReactNativeComponent.getComponentClassForElement( - element - ); var name = componentClass.displayName || componentClass.name; if (componentClass.propTypes) { - checkPropTypes( - name, - componentClass.propTypes, - element.props, - ReactPropTypeLocations.prop - ); + checkPropTypes(name, componentClass.propTypes, element.props, ReactPropTypeLocations.prop); } if (typeof componentClass.getDefaultProps === 'function') { - ("production" !== "development" ? warning( - componentClass.getDefaultProps.isReactClassApproved, - 'getDefaultProps is only used on classic React.createClass ' + - 'definitions. Use a static property named `defaultProps` instead.' - ) : null); + "development" !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : undefined; } } var ReactElementValidator = { - checkAndWarnForMutatedProps: checkAndWarnForMutatedProps, - - createElement: function(type, props, children) { + createElement: function (type, props, children) { + var validType = typeof type === 'string' || typeof type === 'function'; // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. - ("production" !== "development" ? warning( - type != null, - 'React.createElement: type should not be null or undefined. It should ' + - 'be a string (for DOM elements) or a ReactClass (for composite ' + - 'components).' - ) : null); + "development" !== 'production' ? warning(validType, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : undefined; var element = ReactElement.createElement.apply(this, arguments); @@ -11012,8 +9469,15 @@ var ReactElementValidator = { return element; } - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], type); + // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } } validatePropTypes(element); @@ -11021,44 +9485,32 @@ var ReactElementValidator = { return element; }, - createFactory: function(type) { - var validatedFactory = ReactElementValidator.createElement.bind( - null, - type - ); + createFactory: function (type) { + var validatedFactory = ReactElementValidator.createElement.bind(null, type); // Legacy hook TODO: Warn if this is accessed validatedFactory.type = type; - if ("production" !== "development") { + if ("development" !== 'production') { try { - Object.defineProperty( - validatedFactory, - 'type', - { - enumerable: false, - get: function() { - ("production" !== "development" ? warning( - false, - 'Factory.type is deprecated. Access the class directly ' + - 'before passing it to createFactory.' - ) : null); - Object.defineProperty(this, 'type', { - value: type - }); - return type; - } + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + "development" !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : undefined; + Object.defineProperty(this, 'type', { + value: type + }); + return type; } - ); + }); } catch (x) { // IE will fail on defineProperty (es5-shim/sham too) } } - return validatedFactory; }, - cloneElement: function(element, props, children) { + cloneElement: function (element, props, children) { var newElement = ReactElement.cloneElement.apply(this, arguments); for (var i = 2; i < arguments.length; i++) { validateChildKeys(arguments[i], newElement.type); @@ -11070,8 +9522,7 @@ var ReactElementValidator = { }; module.exports = ReactElementValidator; - -},{"141":141,"150":150,"171":171,"45":45,"63":63,"69":69,"80":80,"84":84,"85":85}],65:[function(_dereq_,module,exports){ +},{"114":114,"143":143,"154":154,"34":34,"52":52,"72":72,"73":73}],54:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -11085,52 +9536,69 @@ module.exports = ReactElementValidator; 'use strict'; -var ReactElement = _dereq_(63); -var ReactInstanceMap = _dereq_(73); +var ReactElement = _dereq_(52); +var ReactEmptyComponentRegistry = _dereq_(55); +var ReactReconciler = _dereq_(76); -var invariant = _dereq_(150); +var assign = _dereq_(23); -var component; -// This registry keeps track of the React IDs of the components that rendered to -// `null` (in reality a placeholder such as `noscript`) -var nullComponentIDsRegistry = {}; +var placeholderElement; var ReactEmptyComponentInjection = { - injectEmptyComponent: function(emptyComponent) { - component = ReactElement.createFactory(emptyComponent); + injectEmptyComponent: function (component) { + placeholderElement = ReactElement.createElement(component); } }; -var ReactEmptyComponentType = function() {}; -ReactEmptyComponentType.prototype.componentDidMount = function() { - var internalInstance = ReactInstanceMap.get(this); - // TODO: Make sure we run these methods in the correct order, we shouldn't - // need this check. We're going to assume if we're here it means we ran - // componentWillUnmount already so there is no internal instance (it gets - // removed as part of the unmounting process). - if (!internalInstance) { - return; - } - registerNullComponentID(internalInstance._rootNodeID); +var ReactEmptyComponent = function (instantiate) { + this._currentElement = null; + this._rootNodeID = null; + this._renderedComponent = instantiate(placeholderElement); }; -ReactEmptyComponentType.prototype.componentWillUnmount = function() { - var internalInstance = ReactInstanceMap.get(this); - // TODO: Get rid of this check. See TODO in componentDidMount. - if (!internalInstance) { - return; +assign(ReactEmptyComponent.prototype, { + construct: function (element) {}, + mountComponent: function (rootID, transaction, context) { + ReactEmptyComponentRegistry.registerNullComponentID(rootID); + this._rootNodeID = rootID; + return ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, context); + }, + receiveComponent: function () {}, + unmountComponent: function (rootID, transaction, context) { + ReactReconciler.unmountComponent(this._renderedComponent); + ReactEmptyComponentRegistry.deregisterNullComponentID(this._rootNodeID); + this._rootNodeID = null; + this._renderedComponent = null; } - deregisterNullComponentID(internalInstance._rootNodeID); -}; -ReactEmptyComponentType.prototype.render = function() { - ("production" !== "development" ? invariant( - component, - 'Trying to return null from a render, but no null placeholder component ' + - 'was injected.' - ) : invariant(component)); - return component(); -}; +}); + +ReactEmptyComponent.injection = ReactEmptyComponentInjection; + +module.exports = ReactEmptyComponent; +},{"23":23,"52":52,"55":55,"76":76}],55:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactEmptyComponentRegistry + */ + +'use strict'; + +// This registry keeps track of the React IDs of the components that rendered to +// `null` (in reality a placeholder such as `noscript`) +var nullComponentIDsRegistry = {}; -var emptyElement = ReactElement.createElement(ReactEmptyComponentType); +/** + * @param {string} id Component's `_rootNodeID`. + * @return {boolean} True if the component is rendered to null. + */ +function isNullComponentID(id) { + return !!nullComponentIDsRegistry[id]; +} /** * Mark the component as having rendered to null. @@ -11148,23 +9616,14 @@ function deregisterNullComponentID(id) { delete nullComponentIDsRegistry[id]; } -/** - * @param {string} id Component's `_rootNodeID`. - * @return {boolean} True if the component is rendered to null. - */ -function isNullComponentID(id) { - return !!nullComponentIDsRegistry[id]; -} - -var ReactEmptyComponent = { - emptyElement: emptyElement, - injection: ReactEmptyComponentInjection, - isNullComponentID: isNullComponentID +var ReactEmptyComponentRegistry = { + isNullComponentID: isNullComponentID, + registerNullComponentID: registerNullComponentID, + deregisterNullComponentID: deregisterNullComponentID }; -module.exports = ReactEmptyComponent; - -},{"150":150,"63":63,"73":73}],66:[function(_dereq_,module,exports){ +module.exports = ReactEmptyComponentRegistry; +},{}],56:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11177,26 +9636,69 @@ module.exports = ReactEmptyComponent; * @typechecks */ -"use strict"; +'use strict'; + +var caughtError = null; + +/** + * Call a function while guarding against errors that happens within it. + * + * @param {?String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} a First argument + * @param {*} b Second argument + */ +function invokeGuardedCallback(name, func, a, b) { + try { + return func(a, b); + } catch (x) { + if (caughtError === null) { + caughtError = x; + } + return undefined; + } +} var ReactErrorUtils = { + invokeGuardedCallback: invokeGuardedCallback, + /** - * Creates a guarded version of a function. This is supposed to make debugging - * of event handlers easier. To aid debugging with the browser's debugger, - * this currently simply returns the original function. - * - * @param {function} func Function to be executed - * @param {string} name The name of the guard - * @return {function} + * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event + * handler are sure to be rethrown by rethrowCaughtError. */ - guard: function(func, name) { - return func; + invokeGuardedCallbackWithCatch: invokeGuardedCallback, + + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + rethrowCaughtError: function () { + if (caughtError) { + var error = caughtError; + caughtError = null; + throw error; + } } }; -module.exports = ReactErrorUtils; +if ("development" !== 'production') { + /** + * To help development we can get better devtools integration by simulating a + * real browser event. + */ + if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof Event === 'function') { + var fakeNode = document.createElement('react'); + ReactErrorUtils.invokeGuardedCallback = function (name, func, a, b) { + var boundFunc = func.bind(null, a, b); + fakeNode.addEventListener(name, boundFunc, false); + fakeNode.dispatchEvent(new Event(name)); + fakeNode.removeEventListener(name, boundFunc, false); + }; + } +} -},{}],67:[function(_dereq_,module,exports){ +module.exports = ReactErrorUtils; +},{}],57:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11210,11 +9712,11 @@ module.exports = ReactErrorUtils; 'use strict'; -var EventPluginHub = _dereq_(18); +var EventPluginHub = _dereq_(16); function runEventQueueInBatch(events) { EventPluginHub.enqueueEvents(events); - EventPluginHub.processEventQueue(); + EventPluginHub.processEventQueue(false); } var ReactEventEmitterMixin = { @@ -11228,25 +9730,14 @@ var ReactEventEmitterMixin = { * @param {string} topLevelTargetID ID of `topLevelTarget`. * @param {object} nativeEvent Native environment event. */ - handleTopLevel: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent) { - var events = EventPluginHub.extractEvents( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent - ); - + handleTopLevel: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) { + var events = EventPluginHub.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget); runEventQueueInBatch(events); } }; module.exports = ReactEventEmitterMixin; - -},{"18":18}],68:[function(_dereq_,module,exports){ +},{"16":16}],58:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11261,16 +9752,18 @@ module.exports = ReactEventEmitterMixin; 'use strict'; -var EventListener = _dereq_(17); -var ExecutionEnvironment = _dereq_(22); -var PooledClass = _dereq_(30); -var ReactInstanceHandles = _dereq_(72); -var ReactMount = _dereq_(77); -var ReactUpdates = _dereq_(100); +var EventListener = _dereq_(128); +var ExecutionEnvironment = _dereq_(129); +var PooledClass = _dereq_(24); +var ReactInstanceHandles = _dereq_(61); +var ReactMount = _dereq_(65); +var ReactUpdates = _dereq_(83); + +var assign = _dereq_(23); +var getEventTarget = _dereq_(113); +var getUnboundedScrollPosition = _dereq_(140); -var assign = _dereq_(29); -var getEventTarget = _dereq_(140); -var getUnboundedScrollPosition = _dereq_(146); +var DOCUMENT_FRAGMENT_NODE_TYPE = 11; /** * Finds the parent React component of `node`. @@ -11297,21 +9790,32 @@ function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { this.ancestors = []; } assign(TopLevelCallbackBookKeeping.prototype, { - destructor: function() { + destructor: function () { this.topLevelType = null; this.nativeEvent = null; this.ancestors.length = 0; } }); -PooledClass.addPoolingTo( - TopLevelCallbackBookKeeping, - PooledClass.twoArgumentPooler -); +PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); function handleTopLevelImpl(bookKeeping) { - var topLevelTarget = ReactMount.getFirstReactDOM( - getEventTarget(bookKeeping.nativeEvent) - ) || window; + // TODO: Re-enable event.path handling + // + // if (bookKeeping.nativeEvent.path && bookKeeping.nativeEvent.path.length > 1) { + // // New browsers have a path attribute on native events + // handleTopLevelWithPath(bookKeeping); + // } else { + // // Legacy browsers don't have a path attribute on native events + // handleTopLevelWithoutPath(bookKeeping); + // } + + void handleTopLevelWithPath; // temporarily unused + handleTopLevelWithoutPath(bookKeeping); +} + +// Legacy browsers don't have a path attribute on native events +function handleTopLevelWithoutPath(bookKeeping) { + var topLevelTarget = ReactMount.getFirstReactDOM(getEventTarget(bookKeeping.nativeEvent)) || window; // Loop through the hierarchy, in case there's any nested components. // It's important that we build the array of ancestors before calling any @@ -11323,15 +9827,44 @@ function handleTopLevelImpl(bookKeeping) { ancestor = findParent(ancestor); } - for (var i = 0, l = bookKeeping.ancestors.length; i < l; i++) { + for (var i = 0; i < bookKeeping.ancestors.length; i++) { topLevelTarget = bookKeeping.ancestors[i]; var topLevelTargetID = ReactMount.getID(topLevelTarget) || ''; - ReactEventListener._handleTopLevel( - bookKeeping.topLevelType, - topLevelTarget, - topLevelTargetID, - bookKeeping.nativeEvent - ); + ReactEventListener._handleTopLevel(bookKeeping.topLevelType, topLevelTarget, topLevelTargetID, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); + } +} + +// New browsers have a path attribute on native events +function handleTopLevelWithPath(bookKeeping) { + var path = bookKeeping.nativeEvent.path; + var currentNativeTarget = path[0]; + var eventsFired = 0; + for (var i = 0; i < path.length; i++) { + var currentPathElement = path[i]; + if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) { + currentNativeTarget = path[i + 1]; + } + // TODO: slow + var reactParent = ReactMount.getFirstReactDOM(currentPathElement); + if (reactParent === currentPathElement) { + var currentPathElementID = ReactMount.getID(currentPathElement); + var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID); + bookKeeping.ancestors.push(currentPathElement); + + var topLevelTargetID = ReactMount.getID(currentPathElement) || ''; + eventsFired++; + ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget); + + // Jump to the root of this React render tree + while (currentPathElementID !== newRootID) { + i++; + currentPathElement = path[i]; + currentPathElementID = ReactMount.getID(currentPathElement); + } + } + } + if (eventsFired === 0) { + ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); } } @@ -11346,39 +9879,34 @@ var ReactEventListener = { WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, - setHandleTopLevel: function(handleTopLevel) { + setHandleTopLevel: function (handleTopLevel) { ReactEventListener._handleTopLevel = handleTopLevel; }, - setEnabled: function(enabled) { + setEnabled: function (enabled) { ReactEventListener._enabled = !!enabled; }, - isEnabled: function() { + isEnabled: function () { return ReactEventListener._enabled; }, - /** * Traps top-level events by using event bubbling. * * @param {string} topLevelType Record from `EventConstants`. * @param {string} handlerBaseName Event name (e.g. "click"). * @param {object} handle Element on which to attach listener. - * @return {object} An object with a remove function which will forcefully + * @return {?object} An object with a remove function which will forcefully * remove the listener. * @internal */ - trapBubbledEvent: function(topLevelType, handlerBaseName, handle) { + trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { var element = handle; if (!element) { return null; } - return EventListener.listen( - element, - handlerBaseName, - ReactEventListener.dispatchEvent.bind(null, topLevelType) - ); + return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); }, /** @@ -11387,36 +9915,29 @@ var ReactEventListener = { * @param {string} topLevelType Record from `EventConstants`. * @param {string} handlerBaseName Event name (e.g. "click"). * @param {object} handle Element on which to attach listener. - * @return {object} An object with a remove function which will forcefully + * @return {?object} An object with a remove function which will forcefully * remove the listener. * @internal */ - trapCapturedEvent: function(topLevelType, handlerBaseName, handle) { + trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { var element = handle; if (!element) { return null; } - return EventListener.capture( - element, - handlerBaseName, - ReactEventListener.dispatchEvent.bind(null, topLevelType) - ); + return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); }, - monitorScrollValue: function(refresh) { + monitorScrollValue: function (refresh) { var callback = scrollValueMonitor.bind(null, refresh); EventListener.listen(window, 'scroll', callback); }, - dispatchEvent: function(topLevelType, nativeEvent) { + dispatchEvent: function (topLevelType, nativeEvent) { if (!ReactEventListener._enabled) { return; } - var bookKeeping = TopLevelCallbackBookKeeping.getPooled( - topLevelType, - nativeEvent - ); + var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); try { // Event queue being processed in the same cycle allows // `preventDefault`. @@ -11428,191 +9949,7 @@ var ReactEventListener = { }; module.exports = ReactEventListener; - -},{"100":100,"140":140,"146":146,"17":17,"22":22,"29":29,"30":30,"72":72,"77":77}],69:[function(_dereq_,module,exports){ -/** - * Copyright 2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * -* @providesModule ReactFragment -*/ - -'use strict'; - -var ReactElement = _dereq_(63); - -var warning = _dereq_(171); - -/** - * We used to allow keyed objects to serve as a collection of ReactElements, - * or nested sets. This allowed us a way to explicitly key a set a fragment of - * components. This is now being replaced with an opaque data structure. - * The upgrade path is to call React.addons.createFragment({ key: value }) to - * create a keyed fragment. The resulting data structure is opaque, for now. - */ - -if ("production" !== "development") { - var fragmentKey = '_reactFragment'; - var didWarnKey = '_reactDidWarn'; - var canWarnForReactFragment = false; - - try { - // Feature test. Don't even try to issue this warning if we can't use - // enumerable: false. - - var dummy = function() { - return 1; - }; - - Object.defineProperty( - {}, - fragmentKey, - {enumerable: false, value: true} - ); - - Object.defineProperty( - {}, - 'key', - {enumerable: true, get: dummy} - ); - - canWarnForReactFragment = true; - } catch (x) { } - - var proxyPropertyAccessWithWarning = function(obj, key) { - Object.defineProperty(obj, key, { - enumerable: true, - get: function() { - ("production" !== "development" ? warning( - this[didWarnKey], - 'A ReactFragment is an opaque type. Accessing any of its ' + - 'properties is deprecated. Pass it to one of the React.Children ' + - 'helpers.' - ) : null); - this[didWarnKey] = true; - return this[fragmentKey][key]; - }, - set: function(value) { - ("production" !== "development" ? warning( - this[didWarnKey], - 'A ReactFragment is an immutable opaque type. Mutating its ' + - 'properties is deprecated.' - ) : null); - this[didWarnKey] = true; - this[fragmentKey][key] = value; - } - }); - }; - - var issuedWarnings = {}; - - var didWarnForFragment = function(fragment) { - // We use the keys and the type of the value as a heuristic to dedupe the - // warning to avoid spamming too much. - var fragmentCacheKey = ''; - for (var key in fragment) { - fragmentCacheKey += key + ':' + (typeof fragment[key]) + ','; - } - var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey]; - issuedWarnings[fragmentCacheKey] = true; - return alreadyWarnedOnce; - }; -} - -var ReactFragment = { - // Wrap a keyed object in an opaque proxy that warns you if you access any - // of its properties. - create: function(object) { - if ("production" !== "development") { - if (typeof object !== 'object' || !object || Array.isArray(object)) { - ("production" !== "development" ? warning( - false, - 'React.addons.createFragment only accepts a single object.', - object - ) : null); - return object; - } - if (ReactElement.isValidElement(object)) { - ("production" !== "development" ? warning( - false, - 'React.addons.createFragment does not accept a ReactElement ' + - 'without a wrapper object.' - ) : null); - return object; - } - if (canWarnForReactFragment) { - var proxy = {}; - Object.defineProperty(proxy, fragmentKey, { - enumerable: false, - value: object - }); - Object.defineProperty(proxy, didWarnKey, { - writable: true, - enumerable: false, - value: false - }); - for (var key in object) { - proxyPropertyAccessWithWarning(proxy, key); - } - Object.preventExtensions(proxy); - return proxy; - } - } - return object; - }, - // Extract the original keyed object from the fragment opaque type. Warn if - // a plain object is passed here. - extract: function(fragment) { - if ("production" !== "development") { - if (canWarnForReactFragment) { - if (!fragment[fragmentKey]) { - ("production" !== "development" ? warning( - didWarnForFragment(fragment), - 'Any use of a keyed object should be wrapped in ' + - 'React.addons.createFragment(object) before being passed as a ' + - 'child.' - ) : null); - return fragment; - } - return fragment[fragmentKey]; - } - } - return fragment; - }, - // Check if this is a fragment and if so, extract the keyed object. If it - // is a fragment-like object, warn that it should be wrapped. Ignore if we - // can't determine what kind of object this is. - extractIfFragment: function(fragment) { - if ("production" !== "development") { - if (canWarnForReactFragment) { - // If it is the opaque type, return the keyed object. - if (fragment[fragmentKey]) { - return fragment[fragmentKey]; - } - // Otherwise, check each property if it has an element, if it does - // it is probably meant as a fragment, so we can warn early. Defer, - // the warning to extract. - for (var key in fragment) { - if (fragment.hasOwnProperty(key) && - ReactElement.isValidElement(fragment[key])) { - // This looks like a fragment object, we should provide an - // early warning. - return ReactFragment.extract(fragment); - } - } - } - } - return fragment; - } -}; - -module.exports = ReactFragment; - -},{"171":171,"63":63}],70:[function(_dereq_,module,exports){ +},{"113":113,"128":128,"129":129,"140":140,"23":23,"24":24,"61":61,"65":65,"83":83}],59:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11626,22 +9963,20 @@ module.exports = ReactFragment; 'use strict'; -var DOMProperty = _dereq_(11); -var EventPluginHub = _dereq_(18); -var ReactComponentEnvironment = _dereq_(41); -var ReactClass = _dereq_(38); -var ReactEmptyComponent = _dereq_(65); -var ReactBrowserEventEmitter = _dereq_(33); -var ReactNativeComponent = _dereq_(80); -var ReactDOMComponent = _dereq_(48); -var ReactPerf = _dereq_(82); -var ReactRootIndex = _dereq_(91); -var ReactUpdates = _dereq_(100); +var DOMProperty = _dereq_(10); +var EventPluginHub = _dereq_(16); +var ReactComponentEnvironment = _dereq_(32); +var ReactClass = _dereq_(29); +var ReactEmptyComponent = _dereq_(54); +var ReactBrowserEventEmitter = _dereq_(26); +var ReactNativeComponent = _dereq_(68); +var ReactPerf = _dereq_(71); +var ReactRootIndex = _dereq_(78); +var ReactUpdates = _dereq_(83); var ReactInjection = { Component: ReactComponentEnvironment.injection, Class: ReactClass.injection, - DOMComponent: ReactDOMComponent.injection, DOMProperty: DOMProperty.injection, EmptyComponent: ReactEmptyComponent.injection, EventPluginHub: EventPluginHub.injection, @@ -11653,8 +9988,7 @@ var ReactInjection = { }; module.exports = ReactInjection; - -},{"100":100,"11":11,"18":18,"33":33,"38":38,"41":41,"48":48,"65":65,"80":80,"82":82,"91":91}],71:[function(_dereq_,module,exports){ +},{"10":10,"16":16,"26":26,"29":29,"32":32,"54":54,"68":68,"71":71,"78":78,"83":83}],60:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11668,11 +10002,11 @@ module.exports = ReactInjection; 'use strict'; -var ReactDOMSelection = _dereq_(56); +var ReactDOMSelection = _dereq_(44); -var containsNode = _dereq_(123); -var focusNode = _dereq_(134); -var getActiveElement = _dereq_(136); +var containsNode = _dereq_(132); +var focusNode = _dereq_(137); +var getActiveElement = _dereq_(138); function isInDocument(node) { return containsNode(document.documentElement, node); @@ -11686,21 +10020,16 @@ function isInDocument(node) { */ var ReactInputSelection = { - hasSelectionCapabilities: function(elem) { - return elem && ( - ((elem.nodeName === 'INPUT' && elem.type === 'text') || - elem.nodeName === 'TEXTAREA' || elem.contentEditable === 'true') - ); + hasSelectionCapabilities: function (elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true'); }, - getSelectionInformation: function() { + getSelectionInformation: function () { var focusedElem = getActiveElement(); return { focusedElem: focusedElem, - selectionRange: - ReactInputSelection.hasSelectionCapabilities(focusedElem) ? - ReactInputSelection.getSelection(focusedElem) : - null + selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null }; }, @@ -11709,17 +10038,13 @@ var ReactInputSelection = { * restore it. This is useful when performing operations that could remove dom * nodes and place them back in, resulting in focus being lost. */ - restoreSelection: function(priorSelectionInformation) { + restoreSelection: function (priorSelectionInformation) { var curFocusedElem = getActiveElement(); var priorFocusedElem = priorSelectionInformation.focusedElem; var priorSelectionRange = priorSelectionInformation.selectionRange; - if (curFocusedElem !== priorFocusedElem && - isInDocument(priorFocusedElem)) { + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { - ReactInputSelection.setSelection( - priorFocusedElem, - priorSelectionRange - ); + ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange); } focusNode(priorFocusedElem); } @@ -11731,7 +10056,7 @@ var ReactInputSelection = { * -@input: Look up selection bounds of this input * -@return {start: selectionStart, end: selectionEnd} */ - getSelection: function(input) { + getSelection: function (input) { var selection; if ('selectionStart' in input) { @@ -11740,7 +10065,7 @@ var ReactInputSelection = { start: input.selectionStart, end: input.selectionEnd }; - } else if (document.selection && input.nodeName === 'INPUT') { + } else if (document.selection && (input.nodeName && input.nodeName.toLowerCase() === 'input')) { // IE8 input. var range = document.selection.createRange(); // There can only be one selection per document in IE, so it must @@ -11756,7 +10081,7 @@ var ReactInputSelection = { selection = ReactDOMSelection.getOffsets(input); } - return selection || {start: 0, end: 0}; + return selection || { start: 0, end: 0 }; }, /** @@ -11765,7 +10090,7 @@ var ReactInputSelection = { * -@input Set selection bounds of this input or textarea * -@offsets Object of same form that is returned from get* */ - setSelection: function(input, offsets) { + setSelection: function (input, offsets) { var start = offsets.start; var end = offsets.end; if (typeof end === 'undefined') { @@ -11775,7 +10100,7 @@ var ReactInputSelection = { if ('selectionStart' in input) { input.selectionStart = start; input.selectionEnd = Math.min(end, input.value.length); - } else if (document.selection && input.nodeName === 'INPUT') { + } else if (document.selection && (input.nodeName && input.nodeName.toLowerCase() === 'input')) { var range = input.createTextRange(); range.collapse(true); range.moveStart('character', start); @@ -11788,8 +10113,7 @@ var ReactInputSelection = { }; module.exports = ReactInputSelection; - -},{"123":123,"134":134,"136":136,"56":56}],72:[function(_dereq_,module,exports){ +},{"132":132,"137":137,"138":138,"44":44}],61:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -11804,9 +10128,9 @@ module.exports = ReactInputSelection; 'use strict'; -var ReactRootIndex = _dereq_(91); +var ReactRootIndex = _dereq_(78); -var invariant = _dereq_(150); +var invariant = _dereq_(143); var SEPARATOR = '.'; var SEPARATOR_LENGTH = SEPARATOR.length; @@ -11814,7 +10138,7 @@ var SEPARATOR_LENGTH = SEPARATOR.length; /** * Maximum depth of traversals before we consider the possibility of a bad ID. */ -var MAX_TREE_DEPTH = 100; +var MAX_TREE_DEPTH = 10000; /** * Creates a DOM ID prefix to use when mounting React components. @@ -11847,9 +10171,7 @@ function isBoundary(id, index) { * @private */ function isValidID(id) { - return id === '' || ( - id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR - ); + return id === '' || id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR; } /** @@ -11861,10 +10183,7 @@ function isValidID(id) { * @internal */ function isAncestorIDOf(ancestorID, descendantID) { - return ( - descendantID.indexOf(ancestorID) === 0 && - isBoundary(descendantID, ancestorID.length) - ); + return descendantID.indexOf(ancestorID) === 0 && isBoundary(descendantID, ancestorID.length); } /** @@ -11888,19 +10207,8 @@ function getParentID(id) { * @private */ function getNextDescendantID(ancestorID, destinationID) { - ("production" !== "development" ? invariant( - isValidID(ancestorID) && isValidID(destinationID), - 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', - ancestorID, - destinationID - ) : invariant(isValidID(ancestorID) && isValidID(destinationID))); - ("production" !== "development" ? invariant( - isAncestorIDOf(ancestorID, destinationID), - 'getNextDescendantID(...): React has made an invalid assumption about ' + - 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', - ancestorID, - destinationID - ) : invariant(isAncestorIDOf(ancestorID, destinationID))); + !(isValidID(ancestorID) && isValidID(destinationID)) ? "development" !== 'production' ? invariant(false, 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', ancestorID, destinationID) : invariant(false) : undefined; + !isAncestorIDOf(ancestorID, destinationID) ? "development" !== 'production' ? invariant(false, 'getNextDescendantID(...): React has made an invalid assumption about ' + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', ancestorID, destinationID) : invariant(false) : undefined; if (ancestorID === destinationID) { return ancestorID; } @@ -11942,13 +10250,7 @@ function getFirstCommonAncestorID(oneID, twoID) { } } var longestCommonID = oneID.substr(0, lastCommonMarkerIndex); - ("production" !== "development" ? invariant( - isValidID(longestCommonID), - 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', - oneID, - twoID, - longestCommonID - ) : invariant(isValidID(longestCommonID))); + !isValidID(longestCommonID) ? "development" !== 'production' ? invariant(false, 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', oneID, twoID, longestCommonID) : invariant(false) : undefined; return longestCommonID; } @@ -11960,6 +10262,7 @@ function getFirstCommonAncestorID(oneID, twoID) { * @param {?string} start ID at which to start traversal. * @param {?string} stop ID at which to end traversal. * @param {function} cb Callback to invoke each ID with. + * @param {*} arg Argument to invoke the callback with. * @param {?boolean} skipFirst Whether or not to skip the first node. * @param {?boolean} skipLast Whether or not to skip the last node. * @private @@ -11967,23 +10270,13 @@ function getFirstCommonAncestorID(oneID, twoID) { function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) { start = start || ''; stop = stop || ''; - ("production" !== "development" ? invariant( - start !== stop, - 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', - start - ) : invariant(start !== stop)); + !(start !== stop) ? "development" !== 'production' ? invariant(false, 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', start) : invariant(false) : undefined; var traverseUp = isAncestorIDOf(stop, start); - ("production" !== "development" ? invariant( - traverseUp || isAncestorIDOf(start, stop), - 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + - 'not have a parent path.', - start, - stop - ) : invariant(traverseUp || isAncestorIDOf(start, stop))); + !(traverseUp || isAncestorIDOf(start, stop)) ? "development" !== 'production' ? invariant(false, 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + 'not have a parent path.', start, stop) : invariant(false) : undefined; // Traverse from `start` to `stop` one depth at a time. var depth = 0; var traverse = traverseUp ? getParentID : getNextDescendantID; - for (var id = start; /* until break */; id = traverse(id, stop)) { + for (var id = start;; /* until break */id = traverse(id, stop)) { var ret; if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) { ret = cb(id, traverseUp, arg); @@ -11992,12 +10285,7 @@ function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) { // Only break //after// visiting `stop`. break; } - ("production" !== "development" ? invariant( - depth++ < MAX_TREE_DEPTH, - 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + - 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', - start, stop - ) : invariant(depth++ < MAX_TREE_DEPTH)); + !(depth++ < MAX_TREE_DEPTH) ? "development" !== 'production' ? invariant(false, 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', start, stop, id) : invariant(false) : undefined; } } @@ -12014,7 +10302,7 @@ var ReactInstanceHandles = { * Constructs a React root ID * @return {string} A React root ID. */ - createReactRootID: function() { + createReactRootID: function () { return getReactRootIDString(ReactRootIndex.createReactRootIndex()); }, @@ -12026,7 +10314,7 @@ var ReactInstanceHandles = { * @return {string} A React ID. * @internal */ - createReactID: function(rootID, name) { + createReactID: function (rootID, name) { return rootID + name; }, @@ -12038,7 +10326,7 @@ var ReactInstanceHandles = { * @return {?string} DOM ID of the React component that is the root. * @internal */ - getReactRootIDFromNodeID: function(id) { + getReactRootIDFromNodeID: function (id) { if (id && id.charAt(0) === SEPARATOR && id.length > 1) { var index = id.indexOf(SEPARATOR, 1); return index > -1 ? id.substr(0, index) : id; @@ -12060,7 +10348,7 @@ var ReactInstanceHandles = { * @param {*} downArg Argument to invoke the callback with on entered IDs. * @internal */ - traverseEnterLeave: function(leaveID, enterID, cb, upArg, downArg) { + traverseEnterLeave: function (leaveID, enterID, cb, upArg, downArg) { var ancestorID = getFirstCommonAncestorID(leaveID, enterID); if (ancestorID !== leaveID) { traverseParentPath(leaveID, ancestorID, cb, upArg, false, true); @@ -12080,7 +10368,7 @@ var ReactInstanceHandles = { * @param {*} arg Argument to invoke the callback with. * @internal */ - traverseTwoPhase: function(targetID, cb, arg) { + traverseTwoPhase: function (targetID, cb, arg) { if (targetID) { traverseParentPath('', targetID, cb, arg, true, false); traverseParentPath(targetID, '', cb, arg, false, true); @@ -12088,6 +10376,16 @@ var ReactInstanceHandles = { }, /** + * Same as `traverseTwoPhase` but skips the `targetID`. + */ + traverseTwoPhaseSkipTarget: function (targetID, cb, arg) { + if (targetID) { + traverseParentPath('', targetID, cb, arg, true, true); + traverseParentPath(targetID, '', cb, arg, true, true); + } + }, + + /** * Traverse a node ID, calling the supplied `cb` for each ancestor ID. For * example, passing `.0.$row-0.1` would result in `cb` getting called * with `.0`, `.0.$row-0`, and `.0.$row-0.1`. @@ -12099,15 +10397,11 @@ var ReactInstanceHandles = { * @param {*} arg Argument to invoke the callback with. * @internal */ - traverseAncestors: function(targetID, cb, arg) { + traverseAncestors: function (targetID, cb, arg) { traverseParentPath('', targetID, cb, arg, true, false); }, - /** - * Exposed for unit testing. - * @private - */ - _getFirstCommonAncestorID: getFirstCommonAncestorID, + getFirstCommonAncestorID: getFirstCommonAncestorID, /** * Exposed for unit testing. @@ -12122,8 +10416,7 @@ var ReactInstanceHandles = { }; module.exports = ReactInstanceHandles; - -},{"150":150,"91":91}],73:[function(_dereq_,module,exports){ +},{"143":143,"78":78}],62:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -12152,137 +10445,101 @@ var ReactInstanceMap = { * transform these to strings for IE support. When this transform is fully * supported we can rename it. */ - remove: function(key) { + remove: function (key) { key._reactInternalInstance = undefined; }, - get: function(key) { + get: function (key) { return key._reactInternalInstance; }, - has: function(key) { + has: function (key) { return key._reactInternalInstance !== undefined; }, - set: function(key, value) { + set: function (key, value) { key._reactInternalInstance = value; } }; module.exports = ReactInstanceMap; - -},{}],74:[function(_dereq_,module,exports){ +},{}],63:[function(_dereq_,module,exports){ /** - * Copyright 2015, Facebook, Inc. + * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactLifeCycle + * @providesModule ReactIsomorphic */ 'use strict'; -/** - * This module manages the bookkeeping when a component is in the process - * of being mounted or being unmounted. This is used as a way to enforce - * invariants (or warnings) when it is not recommended to call - * setState/forceUpdate. - * - * currentlyMountingInstance: During the construction phase, it is not possible - * to trigger an update since the instance is not fully mounted yet. However, we - * currently allow this as a convenience for mutating the initial state. - * - * currentlyUnmountingInstance: During the unmounting phase, the instance is - * still mounted and can therefore schedule an update. However, this is not - * recommended and probably an error since it's about to be unmounted. - * Therefore we still want to trigger in an error for that case. - */ +var ReactChildren = _dereq_(28); +var ReactComponent = _dereq_(30); +var ReactClass = _dereq_(29); +var ReactDOMFactories = _dereq_(38); +var ReactElement = _dereq_(52); +var ReactElementValidator = _dereq_(53); +var ReactPropTypes = _dereq_(74); +var ReactVersion = _dereq_(84); -var ReactLifeCycle = { - currentlyMountingInstance: null, - currentlyUnmountingInstance: null -}; +var assign = _dereq_(23); +var onlyChild = _dereq_(120); -module.exports = ReactLifeCycle; +var createElement = ReactElement.createElement; +var createFactory = ReactElement.createFactory; +var cloneElement = ReactElement.cloneElement; -},{}],75:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactLink - * @typechecks static-only - */ +if ("development" !== 'production') { + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; +} -'use strict'; +var React = { -/** - * ReactLink encapsulates a common pattern in which a component wants to modify - * a prop received from its parent. ReactLink allows the parent to pass down a - * value coupled with a callback that, when invoked, expresses an intent to - * modify that value. For example: - * - * React.createClass({ - * getInitialState: function() { - * return {value: ''}; - * }, - * render: function() { - * var valueLink = new ReactLink(this.state.value, this._handleValueChange); - * return <input valueLink={valueLink} />; - * }, - * this._handleValueChange: function(newValue) { - * this.setState({value: newValue}); - * } - * }); - * - * We have provided some sugary mixins to make the creation and - * consumption of ReactLink easier; see LinkedValueUtils and LinkedStateMixin. - */ + // Modern -var React = _dereq_(31); + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + toArray: ReactChildren.toArray, + only: onlyChild + }, -/** - * @param {*} value current value of the link - * @param {function} requestChange callback to request a change - */ -function ReactLink(value, requestChange) { - this.value = value; - this.requestChange = requestChange; -} + Component: ReactComponent, -/** - * Creates a PropType that enforces the ReactLink API and optionally checks the - * type of the value being passed inside the link. Example: - * - * MyComponent.propTypes = { - * tabIndexLink: ReactLink.PropTypes.link(React.PropTypes.number) - * } - */ -function createLinkTypeChecker(linkType) { - var shapes = { - value: typeof linkType === 'undefined' ? - React.PropTypes.any.isRequired : - linkType.isRequired, - requestChange: React.PropTypes.func.isRequired - }; - return React.PropTypes.shape(shapes); -} + createElement: createElement, + cloneElement: cloneElement, + isValidElement: ReactElement.isValidElement, -ReactLink.PropTypes = { - link: createLinkTypeChecker -}; + // Classic -module.exports = ReactLink; + PropTypes: ReactPropTypes, + createClass: ReactClass.createClass, + createFactory: createFactory, + createMixin: function (mixin) { + // Currently a noop. Will be used to validate and trace mixins. + return mixin; + }, + + // This looks DOM specific but these are actually isomorphic helpers + // since they are just generating DOM strings. + DOM: ReactDOMFactories, + + version: ReactVersion, -},{"31":31}],76:[function(_dereq_,module,exports){ + // Hook for JSX spread, don't use this for anything else. + __spread: assign +}; + +module.exports = React; +},{"120":120,"23":23,"28":28,"29":29,"30":30,"38":38,"52":52,"53":53,"74":74,"84":84}],64:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -12296,7 +10553,9 @@ module.exports = ReactLink; 'use strict'; -var adler32 = _dereq_(119); +var adler32 = _dereq_(103); + +var TAG_END = /\/?>/; var ReactMarkupChecksum = { CHECKSUM_ATTR_NAME: 'data-react-checksum', @@ -12305,12 +10564,11 @@ var ReactMarkupChecksum = { * @param {string} markup Markup string * @return {string} Markup string with checksum attribute attached */ - addChecksumToMarkup: function(markup) { + addChecksumToMarkup: function (markup) { var checksum = adler32(markup); - return markup.replace( - '>', - ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '">' - ); + + // Add checksum (handle both parent tags and self-closing tags) + return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&'); }, /** @@ -12318,10 +10576,8 @@ var ReactMarkupChecksum = { * @param {DOMElement} element root React element * @returns {boolean} whether or not the markup is the same */ - canReuseMarkup: function(markup, element) { - var existingChecksum = element.getAttribute( - ReactMarkupChecksum.CHECKSUM_ATTR_NAME - ); + canReuseMarkup: function (markup, element) { + var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); existingChecksum = existingChecksum && parseInt(existingChecksum, 10); var markupChecksum = adler32(markup); return markupChecksum === existingChecksum; @@ -12329,8 +10585,7 @@ var ReactMarkupChecksum = { }; module.exports = ReactMarkupChecksum; - -},{"119":119}],77:[function(_dereq_,module,exports){ +},{"103":103}],65:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -12344,36 +10599,38 @@ module.exports = ReactMarkupChecksum; 'use strict'; -var DOMProperty = _dereq_(11); -var ReactBrowserEventEmitter = _dereq_(33); -var ReactCurrentOwner = _dereq_(45); -var ReactElement = _dereq_(63); -var ReactElementValidator = _dereq_(64); -var ReactEmptyComponent = _dereq_(65); -var ReactInstanceHandles = _dereq_(72); -var ReactInstanceMap = _dereq_(73); -var ReactMarkupChecksum = _dereq_(76); -var ReactPerf = _dereq_(82); -var ReactReconciler = _dereq_(89); -var ReactUpdateQueue = _dereq_(99); -var ReactUpdates = _dereq_(100); - -var emptyObject = _dereq_(130); -var containsNode = _dereq_(123); -var getReactRootElementInContainer = _dereq_(144); -var instantiateReactComponent = _dereq_(149); -var invariant = _dereq_(150); -var setInnerHTML = _dereq_(164); -var shouldUpdateReactComponent = _dereq_(167); -var warning = _dereq_(171); - -var SEPARATOR = ReactInstanceHandles.SEPARATOR; +var DOMProperty = _dereq_(10); +var ReactBrowserEventEmitter = _dereq_(26); +var ReactCurrentOwner = _dereq_(34); +var ReactDOMFeatureFlags = _dereq_(39); +var ReactElement = _dereq_(52); +var ReactEmptyComponentRegistry = _dereq_(55); +var ReactInstanceHandles = _dereq_(61); +var ReactInstanceMap = _dereq_(62); +var ReactMarkupChecksum = _dereq_(64); +var ReactPerf = _dereq_(71); +var ReactReconciler = _dereq_(76); +var ReactUpdateQueue = _dereq_(82); +var ReactUpdates = _dereq_(83); + +var assign = _dereq_(23); +var emptyObject = _dereq_(136); +var containsNode = _dereq_(132); +var instantiateReactComponent = _dereq_(117); +var invariant = _dereq_(143); +var setInnerHTML = _dereq_(123); +var shouldUpdateReactComponent = _dereq_(125); +var validateDOMNesting = _dereq_(127); +var warning = _dereq_(154); var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; var nodeCache = {}; var ELEMENT_NODE_TYPE = 1; var DOC_NODE_TYPE = 9; +var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + +var ownerDocumentContextKey = '__ReactMount_ownerDocument$' + Math.random().toString(36).slice(2); /** Mapping from reactRootID to React component instance. */ var instancesByReactRootID = {}; @@ -12381,7 +10638,7 @@ var instancesByReactRootID = {}; /** Mapping from reactRootID to `container` nodes. */ var containersByReactRootID = {}; -if ("production" !== "development") { +if ("development" !== 'production') { /** __DEV__-only mapping from reactRootID to root elements. */ var rootElementsByReactRootID = {}; } @@ -12406,6 +10663,23 @@ function firstDifferenceIndex(string1, string2) { } /** + * @param {DOMElement|DOMDocument} container DOM element that may contain + * a React component + * @return {?*} DOM element that may have the reactRoot ID, or null. + */ +function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOC_NODE_TYPE) { + return container.documentElement; + } else { + return container.firstChild; + } +} + +/** * @param {DOMElement} container DOM element that may contain a React component. * @return {?string} A "reactRoot" ID, if a React component is rendered. */ @@ -12430,11 +10704,7 @@ function getID(node) { if (nodeCache.hasOwnProperty(id)) { var cached = nodeCache[id]; if (cached !== node) { - ("production" !== "development" ? invariant( - !isValid(cached, id), - 'ReactMount: Two valid but unequal nodes with the same `%s`: %s', - ATTR_NAME, id - ) : invariant(!isValid(cached, id))); + !!isValid(cached, id) ? "development" !== 'production' ? invariant(false, 'ReactMount: Two valid but unequal nodes with the same `%s`: %s', ATTR_NAME, id) : invariant(false) : undefined; nodeCache[id] = node; } @@ -12491,7 +10761,7 @@ function getNode(id) { */ function getNodeFromInstance(instance) { var id = ReactInstanceMap.get(instance)._rootNodeID; - if (ReactEmptyComponent.isNullComponentID(id)) { + if (ReactEmptyComponentRegistry.isNullComponentID(id)) { return null; } if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) { @@ -12512,11 +10782,7 @@ function getNodeFromInstance(instance) { */ function isValid(node, id) { if (node) { - ("production" !== "development" ? invariant( - internalGetID(node) === id, - 'ReactMount: Unexpected modification of `%s`', - ATTR_NAME - ) : invariant(internalGetID(node) === id)); + !(internalGetID(node) === id) ? "development" !== 'production' ? invariant(false, 'ReactMount: Unexpected modification of `%s`', ATTR_NAME) : invariant(false) : undefined; var container = ReactMount.findReactContainerForID(id); if (container && containsNode(container, node)) { @@ -12553,10 +10819,7 @@ function findDeepestCachedAncestorImpl(ancestorID) { */ function findDeepestCachedAncestor(targetID) { deepestNodeSoFar = null; - ReactInstanceHandles.traverseAncestors( - targetID, - findDeepestCachedAncestorImpl - ); + ReactInstanceHandles.traverseAncestors(targetID, findDeepestCachedAncestorImpl); var foundNode = deepestNodeSoFar; deepestNodeSoFar = null; @@ -12572,17 +10835,25 @@ function findDeepestCachedAncestor(targetID) { * @param {ReactReconcileTransaction} transaction * @param {boolean} shouldReuseMarkup If true, do not insert markup */ -function mountComponentIntoNode( - componentInstance, - rootID, - container, - transaction, - shouldReuseMarkup) { - var markup = ReactReconciler.mountComponent( - componentInstance, rootID, transaction, emptyObject - ); - componentInstance._isTopLevel = true; - ReactMount._mountImageIntoNode(markup, container, shouldReuseMarkup); +function mountComponentIntoNode(componentInstance, rootID, container, transaction, shouldReuseMarkup, context) { + if (ReactDOMFeatureFlags.useCreateElement) { + context = assign({}, context); + if (container.nodeType === DOC_NODE_TYPE) { + context[ownerDocumentContextKey] = container; + } else { + context[ownerDocumentContextKey] = container.ownerDocument; + } + } + if ("development" !== 'production') { + if (context === emptyObject) { + context = {}; + } + var tag = container.nodeName.toLowerCase(); + context[validateDOMNesting.ancestorInfoContextKey] = validateDOMNesting.updatedAncestorInfo(null, tag, null); + } + var markup = ReactReconciler.mountComponent(componentInstance, rootID, transaction, context); + componentInstance._renderedComponent._topLevelWrapper = componentInstance; + ReactMount._mountImageIntoNode(markup, container, shouldReuseMarkup, transaction); } /** @@ -12593,25 +10864,107 @@ function mountComponentIntoNode( * @param {DOMElement} container DOM element to mount into. * @param {boolean} shouldReuseMarkup If true, do not insert markup */ -function batchedMountComponentIntoNode( - componentInstance, - rootID, - container, - shouldReuseMarkup) { - var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(); - transaction.perform( - mountComponentIntoNode, - null, - componentInstance, - rootID, - container, - transaction, - shouldReuseMarkup - ); +function batchedMountComponentIntoNode(componentInstance, rootID, container, shouldReuseMarkup, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* forceHTML */shouldReuseMarkup); + transaction.perform(mountComponentIntoNode, null, componentInstance, rootID, container, transaction, shouldReuseMarkup, context); ReactUpdates.ReactReconcileTransaction.release(transaction); } /** + * Unmounts a component and removes it from the DOM. + * + * @param {ReactComponent} instance React component instance. + * @param {DOMElement} container DOM element to unmount from. + * @final + * @internal + * @see {ReactMount.unmountComponentAtNode} + */ +function unmountComponentFromNode(instance, container) { + ReactReconciler.unmountComponent(instance); + + if (container.nodeType === DOC_NODE_TYPE) { + container = container.documentElement; + } + + // http://jsperf.com/emptying-a-node + while (container.lastChild) { + container.removeChild(container.lastChild); + } +} + +/** + * True if the supplied DOM node has a direct React-rendered child that is + * not a React root element. Useful for warning in `render`, + * `unmountComponentAtNode`, etc. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM element contains a direct child that was + * rendered by React but is not a root element. + * @internal + */ +function hasNonRootReactChild(node) { + var reactRootID = getReactRootID(node); + return reactRootID ? reactRootID !== ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID) : false; +} + +/** + * Returns the first (deepest) ancestor of a node which is rendered by this copy + * of React. + */ +function findFirstReactDOMImpl(node) { + // This node might be from another React instance, so we make sure not to + // examine the node cache here + for (; node && node.parentNode !== node; node = node.parentNode) { + if (node.nodeType !== 1) { + // Not a DOMElement, therefore not a React component + continue; + } + var nodeID = internalGetID(node); + if (!nodeID) { + continue; + } + var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID); + + // If containersByReactRootID contains the container we find by crawling up + // the tree, we know that this instance of React rendered the node. + // nb. isValid's strategy (with containsNode) does not work because render + // trees may be nested and we don't want a false positive in that case. + var current = node; + var lastID; + do { + lastID = internalGetID(current); + current = current.parentNode; + if (current == null) { + // The passed-in node has been detached from the container it was + // originally rendered into. + return null; + } + } while (lastID !== reactRootID); + + if (current === containersByReactRootID[reactRootID]) { + return node; + } + } + return null; +} + +/** + * Temporary (?) hack so that we can store all top-level pending updates on + * composites instead of having to worry about different types of components + * here. + */ +var TopLevelWrapper = function () {}; +TopLevelWrapper.prototype.isReactComponent = {}; +if ("development" !== 'production') { + TopLevelWrapper.displayName = 'TopLevelWrapper'; +} +TopLevelWrapper.prototype.render = function () { + // this.props is actually a ReactElement + return this.props; +}; + +/** * Mounting is the process of initializing a React component by creating its * representative DOM elements and inserting them into a supplied `container`. * Any prior content inside `container` is destroyed in the process. @@ -12630,6 +10983,9 @@ function batchedMountComponentIntoNode( * Inside of `container`, the first element rendered is the "reactRoot". */ var ReactMount = { + + TopLevelWrapper: TopLevelWrapper, + /** Exposed for debugging purposes **/ _instancesByReactRootID: instancesByReactRootID, @@ -12641,7 +10997,7 @@ var ReactMount = { * @param {DOMElement} container The `container` being rendered into. * @param {function} renderCallback This must be called once to do the render. */ - scrollMonitor: function(container, renderCallback) { + scrollMonitor: function (container, renderCallback) { renderCallback(); }, @@ -12652,26 +11008,17 @@ var ReactMount = { * @param {DOMElement} container container to render into * @param {?function} callback function triggered on completion */ - _updateRootComponent: function( - prevComponent, - nextElement, - container, - callback) { - if ("production" !== "development") { - ReactElementValidator.checkAndWarnForMutatedProps(nextElement); - } - - ReactMount.scrollMonitor(container, function() { + _updateRootComponent: function (prevComponent, nextElement, container, callback) { + ReactMount.scrollMonitor(container, function () { ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement); if (callback) { ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); } }); - if ("production" !== "development") { + if ("development" !== 'production') { // Record the root element in case it later gets transplanted. - rootElementsByReactRootID[getReactRootID(container)] = - getReactRootElementInContainer(container); + rootElementsByReactRootID[getReactRootID(container)] = getReactRootElementInContainer(container); } return prevComponent; @@ -12684,15 +11031,8 @@ var ReactMount = { * @param {DOMElement} container container to render into * @return {string} reactRoot ID prefix */ - _registerComponent: function(nextComponent, container) { - ("production" !== "development" ? invariant( - container && ( - (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) - ), - '_registerComponent(...): Target container is not a DOM element.' - ) : invariant(container && ( - (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) - ))); + _registerComponent: function (nextComponent, container) { + !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? "development" !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : invariant(false) : undefined; ReactBrowserEventEmitter.ensureScrollValueMonitoring(); @@ -12708,44 +11048,24 @@ var ReactMount = { * @param {boolean} shouldReuseMarkup if we should skip the markup insertion * @return {ReactComponent} nextComponent */ - _renderNewRootComponent: function( - nextElement, - container, - shouldReuseMarkup - ) { + _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) { // Various parts of our code (such as ReactCompositeComponent's // _renderValidatedComponent) assume that calls to render aren't nested; // verify that that's the case. - ("production" !== "development" ? warning( - ReactCurrentOwner.current == null, - '_renderNewRootComponent(): Render methods should be a pure function ' + - 'of props and state; triggering nested component updates from ' + - 'render is not allowed. If necessary, trigger nested updates in ' + - 'componentDidUpdate.' - ) : null); + "development" !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : undefined; var componentInstance = instantiateReactComponent(nextElement, null); - var reactRootID = ReactMount._registerComponent( - componentInstance, - container - ); + var reactRootID = ReactMount._registerComponent(componentInstance, container); // The initial render is synchronous but any updates that happen during // rendering, in componentWillMount or componentDidMount, will be batched // according to the current batching strategy. - ReactUpdates.batchedUpdates( - batchedMountComponentIntoNode, - componentInstance, - reactRootID, - container, - shouldReuseMarkup - ); + ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, reactRootID, container, shouldReuseMarkup, context); - if ("production" !== "development") { + if ("development" !== 'production') { // Record the root element in case it later gets transplanted. - rootElementsByReactRootID[reactRootID] = - getReactRootElementInContainer(container); + rootElementsByReactRootID[reactRootID] = getReactRootElementInContainer(container); } return componentInstance; @@ -12758,76 +11078,59 @@ var ReactMount = { * perform an update on it and only mutate the DOM as necessary to reflect the * latest React component. * + * @param {ReactComponent} parentComponent The conceptual parent of this render tree. * @param {ReactElement} nextElement Component element to render. * @param {DOMElement} container DOM element to render into. * @param {?function} callback function triggered on completion * @return {ReactComponent} Component instance rendered in `container`. */ - render: function(nextElement, container, callback) { - ("production" !== "development" ? invariant( - ReactElement.isValidElement(nextElement), - 'React.render(): Invalid component element.%s', - ( - typeof nextElement === 'string' ? - ' Instead of passing an element string, make sure to instantiate ' + - 'it by passing it to React.createElement.' : - typeof nextElement === 'function' ? - ' Instead of passing a component class, make sure to instantiate ' + - 'it by passing it to React.createElement.' : - // Check if it quacks like an element - nextElement != null && nextElement.props !== undefined ? - ' This may be caused by unintentionally loading two independent ' + - 'copies of React.' : - '' - ) - ) : invariant(ReactElement.isValidElement(nextElement))); + renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + !(parentComponent != null && parentComponent._reactInternalInstance != null) ? "development" !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : invariant(false) : undefined; + return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback); + }, + + _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + !ReactElement.isValidElement(nextElement) ? "development" !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing an element string, make sure to instantiate ' + 'it by passing it to React.createElement.' : typeof nextElement === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : + // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : invariant(false) : undefined; + + "development" !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : undefined; + + var nextWrappedElement = new ReactElement(TopLevelWrapper, null, null, null, null, null, nextElement); var prevComponent = instancesByReactRootID[getReactRootID(container)]; if (prevComponent) { - var prevElement = prevComponent._currentElement; + var prevWrappedElement = prevComponent._currentElement; + var prevElement = prevWrappedElement.props; if (shouldUpdateReactComponent(prevElement, nextElement)) { - return ReactMount._updateRootComponent( - prevComponent, - nextElement, - container, - callback - ).getPublicInstance(); + return ReactMount._updateRootComponent(prevComponent, nextWrappedElement, container, callback)._renderedComponent.getPublicInstance(); } else { ReactMount.unmountComponentAtNode(container); } } var reactRootElement = getReactRootElementInContainer(container); - var containerHasReactMarkup = - reactRootElement && ReactMount.isRenderedByReact(reactRootElement); + var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement); + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + if ("development" !== 'production') { + "development" !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : undefined; - if ("production" !== "development") { if (!containerHasReactMarkup || reactRootElement.nextSibling) { var rootElementSibling = reactRootElement; while (rootElementSibling) { - if (ReactMount.isRenderedByReact(rootElementSibling)) { - ("production" !== "development" ? warning( - false, - 'render(): Target node has markup rendered by React, but there ' + - 'are unrelated nodes as well. This is most commonly caused by ' + - 'white-space inserted around server-rendered markup.' - ) : null); + if (internalGetID(rootElementSibling)) { + "development" !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : undefined; break; } - rootElementSibling = rootElementSibling.nextSibling; } } } - var shouldReuseMarkup = containerHasReactMarkup && !prevComponent; - - var component = ReactMount._renderNewRootComponent( - nextElement, - container, - shouldReuseMarkup - ).getPublicInstance(); + var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild; + var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, parentComponent != null ? parentComponent._reactInternalInstance._processChildContext(parentComponent._reactInternalInstance._context) : emptyObject)._renderedComponent.getPublicInstance(); if (callback) { callback.call(component); } @@ -12835,36 +11138,19 @@ var ReactMount = { }, /** - * Constructs a component instance of `constructor` with `initialProps` and - * renders it into the supplied `container`. + * Renders a React component into the DOM in the supplied `container`. + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. * - * @param {function} constructor React component constructor. - * @param {?object} props Initial props of the component instance. + * @param {ReactElement} nextElement Component element to render. * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion * @return {ReactComponent} Component instance rendered in `container`. */ - constructAndRenderComponent: function(constructor, props, container) { - var element = ReactElement.createElement(constructor, props); - return ReactMount.render(element, container); - }, - - /** - * Constructs a component instance of `constructor` with `initialProps` and - * renders it into a container node identified by supplied `id`. - * - * @param {function} componentConstructor React component constructor - * @param {?object} props Initial props of the component instance. - * @param {string} id ID of the DOM element to render into. - * @return {ReactComponent} Component instance rendered in the container node. - */ - constructAndRenderComponentByID: function(constructor, props, id) { - var domNode = document.getElementById(id); - ("production" !== "development" ? invariant( - domNode, - 'Tried to get element with id of "%s" but it is not present on the page.', - id - ) : invariant(domNode)); - return ReactMount.constructAndRenderComponent(constructor, props, domNode); + render: function (nextElement, container, callback) { + return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback); }, /** @@ -12875,7 +11161,7 @@ var ReactMount = { * @param {DOMElement} container DOM element to register as a container. * @return {string} The "reactRoot" ID of elements rendered within. */ - registerContainer: function(container) { + registerContainer: function (container) { var reactRootID = getReactRootID(container); if (reactRootID) { // If one exists, make sure it is a valid "reactRoot" ID. @@ -12896,101 +11182,68 @@ var ReactMount = { * @return {boolean} True if a component was found in and unmounted from * `container` */ - unmountComponentAtNode: function(container) { + unmountComponentAtNode: function (container) { // Various parts of our code (such as ReactCompositeComponent's // _renderValidatedComponent) assume that calls to render aren't nested; // verify that that's the case. (Strictly speaking, unmounting won't cause a // render but we still don't expect to be in a render call here.) - ("production" !== "development" ? warning( - ReactCurrentOwner.current == null, - 'unmountComponentAtNode(): Render methods should be a pure function of ' + - 'props and state; triggering nested component updates from render is ' + - 'not allowed. If necessary, trigger nested updates in ' + - 'componentDidUpdate.' - ) : null); - - ("production" !== "development" ? invariant( - container && ( - (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) - ), - 'unmountComponentAtNode(...): Target container is not a DOM element.' - ) : invariant(container && ( - (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) - ))); + "development" !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : undefined; + + !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? "development" !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : invariant(false) : undefined; var reactRootID = getReactRootID(container); var component = instancesByReactRootID[reactRootID]; if (!component) { + // Check if the node being unmounted was rendered by React, but isn't a + // root node. + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + // Check if the container itself is a React root node. + var containerID = internalGetID(container); + var isContainerReactRoot = containerID && containerID === ReactInstanceHandles.getReactRootIDFromNodeID(containerID); + + if ("development" !== 'production') { + "development" !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : undefined; + } + return false; } - ReactMount.unmountComponentFromNode(component, container); + ReactUpdates.batchedUpdates(unmountComponentFromNode, component, container); delete instancesByReactRootID[reactRootID]; delete containersByReactRootID[reactRootID]; - if ("production" !== "development") { + if ("development" !== 'production') { delete rootElementsByReactRootID[reactRootID]; } return true; }, /** - * Unmounts a component and removes it from the DOM. - * - * @param {ReactComponent} instance React component instance. - * @param {DOMElement} container DOM element to unmount from. - * @final - * @internal - * @see {ReactMount.unmountComponentAtNode} - */ - unmountComponentFromNode: function(instance, container) { - ReactReconciler.unmountComponent(instance); - - if (container.nodeType === DOC_NODE_TYPE) { - container = container.documentElement; - } - - // http://jsperf.com/emptying-a-node - while (container.lastChild) { - container.removeChild(container.lastChild); - } - }, - - /** * Finds the container DOM element that contains React component to which the * supplied DOM `id` belongs. * * @param {string} id The ID of an element rendered by a React component. * @return {?DOMElement} DOM element that contains the `id`. */ - findReactContainerForID: function(id) { + findReactContainerForID: function (id) { var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id); var container = containersByReactRootID[reactRootID]; - if ("production" !== "development") { + if ("development" !== 'production') { var rootElement = rootElementsByReactRootID[reactRootID]; if (rootElement && rootElement.parentNode !== container) { - ("production" !== "development" ? invariant( - // Call internalGetID here because getID calls isValid which calls - // findReactContainerForID (this function). - internalGetID(rootElement) === reactRootID, - 'ReactMount: Root element ID differed from reactRootID.' - ) : invariant(// Call internalGetID here because getID calls isValid which calls + "development" !== 'production' ? warning( + // Call internalGetID here because getID calls isValid which calls // findReactContainerForID (this function). - internalGetID(rootElement) === reactRootID)); - + internalGetID(rootElement) === reactRootID, 'ReactMount: Root element ID differed from reactRootID.') : undefined; var containerChild = container.firstChild; - if (containerChild && - reactRootID === internalGetID(containerChild)) { + if (containerChild && reactRootID === internalGetID(containerChild)) { // If the container has a new child with the same ID as the old // root element, then rootElementsByReactRootID[reactRootID] is // just stale and needs to be updated. The case that deserves a // warning is when the container is empty. rootElementsByReactRootID[reactRootID] = containerChild; } else { - ("production" !== "development" ? warning( - false, - 'ReactMount: Root element has been removed from its original ' + - 'container. New container:', rootElement.parentNode - ) : null); + "development" !== 'production' ? warning(false, 'ReactMount: Root element has been removed from its original ' + 'container. New container: %s', rootElement.parentNode) : undefined; } } } @@ -13004,44 +11257,21 @@ var ReactMount = { * @param {string} id ID of a DOM node in the React component. * @return {DOMElement} Root DOM node of the React component. */ - findReactNodeByID: function(id) { + findReactNodeByID: function (id) { var reactRoot = ReactMount.findReactContainerForID(id); return ReactMount.findComponentRoot(reactRoot, id); }, /** - * True if the supplied `node` is rendered by React. - * - * @param {*} node DOM Element to check. - * @return {boolean} True if the DOM Element appears to be rendered by React. - * @internal - */ - isRenderedByReact: function(node) { - if (node.nodeType !== 1) { - // Not a DOMElement, therefore not a React component - return false; - } - var id = ReactMount.getID(node); - return id ? id.charAt(0) === SEPARATOR : false; - }, - - /** * Traverses up the ancestors of the supplied node to find a node that is a - * DOM representation of a React component. + * DOM representation of a React component rendered by this copy of React. * * @param {*} node * @return {?DOMEventTarget} * @internal */ - getFirstReactDOM: function(node) { - var current = node; - while (current && current.parentNode !== current) { - if (ReactMount.isRenderedByReact(current)) { - return current; - } - current = current.parentNode; - } - return null; + getFirstReactDOM: function (node) { + return findFirstReactDOMImpl(node); }, /** @@ -13054,12 +11284,17 @@ var ReactMount = { * @return {DOMEventTarget} DOM node with the supplied `targetID`. * @internal */ - findComponentRoot: function(ancestorNode, targetID) { + findComponentRoot: function (ancestorNode, targetID) { var firstChildren = findComponentRootReusableArray; var childIndex = 0; var deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode; + if ("development" !== 'production') { + // This will throw on the next line; give an early warning + "development" !== 'production' ? warning(deepestAncestor != null, 'React can\'t find the root component node for data-reactid value ' + '`%s`. If you\'re seeing this message, it probably means that ' + 'you\'ve loaded two copies of React on the page. At this time, only ' + 'a single copy of React can be loaded at a time.', targetID) : undefined; + } + firstChildren[0] = deepestAncestor.firstChild; firstChildren.length = 1; @@ -13085,7 +11320,6 @@ var ReactMount = { firstChildren.length = childIndex = 0; firstChildren.push(child.firstChild); } - } else { // If this child had no ID, then there's a chance that it was // injected automatically by the browser, as when a `<table>` @@ -13110,91 +11344,68 @@ var ReactMount = { firstChildren.length = 0; - ("production" !== "development" ? invariant( - false, - 'findComponentRoot(..., %s): Unable to find element. This probably ' + - 'means the DOM was unexpectedly mutated (e.g., by the browser), ' + - 'usually due to forgetting a <tbody> when using tables, nesting tags ' + - 'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' + - 'parent. ' + - 'Try inspecting the child nodes of the element with React ID `%s`.', - targetID, - ReactMount.getID(ancestorNode) - ) : invariant(false)); - }, - - _mountImageIntoNode: function(markup, container, shouldReuseMarkup) { - ("production" !== "development" ? invariant( - container && ( - (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) - ), - 'mountComponentIntoNode(...): Target container is not valid.' - ) : invariant(container && ( - (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) - ))); + !false ? "development" !== 'production' ? invariant(false, 'findComponentRoot(..., %s): Unable to find element. This probably ' + 'means the DOM was unexpectedly mutated (e.g., by the browser), ' + 'usually due to forgetting a <tbody> when using tables, nesting tags ' + 'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' + 'parent. ' + 'Try inspecting the child nodes of the element with React ID `%s`.', targetID, ReactMount.getID(ancestorNode)) : invariant(false) : undefined; + }, + + _mountImageIntoNode: function (markup, container, shouldReuseMarkup, transaction) { + !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? "development" !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : invariant(false) : undefined; if (shouldReuseMarkup) { var rootElement = getReactRootElementInContainer(container); if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { return; } else { - var checksum = rootElement.getAttribute( - ReactMarkupChecksum.CHECKSUM_ATTR_NAME - ); + var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); var rootMarkup = rootElement.outerHTML; - rootElement.setAttribute( - ReactMarkupChecksum.CHECKSUM_ATTR_NAME, - checksum - ); - - var diffIndex = firstDifferenceIndex(markup, rootMarkup); - var difference = ' (client) ' + - markup.substring(diffIndex - 20, diffIndex + 20) + - '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); - - ("production" !== "development" ? invariant( - container.nodeType !== DOC_NODE_TYPE, - 'You\'re trying to render a component to the document using ' + - 'server rendering but the checksum was invalid. This usually ' + - 'means you rendered a different component type or props on ' + - 'the client from the one on the server, or your render() ' + - 'methods are impure. React cannot handle this case due to ' + - 'cross-browser quirks by rendering at the document root. You ' + - 'should look for environment dependent code in your components ' + - 'and ensure the props are the same client and server side:\n%s', - difference - ) : invariant(container.nodeType !== DOC_NODE_TYPE)); - - if ("production" !== "development") { - ("production" !== "development" ? warning( - false, - 'React attempted to reuse markup in a container but the ' + - 'checksum was invalid. This generally means that you are ' + - 'using server rendering and the markup generated on the ' + - 'server was not what the client was expecting. React injected ' + - 'new markup to compensate which works but you have lost many ' + - 'of the benefits of server rendering. Instead, figure out ' + - 'why the markup being generated is different on the client ' + - 'or server:\n%s', - difference - ) : null); + rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); + + var normalizedMarkup = markup; + if ("development" !== 'production') { + // because rootMarkup is retrieved from the DOM, various normalizations + // will have occurred which will not be present in `markup`. Here, + // insert markup into a <div> or <iframe> depending on the container + // type to perform the same normalizations before comparing. + var normalizer; + if (container.nodeType === ELEMENT_NODE_TYPE) { + normalizer = document.createElement('div'); + normalizer.innerHTML = markup; + normalizedMarkup = normalizer.innerHTML; + } else { + normalizer = document.createElement('iframe'); + document.body.appendChild(normalizer); + normalizer.contentDocument.write(markup); + normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML; + document.body.removeChild(normalizer); + } + } + + var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup); + var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + + !(container.nodeType !== DOC_NODE_TYPE) ? "development" !== 'production' ? invariant(false, 'You\'re trying to render a component to the document using ' + 'server rendering but the checksum was invalid. This usually ' + 'means you rendered a different component type or props on ' + 'the client from the one on the server, or your render() ' + 'methods are impure. React cannot handle this case due to ' + 'cross-browser quirks by rendering at the document root. You ' + 'should look for environment dependent code in your components ' + 'and ensure the props are the same client and server side:\n%s', difference) : invariant(false) : undefined; + + if ("development" !== 'production') { + "development" !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : undefined; } } } - ("production" !== "development" ? invariant( - container.nodeType !== DOC_NODE_TYPE, - 'You\'re trying to render a component to the document but ' + - 'you didn\'t use server rendering. We can\'t do this ' + - 'without using server rendering due to cross-browser quirks. ' + - 'See React.renderToString() for server rendering.' - ) : invariant(container.nodeType !== DOC_NODE_TYPE)); + !(container.nodeType !== DOC_NODE_TYPE) ? "development" !== 'production' ? invariant(false, 'You\'re trying to render a component to the document but ' + 'you didn\'t use server rendering. We can\'t do this ' + 'without using server rendering due to cross-browser quirks. ' + 'See ReactDOMServer.renderToString() for server rendering.') : invariant(false) : undefined; - setInnerHTML(container, markup); + if (transaction.useCreateElement) { + while (container.lastChild) { + container.removeChild(container.lastChild); + } + container.appendChild(markup); + } else { + setInnerHTML(container, markup); + } }, + ownerDocumentContextKey: ownerDocumentContextKey, + /** * React ID utilities. */ @@ -13209,6 +11420,8 @@ var ReactMount = { getNodeFromInstance: getNodeFromInstance, + isValid: isValid, + purgeID: purgeID }; @@ -13218,8 +11431,7 @@ ReactPerf.measureMethods(ReactMount, 'ReactMount', { }); module.exports = ReactMount; - -},{"100":100,"11":11,"123":123,"130":130,"144":144,"149":149,"150":150,"164":164,"167":167,"171":171,"33":33,"45":45,"63":63,"64":64,"65":65,"72":72,"73":73,"76":76,"82":82,"89":89,"99":99}],78:[function(_dereq_,module,exports){ +},{"10":10,"117":117,"123":123,"125":125,"127":127,"132":132,"136":136,"143":143,"154":154,"23":23,"26":26,"34":34,"39":39,"52":52,"55":55,"61":61,"62":62,"64":64,"71":71,"76":76,"82":82,"83":83}],66:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -13234,11 +11446,14 @@ module.exports = ReactMount; 'use strict'; -var ReactComponentEnvironment = _dereq_(41); -var ReactMultiChildUpdateTypes = _dereq_(79); +var ReactComponentEnvironment = _dereq_(32); +var ReactMultiChildUpdateTypes = _dereq_(67); -var ReactReconciler = _dereq_(89); -var ReactChildReconciler = _dereq_(36); +var ReactCurrentOwner = _dereq_(34); +var ReactReconciler = _dereq_(76); +var ReactChildReconciler = _dereq_(27); + +var flattenChildren = _dereq_(108); /** * Updating children of a component may trigger recursive updates. The depth is @@ -13275,14 +11490,14 @@ var markupQueue = []; * @param {number} toIndex Destination index. * @private */ -function enqueueMarkup(parentID, markup, toIndex) { +function enqueueInsertMarkup(parentID, markup, toIndex) { // NOTE: Null values reduce hidden classes. updateQueue.push({ parentID: parentID, parentNode: null, type: ReactMultiChildUpdateTypes.INSERT_MARKUP, markupIndex: markupQueue.push(markup) - 1, - textContent: null, + content: null, fromIndex: null, toIndex: toIndex }); @@ -13303,7 +11518,7 @@ function enqueueMove(parentID, fromIndex, toIndex) { parentNode: null, type: ReactMultiChildUpdateTypes.MOVE_EXISTING, markupIndex: null, - textContent: null, + content: null, fromIndex: fromIndex, toIndex: toIndex }); @@ -13323,13 +11538,33 @@ function enqueueRemove(parentID, fromIndex) { parentNode: null, type: ReactMultiChildUpdateTypes.REMOVE_NODE, markupIndex: null, - textContent: null, + content: null, fromIndex: fromIndex, toIndex: null }); } /** + * Enqueues setting the markup of a node. + * + * @param {string} parentID ID of the parent component. + * @param {string} markup Markup that renders into an element. + * @private + */ +function enqueueSetMarkup(parentID, markup) { + // NOTE: Null values reduce hidden classes. + updateQueue.push({ + parentID: parentID, + parentNode: null, + type: ReactMultiChildUpdateTypes.SET_MARKUP, + markupIndex: null, + content: markup, + fromIndex: null, + toIndex: null + }); +} + +/** * Enqueues setting the text content. * * @param {string} parentID ID of the parent component. @@ -13343,7 +11578,7 @@ function enqueueTextContent(parentID, textContent) { parentNode: null, type: ReactMultiChildUpdateTypes.TEXT_CONTENT, markupIndex: null, - textContent: textContent, + content: textContent, fromIndex: null, toIndex: null }); @@ -13356,10 +11591,7 @@ function enqueueTextContent(parentID, textContent) { */ function processQueue() { if (updateQueue.length) { - ReactComponentEnvironment.processChildrenUpdates( - updateQueue, - markupQueue - ); + ReactComponentEnvironment.processChildrenUpdates(updateQueue, markupQueue); clearQueue(); } } @@ -13391,6 +11623,37 @@ var ReactMultiChild = { */ Mixin: { + _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { + if ("development" !== 'production') { + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); + } finally { + ReactCurrentOwner.current = null; + } + } + } + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); + }, + + _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, transaction, context) { + var nextChildren; + if ("development" !== 'production') { + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + nextChildren = flattenChildren(nextNestedChildrenElements); + } finally { + ReactCurrentOwner.current = null; + } + return ReactChildReconciler.updateChildren(prevChildren, nextChildren, transaction, context); + } + } + nextChildren = flattenChildren(nextNestedChildrenElements); + return ReactChildReconciler.updateChildren(prevChildren, nextChildren, transaction, context); + }, + /** * Generates a "mount image" for each of the supplied children. In the case * of `ReactDOMComponent`, a mount image is a string of markup. @@ -13399,10 +11662,8 @@ var ReactMultiChild = { * @return {array} An array of mounted representations. * @internal */ - mountChildren: function(nestedChildren, transaction, context) { - var children = ReactChildReconciler.instantiateChildren( - nestedChildren, transaction, context - ); + mountChildren: function (nestedChildren, transaction, context) { + var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); this._renderedChildren = children; var mountImages = []; var index = 0; @@ -13411,15 +11672,9 @@ var ReactMultiChild = { var child = children[name]; // Inlined for performance, see `ReactInstanceHandles.createReactID`. var rootID = this._rootNodeID + name; - var mountImage = ReactReconciler.mountComponent( - child, - rootID, - transaction, - context - ); - child._mountIndex = index; + var mountImage = ReactReconciler.mountComponent(child, rootID, transaction, context); + child._mountIndex = index++; mountImages.push(mountImage); - index++; } } return mountImages; @@ -13431,7 +11686,7 @@ var ReactMultiChild = { * @param {string} nextContent String of content. * @internal */ - updateTextContent: function(nextContent) { + updateTextContent: function (nextContent) { updateDepth++; var errorThrown = true; try { @@ -13441,7 +11696,7 @@ var ReactMultiChild = { // TODO: The setTextContent operation should be enough for (var name in prevChildren) { if (prevChildren.hasOwnProperty(name)) { - this._unmountChildByName(prevChildren[name], name); + this._unmountChild(prevChildren[name]); } } // Set new text content. @@ -13460,17 +11715,49 @@ var ReactMultiChild = { }, /** + * Replaces any rendered children with a markup string. + * + * @param {string} nextMarkup String of markup. + * @internal + */ + updateMarkup: function (nextMarkup) { + updateDepth++; + var errorThrown = true; + try { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + this._unmountChildByName(prevChildren[name], name); + } + } + this.setMarkup(nextMarkup); + errorThrown = false; + } finally { + updateDepth--; + if (!updateDepth) { + if (errorThrown) { + clearQueue(); + } else { + processQueue(); + } + } + } + }, + + /** * Updates the rendered children with new children. * - * @param {?object} nextNestedChildren Nested child maps. + * @param {?object} nextNestedChildrenElements Nested child element maps. * @param {ReactReconcileTransaction} transaction * @internal */ - updateChildren: function(nextNestedChildren, transaction, context) { + updateChildren: function (nextNestedChildrenElements, transaction, context) { updateDepth++; var errorThrown = true; try { - this._updateChildren(nextNestedChildren, transaction, context); + this._updateChildren(nextNestedChildrenElements, transaction, context); errorThrown = false; } finally { updateDepth--; @@ -13481,7 +11768,6 @@ var ReactMultiChild = { processQueue(); } } - } }, @@ -13489,16 +11775,14 @@ var ReactMultiChild = { * Improve performance by isolating this hot code path from the try/catch * block in `updateChildren`. * - * @param {?object} nextNestedChildren Nested child maps. + * @param {?object} nextNestedChildrenElements Nested child element maps. * @param {ReactReconcileTransaction} transaction * @final * @protected */ - _updateChildren: function(nextNestedChildren, transaction, context) { + _updateChildren: function (nextNestedChildrenElements, transaction, context) { var prevChildren = this._renderedChildren; - var nextChildren = ReactChildReconciler.updateChildren( - prevChildren, nextNestedChildren, transaction, context - ); + var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, transaction, context); this._renderedChildren = nextChildren; if (!nextChildren && !prevChildren) { return; @@ -13522,20 +11806,17 @@ var ReactMultiChild = { if (prevChild) { // Update `lastIndex` before `_mountIndex` gets unset by unmounting. lastIndex = Math.max(prevChild._mountIndex, lastIndex); - this._unmountChildByName(prevChild, name); + this._unmountChild(prevChild); } // The child must be instantiated before it's mounted. - this._mountChildByNameAtIndex( - nextChild, name, nextIndex, transaction, context - ); + this._mountChildByNameAtIndex(nextChild, name, nextIndex, transaction, context); } nextIndex++; } // Remove children that are no longer present. for (name in prevChildren) { - if (prevChildren.hasOwnProperty(name) && - !(nextChildren && nextChildren.hasOwnProperty(name))) { - this._unmountChildByName(prevChildren[name], name); + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { + this._unmountChild(prevChildren[name]); } } }, @@ -13546,7 +11827,7 @@ var ReactMultiChild = { * * @internal */ - unmountChildren: function() { + unmountChildren: function () { var renderedChildren = this._renderedChildren; ReactChildReconciler.unmountChildren(renderedChildren); this._renderedChildren = null; @@ -13560,7 +11841,7 @@ var ReactMultiChild = { * @param {number} lastIndex Last index visited of the siblings of `child`. * @protected */ - moveChild: function(child, toIndex, lastIndex) { + moveChild: function (child, toIndex, lastIndex) { // If the index of `child` is less than `lastIndex`, then it needs to // be moved. Otherwise, we do not need to move it because a child will be // inserted or moved before `child`. @@ -13576,8 +11857,8 @@ var ReactMultiChild = { * @param {string} mountImage Markup to insert. * @protected */ - createChild: function(child, mountImage) { - enqueueMarkup(this._rootNodeID, mountImage, child._mountIndex); + createChild: function (child, mountImage) { + enqueueInsertMarkup(this._rootNodeID, mountImage, child._mountIndex); }, /** @@ -13586,7 +11867,7 @@ var ReactMultiChild = { * @param {ReactComponent} child Child to remove. * @protected */ - removeChild: function(child) { + removeChild: function (child) { enqueueRemove(this._rootNodeID, child._mountIndex); }, @@ -13596,11 +11877,21 @@ var ReactMultiChild = { * @param {string} textContent Text content to set. * @protected */ - setTextContent: function(textContent) { + setTextContent: function (textContent) { enqueueTextContent(this._rootNodeID, textContent); }, /** + * Sets this markup string. + * + * @param {string} markup Markup to set. + * @protected + */ + setMarkup: function (markup) { + enqueueSetMarkup(this._rootNodeID, markup); + }, + + /** * Mounts a child with the supplied name. * * NOTE: This is part of `updateChildren` and is here for readability. @@ -13611,34 +11902,23 @@ var ReactMultiChild = { * @param {ReactReconcileTransaction} transaction * @private */ - _mountChildByNameAtIndex: function( - child, - name, - index, - transaction, - context) { + _mountChildByNameAtIndex: function (child, name, index, transaction, context) { // Inlined for performance, see `ReactInstanceHandles.createReactID`. var rootID = this._rootNodeID + name; - var mountImage = ReactReconciler.mountComponent( - child, - rootID, - transaction, - context - ); + var mountImage = ReactReconciler.mountComponent(child, rootID, transaction, context); child._mountIndex = index; this.createChild(child, mountImage); }, /** - * Unmounts a rendered child by name. + * Unmounts a rendered child. * * NOTE: This is part of `updateChildren` and is here for readability. * * @param {ReactComponent} child Component to unmount. - * @param {string} name Name of the child in `this._renderedChildren`. * @private */ - _unmountChildByName: function(child, name) { + _unmountChild: function (child) { this.removeChild(child); child._mountIndex = null; } @@ -13648,8 +11928,7 @@ var ReactMultiChild = { }; module.exports = ReactMultiChild; - -},{"36":36,"41":41,"79":79,"89":89}],79:[function(_dereq_,module,exports){ +},{"108":108,"27":27,"32":32,"34":34,"67":67,"76":76}],67:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -13663,7 +11942,7 @@ module.exports = ReactMultiChild; 'use strict'; -var keyMirror = _dereq_(156); +var keyMirror = _dereq_(146); /** * When a component's children are updated, a series of update configuration @@ -13677,12 +11956,12 @@ var ReactMultiChildUpdateTypes = keyMirror({ INSERT_MARKUP: null, MOVE_EXISTING: null, REMOVE_NODE: null, + SET_MARKUP: null, TEXT_CONTENT: null }); module.exports = ReactMultiChildUpdateTypes; - -},{"156":156}],80:[function(_dereq_,module,exports){ +},{"146":146}],68:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -13696,35 +11975,30 @@ module.exports = ReactMultiChildUpdateTypes; 'use strict'; -var assign = _dereq_(29); -var invariant = _dereq_(150); +var assign = _dereq_(23); +var invariant = _dereq_(143); var autoGenerateWrapperClass = null; var genericComponentClass = null; -// This registry keeps track of wrapper classes around native tags +// This registry keeps track of wrapper classes around native tags. var tagToComponentClass = {}; var textComponentClass = null; var ReactNativeComponentInjection = { // This accepts a class that receives the tag string. This is a catch all // that can render any kind of tag. - injectGenericComponentClass: function(componentClass) { + injectGenericComponentClass: function (componentClass) { genericComponentClass = componentClass; }, // This accepts a text component class that takes the text string to be // rendered as props. - injectTextComponentClass: function(componentClass) { + injectTextComponentClass: function (componentClass) { textComponentClass = componentClass; }, // This accepts a keyed object with classes as values. Each key represents a // tag. That particular tag will use this class instead of the generic one. - injectComponentClasses: function(componentClasses) { + injectComponentClasses: function (componentClasses) { assign(tagToComponentClass, componentClasses); - }, - // Temporary hack since we expect DOM refs to behave like composites, - // for this release. - injectAutoWrapper: function(wrapperFactory) { - autoGenerateWrapperClass = wrapperFactory; } }; @@ -13753,11 +12027,7 @@ function getComponentClassForElement(element) { * @return {function} The internal class constructor function. */ function createInternalComponent(element) { - ("production" !== "development" ? invariant( - genericComponentClass, - 'There is no registered component for the tag %s', - element.type - ) : invariant(genericComponentClass)); + !genericComponentClass ? "development" !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : invariant(false) : undefined; return new genericComponentClass(element.type, element.props); } @@ -13786,8 +12056,126 @@ var ReactNativeComponent = { }; module.exports = ReactNativeComponent; +},{"143":143,"23":23}],69:[function(_dereq_,module,exports){ +/** + * Copyright 2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactNoopUpdateQueue + */ + +'use strict'; + +var warning = _dereq_(154); + +function warnTDZ(publicInstance, callerName) { + if ("development" !== 'production') { + "development" !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, publicInstance.constructor && publicInstance.constructor.displayName || '') : undefined; + } +} + +/** + * This is the abstract API for an update queue. + */ +var ReactNoopUpdateQueue = { + + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + enqueueCallback: function (publicInstance, callback) {}, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + warnTDZ(publicInstance, 'forceUpdate'); + }, -},{"150":150,"29":29}],81:[function(_dereq_,module,exports){ + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + warnTDZ(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + warnTDZ(publicInstance, 'setState'); + }, + + /** + * Sets a subset of the props. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialProps Subset of the next props. + * @internal + */ + enqueueSetProps: function (publicInstance, partialProps) { + warnTDZ(publicInstance, 'setProps'); + }, + + /** + * Replaces all of the props. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} props New props. + * @internal + */ + enqueueReplaceProps: function (publicInstance, props) { + warnTDZ(publicInstance, 'replaceProps'); + } + +}; + +module.exports = ReactNoopUpdateQueue; +},{"154":154}],70:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -13801,7 +12189,7 @@ module.exports = ReactNativeComponent; 'use strict'; -var invariant = _dereq_(150); +var invariant = _dereq_(143); /** * ReactOwners are capable of storing references to owned components. @@ -13840,11 +12228,8 @@ var ReactOwner = { * @return {boolean} True if `object` is a valid owner. * @final */ - isValidOwner: function(object) { - return !!( - (object && - typeof object.attachRef === 'function' && typeof object.detachRef === 'function') - ); + isValidOwner: function (object) { + return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); }, /** @@ -13856,15 +12241,8 @@ var ReactOwner = { * @final * @internal */ - addComponentAsRefTo: function(component, ref, owner) { - ("production" !== "development" ? invariant( - ReactOwner.isValidOwner(owner), - 'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' + - 'usually means that you\'re trying to add a ref to a component that ' + - 'doesn\'t have an owner (that is, was not created inside of another ' + - 'component\'s `render` method). Try rendering this component inside of ' + - 'a new top-level component which will hold the ref.' - ) : invariant(ReactOwner.isValidOwner(owner))); + addComponentAsRefTo: function (component, ref, owner) { + !ReactOwner.isValidOwner(owner) ? "development" !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might ' + 'be adding a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : undefined; owner.attachRef(ref, component); }, @@ -13877,15 +12255,8 @@ var ReactOwner = { * @final * @internal */ - removeComponentAsRefFrom: function(component, ref, owner) { - ("production" !== "development" ? invariant( - ReactOwner.isValidOwner(owner), - 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' + - 'usually means that you\'re trying to remove a ref to a component that ' + - 'doesn\'t have an owner (that is, was not created inside of another ' + - 'component\'s `render` method). Try rendering this component inside of ' + - 'a new top-level component which will hold the ref.' - ) : invariant(ReactOwner.isValidOwner(owner))); + removeComponentAsRefFrom: function (component, ref, owner) { + !ReactOwner.isValidOwner(owner) ? "development" !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might ' + 'be removing a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : undefined; // Check that `component` is still the current ref because we do not want to // detach the ref if another component stole it. if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) { @@ -13896,8 +12267,7 @@ var ReactOwner = { }; module.exports = ReactOwner; - -},{"150":150}],82:[function(_dereq_,module,exports){ +},{"143":143}],71:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -13934,17 +12304,13 @@ var ReactPerf = { * @param {string} objectName * @param {object<string>} methodNames */ - measureMethods: function(object, objectName, methodNames) { - if ("production" !== "development") { + measureMethods: function (object, objectName, methodNames) { + if ("development" !== 'production') { for (var key in methodNames) { if (!methodNames.hasOwnProperty(key)) { continue; } - object[key] = ReactPerf.measure( - objectName, - methodNames[key], - object[key] - ); + object[key] = ReactPerf.measure(objectName, methodNames[key], object[key]); } } }, @@ -13957,10 +12323,10 @@ var ReactPerf = { * @param {function} func * @return {function} */ - measure: function(objName, fnName, func) { - if ("production" !== "development") { + measure: function (objName, fnName, func) { + if ("development" !== 'production') { var measuredFunc = null; - var wrapper = function() { + var wrapper = function () { if (ReactPerf.enableMeasure) { if (!measuredFunc) { measuredFunc = ReactPerf.storedMeasure(objName, fnName, func); @@ -13979,7 +12345,7 @@ var ReactPerf = { /** * @param {function} measure */ - injectMeasure: function(measure) { + injectMeasure: function (measure) { ReactPerf.storedMeasure = measure; } } @@ -13998,118 +12364,7 @@ function _noMeasure(objName, fnName, func) { } module.exports = ReactPerf; - -},{}],83:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactPropTransferer - */ - -'use strict'; - -var assign = _dereq_(29); -var emptyFunction = _dereq_(129); -var joinClasses = _dereq_(155); - -/** - * Creates a transfer strategy that will merge prop values using the supplied - * `mergeStrategy`. If a prop was previously unset, this just sets it. - * - * @param {function} mergeStrategy - * @return {function} - */ -function createTransferStrategy(mergeStrategy) { - return function(props, key, value) { - if (!props.hasOwnProperty(key)) { - props[key] = value; - } else { - props[key] = mergeStrategy(props[key], value); - } - }; -} - -var transferStrategyMerge = createTransferStrategy(function(a, b) { - // `merge` overrides the first object's (`props[key]` above) keys using the - // second object's (`value`) keys. An object's style's existing `propA` would - // get overridden. Flip the order here. - return assign({}, b, a); -}); - -/** - * Transfer strategies dictate how props are transferred by `transferPropsTo`. - * NOTE: if you add any more exceptions to this list you should be sure to - * update `cloneWithProps()` accordingly. - */ -var TransferStrategies = { - /** - * Never transfer `children`. - */ - children: emptyFunction, - /** - * Transfer the `className` prop by merging them. - */ - className: createTransferStrategy(joinClasses), - /** - * Transfer the `style` prop (which is an object) by merging them. - */ - style: transferStrategyMerge -}; - -/** - * Mutates the first argument by transferring the properties from the second - * argument. - * - * @param {object} props - * @param {object} newProps - * @return {object} - */ -function transferInto(props, newProps) { - for (var thisKey in newProps) { - if (!newProps.hasOwnProperty(thisKey)) { - continue; - } - - var transferStrategy = TransferStrategies[thisKey]; - - if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) { - transferStrategy(props, thisKey, newProps[thisKey]); - } else if (!props.hasOwnProperty(thisKey)) { - props[thisKey] = newProps[thisKey]; - } - } - return props; -} - -/** - * ReactPropTransferer are capable of transferring props to another component - * using a `transferPropsTo` method. - * - * @class ReactPropTransferer - */ -var ReactPropTransferer = { - - /** - * Merge two props objects using TransferStrategies. - * - * @param {object} oldProps original props (they take precedence) - * @param {object} newProps new props to merge in - * @return {object} a new object containing both sets of props merged. - */ - mergeProps: function(oldProps, newProps) { - return transferInto(assign({}, oldProps), newProps); - } - -}; - -module.exports = ReactPropTransferer; - -},{"129":129,"155":155,"29":29}],84:[function(_dereq_,module,exports){ +},{}],72:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14125,7 +12380,7 @@ module.exports = ReactPropTransferer; var ReactPropTypeLocationNames = {}; -if ("production" !== "development") { +if ("development" !== 'production') { ReactPropTypeLocationNames = { prop: 'prop', context: 'context', @@ -14134,8 +12389,7 @@ if ("production" !== "development") { } module.exports = ReactPropTypeLocationNames; - -},{}],85:[function(_dereq_,module,exports){ +},{}],73:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14149,7 +12403,7 @@ module.exports = ReactPropTypeLocationNames; 'use strict'; -var keyMirror = _dereq_(156); +var keyMirror = _dereq_(146); var ReactPropTypeLocations = keyMirror({ prop: null, @@ -14158,8 +12412,7 @@ var ReactPropTypeLocations = keyMirror({ }); module.exports = ReactPropTypeLocations; - -},{"156":156}],86:[function(_dereq_,module,exports){ +},{"146":146}],74:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14173,11 +12426,11 @@ module.exports = ReactPropTypeLocations; 'use strict'; -var ReactElement = _dereq_(63); -var ReactFragment = _dereq_(69); -var ReactPropTypeLocationNames = _dereq_(84); +var ReactElement = _dereq_(52); +var ReactPropTypeLocationNames = _dereq_(72); -var emptyFunction = _dereq_(129); +var emptyFunction = _dereq_(135); +var getIteratorFn = _dereq_(114); /** * Collection of methods that allow declaration and validation of props that are @@ -14228,9 +12481,6 @@ var emptyFunction = _dereq_(129); var ANONYMOUS = '<<anonymous>>'; -var elementTypeChecker = createElementTypeChecker(); -var nodeTypeChecker = createNodeChecker(); - var ReactPropTypes = { array: createPrimitiveTypeChecker('array'), bool: createPrimitiveTypeChecker('boolean'), @@ -14241,9 +12491,9 @@ var ReactPropTypes = { any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, - element: elementTypeChecker, + element: createElementTypeChecker(), instanceOf: createInstanceTypeChecker, - node: nodeTypeChecker, + node: createNodeChecker(), objectOf: createObjectOfTypeChecker, oneOf: createEnumTypeChecker, oneOfType: createUnionTypeChecker, @@ -14251,19 +12501,17 @@ var ReactPropTypes = { }; function createChainableTypeChecker(validate) { - function checkType(isRequired, props, propName, componentName, location) { + function checkType(isRequired, props, propName, componentName, location, propFullName) { componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; if (props[propName] == null) { var locationName = ReactPropTypeLocationNames[location]; if (isRequired) { - return new Error( - ("Required " + locationName + " `" + propName + "` was not specified in ") + - ("`" + componentName + "`.") - ); + return new Error('Required ' + locationName + ' `' + propFullName + '` was not specified in ' + ('`' + componentName + '`.')); } return null; } else { - return validate(props, propName, componentName, location); + return validate(props, propName, componentName, location, propFullName); } } @@ -14274,7 +12522,7 @@ function createChainableTypeChecker(validate) { } function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location) { + function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { @@ -14284,10 +12532,7 @@ function createPrimitiveTypeChecker(expectedType) { // 'of type `object`'. var preciseType = getPreciseType(propValue); - return new Error( - ("Invalid " + locationName + " `" + propName + "` of type `" + preciseType + "` ") + - ("supplied to `" + componentName + "`, expected `" + expectedType + "`.") - ); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); } return null; } @@ -14299,18 +12544,15 @@ function createAnyTypeChecker() { } function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location) { + function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!Array.isArray(propValue)) { var locationName = ReactPropTypeLocationNames[location]; var propType = getPropType(propValue); - return new Error( - ("Invalid " + locationName + " `" + propName + "` of type ") + - ("`" + propType + "` supplied to `" + componentName + "`, expected an array.") - ); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location); + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']'); if (error instanceof Error) { return error; } @@ -14321,13 +12563,10 @@ function createArrayOfTypeChecker(typeChecker) { } function createElementTypeChecker() { - function validate(props, propName, componentName, location) { + function validate(props, propName, componentName, location, propFullName) { if (!ReactElement.isValidElement(props[propName])) { var locationName = ReactPropTypeLocationNames[location]; - return new Error( - ("Invalid " + locationName + " `" + propName + "` supplied to ") + - ("`" + componentName + "`, expected a ReactElement.") - ); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a single ReactElement.')); } return null; } @@ -14335,14 +12574,12 @@ function createElementTypeChecker() { } function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location) { + function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var locationName = ReactPropTypeLocationNames[location]; var expectedClassName = expectedClass.name || ANONYMOUS; - return new Error( - ("Invalid " + locationName + " `" + propName + "` supplied to ") + - ("`" + componentName + "`, expected instance of `" + expectedClassName + "`.") - ); + var actualClassName = getClassName(props[propName]); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } @@ -14350,7 +12587,13 @@ function createInstanceTypeChecker(expectedClass) { } function createEnumTypeChecker(expectedValues) { - function validate(props, propName, componentName, location) { + if (!Array.isArray(expectedValues)) { + return createChainableTypeChecker(function () { + return new Error('Invalid argument supplied to oneOf, expected an instance of array.'); + }); + } + + function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (propValue === expectedValues[i]) { @@ -14360,28 +12603,22 @@ function createEnumTypeChecker(expectedValues) { var locationName = ReactPropTypeLocationNames[location]; var valuesString = JSON.stringify(expectedValues); - return new Error( - ("Invalid " + locationName + " `" + propName + "` of value `" + propValue + "` ") + - ("supplied to `" + componentName + "`, expected one of " + valuesString + ".") - ); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location) { + function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { var locationName = ReactPropTypeLocationNames[location]; - return new Error( - ("Invalid " + locationName + " `" + propName + "` of type ") + - ("`" + propType + "` supplied to `" + componentName + "`, expected an object.") - ); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (propValue.hasOwnProperty(key)) { - var error = typeChecker(propValue, key, componentName, location); + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key); if (error instanceof Error) { return error; } @@ -14393,31 +12630,31 @@ function createObjectOfTypeChecker(typeChecker) { } function createUnionTypeChecker(arrayOfTypeCheckers) { - function validate(props, propName, componentName, location) { + if (!Array.isArray(arrayOfTypeCheckers)) { + return createChainableTypeChecker(function () { + return new Error('Invalid argument supplied to oneOfType, expected an instance of array.'); + }); + } + + function validate(props, propName, componentName, location, propFullName) { for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; - if (checker(props, propName, componentName, location) == null) { + if (checker(props, propName, componentName, location, propFullName) == null) { return null; } } var locationName = ReactPropTypeLocationNames[location]; - return new Error( - ("Invalid " + locationName + " `" + propName + "` supplied to ") + - ("`" + componentName + "`.") - ); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } return createChainableTypeChecker(validate); } function createNodeChecker() { - function validate(props, propName, componentName, location) { + function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { var locationName = ReactPropTypeLocationNames[location]; - return new Error( - ("Invalid " + locationName + " `" + propName + "` supplied to ") + - ("`" + componentName + "`, expected a ReactNode.") - ); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } @@ -14425,22 +12662,19 @@ function createNodeChecker() { } function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location) { + function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { var locationName = ReactPropTypeLocationNames[location]; - return new Error( - ("Invalid " + locationName + " `" + propName + "` of type `" + propType + "` ") + - ("supplied to `" + componentName + "`, expected `object`.") - ); + return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; if (!checker) { continue; } - var error = checker(propValue, key, componentName, location); + var error = checker(propValue, key, componentName, location, propFullName + '.' + key); if (error) { return error; } @@ -14465,12 +12699,32 @@ function isNode(propValue) { if (propValue === null || ReactElement.isValidElement(propValue)) { return true; } - propValue = ReactFragment.extractIfFragment(propValue); - for (var k in propValue) { - if (!isNode(propValue[k])) { - return false; + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } } + } else { + return false; } + return true; default: return false; @@ -14506,65 +12760,16 @@ function getPreciseType(propValue) { return propType; } -module.exports = ReactPropTypes; - -},{"129":129,"63":63,"69":69,"84":84}],87:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactPutListenerQueue - */ - -'use strict'; - -var PooledClass = _dereq_(30); -var ReactBrowserEventEmitter = _dereq_(33); - -var assign = _dereq_(29); - -function ReactPutListenerQueue() { - this.listenersToPut = []; -} - -assign(ReactPutListenerQueue.prototype, { - enqueuePutListener: function(rootNodeID, propKey, propValue) { - this.listenersToPut.push({ - rootNodeID: rootNodeID, - propKey: propKey, - propValue: propValue - }); - }, - - putListeners: function() { - for (var i = 0; i < this.listenersToPut.length; i++) { - var listenerToPut = this.listenersToPut[i]; - ReactBrowserEventEmitter.putListener( - listenerToPut.rootNodeID, - listenerToPut.propKey, - listenerToPut.propValue - ); - } - }, - - reset: function() { - this.listenersToPut.length = 0; - }, - - destructor: function() { - this.reset(); +// Returns class name of the object, if any. +function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return '<<anonymous>>'; } -}); - -PooledClass.addPoolingTo(ReactPutListenerQueue); - -module.exports = ReactPutListenerQueue; + return propValue.constructor.name; +} -},{"29":29,"30":30,"33":33}],88:[function(_dereq_,module,exports){ +module.exports = ReactPropTypes; +},{"114":114,"135":135,"52":52,"72":72}],75:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14579,14 +12784,14 @@ module.exports = ReactPutListenerQueue; 'use strict'; -var CallbackQueue = _dereq_(7); -var PooledClass = _dereq_(30); -var ReactBrowserEventEmitter = _dereq_(33); -var ReactInputSelection = _dereq_(71); -var ReactPutListenerQueue = _dereq_(87); -var Transaction = _dereq_(116); +var CallbackQueue = _dereq_(6); +var PooledClass = _dereq_(24); +var ReactBrowserEventEmitter = _dereq_(26); +var ReactDOMFeatureFlags = _dereq_(39); +var ReactInputSelection = _dereq_(60); +var Transaction = _dereq_(100); -var assign = _dereq_(29); +var assign = _dereq_(23); /** * Ensures that, when possible, the selection range (currently selected text @@ -14613,7 +12818,7 @@ var EVENT_SUPPRESSION = { * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before * the reconciliation. */ - initialize: function() { + initialize: function () { var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); ReactBrowserEventEmitter.setEnabled(false); return currentlyEnabled; @@ -14621,10 +12826,10 @@ var EVENT_SUPPRESSION = { /** * @param {boolean} previouslyEnabled Enabled status of - * `ReactBrowserEventEmitter` before the reconciliation occured. `close` + * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` * restores the previous value. */ - close: function(previouslyEnabled) { + close: function (previouslyEnabled) { ReactBrowserEventEmitter.setEnabled(previouslyEnabled); } }; @@ -14637,39 +12842,24 @@ var ON_DOM_READY_QUEUEING = { /** * Initializes the internal `onDOMReady` queue. */ - initialize: function() { + initialize: function () { this.reactMountReady.reset(); }, /** * After DOM is flushed, invoke all registered `onDOMReady` callbacks. */ - close: function() { + close: function () { this.reactMountReady.notifyAll(); } }; -var PUT_LISTENER_QUEUEING = { - initialize: function() { - this.putListenerQueue.reset(); - }, - - close: function() { - this.putListenerQueue.putListeners(); - } -}; - /** * Executed within the scope of the `Transaction` instance. Consider these as * being member methods, but with an implied ordering while being isolated from * each other. */ -var TRANSACTION_WRAPPERS = [ - PUT_LISTENER_QUEUEING, - SELECTION_RESTORATION, - EVENT_SUPPRESSION, - ON_DOM_READY_QUEUEING -]; +var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; /** * Currently: @@ -14685,7 +12875,7 @@ var TRANSACTION_WRAPPERS = [ * * @class ReactReconcileTransaction */ -function ReactReconcileTransaction() { +function ReactReconcileTransaction(forceHTML) { this.reinitializeTransaction(); // Only server-side rendering really needs this option (see // `ReactServerRendering`), but server-side uses @@ -14694,7 +12884,7 @@ function ReactReconcileTransaction() { // `ReactTextComponent` checks it in `mountComponent`.` this.renderToStaticMarkup = false; this.reactMountReady = CallbackQueue.getPooled(null); - this.putListenerQueue = ReactPutListenerQueue.getPooled(); + this.useCreateElement = !forceHTML && ReactDOMFeatureFlags.useCreateElement; } var Mixin = { @@ -14702,45 +12892,36 @@ var Mixin = { * @see Transaction * @abstract * @final - * @return {array<object>} List of operation wrap proceedures. + * @return {array<object>} List of operation wrap procedures. * TODO: convert to array<TransactionWrapper> */ - getTransactionWrappers: function() { + getTransactionWrappers: function () { return TRANSACTION_WRAPPERS; }, /** * @return {object} The queue to collect `onDOMReady` callbacks with. */ - getReactMountReady: function() { + getReactMountReady: function () { return this.reactMountReady; }, - getPutListenerQueue: function() { - return this.putListenerQueue; - }, - /** * `PooledClass` looks for this, and will invoke this before allowing this - * instance to be resused. + * instance to be reused. */ - destructor: function() { + destructor: function () { CallbackQueue.release(this.reactMountReady); this.reactMountReady = null; - - ReactPutListenerQueue.release(this.putListenerQueue); - this.putListenerQueue = null; } }; - assign(ReactReconcileTransaction.prototype, Transaction.Mixin, Mixin); PooledClass.addPoolingTo(ReactReconcileTransaction); module.exports = ReactReconcileTransaction; - -},{"116":116,"29":29,"30":30,"33":33,"7":7,"71":71,"87":87}],89:[function(_dereq_,module,exports){ +},{"100":100,"23":23,"24":24,"26":26,"39":39,"6":6,"60":60}],76:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14754,8 +12935,7 @@ module.exports = ReactReconcileTransaction; 'use strict'; -var ReactRef = _dereq_(90); -var ReactElementValidator = _dereq_(64); +var ReactRef = _dereq_(77); /** * Helper to call ReactRef.attachRefs with this composite component, split out @@ -14777,14 +12957,11 @@ var ReactReconciler = { * @final * @internal */ - mountComponent: function(internalInstance, rootID, transaction, context) { + mountComponent: function (internalInstance, rootID, transaction, context) { var markup = internalInstance.mountComponent(rootID, transaction, context); - if ("production" !== "development") { - ReactElementValidator.checkAndWarnForMutatedProps( - internalInstance._currentElement - ); + if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); } - transaction.getReactMountReady().enqueue(attachRefs, internalInstance); return markup; }, @@ -14794,7 +12971,7 @@ var ReactReconciler = { * @final * @internal */ - unmountComponent: function(internalInstance) { + unmountComponent: function (internalInstance) { ReactRef.detachRefs(internalInstance, internalInstance._currentElement); internalInstance.unmountComponent(); }, @@ -14808,12 +12985,10 @@ var ReactReconciler = { * @param {object} context * @internal */ - receiveComponent: function( - internalInstance, nextElement, transaction, context - ) { + receiveComponent: function (internalInstance, nextElement, transaction, context) { var prevElement = internalInstance._currentElement; - if (nextElement === prevElement && nextElement._owner != null) { + if (nextElement === prevElement && context === internalInstance._context) { // Since elements are immutable after the owner is rendered, // we can do a cheap identity compare here to determine if this is a // superfluous reconcile. It's possible for state to be mutable but such @@ -14821,17 +12996,13 @@ var ReactReconciler = { // the element. We explicitly check for the existence of an owner since // it's possible for an element created outside a composite to be // deeply mutated and reused. - return; - } - if ("production" !== "development") { - ReactElementValidator.checkAndWarnForMutatedProps(nextElement); + // TODO: Bailing out early is just a perf optimization right? + // TODO: Removing the return statement should affect correctness? + return; } - var refsChanged = ReactRef.shouldUpdateRefs( - prevElement, - nextElement - ); + var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); if (refsChanged) { ReactRef.detachRefs(internalInstance, prevElement); @@ -14839,7 +13010,7 @@ var ReactReconciler = { internalInstance.receiveComponent(nextElement, transaction, context); - if (refsChanged) { + if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) { transaction.getReactMountReady().enqueue(attachRefs, internalInstance); } }, @@ -14851,18 +13022,14 @@ var ReactReconciler = { * @param {ReactReconcileTransaction} transaction * @internal */ - performUpdateIfNecessary: function( - internalInstance, - transaction - ) { + performUpdateIfNecessary: function (internalInstance, transaction) { internalInstance.performUpdateIfNecessary(transaction); } }; module.exports = ReactReconciler; - -},{"64":64,"90":90}],90:[function(_dereq_,module,exports){ +},{"77":77}],77:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14876,7 +13043,7 @@ module.exports = ReactReconciler; 'use strict'; -var ReactOwner = _dereq_(81); +var ReactOwner = _dereq_(70); var ReactRef = {}; @@ -14898,14 +13065,17 @@ function detachRef(ref, component, owner) { } } -ReactRef.attachRefs = function(instance, element) { +ReactRef.attachRefs = function (instance, element) { + if (element === null || element === false) { + return; + } var ref = element.ref; if (ref != null) { attachRef(ref, instance, element._owner); } }; -ReactRef.shouldUpdateRefs = function(prevElement, nextElement) { +ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { // If either the owner or a `ref` has changed, make sure the newest owner // has stored a reference to `this`, and the previous owner (if different) // has forgotten the reference to `this`. We use the element instead @@ -14918,13 +13088,19 @@ ReactRef.shouldUpdateRefs = function(prevElement, nextElement) { // is made. It probably belongs where the key checking and // instantiateReactComponent is done. - return ( - nextElement._owner !== prevElement._owner || - nextElement.ref !== prevElement.ref + var prevEmpty = prevElement === null || prevElement === false; + var nextEmpty = nextElement === null || nextElement === false; + + return( + // This has a few false positives w/r/t empty components. + prevEmpty || nextEmpty || nextElement._owner !== prevElement._owner || nextElement.ref !== prevElement.ref ); }; -ReactRef.detachRefs = function(instance, element) { +ReactRef.detachRefs = function (instance, element) { + if (element === null || element === false) { + return; + } var ref = element.ref; if (ref != null) { detachRef(ref, instance, element._owner); @@ -14932,8 +13108,7 @@ ReactRef.detachRefs = function(instance, element) { }; module.exports = ReactRef; - -},{"81":81}],91:[function(_dereq_,module,exports){ +},{"70":70}],78:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14952,7 +13127,7 @@ var ReactRootIndexInjection = { /** * @param {function} _createReactRootIndex */ - injectCreateReactRootIndex: function(_createReactRootIndex) { + injectCreateReactRootIndex: function (_createReactRootIndex) { ReactRootIndex.createReactRootIndex = _createReactRootIndex; } }; @@ -14963,8 +13138,31 @@ var ReactRootIndex = { }; module.exports = ReactRootIndex; +},{}],79:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactServerBatchingStrategy + * @typechecks + */ + +'use strict'; -},{}],92:[function(_dereq_,module,exports){ +var ReactServerBatchingStrategy = { + isBatchingUpdates: false, + batchedUpdates: function (callback) { + // Don't do anything here. During the server rendering we don't want to + // schedule any updates. We will simply ignore them. + } +}; + +module.exports = ReactServerBatchingStrategy; +},{}],80:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -14978,39 +13176,42 @@ module.exports = ReactRootIndex; */ 'use strict'; -var ReactElement = _dereq_(63); -var ReactInstanceHandles = _dereq_(72); -var ReactMarkupChecksum = _dereq_(76); -var ReactServerRenderingTransaction = - _dereq_(93); +var ReactDefaultBatchingStrategy = _dereq_(48); +var ReactElement = _dereq_(52); +var ReactInstanceHandles = _dereq_(61); +var ReactMarkupChecksum = _dereq_(64); +var ReactServerBatchingStrategy = _dereq_(79); +var ReactServerRenderingTransaction = _dereq_(81); +var ReactUpdates = _dereq_(83); -var emptyObject = _dereq_(130); -var instantiateReactComponent = _dereq_(149); -var invariant = _dereq_(150); +var emptyObject = _dereq_(136); +var instantiateReactComponent = _dereq_(117); +var invariant = _dereq_(143); /** * @param {ReactElement} element * @return {string} the HTML markup */ function renderToString(element) { - ("production" !== "development" ? invariant( - ReactElement.isValidElement(element), - 'renderToString(): You must pass a valid ReactElement.' - ) : invariant(ReactElement.isValidElement(element))); + !ReactElement.isValidElement(element) ? "development" !== 'production' ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') : invariant(false) : undefined; var transaction; try { + ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy); + var id = ReactInstanceHandles.createReactRootID(); transaction = ReactServerRenderingTransaction.getPooled(false); - return transaction.perform(function() { + return transaction.perform(function () { var componentInstance = instantiateReactComponent(element, null); - var markup = - componentInstance.mountComponent(id, transaction, emptyObject); + var markup = componentInstance.mountComponent(id, transaction, emptyObject); return ReactMarkupChecksum.addChecksumToMarkup(markup); }, null); } finally { ReactServerRenderingTransaction.release(transaction); + // Revert to the DOM batching strategy since these two renderers + // currently share these stateful modules. + ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy); } } @@ -15020,22 +13221,24 @@ function renderToString(element) { * (for generating static pages) */ function renderToStaticMarkup(element) { - ("production" !== "development" ? invariant( - ReactElement.isValidElement(element), - 'renderToStaticMarkup(): You must pass a valid ReactElement.' - ) : invariant(ReactElement.isValidElement(element))); + !ReactElement.isValidElement(element) ? "development" !== 'production' ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') : invariant(false) : undefined; var transaction; try { + ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy); + var id = ReactInstanceHandles.createReactRootID(); transaction = ReactServerRenderingTransaction.getPooled(true); - return transaction.perform(function() { + return transaction.perform(function () { var componentInstance = instantiateReactComponent(element, null); return componentInstance.mountComponent(id, transaction, emptyObject); }, null); } finally { ReactServerRenderingTransaction.release(transaction); + // Revert to the DOM batching strategy since these two renderers + // currently share these stateful modules. + ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy); } } @@ -15043,8 +13246,7 @@ module.exports = { renderToString: renderToString, renderToStaticMarkup: renderToStaticMarkup }; - -},{"130":130,"149":149,"150":150,"63":63,"72":72,"76":76,"93":93}],93:[function(_dereq_,module,exports){ +},{"117":117,"136":136,"143":143,"48":48,"52":52,"61":61,"64":64,"79":79,"81":81,"83":83}],81:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -15059,13 +13261,12 @@ module.exports = { 'use strict'; -var PooledClass = _dereq_(30); -var CallbackQueue = _dereq_(7); -var ReactPutListenerQueue = _dereq_(87); -var Transaction = _dereq_(116); +var PooledClass = _dereq_(24); +var CallbackQueue = _dereq_(6); +var Transaction = _dereq_(100); -var assign = _dereq_(29); -var emptyFunction = _dereq_(129); +var assign = _dereq_(23); +var emptyFunction = _dereq_(135); /** * Provides a `CallbackQueue` queue for collecting `onDOMReady` callbacks @@ -15075,30 +13276,19 @@ var ON_DOM_READY_QUEUEING = { /** * Initializes the internal `onDOMReady` queue. */ - initialize: function() { + initialize: function () { this.reactMountReady.reset(); }, close: emptyFunction }; -var PUT_LISTENER_QUEUEING = { - initialize: function() { - this.putListenerQueue.reset(); - }, - - close: emptyFunction -}; - /** * Executed within the scope of the `Transaction` instance. Consider these as * being member methods, but with an implied ordering while being isolated from * each other. */ -var TRANSACTION_WRAPPERS = [ - PUT_LISTENER_QUEUEING, - ON_DOM_READY_QUEUEING -]; +var TRANSACTION_WRAPPERS = [ON_DOM_READY_QUEUEING]; /** * @class ReactServerRenderingTransaction @@ -15108,7 +13298,7 @@ function ReactServerRenderingTransaction(renderToStaticMarkup) { this.reinitializeTransaction(); this.renderToStaticMarkup = renderToStaticMarkup; this.reactMountReady = CallbackQueue.getPooled(null); - this.putListenerQueue = ReactPutListenerQueue.getPooled(); + this.useCreateElement = false; } var Mixin = { @@ -15116,1114 +13306,35 @@ var Mixin = { * @see Transaction * @abstract * @final - * @return {array} Empty list of operation wrap proceedures. + * @return {array} Empty list of operation wrap procedures. */ - getTransactionWrappers: function() { + getTransactionWrappers: function () { return TRANSACTION_WRAPPERS; }, /** * @return {object} The queue to collect `onDOMReady` callbacks with. */ - getReactMountReady: function() { + getReactMountReady: function () { return this.reactMountReady; }, - getPutListenerQueue: function() { - return this.putListenerQueue; - }, - /** * `PooledClass` looks for this, and will invoke this before allowing this - * instance to be resused. + * instance to be reused. */ - destructor: function() { + destructor: function () { CallbackQueue.release(this.reactMountReady); this.reactMountReady = null; - - ReactPutListenerQueue.release(this.putListenerQueue); - this.putListenerQueue = null; } }; - -assign( - ReactServerRenderingTransaction.prototype, - Transaction.Mixin, - Mixin -); +assign(ReactServerRenderingTransaction.prototype, Transaction.Mixin, Mixin); PooledClass.addPoolingTo(ReactServerRenderingTransaction); module.exports = ReactServerRenderingTransaction; - -},{"116":116,"129":129,"29":29,"30":30,"7":7,"87":87}],94:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactStateSetters - */ - -'use strict'; - -var ReactStateSetters = { - /** - * Returns a function that calls the provided function, and uses the result - * of that to set the component's state. - * - * @param {ReactCompositeComponent} component - * @param {function} funcReturningState Returned callback uses this to - * determine how to update state. - * @return {function} callback that when invoked uses funcReturningState to - * determined the object literal to setState. - */ - createStateSetter: function(component, funcReturningState) { - return function(a, b, c, d, e, f) { - var partialState = funcReturningState.call(component, a, b, c, d, e, f); - if (partialState) { - component.setState(partialState); - } - }; - }, - - /** - * Returns a single-argument callback that can be used to update a single - * key in the component's state. - * - * Note: this is memoized function, which makes it inexpensive to call. - * - * @param {ReactCompositeComponent} component - * @param {string} key The key in the state that you should update. - * @return {function} callback of 1 argument which calls setState() with - * the provided keyName and callback argument. - */ - createStateKeySetter: function(component, key) { - // Memoize the setters. - var cache = component.__keySetters || (component.__keySetters = {}); - return cache[key] || (cache[key] = createStateKeySetter(component, key)); - } -}; - -function createStateKeySetter(component, key) { - // Partial state is allocated outside of the function closure so it can be - // reused with every call, avoiding memory allocation when this function - // is called. - var partialState = {}; - return function stateKeySetter(value) { - partialState[key] = value; - component.setState(partialState); - }; -} - -ReactStateSetters.Mixin = { - /** - * Returns a function that calls the provided function, and uses the result - * of that to set the component's state. - * - * For example, these statements are equivalent: - * - * this.setState({x: 1}); - * this.createStateSetter(function(xValue) { - * return {x: xValue}; - * })(1); - * - * @param {function} funcReturningState Returned callback uses this to - * determine how to update state. - * @return {function} callback that when invoked uses funcReturningState to - * determined the object literal to setState. - */ - createStateSetter: function(funcReturningState) { - return ReactStateSetters.createStateSetter(this, funcReturningState); - }, - - /** - * Returns a single-argument callback that can be used to update a single - * key in the component's state. - * - * For example, these statements are equivalent: - * - * this.setState({x: 1}); - * this.createStateKeySetter('x')(1); - * - * Note: this is memoized function, which makes it inexpensive to call. - * - * @param {string} key The key in the state that you should update. - * @return {function} callback of 1 argument which calls setState() with - * the provided keyName and callback argument. - */ - createStateKeySetter: function(key) { - return ReactStateSetters.createStateKeySetter(this, key); - } -}; - -module.exports = ReactStateSetters; - -},{}],95:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactTestUtils - */ - -'use strict'; - -var EventConstants = _dereq_(16); -var EventPluginHub = _dereq_(18); -var EventPropagators = _dereq_(21); -var React = _dereq_(31); -var ReactElement = _dereq_(63); -var ReactEmptyComponent = _dereq_(65); -var ReactBrowserEventEmitter = _dereq_(33); -var ReactCompositeComponent = _dereq_(43); -var ReactInstanceHandles = _dereq_(72); -var ReactInstanceMap = _dereq_(73); -var ReactMount = _dereq_(77); -var ReactUpdates = _dereq_(100); -var SyntheticEvent = _dereq_(108); - -var assign = _dereq_(29); -var emptyObject = _dereq_(130); - -var topLevelTypes = EventConstants.topLevelTypes; - -function Event(suffix) {} - -/** - * @class ReactTestUtils - */ - -/** - * Todo: Support the entire DOM.scry query syntax. For now, these simple - * utilities will suffice for testing purposes. - * @lends ReactTestUtils - */ -var ReactTestUtils = { - renderIntoDocument: function(instance) { - var div = document.createElement('div'); - // None of our tests actually require attaching the container to the - // DOM, and doing so creates a mess that we rely on test isolation to - // clean up, so we're going to stop honoring the name of this method - // (and probably rename it eventually) if no problems arise. - // document.documentElement.appendChild(div); - return React.render(instance, div); - }, - - isElement: function(element) { - return ReactElement.isValidElement(element); - }, - - isElementOfType: function(inst, convenienceConstructor) { - return ( - ReactElement.isValidElement(inst) && - inst.type === convenienceConstructor - ); - }, - - isDOMComponent: function(inst) { - // TODO: Fix this heuristic. It's just here because composites can currently - // pretend to be DOM components. - return !!(inst && inst.tagName && inst.getDOMNode); - }, - - isDOMComponentElement: function(inst) { - return !!(inst && - ReactElement.isValidElement(inst) && - !!inst.tagName); - }, - - isCompositeComponent: function(inst) { - return typeof inst.render === 'function' && - typeof inst.setState === 'function'; - }, - - isCompositeComponentWithType: function(inst, type) { - return !!(ReactTestUtils.isCompositeComponent(inst) && - (inst.constructor === type)); - }, - - isCompositeComponentElement: function(inst) { - if (!ReactElement.isValidElement(inst)) { - return false; - } - // We check the prototype of the type that will get mounted, not the - // instance itself. This is a future proof way of duck typing. - var prototype = inst.type.prototype; - return ( - typeof prototype.render === 'function' && - typeof prototype.setState === 'function' - ); - }, - - isCompositeComponentElementWithType: function(inst, type) { - return !!(ReactTestUtils.isCompositeComponentElement(inst) && - (inst.constructor === type)); - }, - - getRenderedChildOfCompositeComponent: function(inst) { - if (!ReactTestUtils.isCompositeComponent(inst)) { - return null; - } - var internalInstance = ReactInstanceMap.get(inst); - return internalInstance._renderedComponent.getPublicInstance(); - }, - - findAllInRenderedTree: function(inst, test) { - if (!inst) { - return []; - } - var ret = test(inst) ? [inst] : []; - if (ReactTestUtils.isDOMComponent(inst)) { - var internalInstance = ReactInstanceMap.get(inst); - var renderedChildren = internalInstance - ._renderedComponent - ._renderedChildren; - var key; - for (key in renderedChildren) { - if (!renderedChildren.hasOwnProperty(key)) { - continue; - } - if (!renderedChildren[key].getPublicInstance) { - continue; - } - ret = ret.concat( - ReactTestUtils.findAllInRenderedTree( - renderedChildren[key].getPublicInstance(), - test - ) - ); - } - } else if (ReactTestUtils.isCompositeComponent(inst)) { - ret = ret.concat( - ReactTestUtils.findAllInRenderedTree( - ReactTestUtils.getRenderedChildOfCompositeComponent(inst), - test - ) - ); - } - return ret; - }, - - /** - * Finds all instance of components in the rendered tree that are DOM - * components with the class name matching `className`. - * @return an array of all the matches. - */ - scryRenderedDOMComponentsWithClass: function(root, className) { - return ReactTestUtils.findAllInRenderedTree(root, function(inst) { - var instClassName = inst.props.className; - return ReactTestUtils.isDOMComponent(inst) && ( - (instClassName && (' ' + instClassName + ' ').indexOf(' ' + className + ' ') !== -1) - ); - }); - }, - - /** - * Like scryRenderedDOMComponentsWithClass but expects there to be one result, - * and returns that one result, or throws exception if there is any other - * number of matches besides one. - * @return {!ReactDOMComponent} The one match. - */ - findRenderedDOMComponentWithClass: function(root, className) { - var all = - ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className); - if (all.length !== 1) { - throw new Error('Did not find exactly one match ' + - '(found: ' + all.length + ') for class:' + className - ); - } - return all[0]; - }, - - - /** - * Finds all instance of components in the rendered tree that are DOM - * components with the tag name matching `tagName`. - * @return an array of all the matches. - */ - scryRenderedDOMComponentsWithTag: function(root, tagName) { - return ReactTestUtils.findAllInRenderedTree(root, function(inst) { - return ReactTestUtils.isDOMComponent(inst) && - inst.tagName === tagName.toUpperCase(); - }); - }, - - /** - * Like scryRenderedDOMComponentsWithTag but expects there to be one result, - * and returns that one result, or throws exception if there is any other - * number of matches besides one. - * @return {!ReactDOMComponent} The one match. - */ - findRenderedDOMComponentWithTag: function(root, tagName) { - var all = ReactTestUtils.scryRenderedDOMComponentsWithTag(root, tagName); - if (all.length !== 1) { - throw new Error('Did not find exactly one match for tag:' + tagName); - } - return all[0]; - }, - - - /** - * Finds all instances of components with type equal to `componentType`. - * @return an array of all the matches. - */ - scryRenderedComponentsWithType: function(root, componentType) { - return ReactTestUtils.findAllInRenderedTree(root, function(inst) { - return ReactTestUtils.isCompositeComponentWithType( - inst, - componentType - ); - }); - }, - - /** - * Same as `scryRenderedComponentsWithType` but expects there to be one result - * and returns that one result, or throws exception if there is any other - * number of matches besides one. - * @return {!ReactComponent} The one match. - */ - findRenderedComponentWithType: function(root, componentType) { - var all = ReactTestUtils.scryRenderedComponentsWithType( - root, - componentType - ); - if (all.length !== 1) { - throw new Error( - 'Did not find exactly one match for componentType:' + componentType - ); - } - return all[0]; - }, - - /** - * Pass a mocked component module to this method to augment it with - * useful methods that allow it to be used as a dummy React component. - * Instead of rendering as usual, the component will become a simple - * <div> containing any provided children. - * - * @param {object} module the mock function object exported from a - * module that defines the component to be mocked - * @param {?string} mockTagName optional dummy root tag name to return - * from render method (overrides - * module.mockTagName if provided) - * @return {object} the ReactTestUtils object (for chaining) - */ - mockComponent: function(module, mockTagName) { - mockTagName = mockTagName || module.mockTagName || "div"; - - module.prototype.render.mockImplementation(function() { - return React.createElement( - mockTagName, - null, - this.props.children - ); - }); - - return this; - }, - - /** - * Simulates a top level event being dispatched from a raw event that occured - * on an `Element` node. - * @param topLevelType {Object} A type from `EventConstants.topLevelTypes` - * @param {!Element} node The dom to simulate an event occurring on. - * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent. - */ - simulateNativeEventOnNode: function(topLevelType, node, fakeNativeEvent) { - fakeNativeEvent.target = node; - ReactBrowserEventEmitter.ReactEventListener.dispatchEvent( - topLevelType, - fakeNativeEvent - ); - }, - - /** - * Simulates a top level event being dispatched from a raw event that occured - * on the `ReactDOMComponent` `comp`. - * @param topLevelType {Object} A type from `EventConstants.topLevelTypes`. - * @param comp {!ReactDOMComponent} - * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent. - */ - simulateNativeEventOnDOMComponent: function( - topLevelType, - comp, - fakeNativeEvent) { - ReactTestUtils.simulateNativeEventOnNode( - topLevelType, - comp.getDOMNode(), - fakeNativeEvent - ); - }, - - nativeTouchData: function(x, y) { - return { - touches: [ - {pageX: x, pageY: y} - ] - }; - }, - - createRenderer: function() { - return new ReactShallowRenderer(); - }, - - Simulate: null, - SimulateNative: {} -}; - -/** - * @class ReactShallowRenderer - */ -var ReactShallowRenderer = function() { - this._instance = null; -}; - -ReactShallowRenderer.prototype.getRenderOutput = function() { - return ( - (this._instance && this._instance._renderedComponent && - this._instance._renderedComponent._renderedOutput) - || null - ); -}; - -var NoopInternalComponent = function(element) { - this._renderedOutput = element; - this._currentElement = element === null || element === false ? - ReactEmptyComponent.emptyElement : - element; -}; - -NoopInternalComponent.prototype = { - - mountComponent: function() { - }, - - receiveComponent: function(element) { - this._renderedOutput = element; - this._currentElement = element === null || element === false ? - ReactEmptyComponent.emptyElement : - element; - }, - - unmountComponent: function() { - } - -}; - -var ShallowComponentWrapper = function() { }; -assign( - ShallowComponentWrapper.prototype, - ReactCompositeComponent.Mixin, { - _instantiateReactComponent: function(element) { - return new NoopInternalComponent(element); - }, - _replaceNodeWithMarkupByID: function() {}, - _renderValidatedComponent: - ReactCompositeComponent.Mixin. - _renderValidatedComponentWithoutOwnerOrContext - } -); - -ReactShallowRenderer.prototype.render = function(element, context) { - if (!context) { - context = emptyObject; - } - var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(); - this._render(element, transaction, context); - ReactUpdates.ReactReconcileTransaction.release(transaction); -}; - -ReactShallowRenderer.prototype.unmount = function() { - if (this._instance) { - this._instance.unmountComponent(); - } -}; - -ReactShallowRenderer.prototype._render = function(element, transaction, context) { - if (!this._instance) { - var rootID = ReactInstanceHandles.createReactRootID(); - var instance = new ShallowComponentWrapper(element.type); - instance.construct(element); - - instance.mountComponent(rootID, transaction, context); - - this._instance = instance; - } else { - this._instance.receiveComponent(element, transaction, context); - } -}; - -/** - * Exports: - * - * - `ReactTestUtils.Simulate.click(Element/ReactDOMComponent)` - * - `ReactTestUtils.Simulate.mouseMove(Element/ReactDOMComponent)` - * - `ReactTestUtils.Simulate.change(Element/ReactDOMComponent)` - * - ... (All keys from event plugin `eventTypes` objects) - */ -function makeSimulator(eventType) { - return function(domComponentOrNode, eventData) { - var node; - if (ReactTestUtils.isDOMComponent(domComponentOrNode)) { - node = domComponentOrNode.getDOMNode(); - } else if (domComponentOrNode.tagName) { - node = domComponentOrNode; - } - - var fakeNativeEvent = new Event(); - fakeNativeEvent.target = node; - // We don't use SyntheticEvent.getPooled in order to not have to worry about - // properly destroying any properties assigned from `eventData` upon release - var event = new SyntheticEvent( - ReactBrowserEventEmitter.eventNameDispatchConfigs[eventType], - ReactMount.getID(node), - fakeNativeEvent - ); - assign(event, eventData); - EventPropagators.accumulateTwoPhaseDispatches(event); - - ReactUpdates.batchedUpdates(function() { - EventPluginHub.enqueueEvents(event); - EventPluginHub.processEventQueue(); - }); - }; -} - -function buildSimulators() { - ReactTestUtils.Simulate = {}; - - var eventType; - for (eventType in ReactBrowserEventEmitter.eventNameDispatchConfigs) { - /** - * @param {!Element || ReactDOMComponent} domComponentOrNode - * @param {?object} eventData Fake event data to use in SyntheticEvent. - */ - ReactTestUtils.Simulate[eventType] = makeSimulator(eventType); - } -} - -// Rebuild ReactTestUtils.Simulate whenever event plugins are injected -var oldInjectEventPluginOrder = EventPluginHub.injection.injectEventPluginOrder; -EventPluginHub.injection.injectEventPluginOrder = function() { - oldInjectEventPluginOrder.apply(this, arguments); - buildSimulators(); -}; -var oldInjectEventPlugins = EventPluginHub.injection.injectEventPluginsByName; -EventPluginHub.injection.injectEventPluginsByName = function() { - oldInjectEventPlugins.apply(this, arguments); - buildSimulators(); -}; - -buildSimulators(); - -/** - * Exports: - * - * - `ReactTestUtils.SimulateNative.click(Element/ReactDOMComponent)` - * - `ReactTestUtils.SimulateNative.mouseMove(Element/ReactDOMComponent)` - * - `ReactTestUtils.SimulateNative.mouseIn/ReactDOMComponent)` - * - `ReactTestUtils.SimulateNative.mouseOut(Element/ReactDOMComponent)` - * - ... (All keys from `EventConstants.topLevelTypes`) - * - * Note: Top level event types are a subset of the entire set of handler types - * (which include a broader set of "synthetic" events). For example, onDragDone - * is a synthetic event. Except when testing an event plugin or React's event - * handling code specifically, you probably want to use ReactTestUtils.Simulate - * to dispatch synthetic events. - */ - -function makeNativeSimulator(eventType) { - return function(domComponentOrNode, nativeEventData) { - var fakeNativeEvent = new Event(eventType); - assign(fakeNativeEvent, nativeEventData); - if (ReactTestUtils.isDOMComponent(domComponentOrNode)) { - ReactTestUtils.simulateNativeEventOnDOMComponent( - eventType, - domComponentOrNode, - fakeNativeEvent - ); - } else if (!!domComponentOrNode.tagName) { - // Will allow on actual dom nodes. - ReactTestUtils.simulateNativeEventOnNode( - eventType, - domComponentOrNode, - fakeNativeEvent - ); - } - }; -} - -var eventType; -for (eventType in topLevelTypes) { - // Event type is stored as 'topClick' - we transform that to 'click' - var convenienceName = eventType.indexOf('top') === 0 ? - eventType.charAt(3).toLowerCase() + eventType.substr(4) : eventType; - /** - * @param {!Element || ReactDOMComponent} domComponentOrNode - * @param {?Event} nativeEventData Fake native event to use in SyntheticEvent. - */ - ReactTestUtils.SimulateNative[convenienceName] = - makeNativeSimulator(eventType); -} - -module.exports = ReactTestUtils; - -},{"100":100,"108":108,"130":130,"16":16,"18":18,"21":21,"29":29,"31":31,"33":33,"43":43,"63":63,"65":65,"72":72,"73":73,"77":77}],96:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks static-only - * @providesModule ReactTransitionChildMapping - */ - -'use strict'; - -var ReactChildren = _dereq_(37); -var ReactFragment = _dereq_(69); - -var ReactTransitionChildMapping = { - /** - * Given `this.props.children`, return an object mapping key to child. Just - * simple syntactic sugar around ReactChildren.map(). - * - * @param {*} children `this.props.children` - * @return {object} Mapping of key to child - */ - getChildMapping: function(children) { - if (!children) { - return children; - } - return ReactFragment.extract(ReactChildren.map(children, function(child) { - return child; - })); - }, - - /** - * When you're adding or removing children some may be added or removed in the - * same render pass. We want to show *both* since we want to simultaneously - * animate elements in and out. This function takes a previous set of keys - * and a new set of keys and merges them with its best guess of the correct - * ordering. In the future we may expose some of the utilities in - * ReactMultiChild to make this easy, but for now React itself does not - * directly have this concept of the union of prevChildren and nextChildren - * so we implement it here. - * - * @param {object} prev prev children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @param {object} next next children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @return {object} a key set that contains all keys in `prev` and all keys - * in `next` in a reasonable order. - */ - mergeChildMappings: function(prev, next) { - prev = prev || {}; - next = next || {}; - - function getValueForKey(key) { - if (next.hasOwnProperty(key)) { - return next[key]; - } else { - return prev[key]; - } - } - - // For each key of `next`, the list of keys to insert before that key in - // the combined list - var nextKeysPending = {}; - - var pendingKeys = []; - for (var prevKey in prev) { - if (next.hasOwnProperty(prevKey)) { - if (pendingKeys.length) { - nextKeysPending[prevKey] = pendingKeys; - pendingKeys = []; - } - } else { - pendingKeys.push(prevKey); - } - } - - var i; - var childMapping = {}; - for (var nextKey in next) { - if (nextKeysPending.hasOwnProperty(nextKey)) { - for (i = 0; i < nextKeysPending[nextKey].length; i++) { - var pendingNextKey = nextKeysPending[nextKey][i]; - childMapping[nextKeysPending[nextKey][i]] = getValueForKey( - pendingNextKey - ); - } - } - childMapping[nextKey] = getValueForKey(nextKey); - } - - // Finally, add the keys which didn't appear before any key in `next` - for (i = 0; i < pendingKeys.length; i++) { - childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); - } - - return childMapping; - } -}; - -module.exports = ReactTransitionChildMapping; - -},{"37":37,"69":69}],97:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactTransitionEvents - */ - -'use strict'; - -var ExecutionEnvironment = _dereq_(22); - -/** - * EVENT_NAME_MAP is used to determine which event fired when a - * transition/animation ends, based on the style property used to - * define that event. - */ -var EVENT_NAME_MAP = { - transitionend: { - 'transition': 'transitionend', - 'WebkitTransition': 'webkitTransitionEnd', - 'MozTransition': 'mozTransitionEnd', - 'OTransition': 'oTransitionEnd', - 'msTransition': 'MSTransitionEnd' - }, - - animationend: { - 'animation': 'animationend', - 'WebkitAnimation': 'webkitAnimationEnd', - 'MozAnimation': 'mozAnimationEnd', - 'OAnimation': 'oAnimationEnd', - 'msAnimation': 'MSAnimationEnd' - } -}; - -var endEvents = []; - -function detectEvents() { - var testEl = document.createElement('div'); - var style = testEl.style; - - // On some platforms, in particular some releases of Android 4.x, - // the un-prefixed "animation" and "transition" properties are defined on the - // style object but the events that fire will still be prefixed, so we need - // to check if the un-prefixed events are useable, and if not remove them - // from the map - if (!('AnimationEvent' in window)) { - delete EVENT_NAME_MAP.animationend.animation; - } - - if (!('TransitionEvent' in window)) { - delete EVENT_NAME_MAP.transitionend.transition; - } - - for (var baseEventName in EVENT_NAME_MAP) { - var baseEvents = EVENT_NAME_MAP[baseEventName]; - for (var styleName in baseEvents) { - if (styleName in style) { - endEvents.push(baseEvents[styleName]); - break; - } - } - } -} - -if (ExecutionEnvironment.canUseDOM) { - detectEvents(); -} - -// We use the raw {add|remove}EventListener() call because EventListener -// does not know how to remove event listeners and we really should -// clean up. Also, these events are not triggered in older browsers -// so we should be A-OK here. - -function addEventListener(node, eventName, eventListener) { - node.addEventListener(eventName, eventListener, false); -} - -function removeEventListener(node, eventName, eventListener) { - node.removeEventListener(eventName, eventListener, false); -} - -var ReactTransitionEvents = { - addEndEventListener: function(node, eventListener) { - if (endEvents.length === 0) { - // If CSS transitions are not supported, trigger an "end animation" - // event immediately. - window.setTimeout(eventListener, 0); - return; - } - endEvents.forEach(function(endEvent) { - addEventListener(node, endEvent, eventListener); - }); - }, - - removeEndEventListener: function(node, eventListener) { - if (endEvents.length === 0) { - return; - } - endEvents.forEach(function(endEvent) { - removeEventListener(node, endEvent, eventListener); - }); - } -}; - -module.exports = ReactTransitionEvents; - -},{"22":22}],98:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactTransitionGroup - */ - -'use strict'; - -var React = _dereq_(31); -var ReactTransitionChildMapping = _dereq_(96); - -var assign = _dereq_(29); -var cloneWithProps = _dereq_(122); -var emptyFunction = _dereq_(129); - -var ReactTransitionGroup = React.createClass({ - displayName: 'ReactTransitionGroup', - - propTypes: { - component: React.PropTypes.any, - childFactory: React.PropTypes.func - }, - - getDefaultProps: function() { - return { - component: 'span', - childFactory: emptyFunction.thatReturnsArgument - }; - }, - - getInitialState: function() { - return { - children: ReactTransitionChildMapping.getChildMapping(this.props.children) - }; - }, - - componentWillMount: function() { - this.currentlyTransitioningKeys = {}; - this.keysToEnter = []; - this.keysToLeave = []; - }, - - componentDidMount: function() { - var initialChildMapping = this.state.children; - for (var key in initialChildMapping) { - if (initialChildMapping[key]) { - this.performAppear(key); - } - } - }, - - componentWillReceiveProps: function(nextProps) { - var nextChildMapping = ReactTransitionChildMapping.getChildMapping( - nextProps.children - ); - var prevChildMapping = this.state.children; - - this.setState({ - children: ReactTransitionChildMapping.mergeChildMappings( - prevChildMapping, - nextChildMapping - ) - }); - - var key; - - for (key in nextChildMapping) { - var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); - if (nextChildMapping[key] && !hasPrev && - !this.currentlyTransitioningKeys[key]) { - this.keysToEnter.push(key); - } - } - - for (key in prevChildMapping) { - var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key); - if (prevChildMapping[key] && !hasNext && - !this.currentlyTransitioningKeys[key]) { - this.keysToLeave.push(key); - } - } - - // If we want to someday check for reordering, we could do it here. - }, - - componentDidUpdate: function() { - var keysToEnter = this.keysToEnter; - this.keysToEnter = []; - keysToEnter.forEach(this.performEnter); - - var keysToLeave = this.keysToLeave; - this.keysToLeave = []; - keysToLeave.forEach(this.performLeave); - }, - - performAppear: function(key) { - this.currentlyTransitioningKeys[key] = true; - - var component = this.refs[key]; - - if (component.componentWillAppear) { - component.componentWillAppear( - this._handleDoneAppearing.bind(this, key) - ); - } else { - this._handleDoneAppearing(key); - } - }, - - _handleDoneAppearing: function(key) { - var component = this.refs[key]; - if (component.componentDidAppear) { - component.componentDidAppear(); - } - - delete this.currentlyTransitioningKeys[key]; - - var currentChildMapping = ReactTransitionChildMapping.getChildMapping( - this.props.children - ); - - if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { - // This was removed before it had fully appeared. Remove it. - this.performLeave(key); - } - }, - - performEnter: function(key) { - this.currentlyTransitioningKeys[key] = true; - - var component = this.refs[key]; - - if (component.componentWillEnter) { - component.componentWillEnter( - this._handleDoneEntering.bind(this, key) - ); - } else { - this._handleDoneEntering(key); - } - }, - - _handleDoneEntering: function(key) { - var component = this.refs[key]; - if (component.componentDidEnter) { - component.componentDidEnter(); - } - - delete this.currentlyTransitioningKeys[key]; - - var currentChildMapping = ReactTransitionChildMapping.getChildMapping( - this.props.children - ); - - if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { - // This was removed before it had fully entered. Remove it. - this.performLeave(key); - } - }, - - performLeave: function(key) { - this.currentlyTransitioningKeys[key] = true; - - var component = this.refs[key]; - if (component.componentWillLeave) { - component.componentWillLeave(this._handleDoneLeaving.bind(this, key)); - } else { - // Note that this is somewhat dangerous b/c it calls setState() - // again, effectively mutating the component before all the work - // is done. - this._handleDoneLeaving(key); - } - }, - - _handleDoneLeaving: function(key) { - var component = this.refs[key]; - - if (component.componentDidLeave) { - component.componentDidLeave(); - } - - delete this.currentlyTransitioningKeys[key]; - - var currentChildMapping = ReactTransitionChildMapping.getChildMapping( - this.props.children - ); - - if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { - // This entered again before it fully left. Add it again. - this.performEnter(key); - } else { - var newChildren = assign({}, this.state.children); - delete newChildren[key]; - this.setState({children: newChildren}); - } - }, - - render: function() { - // TODO: we could get rid of the need for the wrapper node - // by cloning a single child - var childrenToRender = []; - for (var key in this.state.children) { - var child = this.state.children[key]; - if (child) { - // You may need to apply reactive updates to a child as it is leaving. - // The normal React way to do it won't work since the child will have - // already been removed. In case you need this behavior you can provide - // a childFactory function to wrap every child, even the ones that are - // leaving. - childrenToRender.push(cloneWithProps( - this.props.childFactory(child), - {ref: key, key: key} - )); - } - } - return React.createElement( - this.props.component, - this.props, - childrenToRender - ); - } -}); - -module.exports = ReactTransitionGroup; - -},{"122":122,"129":129,"29":29,"31":31,"96":96}],99:[function(_dereq_,module,exports){ +},{"100":100,"135":135,"23":23,"24":24,"6":6}],82:[function(_dereq_,module,exports){ /** * Copyright 2015, Facebook, Inc. * All rights reserved. @@ -16237,55 +13348,33 @@ module.exports = ReactTransitionGroup; 'use strict'; -var ReactLifeCycle = _dereq_(74); -var ReactCurrentOwner = _dereq_(45); -var ReactElement = _dereq_(63); -var ReactInstanceMap = _dereq_(73); -var ReactUpdates = _dereq_(100); +var ReactCurrentOwner = _dereq_(34); +var ReactElement = _dereq_(52); +var ReactInstanceMap = _dereq_(62); +var ReactUpdates = _dereq_(83); -var assign = _dereq_(29); -var invariant = _dereq_(150); -var warning = _dereq_(171); +var assign = _dereq_(23); +var invariant = _dereq_(143); +var warning = _dereq_(154); function enqueueUpdate(internalInstance) { - if (internalInstance !== ReactLifeCycle.currentlyMountingInstance) { - // If we're in a componentWillMount handler, don't enqueue a rerender - // because ReactUpdates assumes we're in a browser context (which is - // wrong for server rendering) and we're about to do a render anyway. - // See bug in #1740. - ReactUpdates.enqueueUpdate(internalInstance); - } + ReactUpdates.enqueueUpdate(internalInstance); } function getInternalInstanceReadyForUpdate(publicInstance, callerName) { - ("production" !== "development" ? invariant( - ReactCurrentOwner.current == null, - '%s(...): Cannot update during an existing state transition ' + - '(such as within `render`). Render methods should be a pure function ' + - 'of props and state.', - callerName - ) : invariant(ReactCurrentOwner.current == null)); - var internalInstance = ReactInstanceMap.get(publicInstance); if (!internalInstance) { - if ("production" !== "development") { + if ("development" !== 'production') { // Only warn when we have a callerName. Otherwise we should be silent. // We're probably calling from enqueueCallback. We don't want to warn // there because we already warned for the corresponding lifecycle method. - ("production" !== "development" ? warning( - !callerName, - '%s(...): Can only update a mounted or mounting component. ' + - 'This usually means you called %s() on an unmounted ' + - 'component. This is a no-op.', - callerName, - callerName - ) : null); + "development" !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, publicInstance.constructor.displayName) : undefined; } return null; } - if (internalInstance === ReactLifeCycle.currentlyUnmountingInstance) { - return null; + if ("development" !== 'production') { + "development" !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition ' + '(such as within `render`). Render methods should be a pure function ' + 'of props and state.', callerName) : undefined; } return internalInstance; @@ -16298,6 +13387,32 @@ function getInternalInstanceReadyForUpdate(publicInstance, callerName) { var ReactUpdateQueue = { /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + if ("development" !== 'production') { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + "development" !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : undefined; + owner._warnedAboutRefsInRender = true; + } + } + var internalInstance = ReactInstanceMap.get(publicInstance); + if (internalInstance) { + // During componentWillMount and render this will still be null but after + // that will always render to something. At least for now. So we can use + // this hack. + return !!internalInstance._renderedComponent; + } else { + return false; + } + }, + + /** * Enqueue a callback that will be executed after all the pending updates * have processed. * @@ -16305,13 +13420,8 @@ var ReactUpdateQueue = { * @param {?function} callback Called after state is updated. * @internal */ - enqueueCallback: function(publicInstance, callback) { - ("production" !== "development" ? invariant( - typeof callback === 'function', - 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + - '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + - 'isn\'t callable.' - ) : invariant(typeof callback === 'function')); + enqueueCallback: function (publicInstance, callback) { + !(typeof callback === 'function') ? "development" !== 'production' ? invariant(false, 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + 'isn\'t callable.') : invariant(false) : undefined; var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); // Previously we would throw an error if we didn't have an internal @@ -16319,8 +13429,7 @@ var ReactUpdateQueue = { // behavior we have in other enqueue* methods. // We also need to ignore callbacks in componentWillMount. See // enqueueUpdates. - if (!internalInstance || - internalInstance === ReactLifeCycle.currentlyMountingInstance) { + if (!internalInstance) { return null; } @@ -16336,13 +13445,8 @@ var ReactUpdateQueue = { enqueueUpdate(internalInstance); }, - enqueueCallbackInternal: function(internalInstance, callback) { - ("production" !== "development" ? invariant( - typeof callback === 'function', - 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + - '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + - 'isn\'t callable.' - ) : invariant(typeof callback === 'function')); + enqueueCallbackInternal: function (internalInstance, callback) { + !(typeof callback === 'function') ? "development" !== 'production' ? invariant(false, 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + 'isn\'t callable.') : invariant(false) : undefined; if (internalInstance._pendingCallbacks) { internalInstance._pendingCallbacks.push(callback); } else { @@ -16358,17 +13462,14 @@ var ReactUpdateQueue = { * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * - * This will not invoke `shouldUpdateComponent`, but it will invoke + * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {ReactClass} publicInstance The instance that should rerender. * @internal */ - enqueueForceUpdate: function(publicInstance) { - var internalInstance = getInternalInstanceReadyForUpdate( - publicInstance, - 'forceUpdate' - ); + enqueueForceUpdate: function (publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); if (!internalInstance) { return; @@ -16390,11 +13491,8 @@ var ReactUpdateQueue = { * @param {object} completeState Next state. * @internal */ - enqueueReplaceState: function(publicInstance, completeState) { - var internalInstance = getInternalInstanceReadyForUpdate( - publicInstance, - 'replaceState' - ); + enqueueReplaceState: function (publicInstance, completeState) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); if (!internalInstance) { return; @@ -16416,19 +13514,14 @@ var ReactUpdateQueue = { * @param {object} partialState Next partial state to be merged with state. * @internal */ - enqueueSetState: function(publicInstance, partialState) { - var internalInstance = getInternalInstanceReadyForUpdate( - publicInstance, - 'setState' - ); + enqueueSetState: function (publicInstance, partialState) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); if (!internalInstance) { return; } - var queue = - internalInstance._pendingStateQueue || - (internalInstance._pendingStateQueue = []); + var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); queue.push(partialState); enqueueUpdate(internalInstance); @@ -16441,36 +13534,26 @@ var ReactUpdateQueue = { * @param {object} partialProps Subset of the next props. * @internal */ - enqueueSetProps: function(publicInstance, partialProps) { - var internalInstance = getInternalInstanceReadyForUpdate( - publicInstance, - 'setProps' - ); - + enqueueSetProps: function (publicInstance, partialProps) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setProps'); if (!internalInstance) { return; } + ReactUpdateQueue.enqueueSetPropsInternal(internalInstance, partialProps); + }, - ("production" !== "development" ? invariant( - internalInstance._isTopLevel, - 'setProps(...): You called `setProps` on a ' + - 'component with a parent. This is an anti-pattern since props will ' + - 'get reactively updated when rendered. Instead, change the owner\'s ' + - '`render` method to pass the correct value as props to the component ' + - 'where it is created.' - ) : invariant(internalInstance._isTopLevel)); + enqueueSetPropsInternal: function (internalInstance, partialProps) { + var topLevelWrapper = internalInstance._topLevelWrapper; + !topLevelWrapper ? "development" !== 'production' ? invariant(false, 'setProps(...): You called `setProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + 'get reactively updated when rendered. Instead, change the owner\'s ' + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(false) : undefined; // Merge with the pending element if it exists, otherwise with existing // element props. - var element = internalInstance._pendingElement || - internalInstance._currentElement; + var wrapElement = topLevelWrapper._pendingElement || topLevelWrapper._currentElement; + var element = wrapElement.props; var props = assign({}, element.props, partialProps); - internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( - element, - props - ); + topLevelWrapper._pendingElement = ReactElement.cloneAndReplaceProps(wrapElement, ReactElement.cloneAndReplaceProps(element, props)); - enqueueUpdate(internalInstance); + enqueueUpdate(topLevelWrapper); }, /** @@ -16480,38 +13563,28 @@ var ReactUpdateQueue = { * @param {object} props New props. * @internal */ - enqueueReplaceProps: function(publicInstance, props) { - var internalInstance = getInternalInstanceReadyForUpdate( - publicInstance, - 'replaceProps' - ); - + enqueueReplaceProps: function (publicInstance, props) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceProps'); if (!internalInstance) { return; } + ReactUpdateQueue.enqueueReplacePropsInternal(internalInstance, props); + }, - ("production" !== "development" ? invariant( - internalInstance._isTopLevel, - 'replaceProps(...): You called `replaceProps` on a ' + - 'component with a parent. This is an anti-pattern since props will ' + - 'get reactively updated when rendered. Instead, change the owner\'s ' + - '`render` method to pass the correct value as props to the component ' + - 'where it is created.' - ) : invariant(internalInstance._isTopLevel)); + enqueueReplacePropsInternal: function (internalInstance, props) { + var topLevelWrapper = internalInstance._topLevelWrapper; + !topLevelWrapper ? "development" !== 'production' ? invariant(false, 'replaceProps(...): You called `replaceProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + 'get reactively updated when rendered. Instead, change the owner\'s ' + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(false) : undefined; // Merge with the pending element if it exists, otherwise with existing // element props. - var element = internalInstance._pendingElement || - internalInstance._currentElement; - internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( - element, - props - ); + var wrapElement = topLevelWrapper._pendingElement || topLevelWrapper._currentElement; + var element = wrapElement.props; + topLevelWrapper._pendingElement = ReactElement.cloneAndReplaceProps(wrapElement, ReactElement.cloneAndReplaceProps(element, props)); - enqueueUpdate(internalInstance); + enqueueUpdate(topLevelWrapper); }, - enqueueElementInternal: function(internalInstance, newElement) { + enqueueElementInternal: function (internalInstance, newElement) { internalInstance._pendingElement = newElement; enqueueUpdate(internalInstance); } @@ -16519,8 +13592,7 @@ var ReactUpdateQueue = { }; module.exports = ReactUpdateQueue; - -},{"100":100,"150":150,"171":171,"29":29,"45":45,"63":63,"73":73,"74":74}],100:[function(_dereq_,module,exports){ +},{"143":143,"154":154,"23":23,"34":34,"52":52,"62":62,"83":83}],83:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -16534,16 +13606,14 @@ module.exports = ReactUpdateQueue; 'use strict'; -var CallbackQueue = _dereq_(7); -var PooledClass = _dereq_(30); -var ReactCurrentOwner = _dereq_(45); -var ReactPerf = _dereq_(82); -var ReactReconciler = _dereq_(89); -var Transaction = _dereq_(116); +var CallbackQueue = _dereq_(6); +var PooledClass = _dereq_(24); +var ReactPerf = _dereq_(71); +var ReactReconciler = _dereq_(76); +var Transaction = _dereq_(100); -var assign = _dereq_(29); -var invariant = _dereq_(150); -var warning = _dereq_(171); +var assign = _dereq_(23); +var invariant = _dereq_(143); var dirtyComponents = []; var asapCallbackQueue = CallbackQueue.getPooled(); @@ -16552,18 +13622,14 @@ var asapEnqueued = false; var batchingStrategy = null; function ensureInjected() { - ("production" !== "development" ? invariant( - ReactUpdates.ReactReconcileTransaction && batchingStrategy, - 'ReactUpdates: must inject a reconcile transaction class and batching ' + - 'strategy' - ) : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy)); + !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching ' + 'strategy') : invariant(false) : undefined; } var NESTED_UPDATES = { - initialize: function() { + initialize: function () { this.dirtyComponentsLength = dirtyComponents.length; }, - close: function() { + close: function () { if (this.dirtyComponentsLength !== dirtyComponents.length) { // Additional updates were enqueued by componentDidUpdate handlers or // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run @@ -16579,10 +13645,10 @@ var NESTED_UPDATES = { }; var UPDATE_QUEUEING = { - initialize: function() { + initialize: function () { this.callbackQueue.reset(); }, - close: function() { + close: function () { this.callbackQueue.notifyAll(); } }; @@ -16593,18 +13659,15 @@ function ReactUpdatesFlushTransaction() { this.reinitializeTransaction(); this.dirtyComponentsLength = null; this.callbackQueue = CallbackQueue.getPooled(); - this.reconcileTransaction = - ReactUpdates.ReactReconcileTransaction.getPooled(); + this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( /* forceHTML */false); } -assign( - ReactUpdatesFlushTransaction.prototype, - Transaction.Mixin, { - getTransactionWrappers: function() { +assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, { + getTransactionWrappers: function () { return TRANSACTION_WRAPPERS; }, - destructor: function() { + destructor: function () { this.dirtyComponentsLength = null; CallbackQueue.release(this.callbackQueue); this.callbackQueue = null; @@ -16612,25 +13675,18 @@ assign( this.reconcileTransaction = null; }, - perform: function(method, scope, a) { + perform: function (method, scope, a) { // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` // with this transaction's wrappers around it. - return Transaction.Mixin.perform.call( - this, - this.reconcileTransaction.perform, - this.reconcileTransaction, - method, - scope, - a - ); + return Transaction.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); } }); PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); -function batchedUpdates(callback, a, b, c, d) { +function batchedUpdates(callback, a, b, c, d, e) { ensureInjected(); - batchingStrategy.batchedUpdates(callback, a, b, c, d); + batchingStrategy.batchedUpdates(callback, a, b, c, d, e); } /** @@ -16646,13 +13702,7 @@ function mountOrderComparator(c1, c2) { function runBatchedUpdates(transaction) { var len = transaction.dirtyComponentsLength; - ("production" !== "development" ? invariant( - len === dirtyComponents.length, - 'Expected flush transaction\'s stored dirty-components length (%s) to ' + - 'match dirty-components array length (%s).', - len, - dirtyComponents.length - ) : invariant(len === dirtyComponents.length)); + !(len === dirtyComponents.length) ? "development" !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to ' + 'match dirty-components array length (%s).', len, dirtyComponents.length) : invariant(false) : undefined; // Since reconciling a component higher in the owner hierarchy usually (not // always -- see shouldComponentUpdate()) will reconcile children, reconcile @@ -16671,23 +13721,17 @@ function runBatchedUpdates(transaction) { var callbacks = component._pendingCallbacks; component._pendingCallbacks = null; - ReactReconciler.performUpdateIfNecessary( - component, - transaction.reconcileTransaction - ); + ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction); if (callbacks) { for (var j = 0; j < callbacks.length; j++) { - transaction.callbackQueue.enqueue( - callbacks[j], - component.getPublicInstance() - ); + transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); } } } } -var flushBatchedUpdates = function() { +var flushBatchedUpdates = function () { // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents // array and perform any updates enqueued by mount-ready handlers (i.e., // componentDidUpdate) but we need to check here too in order to catch @@ -16708,11 +13752,7 @@ var flushBatchedUpdates = function() { } } }; -flushBatchedUpdates = ReactPerf.measure( - 'ReactUpdates', - 'flushBatchedUpdates', - flushBatchedUpdates -); +flushBatchedUpdates = ReactPerf.measure('ReactUpdates', 'flushBatchedUpdates', flushBatchedUpdates); /** * Mark a component as needing a rerender, adding an optional callback to a @@ -16726,13 +13766,6 @@ function enqueueUpdate(component) { // verify that that's the case. (This is called by each top-level update // function, like setProps, setState, forceUpdate, etc.; creation and // destruction of top-level components is guarded in ReactMount.) - ("production" !== "development" ? warning( - ReactCurrentOwner.current == null, - 'enqueueUpdate(): Render methods should be a pure function of props ' + - 'and state; triggering nested component updates from render is not ' + - 'allowed. If necessary, trigger nested updates in ' + - 'componentDidUpdate.' - ) : null); if (!batchingStrategy.isBatchingUpdates) { batchingStrategy.batchedUpdates(enqueueUpdate, component); @@ -16747,37 +13780,21 @@ function enqueueUpdate(component) { * if no updates are currently being performed. */ function asap(callback, context) { - ("production" !== "development" ? invariant( - batchingStrategy.isBatchingUpdates, - 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + - 'updates are not being batched.' - ) : invariant(batchingStrategy.isBatchingUpdates)); + !batchingStrategy.isBatchingUpdates ? "development" !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(false) : undefined; asapCallbackQueue.enqueue(callback, context); asapEnqueued = true; } var ReactUpdatesInjection = { - injectReconcileTransaction: function(ReconcileTransaction) { - ("production" !== "development" ? invariant( - ReconcileTransaction, - 'ReactUpdates: must provide a reconcile transaction class' - ) : invariant(ReconcileTransaction)); + injectReconcileTransaction: function (ReconcileTransaction) { + !ReconcileTransaction ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : invariant(false) : undefined; ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; }, - injectBatchingStrategy: function(_batchingStrategy) { - ("production" !== "development" ? invariant( - _batchingStrategy, - 'ReactUpdates: must provide a batching strategy' - ) : invariant(_batchingStrategy)); - ("production" !== "development" ? invariant( - typeof _batchingStrategy.batchedUpdates === 'function', - 'ReactUpdates: must provide a batchedUpdates() function' - ) : invariant(typeof _batchingStrategy.batchedUpdates === 'function')); - ("production" !== "development" ? invariant( - typeof _batchingStrategy.isBatchingUpdates === 'boolean', - 'ReactUpdates: must provide an isBatchingUpdates boolean attribute' - ) : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean')); + injectBatchingStrategy: function (_batchingStrategy) { + !_batchingStrategy ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : invariant(false) : undefined; + !(typeof _batchingStrategy.batchedUpdates === 'function') ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : invariant(false) : undefined; + !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : invariant(false) : undefined; batchingStrategy = _batchingStrategy; } }; @@ -16799,8 +13816,22 @@ var ReactUpdates = { }; module.exports = ReactUpdates; +},{"100":100,"143":143,"23":23,"24":24,"6":6,"71":71,"76":76}],84:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactVersion + */ -},{"116":116,"150":150,"171":171,"29":29,"30":30,"45":45,"7":7,"82":82,"89":89}],101:[function(_dereq_,module,exports){ +'use strict'; + +module.exports = '0.14.0'; +},{}],85:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -16812,14 +13843,17 @@ module.exports = ReactUpdates; * @providesModule SVGDOMPropertyConfig */ -/*jslint bitwise: true*/ - 'use strict'; -var DOMProperty = _dereq_(11); +var DOMProperty = _dereq_(10); var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE; +var NS = { + xlink: 'http://www.w3.org/1999/xlink', + xml: 'http://www.w3.org/XML/1998/namespace' +}; + var SVGDOMPropertyConfig = { Properties: { clipPath: MUST_USE_ATTRIBUTE, @@ -16863,10 +13897,32 @@ var SVGDOMPropertyConfig = { x1: MUST_USE_ATTRIBUTE, x2: MUST_USE_ATTRIBUTE, x: MUST_USE_ATTRIBUTE, + xlinkActuate: MUST_USE_ATTRIBUTE, + xlinkArcrole: MUST_USE_ATTRIBUTE, + xlinkHref: MUST_USE_ATTRIBUTE, + xlinkRole: MUST_USE_ATTRIBUTE, + xlinkShow: MUST_USE_ATTRIBUTE, + xlinkTitle: MUST_USE_ATTRIBUTE, + xlinkType: MUST_USE_ATTRIBUTE, + xmlBase: MUST_USE_ATTRIBUTE, + xmlLang: MUST_USE_ATTRIBUTE, + xmlSpace: MUST_USE_ATTRIBUTE, y1: MUST_USE_ATTRIBUTE, y2: MUST_USE_ATTRIBUTE, y: MUST_USE_ATTRIBUTE }, + DOMAttributeNamespaces: { + xlinkActuate: NS.xlink, + xlinkArcrole: NS.xlink, + xlinkHref: NS.xlink, + xlinkRole: NS.xlink, + xlinkShow: NS.xlink, + xlinkTitle: NS.xlink, + xlinkType: NS.xlink, + xmlBase: NS.xml, + xmlLang: NS.xml, + xmlSpace: NS.xml + }, DOMAttributeNames: { clipPath: 'clip-path', fillOpacity: 'fill-opacity', @@ -16888,13 +13944,22 @@ var SVGDOMPropertyConfig = { strokeOpacity: 'stroke-opacity', strokeWidth: 'stroke-width', textAnchor: 'text-anchor', - viewBox: 'viewBox' + viewBox: 'viewBox', + xlinkActuate: 'xlink:actuate', + xlinkArcrole: 'xlink:arcrole', + xlinkHref: 'xlink:href', + xlinkRole: 'xlink:role', + xlinkShow: 'xlink:show', + xlinkTitle: 'xlink:title', + xlinkType: 'xlink:type', + xmlBase: 'xml:base', + xmlLang: 'xml:lang', + xmlSpace: 'xml:space' } }; module.exports = SVGDOMPropertyConfig; - -},{"11":11}],102:[function(_dereq_,module,exports){ +},{"10":10}],86:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -16908,33 +13973,28 @@ module.exports = SVGDOMPropertyConfig; 'use strict'; -var EventConstants = _dereq_(16); -var EventPropagators = _dereq_(21); -var ReactInputSelection = _dereq_(71); -var SyntheticEvent = _dereq_(108); +var EventConstants = _dereq_(15); +var EventPropagators = _dereq_(19); +var ExecutionEnvironment = _dereq_(129); +var ReactInputSelection = _dereq_(60); +var SyntheticEvent = _dereq_(92); -var getActiveElement = _dereq_(136); -var isTextInputElement = _dereq_(153); -var keyOf = _dereq_(157); -var shallowEqual = _dereq_(166); +var getActiveElement = _dereq_(138); +var isTextInputElement = _dereq_(119); +var keyOf = _dereq_(147); +var shallowEqual = _dereq_(152); var topLevelTypes = EventConstants.topLevelTypes; +var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; + var eventTypes = { select: { phasedRegistrationNames: { - bubbled: keyOf({onSelect: null}), - captured: keyOf({onSelectCapture: null}) + bubbled: keyOf({ onSelect: null }), + captured: keyOf({ onSelectCapture: null }) }, - dependencies: [ - topLevelTypes.topBlur, - topLevelTypes.topContextMenu, - topLevelTypes.topFocus, - topLevelTypes.topKeyDown, - topLevelTypes.topMouseDown, - topLevelTypes.topMouseUp, - topLevelTypes.topSelectionChange - ] + dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange] } }; @@ -16943,6 +14003,11 @@ var activeElementID = null; var lastSelection = null; var mouseDown = false; +// Track whether a listener exists for this plugin. If none exist, we do +// not extract events. +var hasListener = false; +var ON_SELECT_KEY = keyOf({ onSelect: null }); + /** * Get an object which is a unique representation of the current selection. * @@ -16950,11 +14015,10 @@ var mouseDown = false; * two identical selections on the same node will return identical objects. * * @param {DOMElement} node - * @param {object} + * @return {object} */ function getSelection(node) { - if ('selectionStart' in node && - ReactInputSelection.hasSelectionCapabilities(node)) { + if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { return { start: node.selectionStart, end: node.selectionEnd @@ -16984,14 +14048,12 @@ function getSelection(node) { * @param {object} nativeEvent * @return {?SyntheticEvent} */ -function constructSelectEvent(nativeEvent) { +function constructSelectEvent(nativeEvent, nativeEventTarget) { // Ensure we have the right element, and that the user is not dragging a // selection (this matches native `select` event behavior). In HTML5, select // fires only on input and textarea thus if there's no focused element we // won't dispatch. - if (mouseDown || - activeElement == null || - activeElement !== getActiveElement()) { + if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { return null; } @@ -17000,11 +14062,7 @@ function constructSelectEvent(nativeEvent) { if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { lastSelection = currentSelection; - var syntheticEvent = SyntheticEvent.getPooled( - eventTypes.select, - activeElementID, - nativeEvent - ); + var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementID, nativeEvent, nativeEventTarget); syntheticEvent.type = 'select'; syntheticEvent.target = activeElement; @@ -17013,6 +14071,8 @@ function constructSelectEvent(nativeEvent) { return syntheticEvent; } + + return null; } /** @@ -17041,17 +14101,15 @@ var SelectEventPlugin = { * @return {*} An accumulation of synthetic events. * @see {EventPluginHub.extractEvents} */ - extractEvents: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent) { + extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) { + if (!hasListener) { + return null; + } switch (topLevelType) { // Track the input node that has focus. case topLevelTypes.topFocus: - if (isTextInputElement(topLevelTarget) || - topLevelTarget.contentEditable === 'true') { + if (isTextInputElement(topLevelTarget) || topLevelTarget.contentEditable === 'true') { activeElement = topLevelTarget; activeElementID = topLevelTargetID; lastSelection = null; @@ -17071,25 +14129,39 @@ var SelectEventPlugin = { case topLevelTypes.topContextMenu: case topLevelTypes.topMouseUp: mouseDown = false; - return constructSelectEvent(nativeEvent); + return constructSelectEvent(nativeEvent, nativeEventTarget); // Chrome and IE fire non-standard event when selection is changed (and - // sometimes when it hasn't). + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // // Firefox doesn't support selectionchange, so check selection status // after each key entry. The selection changes after keydown and before // keyup, but we check on keydown as well in the case of holding down a // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. case topLevelTypes.topSelectionChange: + if (skipSelectionChangeEvent) { + break; + } + // falls through case topLevelTypes.topKeyDown: case topLevelTypes.topKeyUp: - return constructSelectEvent(nativeEvent); + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + + didPutListener: function (id, registrationName, listener) { + if (registrationName === ON_SELECT_KEY) { + hasListener = true; } } }; module.exports = SelectEventPlugin; - -},{"108":108,"136":136,"153":153,"157":157,"16":16,"166":166,"21":21,"71":71}],103:[function(_dereq_,module,exports){ +},{"119":119,"129":129,"138":138,"147":147,"15":15,"152":152,"19":19,"60":60,"92":92}],87:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17113,14 +14185,13 @@ module.exports = SelectEventPlugin; var GLOBAL_MOUNT_POINT_MAX = Math.pow(2, 53); var ServerReactRootIndex = { - createReactRootIndex: function() { + createReactRootIndex: function () { return Math.ceil(Math.random() * GLOBAL_MOUNT_POINT_MAX); } }; module.exports = ServerReactRootIndex; - -},{}],104:[function(_dereq_,module,exports){ +},{}],88:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17134,313 +14205,446 @@ module.exports = ServerReactRootIndex; 'use strict'; -var EventConstants = _dereq_(16); -var EventPluginUtils = _dereq_(20); -var EventPropagators = _dereq_(21); -var SyntheticClipboardEvent = _dereq_(105); -var SyntheticEvent = _dereq_(108); -var SyntheticFocusEvent = _dereq_(109); -var SyntheticKeyboardEvent = _dereq_(111); -var SyntheticMouseEvent = _dereq_(112); -var SyntheticDragEvent = _dereq_(107); -var SyntheticTouchEvent = _dereq_(113); -var SyntheticUIEvent = _dereq_(114); -var SyntheticWheelEvent = _dereq_(115); - -var getEventCharCode = _dereq_(137); - -var invariant = _dereq_(150); -var keyOf = _dereq_(157); -var warning = _dereq_(171); +var EventConstants = _dereq_(15); +var EventListener = _dereq_(128); +var EventPropagators = _dereq_(19); +var ReactMount = _dereq_(65); +var SyntheticClipboardEvent = _dereq_(89); +var SyntheticEvent = _dereq_(92); +var SyntheticFocusEvent = _dereq_(93); +var SyntheticKeyboardEvent = _dereq_(95); +var SyntheticMouseEvent = _dereq_(96); +var SyntheticDragEvent = _dereq_(91); +var SyntheticTouchEvent = _dereq_(97); +var SyntheticUIEvent = _dereq_(98); +var SyntheticWheelEvent = _dereq_(99); + +var emptyFunction = _dereq_(135); +var getEventCharCode = _dereq_(110); +var invariant = _dereq_(143); +var keyOf = _dereq_(147); var topLevelTypes = EventConstants.topLevelTypes; var eventTypes = { + abort: { + phasedRegistrationNames: { + bubbled: keyOf({ onAbort: true }), + captured: keyOf({ onAbortCapture: true }) + } + }, blur: { phasedRegistrationNames: { - bubbled: keyOf({onBlur: true}), - captured: keyOf({onBlurCapture: true}) + bubbled: keyOf({ onBlur: true }), + captured: keyOf({ onBlurCapture: true }) + } + }, + canPlay: { + phasedRegistrationNames: { + bubbled: keyOf({ onCanPlay: true }), + captured: keyOf({ onCanPlayCapture: true }) + } + }, + canPlayThrough: { + phasedRegistrationNames: { + bubbled: keyOf({ onCanPlayThrough: true }), + captured: keyOf({ onCanPlayThroughCapture: true }) } }, click: { phasedRegistrationNames: { - bubbled: keyOf({onClick: true}), - captured: keyOf({onClickCapture: true}) + bubbled: keyOf({ onClick: true }), + captured: keyOf({ onClickCapture: true }) } }, contextMenu: { phasedRegistrationNames: { - bubbled: keyOf({onContextMenu: true}), - captured: keyOf({onContextMenuCapture: true}) + bubbled: keyOf({ onContextMenu: true }), + captured: keyOf({ onContextMenuCapture: true }) } }, copy: { phasedRegistrationNames: { - bubbled: keyOf({onCopy: true}), - captured: keyOf({onCopyCapture: true}) + bubbled: keyOf({ onCopy: true }), + captured: keyOf({ onCopyCapture: true }) } }, cut: { phasedRegistrationNames: { - bubbled: keyOf({onCut: true}), - captured: keyOf({onCutCapture: true}) + bubbled: keyOf({ onCut: true }), + captured: keyOf({ onCutCapture: true }) } }, doubleClick: { phasedRegistrationNames: { - bubbled: keyOf({onDoubleClick: true}), - captured: keyOf({onDoubleClickCapture: true}) + bubbled: keyOf({ onDoubleClick: true }), + captured: keyOf({ onDoubleClickCapture: true }) } }, drag: { phasedRegistrationNames: { - bubbled: keyOf({onDrag: true}), - captured: keyOf({onDragCapture: true}) + bubbled: keyOf({ onDrag: true }), + captured: keyOf({ onDragCapture: true }) } }, dragEnd: { phasedRegistrationNames: { - bubbled: keyOf({onDragEnd: true}), - captured: keyOf({onDragEndCapture: true}) + bubbled: keyOf({ onDragEnd: true }), + captured: keyOf({ onDragEndCapture: true }) } }, dragEnter: { phasedRegistrationNames: { - bubbled: keyOf({onDragEnter: true}), - captured: keyOf({onDragEnterCapture: true}) + bubbled: keyOf({ onDragEnter: true }), + captured: keyOf({ onDragEnterCapture: true }) } }, dragExit: { phasedRegistrationNames: { - bubbled: keyOf({onDragExit: true}), - captured: keyOf({onDragExitCapture: true}) + bubbled: keyOf({ onDragExit: true }), + captured: keyOf({ onDragExitCapture: true }) } }, dragLeave: { phasedRegistrationNames: { - bubbled: keyOf({onDragLeave: true}), - captured: keyOf({onDragLeaveCapture: true}) + bubbled: keyOf({ onDragLeave: true }), + captured: keyOf({ onDragLeaveCapture: true }) } }, dragOver: { phasedRegistrationNames: { - bubbled: keyOf({onDragOver: true}), - captured: keyOf({onDragOverCapture: true}) + bubbled: keyOf({ onDragOver: true }), + captured: keyOf({ onDragOverCapture: true }) } }, dragStart: { phasedRegistrationNames: { - bubbled: keyOf({onDragStart: true}), - captured: keyOf({onDragStartCapture: true}) + bubbled: keyOf({ onDragStart: true }), + captured: keyOf({ onDragStartCapture: true }) } }, drop: { phasedRegistrationNames: { - bubbled: keyOf({onDrop: true}), - captured: keyOf({onDropCapture: true}) + bubbled: keyOf({ onDrop: true }), + captured: keyOf({ onDropCapture: true }) + } + }, + durationChange: { + phasedRegistrationNames: { + bubbled: keyOf({ onDurationChange: true }), + captured: keyOf({ onDurationChangeCapture: true }) + } + }, + emptied: { + phasedRegistrationNames: { + bubbled: keyOf({ onEmptied: true }), + captured: keyOf({ onEmptiedCapture: true }) + } + }, + encrypted: { + phasedRegistrationNames: { + bubbled: keyOf({ onEncrypted: true }), + captured: keyOf({ onEncryptedCapture: true }) + } + }, + ended: { + phasedRegistrationNames: { + bubbled: keyOf({ onEnded: true }), + captured: keyOf({ onEndedCapture: true }) + } + }, + error: { + phasedRegistrationNames: { + bubbled: keyOf({ onError: true }), + captured: keyOf({ onErrorCapture: true }) } }, focus: { phasedRegistrationNames: { - bubbled: keyOf({onFocus: true}), - captured: keyOf({onFocusCapture: true}) + bubbled: keyOf({ onFocus: true }), + captured: keyOf({ onFocusCapture: true }) } }, input: { phasedRegistrationNames: { - bubbled: keyOf({onInput: true}), - captured: keyOf({onInputCapture: true}) + bubbled: keyOf({ onInput: true }), + captured: keyOf({ onInputCapture: true }) } }, keyDown: { phasedRegistrationNames: { - bubbled: keyOf({onKeyDown: true}), - captured: keyOf({onKeyDownCapture: true}) + bubbled: keyOf({ onKeyDown: true }), + captured: keyOf({ onKeyDownCapture: true }) } }, keyPress: { phasedRegistrationNames: { - bubbled: keyOf({onKeyPress: true}), - captured: keyOf({onKeyPressCapture: true}) + bubbled: keyOf({ onKeyPress: true }), + captured: keyOf({ onKeyPressCapture: true }) } }, keyUp: { phasedRegistrationNames: { - bubbled: keyOf({onKeyUp: true}), - captured: keyOf({onKeyUpCapture: true}) + bubbled: keyOf({ onKeyUp: true }), + captured: keyOf({ onKeyUpCapture: true }) } }, load: { phasedRegistrationNames: { - bubbled: keyOf({onLoad: true}), - captured: keyOf({onLoadCapture: true}) + bubbled: keyOf({ onLoad: true }), + captured: keyOf({ onLoadCapture: true }) } }, - error: { + loadedData: { + phasedRegistrationNames: { + bubbled: keyOf({ onLoadedData: true }), + captured: keyOf({ onLoadedDataCapture: true }) + } + }, + loadedMetadata: { phasedRegistrationNames: { - bubbled: keyOf({onError: true}), - captured: keyOf({onErrorCapture: true}) + bubbled: keyOf({ onLoadedMetadata: true }), + captured: keyOf({ onLoadedMetadataCapture: true }) + } + }, + loadStart: { + phasedRegistrationNames: { + bubbled: keyOf({ onLoadStart: true }), + captured: keyOf({ onLoadStartCapture: true }) } }, // Note: We do not allow listening to mouseOver events. Instead, use the // onMouseEnter/onMouseLeave created by `EnterLeaveEventPlugin`. mouseDown: { phasedRegistrationNames: { - bubbled: keyOf({onMouseDown: true}), - captured: keyOf({onMouseDownCapture: true}) + bubbled: keyOf({ onMouseDown: true }), + captured: keyOf({ onMouseDownCapture: true }) } }, mouseMove: { phasedRegistrationNames: { - bubbled: keyOf({onMouseMove: true}), - captured: keyOf({onMouseMoveCapture: true}) + bubbled: keyOf({ onMouseMove: true }), + captured: keyOf({ onMouseMoveCapture: true }) } }, mouseOut: { phasedRegistrationNames: { - bubbled: keyOf({onMouseOut: true}), - captured: keyOf({onMouseOutCapture: true}) + bubbled: keyOf({ onMouseOut: true }), + captured: keyOf({ onMouseOutCapture: true }) } }, mouseOver: { phasedRegistrationNames: { - bubbled: keyOf({onMouseOver: true}), - captured: keyOf({onMouseOverCapture: true}) + bubbled: keyOf({ onMouseOver: true }), + captured: keyOf({ onMouseOverCapture: true }) } }, mouseUp: { phasedRegistrationNames: { - bubbled: keyOf({onMouseUp: true}), - captured: keyOf({onMouseUpCapture: true}) + bubbled: keyOf({ onMouseUp: true }), + captured: keyOf({ onMouseUpCapture: true }) } }, paste: { phasedRegistrationNames: { - bubbled: keyOf({onPaste: true}), - captured: keyOf({onPasteCapture: true}) + bubbled: keyOf({ onPaste: true }), + captured: keyOf({ onPasteCapture: true }) + } + }, + pause: { + phasedRegistrationNames: { + bubbled: keyOf({ onPause: true }), + captured: keyOf({ onPauseCapture: true }) + } + }, + play: { + phasedRegistrationNames: { + bubbled: keyOf({ onPlay: true }), + captured: keyOf({ onPlayCapture: true }) + } + }, + playing: { + phasedRegistrationNames: { + bubbled: keyOf({ onPlaying: true }), + captured: keyOf({ onPlayingCapture: true }) + } + }, + progress: { + phasedRegistrationNames: { + bubbled: keyOf({ onProgress: true }), + captured: keyOf({ onProgressCapture: true }) + } + }, + rateChange: { + phasedRegistrationNames: { + bubbled: keyOf({ onRateChange: true }), + captured: keyOf({ onRateChangeCapture: true }) } }, reset: { phasedRegistrationNames: { - bubbled: keyOf({onReset: true}), - captured: keyOf({onResetCapture: true}) + bubbled: keyOf({ onReset: true }), + captured: keyOf({ onResetCapture: true }) } }, scroll: { phasedRegistrationNames: { - bubbled: keyOf({onScroll: true}), - captured: keyOf({onScrollCapture: true}) + bubbled: keyOf({ onScroll: true }), + captured: keyOf({ onScrollCapture: true }) + } + }, + seeked: { + phasedRegistrationNames: { + bubbled: keyOf({ onSeeked: true }), + captured: keyOf({ onSeekedCapture: true }) + } + }, + seeking: { + phasedRegistrationNames: { + bubbled: keyOf({ onSeeking: true }), + captured: keyOf({ onSeekingCapture: true }) + } + }, + stalled: { + phasedRegistrationNames: { + bubbled: keyOf({ onStalled: true }), + captured: keyOf({ onStalledCapture: true }) } }, submit: { phasedRegistrationNames: { - bubbled: keyOf({onSubmit: true}), - captured: keyOf({onSubmitCapture: true}) + bubbled: keyOf({ onSubmit: true }), + captured: keyOf({ onSubmitCapture: true }) + } + }, + suspend: { + phasedRegistrationNames: { + bubbled: keyOf({ onSuspend: true }), + captured: keyOf({ onSuspendCapture: true }) + } + }, + timeUpdate: { + phasedRegistrationNames: { + bubbled: keyOf({ onTimeUpdate: true }), + captured: keyOf({ onTimeUpdateCapture: true }) } }, touchCancel: { phasedRegistrationNames: { - bubbled: keyOf({onTouchCancel: true}), - captured: keyOf({onTouchCancelCapture: true}) + bubbled: keyOf({ onTouchCancel: true }), + captured: keyOf({ onTouchCancelCapture: true }) } }, touchEnd: { phasedRegistrationNames: { - bubbled: keyOf({onTouchEnd: true}), - captured: keyOf({onTouchEndCapture: true}) + bubbled: keyOf({ onTouchEnd: true }), + captured: keyOf({ onTouchEndCapture: true }) } }, touchMove: { phasedRegistrationNames: { - bubbled: keyOf({onTouchMove: true}), - captured: keyOf({onTouchMoveCapture: true}) + bubbled: keyOf({ onTouchMove: true }), + captured: keyOf({ onTouchMoveCapture: true }) } }, touchStart: { phasedRegistrationNames: { - bubbled: keyOf({onTouchStart: true}), - captured: keyOf({onTouchStartCapture: true}) + bubbled: keyOf({ onTouchStart: true }), + captured: keyOf({ onTouchStartCapture: true }) + } + }, + volumeChange: { + phasedRegistrationNames: { + bubbled: keyOf({ onVolumeChange: true }), + captured: keyOf({ onVolumeChangeCapture: true }) + } + }, + waiting: { + phasedRegistrationNames: { + bubbled: keyOf({ onWaiting: true }), + captured: keyOf({ onWaitingCapture: true }) } }, wheel: { phasedRegistrationNames: { - bubbled: keyOf({onWheel: true}), - captured: keyOf({onWheelCapture: true}) + bubbled: keyOf({ onWheel: true }), + captured: keyOf({ onWheelCapture: true }) } } }; var topLevelEventsToDispatchConfig = { - topBlur: eventTypes.blur, - topClick: eventTypes.click, + topAbort: eventTypes.abort, + topBlur: eventTypes.blur, + topCanPlay: eventTypes.canPlay, + topCanPlayThrough: eventTypes.canPlayThrough, + topClick: eventTypes.click, topContextMenu: eventTypes.contextMenu, - topCopy: eventTypes.copy, - topCut: eventTypes.cut, + topCopy: eventTypes.copy, + topCut: eventTypes.cut, topDoubleClick: eventTypes.doubleClick, - topDrag: eventTypes.drag, - topDragEnd: eventTypes.dragEnd, - topDragEnter: eventTypes.dragEnter, - topDragExit: eventTypes.dragExit, - topDragLeave: eventTypes.dragLeave, - topDragOver: eventTypes.dragOver, - topDragStart: eventTypes.dragStart, - topDrop: eventTypes.drop, - topError: eventTypes.error, - topFocus: eventTypes.focus, - topInput: eventTypes.input, - topKeyDown: eventTypes.keyDown, - topKeyPress: eventTypes.keyPress, - topKeyUp: eventTypes.keyUp, - topLoad: eventTypes.load, - topMouseDown: eventTypes.mouseDown, - topMouseMove: eventTypes.mouseMove, - topMouseOut: eventTypes.mouseOut, - topMouseOver: eventTypes.mouseOver, - topMouseUp: eventTypes.mouseUp, - topPaste: eventTypes.paste, - topReset: eventTypes.reset, - topScroll: eventTypes.scroll, - topSubmit: eventTypes.submit, + topDrag: eventTypes.drag, + topDragEnd: eventTypes.dragEnd, + topDragEnter: eventTypes.dragEnter, + topDragExit: eventTypes.dragExit, + topDragLeave: eventTypes.dragLeave, + topDragOver: eventTypes.dragOver, + topDragStart: eventTypes.dragStart, + topDrop: eventTypes.drop, + topDurationChange: eventTypes.durationChange, + topEmptied: eventTypes.emptied, + topEncrypted: eventTypes.encrypted, + topEnded: eventTypes.ended, + topError: eventTypes.error, + topFocus: eventTypes.focus, + topInput: eventTypes.input, + topKeyDown: eventTypes.keyDown, + topKeyPress: eventTypes.keyPress, + topKeyUp: eventTypes.keyUp, + topLoad: eventTypes.load, + topLoadedData: eventTypes.loadedData, + topLoadedMetadata: eventTypes.loadedMetadata, + topLoadStart: eventTypes.loadStart, + topMouseDown: eventTypes.mouseDown, + topMouseMove: eventTypes.mouseMove, + topMouseOut: eventTypes.mouseOut, + topMouseOver: eventTypes.mouseOver, + topMouseUp: eventTypes.mouseUp, + topPaste: eventTypes.paste, + topPause: eventTypes.pause, + topPlay: eventTypes.play, + topPlaying: eventTypes.playing, + topProgress: eventTypes.progress, + topRateChange: eventTypes.rateChange, + topReset: eventTypes.reset, + topScroll: eventTypes.scroll, + topSeeked: eventTypes.seeked, + topSeeking: eventTypes.seeking, + topStalled: eventTypes.stalled, + topSubmit: eventTypes.submit, + topSuspend: eventTypes.suspend, + topTimeUpdate: eventTypes.timeUpdate, topTouchCancel: eventTypes.touchCancel, - topTouchEnd: eventTypes.touchEnd, - topTouchMove: eventTypes.touchMove, - topTouchStart: eventTypes.touchStart, - topWheel: eventTypes.wheel + topTouchEnd: eventTypes.touchEnd, + topTouchMove: eventTypes.touchMove, + topTouchStart: eventTypes.touchStart, + topVolumeChange: eventTypes.volumeChange, + topWaiting: eventTypes.waiting, + topWheel: eventTypes.wheel }; for (var type in topLevelEventsToDispatchConfig) { topLevelEventsToDispatchConfig[type].dependencies = [type]; } +var ON_CLICK_KEY = keyOf({ onClick: null }); +var onClickListeners = {}; + var SimpleEventPlugin = { eventTypes: eventTypes, /** - * Same as the default implementation, except cancels the event when return - * value is false. This behavior will be disabled in a future release. - * - * @param {object} Event to be dispatched. - * @param {function} Application-level callback. - * @param {string} domID DOM ID to pass to the callback. - */ - executeDispatch: function(event, listener, domID) { - var returnValue = EventPluginUtils.executeDispatch(event, listener, domID); - - ("production" !== "development" ? warning( - typeof returnValue !== 'boolean', - 'Returning `false` from an event handler is deprecated and will be ' + - 'ignored in a future release. Instead, manually call ' + - 'e.stopPropagation() or e.preventDefault(), as appropriate.' - ) : null); - - if (returnValue === false) { - event.stopPropagation(); - event.preventDefault(); - } - }, - - /** * @param {string} topLevelType Record from `EventConstants`. * @param {DOMEventTarget} topLevelTarget The listening component root node. * @param {string} topLevelTargetID ID of `topLevelTarget`. @@ -17448,22 +14652,40 @@ var SimpleEventPlugin = { * @return {*} An accumulation of synthetic events. * @see {EventPluginHub.extractEvents} */ - extractEvents: function( - topLevelType, - topLevelTarget, - topLevelTargetID, - nativeEvent) { + extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) { var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; if (!dispatchConfig) { return null; } var EventConstructor; switch (topLevelType) { + case topLevelTypes.topAbort: + case topLevelTypes.topCanPlay: + case topLevelTypes.topCanPlayThrough: + case topLevelTypes.topDurationChange: + case topLevelTypes.topEmptied: + case topLevelTypes.topEncrypted: + case topLevelTypes.topEnded: + case topLevelTypes.topError: case topLevelTypes.topInput: case topLevelTypes.topLoad: - case topLevelTypes.topError: + case topLevelTypes.topLoadedData: + case topLevelTypes.topLoadedMetadata: + case topLevelTypes.topLoadStart: + case topLevelTypes.topPause: + case topLevelTypes.topPlay: + case topLevelTypes.topPlaying: + case topLevelTypes.topProgress: + case topLevelTypes.topRateChange: case topLevelTypes.topReset: + case topLevelTypes.topSeeked: + case topLevelTypes.topSeeking: + case topLevelTypes.topStalled: case topLevelTypes.topSubmit: + case topLevelTypes.topSuspend: + case topLevelTypes.topTimeUpdate: + case topLevelTypes.topVolumeChange: + case topLevelTypes.topWaiting: // HTML Events // @see http://www.w3.org/TR/html5/index.html#events-0 EventConstructor = SyntheticEvent; @@ -17475,7 +14697,7 @@ var SimpleEventPlugin = { if (getEventCharCode(nativeEvent) === 0) { return null; } - /* falls through */ + /* falls through */ case topLevelTypes.topKeyDown: case topLevelTypes.topKeyUp: EventConstructor = SyntheticKeyboardEvent; @@ -17490,7 +14712,7 @@ var SimpleEventPlugin = { if (nativeEvent.button === 2) { return null; } - /* falls through */ + /* falls through */ case topLevelTypes.topContextMenu: case topLevelTypes.topDoubleClick: case topLevelTypes.topMouseDown: @@ -17528,25 +14750,36 @@ var SimpleEventPlugin = { EventConstructor = SyntheticClipboardEvent; break; } - ("production" !== "development" ? invariant( - EventConstructor, - 'SimpleEventPlugin: Unhandled event type, `%s`.', - topLevelType - ) : invariant(EventConstructor)); - var event = EventConstructor.getPooled( - dispatchConfig, - topLevelTargetID, - nativeEvent - ); + !EventConstructor ? "development" !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : invariant(false) : undefined; + var event = EventConstructor.getPooled(dispatchConfig, topLevelTargetID, nativeEvent, nativeEventTarget); EventPropagators.accumulateTwoPhaseDispatches(event); return event; + }, + + didPutListener: function (id, registrationName, listener) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + if (registrationName === ON_CLICK_KEY) { + var node = ReactMount.getNode(id); + if (!onClickListeners[id]) { + onClickListeners[id] = EventListener.listen(node, 'click', emptyFunction); + } + } + }, + + willDeleteListener: function (id, registrationName) { + if (registrationName === ON_CLICK_KEY) { + onClickListeners[id].remove(); + delete onClickListeners[id]; + } } }; module.exports = SimpleEventPlugin; - -},{"105":105,"107":107,"108":108,"109":109,"111":111,"112":112,"113":113,"114":114,"115":115,"137":137,"150":150,"157":157,"16":16,"171":171,"20":20,"21":21}],105:[function(_dereq_,module,exports){ +},{"110":110,"128":128,"135":135,"143":143,"147":147,"15":15,"19":19,"65":65,"89":89,"91":91,"92":92,"93":93,"95":95,"96":96,"97":97,"98":98,"99":99}],89:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17561,19 +14794,15 @@ module.exports = SimpleEventPlugin; 'use strict'; -var SyntheticEvent = _dereq_(108); +var SyntheticEvent = _dereq_(92); /** * @interface Event * @see http://www.w3.org/TR/clipboard-apis/ */ var ClipboardEventInterface = { - clipboardData: function(event) { - return ( - 'clipboardData' in event ? - event.clipboardData : - window.clipboardData - ); + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; } }; @@ -17583,15 +14812,14 @@ var ClipboardEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticUIEvent} */ -function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent) { - SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); module.exports = SyntheticClipboardEvent; - -},{"108":108}],106:[function(_dereq_,module,exports){ +},{"92":92}],90:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17606,7 +14834,7 @@ module.exports = SyntheticClipboardEvent; 'use strict'; -var SyntheticEvent = _dereq_(108); +var SyntheticEvent = _dereq_(92); /** * @interface Event @@ -17622,21 +14850,14 @@ var CompositionEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticUIEvent} */ -function SyntheticCompositionEvent( - dispatchConfig, - dispatchMarker, - nativeEvent) { - SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } -SyntheticEvent.augmentClass( - SyntheticCompositionEvent, - CompositionEventInterface -); +SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); module.exports = SyntheticCompositionEvent; - -},{"108":108}],107:[function(_dereq_,module,exports){ +},{"92":92}],91:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17651,7 +14872,7 @@ module.exports = SyntheticCompositionEvent; 'use strict'; -var SyntheticMouseEvent = _dereq_(112); +var SyntheticMouseEvent = _dereq_(96); /** * @interface DragEvent @@ -17667,15 +14888,14 @@ var DragEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticUIEvent} */ -function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent) { - SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); module.exports = SyntheticDragEvent; - -},{"112":112}],108:[function(_dereq_,module,exports){ +},{"96":96}],92:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17690,11 +14910,11 @@ module.exports = SyntheticDragEvent; 'use strict'; -var PooledClass = _dereq_(30); +var PooledClass = _dereq_(24); -var assign = _dereq_(29); -var emptyFunction = _dereq_(129); -var getEventTarget = _dereq_(140); +var assign = _dereq_(23); +var emptyFunction = _dereq_(135); +var warning = _dereq_(154); /** * @interface Event @@ -17702,13 +14922,12 @@ var getEventTarget = _dereq_(140); */ var EventInterface = { type: null, - target: getEventTarget, // currentTarget is set when dispatching; no use in copying it here currentTarget: emptyFunction.thatReturnsNull, eventPhase: null, bubbles: null, cancelable: null, - timeStamp: function(event) { + timeStamp: function (event) { return event.timeStamp || Date.now(); }, defaultPrevented: null, @@ -17732,10 +14951,12 @@ var EventInterface = { * @param {string} dispatchMarker Marker identifying the event target. * @param {object} nativeEvent Native browser event. */ -function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) { +function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { this.dispatchConfig = dispatchConfig; this.dispatchMarker = dispatchMarker; this.nativeEvent = nativeEvent; + this.target = nativeEventTarget; + this.currentTarget = nativeEventTarget; var Interface = this.constructor.Interface; for (var propName in Interface) { @@ -17750,9 +14971,7 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) { } } - var defaultPrevented = nativeEvent.defaultPrevented != null ? - nativeEvent.defaultPrevented : - nativeEvent.returnValue === false; + var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; if (defaultPrevented) { this.isDefaultPrevented = emptyFunction.thatReturnsTrue; } else { @@ -17763,9 +14982,16 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) { assign(SyntheticEvent.prototype, { - preventDefault: function() { + preventDefault: function () { this.defaultPrevented = true; var event = this.nativeEvent; + if ("development" !== 'production') { + "development" !== 'production' ? warning(event, 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re calling `preventDefault` on a ' + 'released/nullified synthetic event. This is a no-op. See ' + 'https://fb.me/react-event-pooling for more information.') : undefined; + } + if (!event) { + return; + } + if (event.preventDefault) { event.preventDefault(); } else { @@ -17774,8 +15000,15 @@ assign(SyntheticEvent.prototype, { this.isDefaultPrevented = emptyFunction.thatReturnsTrue; }, - stopPropagation: function() { + stopPropagation: function () { var event = this.nativeEvent; + if ("development" !== 'production') { + "development" !== 'production' ? warning(event, 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re calling `stopPropagation` on a ' + 'released/nullified synthetic event. This is a no-op. See ' + 'https://fb.me/react-event-pooling for more information.') : undefined; + } + if (!event) { + return; + } + if (event.stopPropagation) { event.stopPropagation(); } else { @@ -17789,7 +15022,7 @@ assign(SyntheticEvent.prototype, { * them back into the pool. This allows a way to hold onto a reference that * won't be added back into the pool. */ - persist: function() { + persist: function () { this.isPersistent = emptyFunction.thatReturnsTrue; }, @@ -17803,7 +15036,7 @@ assign(SyntheticEvent.prototype, { /** * `PooledClass` looks for `destructor` on each instance it releases. */ - destructor: function() { + destructor: function () { var Interface = this.constructor.Interface; for (var propName in Interface) { this[propName] = null; @@ -17823,7 +15056,7 @@ SyntheticEvent.Interface = EventInterface; * @param {function} Class * @param {?object} Interface */ -SyntheticEvent.augmentClass = function(Class, Interface) { +SyntheticEvent.augmentClass = function (Class, Interface) { var Super = this; var prototype = Object.create(Super.prototype); @@ -17834,14 +15067,13 @@ SyntheticEvent.augmentClass = function(Class, Interface) { Class.Interface = assign({}, Super.Interface, Interface); Class.augmentClass = Super.augmentClass; - PooledClass.addPoolingTo(Class, PooledClass.threeArgumentPooler); + PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); }; -PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler); +PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); module.exports = SyntheticEvent; - -},{"129":129,"140":140,"29":29,"30":30}],109:[function(_dereq_,module,exports){ +},{"135":135,"154":154,"23":23,"24":24}],93:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17856,7 +15088,7 @@ module.exports = SyntheticEvent; 'use strict'; -var SyntheticUIEvent = _dereq_(114); +var SyntheticUIEvent = _dereq_(98); /** * @interface FocusEvent @@ -17872,15 +15104,14 @@ var FocusEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticUIEvent} */ -function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent) { - SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); module.exports = SyntheticFocusEvent; - -},{"114":114}],110:[function(_dereq_,module,exports){ +},{"98":98}],94:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17895,7 +15126,7 @@ module.exports = SyntheticFocusEvent; 'use strict'; -var SyntheticEvent = _dereq_(108); +var SyntheticEvent = _dereq_(92); /** * @interface Event @@ -17912,21 +15143,14 @@ var InputEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticUIEvent} */ -function SyntheticInputEvent( - dispatchConfig, - dispatchMarker, - nativeEvent) { - SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } -SyntheticEvent.augmentClass( - SyntheticInputEvent, - InputEventInterface -); +SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); module.exports = SyntheticInputEvent; - -},{"108":108}],111:[function(_dereq_,module,exports){ +},{"92":92}],95:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -17941,11 +15165,11 @@ module.exports = SyntheticInputEvent; 'use strict'; -var SyntheticUIEvent = _dereq_(114); +var SyntheticUIEvent = _dereq_(98); -var getEventCharCode = _dereq_(137); -var getEventKey = _dereq_(138); -var getEventModifierState = _dereq_(139); +var getEventCharCode = _dereq_(110); +var getEventKey = _dereq_(111); +var getEventModifierState = _dereq_(112); /** * @interface KeyboardEvent @@ -17962,7 +15186,7 @@ var KeyboardEventInterface = { locale: null, getModifierState: getEventModifierState, // Legacy Interface - charCode: function(event) { + charCode: function (event) { // `charCode` is the result of a KeyPress event and represents the value of // the actual printable character. @@ -17973,7 +15197,7 @@ var KeyboardEventInterface = { } return 0; }, - keyCode: function(event) { + keyCode: function (event) { // `keyCode` is the result of a KeyDown/Up event and represents the value of // physical keyboard key. @@ -17986,7 +15210,7 @@ var KeyboardEventInterface = { } return 0; }, - which: function(event) { + which: function (event) { // `which` is an alias for either `keyCode` or `charCode` depending on the // type of the event. if (event.type === 'keypress') { @@ -18005,15 +15229,14 @@ var KeyboardEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticUIEvent} */ -function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent) { - SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); module.exports = SyntheticKeyboardEvent; - -},{"114":114,"137":137,"138":138,"139":139}],112:[function(_dereq_,module,exports){ +},{"110":110,"111":111,"112":112,"98":98}],96:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18028,10 +15251,10 @@ module.exports = SyntheticKeyboardEvent; 'use strict'; -var SyntheticUIEvent = _dereq_(114); -var ViewportMetrics = _dereq_(117); +var SyntheticUIEvent = _dereq_(98); +var ViewportMetrics = _dereq_(101); -var getEventModifierState = _dereq_(139); +var getEventModifierState = _dereq_(112); /** * @interface MouseEvent @@ -18047,7 +15270,7 @@ var MouseEventInterface = { altKey: null, metaKey: null, getModifierState: getEventModifierState, - button: function(event) { + button: function (event) { // Webkit, Firefox, IE9+ // which: 1 2 3 // button: 0 1 2 (standard) @@ -18062,21 +15285,15 @@ var MouseEventInterface = { return button === 2 ? 2 : button === 4 ? 1 : 0; }, buttons: null, - relatedTarget: function(event) { - return event.relatedTarget || ( - ((event.fromElement === event.srcElement ? event.toElement : event.fromElement)) - ); + relatedTarget: function (event) { + return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); }, // "Proprietary" Interface. - pageX: function(event) { - return 'pageX' in event ? - event.pageX : - event.clientX + ViewportMetrics.currentScrollLeft; + pageX: function (event) { + return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; }, - pageY: function(event) { - return 'pageY' in event ? - event.pageY : - event.clientY + ViewportMetrics.currentScrollTop; + pageY: function (event) { + return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; } }; @@ -18086,15 +15303,14 @@ var MouseEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticUIEvent} */ -function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent) { - SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); module.exports = SyntheticMouseEvent; - -},{"114":114,"117":117,"139":139}],113:[function(_dereq_,module,exports){ +},{"101":101,"112":112,"98":98}],97:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18109,9 +15325,9 @@ module.exports = SyntheticMouseEvent; 'use strict'; -var SyntheticUIEvent = _dereq_(114); +var SyntheticUIEvent = _dereq_(98); -var getEventModifierState = _dereq_(139); +var getEventModifierState = _dereq_(112); /** * @interface TouchEvent @@ -18134,15 +15350,14 @@ var TouchEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticUIEvent} */ -function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent) { - SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); module.exports = SyntheticTouchEvent; - -},{"114":114,"139":139}],114:[function(_dereq_,module,exports){ +},{"112":112,"98":98}],98:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18157,16 +15372,16 @@ module.exports = SyntheticTouchEvent; 'use strict'; -var SyntheticEvent = _dereq_(108); +var SyntheticEvent = _dereq_(92); -var getEventTarget = _dereq_(140); +var getEventTarget = _dereq_(113); /** * @interface UIEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var UIEventInterface = { - view: function(event) { + view: function (event) { if (event.view) { return event.view; } @@ -18185,7 +15400,7 @@ var UIEventInterface = { return window; } }, - detail: function(event) { + detail: function (event) { return event.detail || 0; } }; @@ -18196,15 +15411,14 @@ var UIEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticEvent} */ -function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent) { - SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); module.exports = SyntheticUIEvent; - -},{"108":108,"140":140}],115:[function(_dereq_,module,exports){ +},{"113":113,"92":92}],99:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18219,28 +15433,24 @@ module.exports = SyntheticUIEvent; 'use strict'; -var SyntheticMouseEvent = _dereq_(112); +var SyntheticMouseEvent = _dereq_(96); /** * @interface WheelEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var WheelEventInterface = { - deltaX: function(event) { - return ( - 'deltaX' in event ? event.deltaX : - // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). - 'wheelDeltaX' in event ? -event.wheelDeltaX : 0 - ); - }, - deltaY: function(event) { - return ( - 'deltaY' in event ? event.deltaY : - // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). - 'wheelDeltaY' in event ? -event.wheelDeltaY : - // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). - 'wheelDelta' in event ? -event.wheelDelta : 0 - ); + deltaX: function (event) { + return 'deltaX' in event ? event.deltaX : + // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; + }, + deltaY: function (event) { + return 'deltaY' in event ? event.deltaY : + // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event ? -event.wheelDeltaY : + // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + 'wheelDelta' in event ? -event.wheelDelta : 0; }, deltaZ: null, @@ -18257,15 +15467,14 @@ var WheelEventInterface = { * @param {object} nativeEvent Native browser event. * @extends {SyntheticMouseEvent} */ -function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent) { - SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); } SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); module.exports = SyntheticWheelEvent; - -},{"112":112}],116:[function(_dereq_,module,exports){ +},{"96":96}],100:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18279,7 +15488,7 @@ module.exports = SyntheticWheelEvent; 'use strict'; -var invariant = _dereq_(150); +var invariant = _dereq_(143); /** * `Transaction` creates a black box that is able to wrap any method such that @@ -18350,12 +15559,12 @@ var Mixin = { * That can be useful if you decide to make your subclass of this mixin a * "PooledClass". */ - reinitializeTransaction: function() { + reinitializeTransaction: function () { this.transactionWrappers = this.getTransactionWrappers(); - if (!this.wrapperInitData) { - this.wrapperInitData = []; - } else { + if (this.wrapperInitData) { this.wrapperInitData.length = 0; + } else { + this.wrapperInitData = []; } this._isInTransaction = false; }, @@ -18368,27 +15577,29 @@ var Mixin = { */ getTransactionWrappers: null, - isInTransaction: function() { + isInTransaction: function () { return !!this._isInTransaction; }, /** * Executes the function within a safety window. Use this for the top level * methods that result in large amounts of computation/mutations that would - * need to be safety checked. + * need to be safety checked. The optional arguments helps prevent the need + * to bind in many cases. * * @param {function} method Member of scope to call. * @param {Object} scope Scope to invoke from. - * @param {Object?=} args... Arguments to pass to the method (optional). - * Helps prevent need to bind in many cases. - * @return Return value from `method`. + * @param {Object?=} a Argument to pass to the method. + * @param {Object?=} b Argument to pass to the method. + * @param {Object?=} c Argument to pass to the method. + * @param {Object?=} d Argument to pass to the method. + * @param {Object?=} e Argument to pass to the method. + * @param {Object?=} f Argument to pass to the method. + * + * @return {*} Return value from `method`. */ - perform: function(method, scope, a, b, c, d, e, f) { - ("production" !== "development" ? invariant( - !this.isInTransaction(), - 'Transaction.perform(...): Cannot initialize a transaction when there ' + - 'is already an outstanding transaction.' - ) : invariant(!this.isInTransaction())); + perform: function (method, scope, a, b, c, d, e, f) { + !!this.isInTransaction() ? "development" !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(false) : undefined; var errorThrown; var ret; try { @@ -18408,8 +15619,7 @@ var Mixin = { // by invoking `closeAll`. try { this.closeAll(0); - } catch (err) { - } + } catch (err) {} } else { // Since `method` didn't throw, we don't want to silence the exception // here. @@ -18422,7 +15632,7 @@ var Mixin = { return ret; }, - initializeAll: function(startIndex) { + initializeAll: function (startIndex) { var transactionWrappers = this.transactionWrappers; for (var i = startIndex; i < transactionWrappers.length; i++) { var wrapper = transactionWrappers[i]; @@ -18432,9 +15642,7 @@ var Mixin = { // of initialize -- if it's still set to OBSERVED_ERROR in the finally // block, it means wrapper.initialize threw. this.wrapperInitData[i] = Transaction.OBSERVED_ERROR; - this.wrapperInitData[i] = wrapper.initialize ? - wrapper.initialize.call(this) : - null; + this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; } finally { if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) { // The initializer for wrapper i threw an error; initialize the @@ -18442,8 +15650,7 @@ var Mixin = { // that the first error is the one to bubble up. try { this.initializeAll(i + 1); - } catch (err) { - } + } catch (err) {} } } } @@ -18455,11 +15662,8 @@ var Mixin = { * (`close`rs that correspond to initializers that failed will not be * invoked). */ - closeAll: function(startIndex) { - ("production" !== "development" ? invariant( - this.isInTransaction(), - 'Transaction.closeAll(): Cannot close transaction when none are open.' - ) : invariant(this.isInTransaction())); + closeAll: function (startIndex) { + !this.isInTransaction() ? "development" !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(false) : undefined; var transactionWrappers = this.transactionWrappers; for (var i = startIndex; i < transactionWrappers.length; i++) { var wrapper = transactionWrappers[i]; @@ -18482,8 +15686,7 @@ var Mixin = { // first error is the one to bubble up. try { this.closeAll(i + 1); - } catch (e) { - } + } catch (e) {} } } } @@ -18496,15 +15699,14 @@ var Transaction = { Mixin: Mixin, /** - * Token to look for to determine if an error occured. + * Token to look for to determine if an error occurred. */ OBSERVED_ERROR: {} }; module.exports = Transaction; - -},{"150":150}],117:[function(_dereq_,module,exports){ +},{"143":143}],101:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18524,7 +15726,7 @@ var ViewportMetrics = { currentScrollTop: 0, - refreshScrollValues: function(scrollPosition) { + refreshScrollValues: function (scrollPosition) { ViewportMetrics.currentScrollLeft = scrollPosition.x; ViewportMetrics.currentScrollTop = scrollPosition.y; } @@ -18532,8 +15734,7 @@ var ViewportMetrics = { }; module.exports = ViewportMetrics; - -},{}],118:[function(_dereq_,module,exports){ +},{}],102:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -18547,7 +15748,7 @@ module.exports = ViewportMetrics; 'use strict'; -var invariant = _dereq_(150); +var invariant = _dereq_(143); /** * @@ -18564,10 +15765,7 @@ var invariant = _dereq_(150); */ function accumulateInto(current, next) { - ("production" !== "development" ? invariant( - next != null, - 'accumulateInto(...): Accumulated items must not be null or undefined.' - ) : invariant(next != null)); + !(next != null) ? "development" !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : invariant(false) : undefined; if (current == null) { return next; } @@ -18596,8 +15794,7 @@ function accumulateInto(current, next) { } module.exports = accumulateInto; - -},{"150":150}],119:[function(_dereq_,module,exports){ +},{"143":143}],103:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -18609,492 +15806,38 @@ module.exports = accumulateInto; * @providesModule adler32 */ -/* jslint bitwise:true */ - 'use strict'; var MOD = 65521; -// This is a clean-room implementation of adler32 designed for detecting -// if markup is not what we expect it to be. It does not need to be -// cryptographically strong, only reasonably good at detecting if markup -// generated on the server is different than that on the client. +// adler32 is not cryptographically strong, and is only used to sanity check that +// markup generated on the server matches the markup generated on the client. +// This implementation (a modified version of the SheetJS version) has been optimized +// for our use case, at the expense of conforming to the adler32 specification +// for non-ascii inputs. function adler32(data) { var a = 1; var b = 0; - for (var i = 0; i < data.length; i++) { - a = (a + data.charCodeAt(i)) % MOD; - b = (b + a) % MOD; - } - return a | (b << 16); -} - -module.exports = adler32; - -},{}],120:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule camelize - * @typechecks - */ - -var _hyphenPattern = /-(.)/g; - -/** - * Camelcases a hyphenated string, for example: - * - * > camelize('background-color') - * < "backgroundColor" - * - * @param {string} string - * @return {string} - */ -function camelize(string) { - return string.replace(_hyphenPattern, function(_, character) { - return character.toUpperCase(); - }); -} - -module.exports = camelize; - -},{}],121:[function(_dereq_,module,exports){ -/** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule camelizeStyleName - * @typechecks - */ - -"use strict"; - -var camelize = _dereq_(120); - -var msPattern = /^-ms-/; - -/** - * Camelcases a hyphenated CSS property name, for example: - * - * > camelizeStyleName('background-color') - * < "backgroundColor" - * > camelizeStyleName('-moz-transition') - * < "MozTransition" - * > camelizeStyleName('-ms-transition') - * < "msTransition" - * - * As Andi Smith suggests - * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix - * is converted to lowercase `ms`. - * - * @param {string} string - * @return {string} - */ -function camelizeStyleName(string) { - return camelize(string.replace(msPattern, 'ms-')); -} - -module.exports = camelizeStyleName; - -},{"120":120}],122:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks static-only - * @providesModule cloneWithProps - */ - -'use strict'; - -var ReactElement = _dereq_(63); -var ReactPropTransferer = _dereq_(83); - -var keyOf = _dereq_(157); -var warning = _dereq_(171); - -var CHILDREN_PROP = keyOf({children: null}); - -/** - * Sometimes you want to change the props of a child passed to you. Usually - * this is to add a CSS class. - * - * @param {ReactElement} child child element you'd like to clone - * @param {object} props props you'd like to modify. className and style will be - * merged automatically. - * @return {ReactElement} a clone of child with props merged in. - */ -function cloneWithProps(child, props) { - if ("production" !== "development") { - ("production" !== "development" ? warning( - !child.ref, - 'You are calling cloneWithProps() on a child with a ref. This is ' + - 'dangerous because you\'re creating a new child which will not be ' + - 'added as a ref to its parent.' - ) : null); - } - - var newProps = ReactPropTransferer.mergeProps(props, child.props); - - // Use `child.props.children` if it is provided. - if (!newProps.hasOwnProperty(CHILDREN_PROP) && - child.props.hasOwnProperty(CHILDREN_PROP)) { - newProps.children = child.props.children; - } - - // The current API doesn't retain _owner and _context, which is why this - // doesn't use ReactElement.cloneAndReplaceProps. - return ReactElement.createElement(child.type, newProps); -} - -module.exports = cloneWithProps; - -},{"157":157,"171":171,"63":63,"83":83}],123:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule containsNode - * @typechecks - */ - -var isTextNode = _dereq_(154); - -/*jslint bitwise:true */ - -/** - * Checks if a given DOM node contains or is another DOM node. - * - * @param {?DOMNode} outerNode Outer DOM node. - * @param {?DOMNode} innerNode Inner DOM node. - * @return {boolean} True if `outerNode` contains or is `innerNode`. - */ -function containsNode(outerNode, innerNode) { - if (!outerNode || !innerNode) { - return false; - } else if (outerNode === innerNode) { - return true; - } else if (isTextNode(outerNode)) { - return false; - } else if (isTextNode(innerNode)) { - return containsNode(outerNode, innerNode.parentNode); - } else if (outerNode.contains) { - return outerNode.contains(innerNode); - } else if (outerNode.compareDocumentPosition) { - return !!(outerNode.compareDocumentPosition(innerNode) & 16); - } else { - return false; - } -} - -module.exports = containsNode; - -},{"154":154}],124:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule createArrayFromMixed - * @typechecks - */ - -var toArray = _dereq_(168); - -/** - * Perform a heuristic test to determine if an object is "array-like". - * - * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" - * Joshu replied: "Mu." - * - * This function determines if its argument has "array nature": it returns - * true if the argument is an actual array, an `arguments' object, or an - * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). - * - * It will return false for other array-like objects like Filelist. - * - * @param {*} obj - * @return {boolean} - */ -function hasArrayNature(obj) { - return ( - // not null/false - !!obj && - // arrays are objects, NodeLists are functions in Safari - (typeof obj == 'object' || typeof obj == 'function') && - // quacks like an array - ('length' in obj) && - // not window - !('setInterval' in obj) && - // no DOM node should be considered an array-like - // a 'select' element has 'length' and 'item' properties on IE8 - (typeof obj.nodeType != 'number') && - ( - // a real array - (// HTMLCollection/NodeList - (Array.isArray(obj) || - // arguments - ('callee' in obj) || 'item' in obj)) - ) - ); -} - -/** - * Ensure that the argument is an array by wrapping it in an array if it is not. - * Creates a copy of the argument if it is already an array. - * - * This is mostly useful idiomatically: - * - * var createArrayFromMixed = require('createArrayFromMixed'); - * - * function takesOneOrMoreThings(things) { - * things = createArrayFromMixed(things); - * ... - * } - * - * This allows you to treat `things' as an array, but accept scalars in the API. - * - * If you need to convert an array-like object, like `arguments`, into an array - * use toArray instead. - * - * @param {*} obj - * @return {array} - */ -function createArrayFromMixed(obj) { - if (!hasArrayNature(obj)) { - return [obj]; - } else if (Array.isArray(obj)) { - return obj.slice(); - } else { - return toArray(obj); - } -} - -module.exports = createArrayFromMixed; - -},{"168":168}],125:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule createFullPageComponent - * @typechecks - */ - -'use strict'; - -// Defeat circular references by requiring this directly. -var ReactClass = _dereq_(38); -var ReactElement = _dereq_(63); - -var invariant = _dereq_(150); - -/** - * Create a component that will throw an exception when unmounted. - * - * Components like <html> <head> and <body> can't be removed or added - * easily in a cross-browser way, however it's valuable to be able to - * take advantage of React's reconciliation for styling and <title> - * management. So we just document it and throw in dangerous cases. - * - * @param {string} tag The tag to wrap - * @return {function} convenience constructor of new component - */ -function createFullPageComponent(tag) { - var elementFactory = ReactElement.createFactory(tag); - - var FullPageComponent = ReactClass.createClass({ - tagName: tag.toUpperCase(), - displayName: 'ReactFullPageComponent' + tag, - - componentWillUnmount: function() { - ("production" !== "development" ? invariant( - false, - '%s tried to unmount. Because of cross-browser quirks it is ' + - 'impossible to unmount some top-level components (eg <html>, <head>, ' + - 'and <body>) reliably and efficiently. To fix this, have a single ' + - 'top-level component that never unmounts render these elements.', - this.constructor.displayName - ) : invariant(false)); - }, - - render: function() { - return elementFactory(this.props); - } - }); - - return FullPageComponent; -} - -module.exports = createFullPageComponent; - -},{"150":150,"38":38,"63":63}],126:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule createNodesFromMarkup - * @typechecks - */ - -/*jslint evil: true, sub: true */ - -var ExecutionEnvironment = _dereq_(22); - -var createArrayFromMixed = _dereq_(124); -var getMarkupWrap = _dereq_(142); -var invariant = _dereq_(150); - -/** - * Dummy container used to render all markup. - */ -var dummyNode = - ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; - -/** - * Pattern used by `getNodeName`. - */ -var nodeNamePattern = /^\s*<(\w+)/; - -/** - * Extracts the `nodeName` of the first element in a string of markup. - * - * @param {string} markup String of markup. - * @return {?string} Node name of the supplied markup. - */ -function getNodeName(markup) { - var nodeNameMatch = markup.match(nodeNamePattern); - return nodeNameMatch && nodeNameMatch[1].toLowerCase(); -} - -/** - * Creates an array containing the nodes rendered from the supplied markup. The - * optionally supplied `handleScript` function will be invoked once for each - * <script> element that is rendered. If no `handleScript` function is supplied, - * an exception is thrown if any <script> elements are rendered. - * - * @param {string} markup A string of valid HTML markup. - * @param {?function} handleScript Invoked once for each rendered <script>. - * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. - */ -function createNodesFromMarkup(markup, handleScript) { - var node = dummyNode; - ("production" !== "development" ? invariant(!!dummyNode, 'createNodesFromMarkup dummy not initialized') : invariant(!!dummyNode)); - var nodeName = getNodeName(markup); - - var wrap = nodeName && getMarkupWrap(nodeName); - if (wrap) { - node.innerHTML = wrap[1] + markup + wrap[2]; - - var wrapDepth = wrap[0]; - while (wrapDepth--) { - node = node.lastChild; + var i = 0; + var l = data.length; + var m = l & ~0x3; + while (i < m) { + for (; i < Math.min(i + 4096, m); i += 4) { + b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3)); } - } else { - node.innerHTML = markup; + a %= MOD; + b %= MOD; } - - var scripts = node.getElementsByTagName('script'); - if (scripts.length) { - ("production" !== "development" ? invariant( - handleScript, - 'createNodesFromMarkup(...): Unexpected <script> element rendered.' - ) : invariant(handleScript)); - createArrayFromMixed(scripts).forEach(handleScript); - } - - var nodes = createArrayFromMixed(node.childNodes); - while (node.lastChild) { - node.removeChild(node.lastChild); + for (; i < l; i++) { + b += a += data.charCodeAt(i); } - return nodes; + a %= MOD; + b %= MOD; + return a | b << 16; } -module.exports = createNodesFromMarkup; - -},{"124":124,"142":142,"150":150,"22":22}],127:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule cx - */ - -/** - * This function is used to mark string literals representing CSS class names - * so that they can be transformed statically. This allows for modularization - * and minification of CSS class names. - * - * In static_upstream, this function is actually implemented, but it should - * eventually be replaced with something more descriptive, and the transform - * that is used in the main stack should be ported for use elsewhere. - * - * @param string|object className to modularize, or an object of key/values. - * In the object case, the values are conditions that - * determine if the className keys should be included. - * @param [string ...] Variable list of classNames in the string case. - * @return string Renderable space-separated CSS className. - */ - -'use strict'; -var warning = _dereq_(171); - -var warned = false; - -function cx(classNames) { - if ("production" !== "development") { - ("production" !== "development" ? warning( - warned, - 'React.addons.classSet will be deprecated in a future version. See ' + - 'http://fb.me/react-addons-classset' - ) : null); - warned = true; - } - - if (typeof classNames == 'object') { - return Object.keys(classNames).filter(function(className) { - return classNames[className]; - }).join(' '); - } else { - return Array.prototype.join.call(arguments, ' '); - } -} - -module.exports = cx; - -},{"171":171}],128:[function(_dereq_,module,exports){ +module.exports = adler32; +},{}],104:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19109,7 +15852,7 @@ module.exports = cx; 'use strict'; -var CSSProperty = _dereq_(5); +var CSSProperty = _dereq_(4); var isUnitlessNumber = CSSProperty.isUnitlessNumber; @@ -19139,8 +15882,7 @@ function dangerousStyleValue(name, value) { } var isNonNumeric = isNaN(value); - if (isNonNumeric || value === 0 || - isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { return '' + value; // cast to string } @@ -19151,42 +15893,7 @@ function dangerousStyleValue(name, value) { } module.exports = dangerousStyleValue; - -},{"5":5}],129:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule emptyFunction - */ - -function makeEmptyFunction(arg) { - return function() { - return arg; - }; -} - -/** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. - */ -function emptyFunction() {} - -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function() { return this; }; -emptyFunction.thatReturnsArgument = function(arg) { return arg; }; - -module.exports = emptyFunction; - -},{}],130:[function(_dereq_,module,exports){ +},{"4":4}],105:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19195,20 +15902,47 @@ module.exports = emptyFunction; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule emptyObject + * @providesModule deprecated */ -"use strict"; +'use strict'; -var emptyObject = {}; +var assign = _dereq_(23); +var warning = _dereq_(154); + +/** + * This will log a single deprecation notice per function and forward the call + * on to the new API. + * + * @param {string} fnName The name of the function + * @param {string} newModule The module that fn will exist in + * @param {string} newPackage The module that fn will exist in + * @param {*} ctx The context this forwarded call should run in + * @param {function} fn The function to forward on to + * @return {function} The function that will warn once and then call fn + */ +function deprecated(fnName, newModule, newPackage, ctx, fn) { + var warned = false; + if ("development" !== 'production') { + var newFn = function () { + "development" !== 'production' ? warning(warned, + // Require examples in this string must be split to prevent React's + // build tools from mistaking them for real requires. + // Otherwise the build tools will attempt to build a '%s' module. + 'React.%s is deprecated. Please use %s.%s from require' + '(\'%s\') ' + 'instead.', fnName, newModule, fnName, newPackage) : undefined; + warned = true; + return fn.apply(ctx, arguments); + }; + // We need to make sure all properties of the original fn are copied over. + // In particular, this is needed to support PropTypes + return assign(newFn, fn); + } -if ("production" !== "development") { - Object.freeze(emptyObject); + return fn; } -module.exports = emptyObject; - -},{}],131:[function(_dereq_,module,exports){ +module.exports = deprecated; +},{"154":154,"23":23}],106:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19247,8 +15981,7 @@ function escapeTextContentForBrowser(text) { } module.exports = escapeTextContentForBrowser; - -},{}],132:[function(_dereq_,module,exports){ +},{}],107:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19263,63 +15996,42 @@ module.exports = escapeTextContentForBrowser; 'use strict'; -var ReactCurrentOwner = _dereq_(45); -var ReactInstanceMap = _dereq_(73); -var ReactMount = _dereq_(77); +var ReactCurrentOwner = _dereq_(34); +var ReactInstanceMap = _dereq_(62); +var ReactMount = _dereq_(65); -var invariant = _dereq_(150); -var isNode = _dereq_(152); -var warning = _dereq_(171); +var invariant = _dereq_(143); +var warning = _dereq_(154); /** * Returns the DOM node rendered by this element. * * @param {ReactComponent|DOMElement} componentOrElement - * @return {DOMElement} The root node of this element. + * @return {?DOMElement} The root node of this element. */ function findDOMNode(componentOrElement) { - if ("production" !== "development") { + if ("development" !== 'production') { var owner = ReactCurrentOwner.current; if (owner !== null) { - ("production" !== "development" ? warning( - owner._warnedAboutRefsInRender, - '%s is accessing getDOMNode or findDOMNode inside its render(). ' + - 'render() should be a pure function of props and state. It should ' + - 'never access something that requires stale data from the previous ' + - 'render, such as refs. Move this logic to componentDidMount and ' + - 'componentDidUpdate instead.', - owner.getName() || 'A component' - ) : null); + "development" !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing getDOMNode or findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : undefined; owner._warnedAboutRefsInRender = true; } } if (componentOrElement == null) { return null; } - if (isNode(componentOrElement)) { + if (componentOrElement.nodeType === 1) { return componentOrElement; } if (ReactInstanceMap.has(componentOrElement)) { return ReactMount.getNodeFromInstance(componentOrElement); } - ("production" !== "development" ? invariant( - componentOrElement.render == null || - typeof componentOrElement.render !== 'function', - 'Component (with keys: %s) contains `render` method ' + - 'but is not mounted in the DOM', - Object.keys(componentOrElement) - ) : invariant(componentOrElement.render == null || - typeof componentOrElement.render !== 'function')); - ("production" !== "development" ? invariant( - false, - 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', - Object.keys(componentOrElement) - ) : invariant(false)); + !(componentOrElement.render == null || typeof componentOrElement.render !== 'function') ? "development" !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : invariant(false) : undefined; + !false ? "development" !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : invariant(false) : undefined; } module.exports = findDOMNode; - -},{"150":150,"152":152,"171":171,"45":45,"73":73,"77":77}],133:[function(_dereq_,module,exports){ +},{"143":143,"154":154,"34":34,"62":62,"65":65}],108:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19333,8 +16045,8 @@ module.exports = findDOMNode; 'use strict'; -var traverseAllChildren = _dereq_(169); -var warning = _dereq_(171); +var traverseAllChildren = _dereq_(126); +var warning = _dereq_(154); /** * @param {function} traverseContext Context passed through traversal. @@ -19344,15 +16056,9 @@ var warning = _dereq_(171); function flattenSingleChildIntoContext(traverseContext, child, name) { // We found a component instance. var result = traverseContext; - var keyUnique = !result.hasOwnProperty(name); - if ("production" !== "development") { - ("production" !== "development" ? warning( - keyUnique, - 'flattenChildren(...): Encountered two children with the same key, ' + - '`%s`. Child keys must be unique; when two children share a key, only ' + - 'the first child will be used.', - name - ) : null); + var keyUnique = result[name] === undefined; + if ("development" !== 'production') { + "development" !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.', name) : undefined; } if (keyUnique && child != null) { result[name] = child; @@ -19374,37 +16080,7 @@ function flattenChildren(children) { } module.exports = flattenChildren; - -},{"169":169,"171":171}],134:[function(_dereq_,module,exports){ -/** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule focusNode - */ - -"use strict"; - -/** - * @param {DOMElement} node input/textarea to focus - */ -function focusNode(node) { - // IE8 can throw "Can't move focus to the control because it is invisible, - // not enabled, or of a type that does not accept the focus." for all kinds of - // reasons that are too expensive and fragile to test. - try { - node.focus(); - } catch(e) { - } -} - -module.exports = focusNode; - -},{}],135:[function(_dereq_,module,exports){ +},{"126":126,"154":154}],109:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19419,13 +16095,13 @@ module.exports = focusNode; 'use strict'; /** - * @param {array} an "accumulation" of items which is either an Array or + * @param {array} arr an "accumulation" of items which is either an Array or * a single item. Useful when paired with the `accumulate` module. This is a * simple utility that allows us to reason about a collection of items, but * handling the case when there is exactly one item (and we do not need to * allocate an array). */ -var forEachAccumulated = function(arr, cb, scope) { +var forEachAccumulated = function (arr, cb, scope) { if (Array.isArray(arr)) { arr.forEach(cb, scope); } else if (arr) { @@ -19434,37 +16110,7 @@ var forEachAccumulated = function(arr, cb, scope) { }; module.exports = forEachAccumulated; - -},{}],136:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule getActiveElement - * @typechecks - */ - -/** - * Same as document.activeElement but wraps in a try-catch block. In IE it is - * not safe to call document.activeElement if there is nothing focused. - * - * The activeElement will be null only if the document body is not yet defined. - */ -function getActiveElement() /*?DOMElement*/ { - try { - return document.activeElement || document.body; - } catch (e) { - return document.body; - } -} - -module.exports = getActiveElement; - -},{}],137:[function(_dereq_,module,exports){ +},{}],110:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19487,7 +16133,7 @@ module.exports = getActiveElement; * presumably because it does not produce a tab-character in browsers. * * @param {object} nativeEvent Native browser event. - * @return {string} Normalized `charCode` property. + * @return {number} Normalized `charCode` property. */ function getEventCharCode(nativeEvent) { var charCode; @@ -19515,8 +16161,7 @@ function getEventCharCode(nativeEvent) { } module.exports = getEventCharCode; - -},{}],138:[function(_dereq_,module,exports){ +},{}],111:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19531,7 +16176,7 @@ module.exports = getEventCharCode; 'use strict'; -var getEventCharCode = _dereq_(137); +var getEventCharCode = _dereq_(110); /** * Normalization of deprecated HTML5 `key` values @@ -19620,8 +16265,7 @@ function getEventKey(nativeEvent) { } module.exports = getEventKey; - -},{"137":137}],139:[function(_dereq_,module,exports){ +},{"110":110}],112:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19652,7 +16296,6 @@ var modifierKeyToProp = { // modifier keys exposed by the event itself, does not support Lock-keys. // Currently, all major browsers except Chrome seems to support Lock-keys. function modifierStateGetter(keyArg) { - /*jshint validthis:true */ var syntheticEvent = this; var nativeEvent = syntheticEvent.nativeEvent; if (nativeEvent.getModifierState) { @@ -19667,8 +16310,7 @@ function getEventModifierState(nativeEvent) { } module.exports = getEventModifierState; - -},{}],140:[function(_dereq_,module,exports){ +},{}],113:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19698,8 +16340,7 @@ function getEventTarget(nativeEvent) { } module.exports = getEventTarget; - -},{}],141:[function(_dereq_,module,exports){ +},{}],114:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19733,134 +16374,14 @@ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. * @return {?function} */ function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && ( - (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]) - ); + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } module.exports = getIteratorFn; - -},{}],142:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule getMarkupWrap - */ - -var ExecutionEnvironment = _dereq_(22); - -var invariant = _dereq_(150); - -/** - * Dummy container used to detect which wraps are necessary. - */ -var dummyNode = - ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; - -/** - * Some browsers cannot use `innerHTML` to render certain elements standalone, - * so we wrap them, render the wrapped nodes, then extract the desired node. - * - * In IE8, certain elements cannot render alone, so wrap all elements ('*'). - */ -var shouldWrap = { - // Force wrapping for SVG elements because if they get created inside a <div>, - // they will be initialized in the wrong namespace (and will not display). - 'circle': true, - 'clipPath': true, - 'defs': true, - 'ellipse': true, - 'g': true, - 'line': true, - 'linearGradient': true, - 'path': true, - 'polygon': true, - 'polyline': true, - 'radialGradient': true, - 'rect': true, - 'stop': true, - 'text': true -}; - -var selectWrap = [1, '<select multiple="true">', '</select>']; -var tableWrap = [1, '<table>', '</table>']; -var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; - -var svgWrap = [1, '<svg>', '</svg>']; - -var markupWrap = { - '*': [1, '?<div>', '</div>'], - - 'area': [1, '<map>', '</map>'], - 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], - 'legend': [1, '<fieldset>', '</fieldset>'], - 'param': [1, '<object>', '</object>'], - 'tr': [2, '<table><tbody>', '</tbody></table>'], - - 'optgroup': selectWrap, - 'option': selectWrap, - - 'caption': tableWrap, - 'colgroup': tableWrap, - 'tbody': tableWrap, - 'tfoot': tableWrap, - 'thead': tableWrap, - - 'td': trWrap, - 'th': trWrap, - - 'circle': svgWrap, - 'clipPath': svgWrap, - 'defs': svgWrap, - 'ellipse': svgWrap, - 'g': svgWrap, - 'line': svgWrap, - 'linearGradient': svgWrap, - 'path': svgWrap, - 'polygon': svgWrap, - 'polyline': svgWrap, - 'radialGradient': svgWrap, - 'rect': svgWrap, - 'stop': svgWrap, - 'text': svgWrap -}; - -/** - * Gets the markup wrap configuration for the supplied `nodeName`. - * - * NOTE: This lazily detects which wraps are necessary for the current browser. - * - * @param {string} nodeName Lowercase `nodeName`. - * @return {?array} Markup wrap configuration, if applicable. - */ -function getMarkupWrap(nodeName) { - ("production" !== "development" ? invariant(!!dummyNode, 'Markup wrapping node not initialized') : invariant(!!dummyNode)); - if (!markupWrap.hasOwnProperty(nodeName)) { - nodeName = '*'; - } - if (!shouldWrap.hasOwnProperty(nodeName)) { - if (nodeName === '*') { - dummyNode.innerHTML = '<link />'; - } else { - dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; - } - shouldWrap[nodeName] = !dummyNode.firstChild; - } - return shouldWrap[nodeName] ? markupWrap[nodeName] : null; -} - - -module.exports = getMarkupWrap; - -},{"150":150,"22":22}],143:[function(_dereq_,module,exports){ +},{}],115:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19934,43 +16455,7 @@ function getNodeForCharacterOffset(root, offset) { } module.exports = getNodeForCharacterOffset; - -},{}],144:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule getReactRootElementInContainer - */ - -'use strict'; - -var DOC_NODE_TYPE = 9; - -/** - * @param {DOMElement|DOMDocument} container DOM element that may contain - * a React component - * @return {?*} DOM element that may have the reactRoot ID, or null. - */ -function getReactRootElementInContainer(container) { - if (!container) { - return null; - } - - if (container.nodeType === DOC_NODE_TYPE) { - return container.documentElement; - } else { - return container.firstChild; - } -} - -module.exports = getReactRootElementInContainer; - -},{}],145:[function(_dereq_,module,exports){ +},{}],116:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -19984,7 +16469,7 @@ module.exports = getReactRootElementInContainer; 'use strict'; -var ExecutionEnvironment = _dereq_(22); +var ExecutionEnvironment = _dereq_(129); var contentKey = null; @@ -19998,130 +16483,13 @@ function getTextContentAccessor() { if (!contentKey && ExecutionEnvironment.canUseDOM) { // Prefer textContent to innerText because many browsers support both but // SVG <text> elements don't support innerText even when <div> does. - contentKey = 'textContent' in document.documentElement ? - 'textContent' : - 'innerText'; + contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; } return contentKey; } module.exports = getTextContentAccessor; - -},{"22":22}],146:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule getUnboundedScrollPosition - * @typechecks - */ - -"use strict"; - -/** - * Gets the scroll position of the supplied element or window. - * - * The return values are unbounded, unlike `getScrollPosition`. This means they - * may be negative or exceed the element boundaries (which is possible using - * inertial scrolling). - * - * @param {DOMWindow|DOMElement} scrollable - * @return {object} Map with `x` and `y` keys. - */ -function getUnboundedScrollPosition(scrollable) { - if (scrollable === window) { - return { - x: window.pageXOffset || document.documentElement.scrollLeft, - y: window.pageYOffset || document.documentElement.scrollTop - }; - } - return { - x: scrollable.scrollLeft, - y: scrollable.scrollTop - }; -} - -module.exports = getUnboundedScrollPosition; - -},{}],147:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule hyphenate - * @typechecks - */ - -var _uppercasePattern = /([A-Z])/g; - -/** - * Hyphenates a camelcased string, for example: - * - * > hyphenate('backgroundColor') - * < "background-color" - * - * For CSS style names, use `hyphenateStyleName` instead which works properly - * with all vendor prefixes, including `ms`. - * - * @param {string} string - * @return {string} - */ -function hyphenate(string) { - return string.replace(_uppercasePattern, '-$1').toLowerCase(); -} - -module.exports = hyphenate; - -},{}],148:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule hyphenateStyleName - * @typechecks - */ - -"use strict"; - -var hyphenate = _dereq_(147); - -var msPattern = /^ms-/; - -/** - * Hyphenates a camelcased CSS property name, for example: - * - * > hyphenateStyleName('backgroundColor') - * < "background-color" - * > hyphenateStyleName('MozTransition') - * < "-moz-transition" - * > hyphenateStyleName('msTransition') - * < "-ms-transition" - * - * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix - * is converted to `-ms-`. - * - * @param {string} string - * @return {string} - */ -function hyphenateStyleName(string) { - return hyphenate(string).replace(msPattern, '-ms-'); -} - -module.exports = hyphenateStyleName; - -},{"147":147}],149:[function(_dereq_,module,exports){ +},{"129":129}],117:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20136,23 +16504,29 @@ module.exports = hyphenateStyleName; 'use strict'; -var ReactCompositeComponent = _dereq_(43); -var ReactEmptyComponent = _dereq_(65); -var ReactNativeComponent = _dereq_(80); +var ReactCompositeComponent = _dereq_(33); +var ReactEmptyComponent = _dereq_(54); +var ReactNativeComponent = _dereq_(68); -var assign = _dereq_(29); -var invariant = _dereq_(150); -var warning = _dereq_(171); +var assign = _dereq_(23); +var invariant = _dereq_(143); +var warning = _dereq_(154); // To avoid a cyclic dependency, we create the final class in this module -var ReactCompositeComponentWrapper = function() { }; -assign( - ReactCompositeComponentWrapper.prototype, - ReactCompositeComponent.Mixin, - { - _instantiateReactComponent: instantiateReactComponent +var ReactCompositeComponentWrapper = function () {}; +assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent.Mixin, { + _instantiateReactComponent: instantiateReactComponent +}); + +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } } -); + return ''; +} /** * Check if the type reference is a known internal type. I.e. not a user @@ -20162,49 +16536,31 @@ assign( * @return {boolean} Returns true if this is a valid internal type. */ function isInternalComponentType(type) { - return ( - typeof type === 'function' && - typeof type.prototype !== 'undefined' && - typeof type.prototype.mountComponent === 'function' && - typeof type.prototype.receiveComponent === 'function' - ); + return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function'; } /** * Given a ReactNode, create an instance that will actually be mounted. * * @param {ReactNode} node - * @param {*} parentCompositeType The composite type that resolved this. * @return {object} A new instance of the element's constructor. * @protected */ -function instantiateReactComponent(node, parentCompositeType) { +function instantiateReactComponent(node) { var instance; if (node === null || node === false) { - node = ReactEmptyComponent.emptyElement; - } - - if (typeof node === 'object') { + instance = new ReactEmptyComponent(instantiateReactComponent); + } else if (typeof node === 'object') { var element = node; - if ("production" !== "development") { - ("production" !== "development" ? warning( - element && (typeof element.type === 'function' || - typeof element.type === 'string'), - 'Only functions or strings can be mounted as React components.' - ) : null); - } + !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? "development" !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) ' + 'or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : invariant(false) : undefined; // Special case string values - if (parentCompositeType === element.type && - typeof element.type === 'string') { - // Avoid recursion if the wrapper renders itself. + if (typeof element.type === 'string') { instance = ReactNativeComponent.createInternalComponent(element); - // All native components are currently wrapped in a composite so we're - // safe to assume that this is what we should instantiate. } else if (isInternalComponentType(element.type)) { // This is temporarily available for custom components that are not string - // represenations. I.e. ART. Once those are updated to use the string + // representations. I.e. ART. Once those are updated to use the string // representation, we can drop this code path. instance = new element.type(element); } else { @@ -20213,21 +16569,11 @@ function instantiateReactComponent(node, parentCompositeType) { } else if (typeof node === 'string' || typeof node === 'number') { instance = ReactNativeComponent.createInstanceForText(node); } else { - ("production" !== "development" ? invariant( - false, - 'Encountered invalid React node of type %s', - typeof node - ) : invariant(false)); + !false ? "development" !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : invariant(false) : undefined; } - if ("production" !== "development") { - ("production" !== "development" ? warning( - typeof instance.construct === 'function' && - typeof instance.mountComponent === 'function' && - typeof instance.receiveComponent === 'function' && - typeof instance.unmountComponent === 'function', - 'Only React Components can be mounted.' - ) : null); + if ("development" !== 'production') { + "development" !== 'production' ? warning(typeof instance.construct === 'function' && typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : undefined; } // Sets up the instance. This can probably just move into the constructor now. @@ -20239,14 +16585,14 @@ function instantiateReactComponent(node, parentCompositeType) { instance._mountIndex = 0; instance._mountImage = null; - if ("production" !== "development") { + if ("development" !== 'production') { instance._isOwnerNecessary = false; instance._warnedAboutRefsInRender = false; } // Internal instances should fully constructed at this point, so they should // not get any new fields added to them at this point. - if ("production" !== "development") { + if ("development" !== 'production') { if (Object.preventExtensions) { Object.preventExtensions(instance); } @@ -20256,63 +16602,7 @@ function instantiateReactComponent(node, parentCompositeType) { } module.exports = instantiateReactComponent; - -},{"150":150,"171":171,"29":29,"43":43,"65":65,"80":80}],150:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule invariant - */ - -"use strict"; - -/** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - -var invariant = function(condition, format, a, b, c, d, e, f) { - if ("production" !== "development") { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } - - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - 'Invariant Violation: ' + - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -}; - -module.exports = invariant; - -},{}],151:[function(_dereq_,module,exports){ +},{"143":143,"154":154,"23":23,"33":33,"54":54,"68":68}],118:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20326,16 +16616,14 @@ module.exports = invariant; 'use strict'; -var ExecutionEnvironment = _dereq_(22); +var ExecutionEnvironment = _dereq_(129); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { - useHasFeature = - document.implementation && - document.implementation.hasFeature && - // always returns true in newer browsers as per the standard. - // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature - document.implementation.hasFeature('', '') !== true; + useHasFeature = document.implementation && document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; } /** @@ -20353,13 +16641,12 @@ if (ExecutionEnvironment.canUseDOM) { * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function isEventSupported(eventNameSuffix, capture) { - if (!ExecutionEnvironment.canUseDOM || - capture && !('addEventListener' in document)) { + if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { return false; } var eventName = 'on' + eventNameSuffix; - var isSupported = eventName in document; + var isSupported = (eventName in document); if (!isSupported) { var element = document.createElement('div'); @@ -20376,35 +16663,7 @@ function isEventSupported(eventNameSuffix, capture) { } module.exports = isEventSupported; - -},{"22":22}],152:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule isNode - * @typechecks - */ - -/** - * @param {*} object The object to check. - * @return {boolean} Whether or not the object is a DOM node. - */ -function isNode(object) { - return !!(object && ( - ((typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && - typeof object.nodeType === 'number' && - typeof object.nodeName === 'string')) - )); -} - -module.exports = isNode; - -},{}],153:[function(_dereq_,module,exports){ +},{"129":129}],119:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20440,255 +16699,12 @@ var supportedInputTypes = { }; function isTextInputElement(elem) { - return elem && ( - (elem.nodeName === 'INPUT' && supportedInputTypes[elem.type] || elem.nodeName === 'TEXTAREA') - ); + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName && (nodeName === 'input' && supportedInputTypes[elem.type] || nodeName === 'textarea'); } module.exports = isTextInputElement; - -},{}],154:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule isTextNode - * @typechecks - */ - -var isNode = _dereq_(152); - -/** - * @param {*} object The object to check. - * @return {boolean} Whether or not the object is a DOM text node. - */ -function isTextNode(object) { - return isNode(object) && object.nodeType == 3; -} - -module.exports = isTextNode; - -},{"152":152}],155:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule joinClasses - * @typechecks static-only - */ - -'use strict'; - -/** - * Combines multiple className strings into one. - * http://jsperf.com/joinclasses-args-vs-array - * - * @param {...?string} classes - * @return {string} - */ -function joinClasses(className/*, ... */) { - if (!className) { - className = ''; - } - var nextClass; - var argLength = arguments.length; - if (argLength > 1) { - for (var ii = 1; ii < argLength; ii++) { - nextClass = arguments[ii]; - if (nextClass) { - className = (className ? className + ' ' : '') + nextClass; - } - } - } - return className; -} - -module.exports = joinClasses; - -},{}],156:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule keyMirror - * @typechecks static-only - */ - -'use strict'; - -var invariant = _dereq_(150); - -/** - * Constructs an enumeration with keys equal to their value. - * - * For example: - * - * var COLORS = keyMirror({blue: null, red: null}); - * var myColor = COLORS.blue; - * var isColorValid = !!COLORS[myColor]; - * - * The last line could not be performed if the values of the generated enum were - * not equal to their keys. - * - * Input: {key1: val1, key2: val2} - * Output: {key1: key1, key2: key2} - * - * @param {object} obj - * @return {object} - */ -var keyMirror = function(obj) { - var ret = {}; - var key; - ("production" !== "development" ? invariant( - obj instanceof Object && !Array.isArray(obj), - 'keyMirror(...): Argument must be an object.' - ) : invariant(obj instanceof Object && !Array.isArray(obj))); - for (key in obj) { - if (!obj.hasOwnProperty(key)) { - continue; - } - ret[key] = key; - } - return ret; -}; - -module.exports = keyMirror; - -},{"150":150}],157:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule keyOf - */ - -/** - * Allows extraction of a minified key. Let's the build system minify keys - * without loosing the ability to dynamically use key strings as values - * themselves. Pass in an object with a single key/val pair and it will return - * you the string key of that single record. Suppose you want to grab the - * value for a key 'className' inside of an object. Key/val minification may - * have aliased that key to be 'xa12'. keyOf({className: null}) will return - * 'xa12' in that case. Resolve keys you want to use once at startup time, then - * reuse those resolutions. - */ -var keyOf = function(oneKeyObj) { - var key; - for (key in oneKeyObj) { - if (!oneKeyObj.hasOwnProperty(key)) { - continue; - } - return key; - } - return null; -}; - - -module.exports = keyOf; - -},{}],158:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule mapObject - */ - -'use strict'; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Executes the provided `callback` once for each enumerable own property in the - * object and constructs a new object from the results. The `callback` is - * invoked with three arguments: - * - * - the property value - * - the property name - * - the object being traversed - * - * Properties that are added after the call to `mapObject` will not be visited - * by `callback`. If the values of existing properties are changed, the value - * passed to `callback` will be the value at the time `mapObject` visits them. - * Properties that are deleted before being visited are not visited. - * - * @grep function objectMap() - * @grep function objMap() - * - * @param {?object} object - * @param {function} callback - * @param {*} context - * @return {?object} - */ -function mapObject(object, callback, context) { - if (!object) { - return null; - } - var result = {}; - for (var name in object) { - if (hasOwnProperty.call(object, name)) { - result[name] = callback.call(context, object[name], name, object); - } - } - return result; -} - -module.exports = mapObject; - -},{}],159:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule memoizeStringOnly - * @typechecks static-only - */ - -'use strict'; - -/** - * Memoizes the return value of a function that accepts one string argument. - * - * @param {function} callback - * @return {function} - */ -function memoizeStringOnly(callback) { - var cache = {}; - return function(string) { - if (!cache.hasOwnProperty(string)) { - cache[string] = callback.call(this, string); - } - return cache[string]; - }; -} - -module.exports = memoizeStringOnly; - -},{}],160:[function(_dereq_,module,exports){ +},{}],120:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20701,9 +16717,9 @@ module.exports = memoizeStringOnly; */ 'use strict'; -var ReactElement = _dereq_(63); +var ReactElement = _dereq_(52); -var invariant = _dereq_(150); +var invariant = _dereq_(143); /** * Returns the first child in a collection of children and verifies that there @@ -20717,16 +16733,12 @@ var invariant = _dereq_(150); * structure. */ function onlyChild(children) { - ("production" !== "development" ? invariant( - ReactElement.isValidElement(children), - 'onlyChild must be passed a children with exactly one child.' - ) : invariant(ReactElement.isValidElement(children))); + !ReactElement.isValidElement(children) ? "development" !== 'production' ? invariant(false, 'onlyChild must be passed a children with exactly one child.') : invariant(false) : undefined; return children; } module.exports = onlyChild; - -},{"150":150,"63":63}],161:[function(_dereq_,module,exports){ +},{"143":143,"52":52}],121:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20735,54 +16747,25 @@ module.exports = onlyChild; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule performance - * @typechecks + * @providesModule quoteAttributeValueForBrowser */ -"use strict"; - -var ExecutionEnvironment = _dereq_(22); - -var performance; - -if (ExecutionEnvironment.canUseDOM) { - performance = - window.performance || - window.msPerformance || - window.webkitPerformance; -} +'use strict'; -module.exports = performance || {}; +var escapeTextContentForBrowser = _dereq_(106); -},{"22":22}],162:[function(_dereq_,module,exports){ /** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Escapes attribute value to prevent scripting attacks. * - * @providesModule performanceNow - * @typechecks - */ - -var performance = _dereq_(161); - -/** - * Detect if we can use `window.performance.now()` and gracefully fallback to - * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now - * because of Facebook's testing infrastructure. + * @param {*} value Value to escape. + * @return {string} An escaped string. */ -if (!performance || !performance.now) { - performance = Date; +function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; } -var performanceNow = performance.now.bind(performance); - -module.exports = performanceNow; - -},{"161":161}],163:[function(_dereq_,module,exports){ +module.exports = quoteAttributeValueForBrowser; +},{"106":106}],122:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20791,26 +16774,15 @@ module.exports = performanceNow; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule quoteAttributeValueForBrowser - */ +* @providesModule renderSubtreeIntoContainer +*/ 'use strict'; -var escapeTextContentForBrowser = _dereq_(131); +var ReactMount = _dereq_(65); -/** - * Escapes attribute value to prevent scripting attacks. - * - * @param {*} value Value to escape. - * @return {string} An escaped string. - */ -function quoteAttributeValueForBrowser(value) { - return '"' + escapeTextContentForBrowser(value) + '"'; -} - -module.exports = quoteAttributeValueForBrowser; - -},{"131":131}],164:[function(_dereq_,module,exports){ +module.exports = ReactMount.renderSubtreeIntoContainer; +},{"65":65}],123:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20826,7 +16798,7 @@ module.exports = quoteAttributeValueForBrowser; 'use strict'; -var ExecutionEnvironment = _dereq_(22); +var ExecutionEnvironment = _dereq_(129); var WHITESPACE_TEST = /^[ \r\n\t\f]/; var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; @@ -20839,14 +16811,14 @@ var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; * @param {string} html * @internal */ -var setInnerHTML = function(node, html) { +var setInnerHTML = function (node, html) { node.innerHTML = html; }; // Win8 apps: Allow all html to be inserted if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { - setInnerHTML = function(node, html) { - MSApp.execUnsafeLocalFunction(function() { + setInnerHTML = function (node, html) { + MSApp.execUnsafeLocalFunction(function () { node.innerHTML = html; }); }; @@ -20862,7 +16834,7 @@ if (ExecutionEnvironment.canUseDOM) { var testElement = document.createElement('div'); testElement.innerHTML = ' '; if (testElement.innerHTML === '') { - setInnerHTML = function(node, html) { + setInnerHTML = function (node, html) { // Magic theory: IE8 supposedly differentiates between added and updated // nodes when processing innerHTML, innerHTML on updated nodes suffers // from worse whitespace behavior. Re-adding a node like this triggers @@ -20876,11 +16848,14 @@ if (ExecutionEnvironment.canUseDOM) { // thin air on IE8, this only happens if there is no visible text // in-front of the non-visible tags. Piggyback on the whitespace fix // and simply check if any non-visible tags appear in the source. - if (WHITESPACE_TEST.test(html) || - html[0] === '<' && NONVISIBLE_TEST.test(html)) { + if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) { // Recover leading whitespace by temporarily prepending any character. // \uFEFF has the potential advantage of being zero-width/invisible. - node.innerHTML = '\uFEFF' + html; + // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode + // in hopes that this is preserved even if "\uFEFF" is transformed to + // the actual Unicode character (by Babel, for example). + // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 + node.innerHTML = String.fromCharCode(0xFEFF) + html; // deleteData leaves an empty `TextNode` which offsets the index of all // children. Definitely want to avoid this. @@ -20898,8 +16873,7 @@ if (ExecutionEnvironment.canUseDOM) { } module.exports = setInnerHTML; - -},{"22":22}],165:[function(_dereq_,module,exports){ +},{"129":129}],124:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -20913,9 +16887,9 @@ module.exports = setInnerHTML; 'use strict'; -var ExecutionEnvironment = _dereq_(22); -var escapeTextContentForBrowser = _dereq_(131); -var setInnerHTML = _dereq_(164); +var ExecutionEnvironment = _dereq_(129); +var escapeTextContentForBrowser = _dereq_(106); +var setInnerHTML = _dereq_(123); /** * Set the textContent property of a node, ensuring that whitespace is preserved @@ -20927,65 +16901,20 @@ var setInnerHTML = _dereq_(164); * @param {string} text * @internal */ -var setTextContent = function(node, text) { +var setTextContent = function (node, text) { node.textContent = text; }; if (ExecutionEnvironment.canUseDOM) { if (!('textContent' in document.documentElement)) { - setTextContent = function(node, text) { + setTextContent = function (node, text) { setInnerHTML(node, escapeTextContentForBrowser(text)); }; } } module.exports = setTextContent; - -},{"131":131,"164":164,"22":22}],166:[function(_dereq_,module,exports){ -/** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule shallowEqual - */ - -'use strict'; - -/** - * Performs equality by iterating through keys on an object and returning - * false when any key has values which are not strictly equal between - * objA and objB. Returns true when the values of all keys are strictly equal. - * - * @return {boolean} - */ -function shallowEqual(objA, objB) { - if (objA === objB) { - return true; - } - var key; - // Test for A's keys different from B. - for (key in objA) { - if (objA.hasOwnProperty(key) && - (!objB.hasOwnProperty(key) || objA[key] !== objB[key])) { - return false; - } - } - // Test for B's keys missing from A. - for (key in objB) { - if (objB.hasOwnProperty(key) && !objA.hasOwnProperty(key)) { - return false; - } - } - return true; -} - -module.exports = shallowEqual; - -},{}],167:[function(_dereq_,module,exports){ +},{"106":106,"123":123,"129":129}],125:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -21000,8 +16929,6 @@ module.exports = shallowEqual; 'use strict'; -var warning = _dereq_(171); - /** * Given a `prevElement` and `nextElement`, determines if the existing * instance should be updated as opposed to being destroyed or replaced by a new @@ -21014,150 +16941,24 @@ var warning = _dereq_(171); * @protected */ function shouldUpdateReactComponent(prevElement, nextElement) { - if (prevElement != null && nextElement != null) { - var prevType = typeof prevElement; - var nextType = typeof nextElement; - if (prevType === 'string' || prevType === 'number') { - return (nextType === 'string' || nextType === 'number'); - } else { - if (nextType === 'object' && - prevElement.type === nextElement.type && - prevElement.key === nextElement.key) { - var ownersMatch = prevElement._owner === nextElement._owner; - var prevName = null; - var nextName = null; - var nextDisplayName = null; - if ("production" !== "development") { - if (!ownersMatch) { - if (prevElement._owner != null && - prevElement._owner.getPublicInstance() != null && - prevElement._owner.getPublicInstance().constructor != null) { - prevName = - prevElement._owner.getPublicInstance().constructor.displayName; - } - if (nextElement._owner != null && - nextElement._owner.getPublicInstance() != null && - nextElement._owner.getPublicInstance().constructor != null) { - nextName = - nextElement._owner.getPublicInstance().constructor.displayName; - } - if (nextElement.type != null && - nextElement.type.displayName != null) { - nextDisplayName = nextElement.type.displayName; - } - if (nextElement.type != null && typeof nextElement.type === 'string') { - nextDisplayName = nextElement.type; - } - if (typeof nextElement.type !== 'string' || - nextElement.type === 'input' || - nextElement.type === 'textarea') { - if ((prevElement._owner != null && - prevElement._owner._isOwnerNecessary === false) || - (nextElement._owner != null && - nextElement._owner._isOwnerNecessary === false)) { - if (prevElement._owner != null) { - prevElement._owner._isOwnerNecessary = true; - } - if (nextElement._owner != null) { - nextElement._owner._isOwnerNecessary = true; - } - ("production" !== "development" ? warning( - false, - '<%s /> is being rendered by both %s and %s using the same ' + - 'key (%s) in the same place. Currently, this means that ' + - 'they don\'t preserve state. This behavior should be very ' + - 'rare so we\'re considering deprecating it. Please contact ' + - 'the React team and explain your use case so that we can ' + - 'take that into consideration.', - nextDisplayName || 'Unknown Component', - prevName || '[Unknown]', - nextName || '[Unknown]', - prevElement.key - ) : null); - } - } - } - } - return ownersMatch; - } - } + var prevEmpty = prevElement === null || prevElement === false; + var nextEmpty = nextElement === null || nextElement === false; + if (prevEmpty || nextEmpty) { + return prevEmpty === nextEmpty; } - return false; -} -module.exports = shouldUpdateReactComponent; - -},{"171":171}],168:[function(_dereq_,module,exports){ -/** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule toArray - * @typechecks - */ - -var invariant = _dereq_(150); - -/** - * Convert array-like objects to arrays. - * - * This API assumes the caller knows the contents of the data type. For less - * well defined inputs use createArrayFromMixed. - * - * @param {object|function|filelist} obj - * @return {array} - */ -function toArray(obj) { - var length = obj.length; - - // Some browse builtin objects can report typeof 'function' (e.g. NodeList in - // old versions of Safari). - ("production" !== "development" ? invariant( - !Array.isArray(obj) && - (typeof obj === 'object' || typeof obj === 'function'), - 'toArray: Array-like object expected' - ) : invariant(!Array.isArray(obj) && - (typeof obj === 'object' || typeof obj === 'function'))); - - ("production" !== "development" ? invariant( - typeof length === 'number', - 'toArray: Object needs a length property' - ) : invariant(typeof length === 'number')); - - ("production" !== "development" ? invariant( - length === 0 || - (length - 1) in obj, - 'toArray: Object should have keys for indices' - ) : invariant(length === 0 || - (length - 1) in obj)); - - // Old IE doesn't give collections access to hasOwnProperty. Assume inputs - // without method will throw during the slice call and skip straight to the - // fallback. - if (obj.hasOwnProperty) { - try { - return Array.prototype.slice.call(obj); - } catch (e) { - // IE < 9 does not support Array#slice on collections objects - } - } - - // Fall back to copying key by key. This assumes all keys have a value, - // so will not preserve sparsely populated inputs. - var ret = Array(length); - for (var ii = 0; ii < length; ii++) { - ret[ii] = obj[ii]; + var prevType = typeof prevElement; + var nextType = typeof nextElement; + if (prevType === 'string' || prevType === 'number') { + return nextType === 'string' || nextType === 'number'; + } else { + return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key; } - return ret; + return false; } -module.exports = toArray; - -},{"150":150}],169:[function(_dereq_,module,exports){ +module.exports = shouldUpdateReactComponent; +},{}],126:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -21171,13 +16972,13 @@ module.exports = toArray; 'use strict'; -var ReactElement = _dereq_(63); -var ReactFragment = _dereq_(69); -var ReactInstanceHandles = _dereq_(72); +var ReactCurrentOwner = _dereq_(34); +var ReactElement = _dereq_(52); +var ReactInstanceHandles = _dereq_(61); -var getIteratorFn = _dereq_(141); -var invariant = _dereq_(150); -var warning = _dereq_(171); +var getIteratorFn = _dereq_(114); +var invariant = _dereq_(143); +var warning = _dereq_(154); var SEPARATOR = ReactInstanceHandles.SEPARATOR; var SUBSEPARATOR = ':'; @@ -21220,14 +17021,11 @@ function getComponentKey(component, index) { /** * Escape a component key so that it is safe to use in a reactid. * - * @param {*} key Component key to be escaped. + * @param {*} text Component key to be escaped. * @return {string} An escaped string. */ function escapeUserProvidedKey(text) { - return ('' + text).replace( - userProvidedKeyEscapeRegex, - userProvidedKeyEscaper - ); + return ('' + text).replace(userProvidedKeyEscapeRegex, userProvidedKeyEscaper); } /** @@ -21244,19 +17042,12 @@ function wrapUserProvidedKey(key) { /** * @param {?*} children Children tree container. * @param {!string} nameSoFar Name of the key path so far. - * @param {!number} indexSoFar Number of children encountered until this point. * @param {!function} callback Callback to invoke with each child found. * @param {?*} traverseContext Used to pass information throughout the traversal * process. * @return {!number} The number of children in this subtree. */ -function traverseAllChildrenImpl( - children, - nameSoFar, - indexSoFar, - callback, - traverseContext -) { +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { var type = typeof children; if (type === 'undefined' || type === 'boolean') { @@ -21264,39 +17055,24 @@ function traverseAllChildrenImpl( children = null; } - if (children === null || - type === 'string' || - type === 'number' || - ReactElement.isValidElement(children)) { - callback( - traverseContext, - children, - // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows. - nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, - indexSoFar - ); + if (children === null || type === 'string' || type === 'number' || ReactElement.isValidElement(children)) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); return 1; } - var child, nextName, nextIndex; + var child; + var nextName; var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; if (Array.isArray(children)) { for (var i = 0; i < children.length; i++) { child = children[i]; - nextName = ( - (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + - getComponentKey(child, i) - ); - nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl( - child, - nextName, - nextIndex, - callback, - traverseContext - ); + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); } } else { var iteratorFn = getIteratorFn(children); @@ -21307,27 +17083,12 @@ function traverseAllChildrenImpl( var ii = 0; while (!(step = iterator.next()).done) { child = step.value; - nextName = ( - (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + - getComponentKey(child, ii++) - ); - nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl( - child, - nextName, - nextIndex, - callback, - traverseContext - ); + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); } } else { - if ("production" !== "development") { - ("production" !== "development" ? warning( - didWarnAboutMaps, - 'Using Maps as children is not yet fully supported. It is an ' + - 'experimental feature that might be removed. Convert it to a ' + - 'sequence / iterable of keyed ReactElements instead.' - ) : null); + if ("development" !== 'production') { + "development" !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.') : undefined; didWarnAboutMaps = true; } // Iterator will provide entry [k,v] tuples rather than values. @@ -21335,47 +17096,27 @@ function traverseAllChildrenImpl( var entry = step.value; if (entry) { child = entry[1]; - nextName = ( - (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + - wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + - getComponentKey(child, 0) - ); - nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl( - child, - nextName, - nextIndex, - callback, - traverseContext - ); + nextName = nextNamePrefix + wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); } } } } else if (type === 'object') { - ("production" !== "development" ? invariant( - children.nodeType !== 1, - 'traverseAllChildren(...): Encountered an invalid child; DOM ' + - 'elements are not valid children of React components.' - ) : invariant(children.nodeType !== 1)); - var fragment = ReactFragment.extract(children); - for (var key in fragment) { - if (fragment.hasOwnProperty(key)) { - child = fragment[key]; - nextName = ( - (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + - wrapUserProvidedKey(key) + SUBSEPARATOR + - getComponentKey(child, 0) - ); - nextIndex = indexSoFar + subtreeCount; - subtreeCount += traverseAllChildrenImpl( - child, - nextName, - nextIndex, - callback, - traverseContext - ); + var addendum = ''; + if ("development" !== 'production') { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } } } + var childrenString = String(children); + !false ? "development" !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : invariant(false) : undefined; } } @@ -21403,12 +17144,571 @@ function traverseAllChildren(children, callback, traverseContext) { return 0; } - return traverseAllChildrenImpl(children, '', 0, callback, traverseContext); + return traverseAllChildrenImpl(children, '', callback, traverseContext); } module.exports = traverseAllChildren; +},{"114":114,"143":143,"154":154,"34":34,"52":52,"61":61}],127:[function(_dereq_,module,exports){ +/** + * Copyright 2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule validateDOMNesting + */ + +'use strict'; + +var assign = _dereq_(23); +var emptyFunction = _dereq_(135); +var warning = _dereq_(154); + +var validateDOMNesting = emptyFunction; + +if ("development" !== 'production') { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example, <b><div></div></b> is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + // <p> tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', + + // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for <title>, including it here + // errs on the side of fewer warnings + 'foreignObject', 'desc', 'title']; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + var buttonScopeTags = inScopeTags.concat(['button']); + + // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + + var emptyAncestorInfo = { + parentTag: null, + + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null + }; + + var updatedAncestorInfo = function (oldInfo, tag, instance) { + var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo); + var info = { tag: tag, instance: instance }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } + + // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.parentTag = info; -},{"141":141,"150":150,"171":171,"63":63,"69":69,"72":72}],170:[function(_dereq_,module,exports){ + if (tag === 'form') { + ancestorInfo.formTag = info; + } + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + + /** + * Returns whether + */ + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + case 'option': + return tag === '#text'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + case 'tr': + return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + case 'colgroup': + return tag === 'col' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + case 'table': + return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + case 'head': + return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + case 'html': + return tag === 'head' || tag === 'body'; + } + + // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6'; + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'caption': + case 'col': + case 'colgroup': + case 'frame': + case 'head': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + + /** + * Returns whether + */ + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + + case 'pre': + case 'listing': + + case 'table': + + case 'hr': + + case 'xmp': + + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + /** + * Given a ReactCompositeComponent instance, return a list of its recursive + * owners, starting at the root and ending with the instance itself. + */ + var findOwnerStack = function (instance) { + if (!instance) { + return []; + } + + var stack = []; + /*eslint-disable space-after-keywords */ + do { + /*eslint-enable space-after-keywords */ + stack.push(instance); + } while (instance = instance._currentElement._owner); + stack.reverse(); + return stack; + }; + + var didWarn = {}; + + validateDOMNesting = function (childTag, childInstance, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.parentTag; + var parentTag = parentInfo && parentInfo.tag; + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var problematic = invalidParent || invalidAncestor; + + if (problematic) { + var ancestorTag = problematic.tag; + var ancestorInstance = problematic.instance; + + var childOwner = childInstance && childInstance._currentElement._owner; + var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner; + + var childOwners = findOwnerStack(childOwner); + var ancestorOwners = findOwnerStack(ancestorOwner); + + var minStackLen = Math.min(childOwners.length, ancestorOwners.length); + var i; + + var deepestCommon = -1; + for (i = 0; i < minStackLen; i++) { + if (childOwners[i] === ancestorOwners[i]) { + deepestCommon = i; + } else { + break; + } + } + + var UNKNOWN = '(unknown)'; + var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ownerInfo = [].concat( + // If the parent and child instances have a common owner ancestor, start + // with that -- otherwise we just start with the parent's owners. + deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag, + // If we're warning about an invalid (non-parent) ancestry, add '...' + invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > '); + + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo; + if (didWarn[warnKey]) { + return; + } + didWarn[warnKey] = true; + + if (invalidParent) { + var info = ''; + if (ancestorTag === 'table' && childTag === 'tr') { + info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; + } + "development" !== 'production' ? warning(false, 'validateDOMNesting(...): <%s> cannot appear as a child of <%s>. ' + 'See %s.%s', childTag, ancestorTag, ownerInfo, info) : undefined; + } else { + "development" !== 'production' ? warning(false, 'validateDOMNesting(...): <%s> cannot appear as a descendant of ' + '<%s>. See %s.', childTag, ancestorTag, ownerInfo) : undefined; + } + } + }; + + validateDOMNesting.ancestorInfoContextKey = '__validateDOMNesting_ancestorInfo$' + Math.random().toString(36).slice(2); + + validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo; + + // For testing + validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.parentTag; + var parentTag = parentInfo && parentInfo.tag; + return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo); + }; +} + +module.exports = validateDOMNesting; +},{"135":135,"154":154,"23":23}],128:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @providesModule EventListener + * @typechecks + */ + +'use strict'; + +var emptyFunction = _dereq_(135); + +/** + * Upstream version of event listener. Does not take into account specific + * nature of platform. + */ +var EventListener = { + /** + * Listen to DOM events during the bubble phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + listen: function (target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, false); + return { + remove: function () { + target.removeEventListener(eventType, callback, false); + } + }; + } else if (target.attachEvent) { + target.attachEvent('on' + eventType, callback); + return { + remove: function () { + target.detachEvent('on' + eventType, callback); + } + }; + } + }, + + /** + * Listen to DOM events during the capture phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + capture: function (target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, true); + return { + remove: function () { + target.removeEventListener(eventType, callback, true); + } + }; + } else { + if ("development" !== 'production') { + console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.'); + } + return { + remove: emptyFunction + }; + } + }, + + registerDefault: function () {} +}; + +module.exports = EventListener; +},{"135":135}],129:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ExecutionEnvironment + */ + +'use strict'; + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ +var ExecutionEnvironment = { + + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM // For now, this is true - might change in the future. + +}; + +module.exports = ExecutionEnvironment; +},{}],130:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule camelize + * @typechecks + */ + +"use strict"; + +var _hyphenPattern = /-(.)/g; + +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; +},{}],131:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule camelizeStyleName + * @typechecks + */ + +'use strict'; + +var camelize = _dereq_(130); + +var msPattern = /^-ms-/; + +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} + +module.exports = camelizeStyleName; +},{"130":130}],132:[function(_dereq_,module,exports){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -21417,167 +17717,987 @@ module.exports = traverseAllChildren; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule update + * @providesModule containsNode + * @typechecks + */ + +'use strict'; + +var isTextNode = _dereq_(145); + +/*eslint-disable no-bitwise */ + +/** + * Checks if a given DOM node contains or is another DOM node. + * + * @param {?DOMNode} outerNode Outer DOM node. + * @param {?DOMNode} innerNode Inner DOM node. + * @return {boolean} True if `outerNode` contains or is `innerNode`. */ +function containsNode(_x, _x2) { + var _again = true; - /* global hasOwnProperty:true */ + _function: while (_again) { + var outerNode = _x, + innerNode = _x2; + _again = false; + + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + _x = outerNode; + _x2 = innerNode.parentNode; + _again = true; + continue _function; + } else if (outerNode.contains) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } + } +} + +module.exports = containsNode; +},{"145":145}],133:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createArrayFromMixed + * @typechecks + */ 'use strict'; -var assign = _dereq_(29); -var keyOf = _dereq_(157); -var invariant = _dereq_(150); -var hasOwnProperty = {}.hasOwnProperty; +var toArray = _dereq_(153); -function shallowCopy(x) { - if (Array.isArray(x)) { - return x.concat(); - } else if (x && typeof x === 'object') { - return assign(new x.constructor(), x); +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return( + // not null/false + !!obj && ( + // arrays are objects, NodeLists are functions in Safari + typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && ( + // a real array + Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); } else { - return x; + return toArray(obj); } } -var COMMAND_PUSH = keyOf({$push: null}); -var COMMAND_UNSHIFT = keyOf({$unshift: null}); -var COMMAND_SPLICE = keyOf({$splice: null}); -var COMMAND_SET = keyOf({$set: null}); -var COMMAND_MERGE = keyOf({$merge: null}); -var COMMAND_APPLY = keyOf({$apply: null}); +module.exports = createArrayFromMixed; +},{"153":153}],134:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createNodesFromMarkup + * @typechecks + */ + +/*eslint-disable fb-www/unsafe-html*/ + +'use strict'; -var ALL_COMMANDS_LIST = [ - COMMAND_PUSH, - COMMAND_UNSHIFT, - COMMAND_SPLICE, - COMMAND_SET, - COMMAND_MERGE, - COMMAND_APPLY -]; +var ExecutionEnvironment = _dereq_(129); -var ALL_COMMANDS_SET = {}; +var createArrayFromMixed = _dereq_(133); +var getMarkupWrap = _dereq_(139); +var invariant = _dereq_(143); -ALL_COMMANDS_LIST.forEach(function(command) { - ALL_COMMANDS_SET[command] = true; +/** + * Dummy container used to render all markup. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Pattern used by `getNodeName`. + */ +var nodeNamePattern = /^\s*<(\w+)/; + +/** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ +function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); +} + +/** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * <script> element that is rendered. If no `handleScript` function is supplied, + * an exception is thrown if any <script> elements are rendered. + * + * @param {string} markup A string of valid HTML markup. + * @param {?function} handleScript Invoked once for each rendered <script>. + * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. + */ +function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + !!!dummyNode ? "development" !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : undefined; + var nodeName = getNodeName(markup); + + var wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; + + var wrapDepth = wrap[0]; + while (wrapDepth--) { + node = node.lastChild; + } + } else { + node.innerHTML = markup; + } + + var scripts = node.getElementsByTagName('script'); + if (scripts.length) { + !handleScript ? "development" !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : undefined; + createArrayFromMixed(scripts).forEach(handleScript); + } + + var nodes = createArrayFromMixed(node.childNodes); + while (node.lastChild) { + node.removeChild(node.lastChild); + } + return nodes; +} + +module.exports = createNodesFromMarkup; +},{"129":129,"133":133,"139":139,"143":143}],135:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyFunction + */ + +"use strict"; + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +function emptyFunction() {} + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; +},{}],136:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyObject + */ + +'use strict'; + +var emptyObject = {}; + +if ("development" !== 'production') { + Object.freeze(emptyObject); +} + +module.exports = emptyObject; +},{}],137:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule focusNode + */ + +'use strict'; + +/** + * @param {DOMElement} node input/textarea to focus + */ +function focusNode(node) { + // IE8 can throw "Can't move focus to the control because it is invisible, + // not enabled, or of a type that does not accept the focus." for all kinds of + // reasons that are too expensive and fragile to test. + try { + node.focus(); + } catch (e) {} +} + +module.exports = focusNode; +},{}],138:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getActiveElement + * @typechecks + */ + +/** + * Same as document.activeElement but wraps in a try-catch block. In IE it is + * not safe to call document.activeElement if there is nothing focused. + * + * The activeElement will be null only if the document or document body is not yet defined. + */ +'use strict'; + +function getActiveElement() /*?DOMElement*/{ + if (typeof document === 'undefined') { + return null; + } + + try { + return document.activeElement || document.body; + } catch (e) { + return document.body; + } +} + +module.exports = getActiveElement; +},{}],139:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getMarkupWrap + */ + +/*eslint-disable fb-www/unsafe-html */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(129); + +var invariant = _dereq_(143); + +/** + * Dummy container used to detect which wraps are necessary. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Some browsers cannot use `innerHTML` to render certain elements standalone, + * so we wrap them, render the wrapped nodes, then extract the desired node. + * + * In IE8, certain elements cannot render alone, so wrap all elements ('*'). + */ + +var shouldWrap = {}; + +var selectWrap = [1, '<select multiple="true">', '</select>']; +var tableWrap = [1, '<table>', '</table>']; +var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; + +var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; + +var markupWrap = { + '*': [1, '?<div>', '</div>'], + + 'area': [1, '<map>', '</map>'], + 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], + 'legend': [1, '<fieldset>', '</fieldset>'], + 'param': [1, '<object>', '</object>'], + 'tr': [2, '<table><tbody>', '</tbody></table>'], + + 'optgroup': selectWrap, + 'option': selectWrap, + + 'caption': tableWrap, + 'colgroup': tableWrap, + 'tbody': tableWrap, + 'tfoot': tableWrap, + 'thead': tableWrap, + + 'td': trWrap, + 'th': trWrap +}; + +// Initialize the SVG elements since we know they'll always need to be wrapped +// consistently. If they are created inside a <div> they will be initialized in +// the wrong namespace (and will not display). +var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan']; +svgElements.forEach(function (nodeName) { + markupWrap[nodeName] = svgWrap; + shouldWrap[nodeName] = true; }); -function invariantArrayCase(value, spec, command) { - ("production" !== "development" ? invariant( - Array.isArray(value), - 'update(): expected target of %s to be an array; got %s.', - command, - value - ) : invariant(Array.isArray(value))); - var specValue = spec[command]; - ("production" !== "development" ? invariant( - Array.isArray(specValue), - 'update(): expected spec of %s to be an array; got %s. ' + - 'Did you forget to wrap your parameter in an array?', - command, - specValue - ) : invariant(Array.isArray(specValue))); -} - -function update(value, spec) { - ("production" !== "development" ? invariant( - typeof spec === 'object', - 'update(): You provided a key path to update() that did not contain one ' + - 'of %s. Did you forget to include {%s: ...}?', - ALL_COMMANDS_LIST.join(', '), - COMMAND_SET - ) : invariant(typeof spec === 'object')); - - if (hasOwnProperty.call(spec, COMMAND_SET)) { - ("production" !== "development" ? invariant( - Object.keys(spec).length === 1, - 'Cannot have more than one key in an object with %s', - COMMAND_SET - ) : invariant(Object.keys(spec).length === 1)); - - return spec[COMMAND_SET]; - } - - var nextValue = shallowCopy(value); - - if (hasOwnProperty.call(spec, COMMAND_MERGE)) { - var mergeObj = spec[COMMAND_MERGE]; - ("production" !== "development" ? invariant( - mergeObj && typeof mergeObj === 'object', - 'update(): %s expects a spec of type \'object\'; got %s', - COMMAND_MERGE, - mergeObj - ) : invariant(mergeObj && typeof mergeObj === 'object')); - ("production" !== "development" ? invariant( - nextValue && typeof nextValue === 'object', - 'update(): %s expects a target of type \'object\'; got %s', - COMMAND_MERGE, - nextValue - ) : invariant(nextValue && typeof nextValue === 'object')); - assign(nextValue, spec[COMMAND_MERGE]); - } - - if (hasOwnProperty.call(spec, COMMAND_PUSH)) { - invariantArrayCase(value, spec, COMMAND_PUSH); - spec[COMMAND_PUSH].forEach(function(item) { - nextValue.push(item); - }); +/** + * Gets the markup wrap configuration for the supplied `nodeName`. + * + * NOTE: This lazily detects which wraps are necessary for the current browser. + * + * @param {string} nodeName Lowercase `nodeName`. + * @return {?array} Markup wrap configuration, if applicable. + */ +function getMarkupWrap(nodeName) { + !!!dummyNode ? "development" !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : undefined; + if (!markupWrap.hasOwnProperty(nodeName)) { + nodeName = '*'; } + if (!shouldWrap.hasOwnProperty(nodeName)) { + if (nodeName === '*') { + dummyNode.innerHTML = '<link />'; + } else { + dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; + } + shouldWrap[nodeName] = !dummyNode.firstChild; + } + return shouldWrap[nodeName] ? markupWrap[nodeName] : null; +} - if (hasOwnProperty.call(spec, COMMAND_UNSHIFT)) { - invariantArrayCase(value, spec, COMMAND_UNSHIFT); - spec[COMMAND_UNSHIFT].forEach(function(item) { - nextValue.unshift(item); - }); +module.exports = getMarkupWrap; +},{"129":129,"143":143}],140:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getUnboundedScrollPosition + * @typechecks + */ + +'use strict'; + +/** + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ +function getUnboundedScrollPosition(scrollable) { + if (scrollable === window) { + return { + x: window.pageXOffset || document.documentElement.scrollLeft, + y: window.pageYOffset || document.documentElement.scrollTop + }; } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop + }; +} - if (hasOwnProperty.call(spec, COMMAND_SPLICE)) { - ("production" !== "development" ? invariant( - Array.isArray(value), - 'Expected %s target to be an array; got %s', - COMMAND_SPLICE, - value - ) : invariant(Array.isArray(value))); - ("production" !== "development" ? invariant( - Array.isArray(spec[COMMAND_SPLICE]), - 'update(): expected spec of %s to be an array of arrays; got %s. ' + - 'Did you forget to wrap your parameters in an array?', - COMMAND_SPLICE, - spec[COMMAND_SPLICE] - ) : invariant(Array.isArray(spec[COMMAND_SPLICE]))); - spec[COMMAND_SPLICE].forEach(function(args) { - ("production" !== "development" ? invariant( - Array.isArray(args), - 'update(): expected spec of %s to be an array of arrays; got %s. ' + - 'Did you forget to wrap your parameters in an array?', - COMMAND_SPLICE, - spec[COMMAND_SPLICE] - ) : invariant(Array.isArray(args))); - nextValue.splice.apply(nextValue, args); - }); +module.exports = getUnboundedScrollPosition; +},{}],141:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule hyphenate + * @typechecks + */ + +'use strict'; + +var _uppercasePattern = /([A-Z])/g; + +/** + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} + */ +function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); +} + +module.exports = hyphenate; +},{}],142:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule hyphenateStyleName + * @typechecks + */ + +'use strict'; + +var hyphenate = _dereq_(141); + +var msPattern = /^ms-/; + +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} + */ +function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; +},{"141":141}],143:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule invariant + */ + +'use strict'; + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function (condition, format, a, b, c, d, e, f) { + if ("development" !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error('Invariant Violation: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + })); + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; +},{}],144:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isNode + * @typechecks + */ + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ +'use strict'; + +function isNode(object) { + return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); +} + +module.exports = isNode; +},{}],145:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isTextNode + * @typechecks + */ + +'use strict'; + +var isNode = _dereq_(144); + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ +function isTextNode(object) { + return isNode(object) && object.nodeType == 3; +} + +module.exports = isTextNode; +},{"144":144}],146:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyMirror + * @typechecks static-only + */ + +'use strict'; + +var invariant = _dereq_(143); + +/** + * Constructs an enumeration with keys equal to their value. + * + * For example: + * + * var COLORS = keyMirror({blue: null, red: null}); + * var myColor = COLORS.blue; + * var isColorValid = !!COLORS[myColor]; + * + * The last line could not be performed if the values of the generated enum were + * not equal to their keys. + * + * Input: {key1: val1, key2: val2} + * Output: {key1: key1, key2: key2} + * + * @param {object} obj + * @return {object} + */ +var keyMirror = function (obj) { + var ret = {}; + var key; + !(obj instanceof Object && !Array.isArray(obj)) ? "development" !== 'production' ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : undefined; + for (key in obj) { + if (!obj.hasOwnProperty(key)) { + continue; + } + ret[key] = key; + } + return ret; +}; + +module.exports = keyMirror; +},{"143":143}],147:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyOf + */ + +/** + * Allows extraction of a minified key. Let's the build system minify keys + * without losing the ability to dynamically use key strings as values + * themselves. Pass in an object with a single key/val pair and it will return + * you the string key of that single record. Suppose you want to grab the + * value for a key 'className' inside of an object. Key/val minification may + * have aliased that key to be 'xa12'. keyOf({className: null}) will return + * 'xa12' in that case. Resolve keys you want to use once at startup time, then + * reuse those resolutions. + */ +"use strict"; + +var keyOf = function (oneKeyObj) { + var key; + for (key in oneKeyObj) { + if (!oneKeyObj.hasOwnProperty(key)) { + continue; + } + return key; + } + return null; +}; + +module.exports = keyOf; +},{}],148:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule mapObject + */ + +'use strict'; + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Executes the provided `callback` once for each enumerable own property in the + * object and constructs a new object from the results. The `callback` is + * invoked with three arguments: + * + * - the property value + * - the property name + * - the object being traversed + * + * Properties that are added after the call to `mapObject` will not be visited + * by `callback`. If the values of existing properties are changed, the value + * passed to `callback` will be the value at the time `mapObject` visits them. + * Properties that are deleted before being visited are not visited. + * + * @grep function objectMap() + * @grep function objMap() + * + * @param {?object} object + * @param {function} callback + * @param {*} context + * @return {?object} + */ +function mapObject(object, callback, context) { + if (!object) { + return null; + } + var result = {}; + for (var name in object) { + if (hasOwnProperty.call(object, name)) { + result[name] = callback.call(context, object[name], name, object); + } + } + return result; +} + +module.exports = mapObject; +},{}],149:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule memoizeStringOnly + * @typechecks static-only + */ + +'use strict'; + +/** + * Memoizes the return value of a function that accepts one string argument. + * + * @param {function} callback + * @return {function} + */ +function memoizeStringOnly(callback) { + var cache = {}; + return function (string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; +} + +module.exports = memoizeStringOnly; +},{}],150:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performance + * @typechecks + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(129); + +var performance; + +if (ExecutionEnvironment.canUseDOM) { + performance = window.performance || window.msPerformance || window.webkitPerformance; +} + +module.exports = performance || {}; +},{"129":129}],151:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performanceNow + * @typechecks + */ + +'use strict'; + +var performance = _dereq_(150); +var curPerformance = performance; + +/** + * Detect if we can use `window.performance.now()` and gracefully fallback to + * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now + * because of Facebook's testing infrastructure. + */ +if (!curPerformance || !curPerformance.now) { + curPerformance = Date; +} + +var performanceNow = curPerformance.now.bind(curPerformance); + +module.exports = performanceNow; +},{"150":150}],152:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule shallowEqual + * @typechecks + * + */ + +'use strict'; + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ +function shallowEqual(objA, objB) { + if (objA === objB) { + return true; } - if (hasOwnProperty.call(spec, COMMAND_APPLY)) { - ("production" !== "development" ? invariant( - typeof spec[COMMAND_APPLY] === 'function', - 'update(): expected spec of %s to be a function; got %s.', - COMMAND_APPLY, - spec[COMMAND_APPLY] - ) : invariant(typeof spec[COMMAND_APPLY] === 'function')); - nextValue = spec[COMMAND_APPLY](nextValue); + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; } - for (var k in spec) { - if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) { - nextValue[k] = update(value[k], spec[k]); + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + var bHasOwnProperty = hasOwnProperty.bind(objB); + for (var i = 0; i < keysA.length; i++) { + if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; } } - return nextValue; + return true; } -module.exports = update; +module.exports = shallowEqual; +},{}],153:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule toArray + * @typechecks + */ + +'use strict'; + +var invariant = _dereq_(143); -},{"150":150,"157":157,"29":29}],171:[function(_dereq_,module,exports){ +/** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ +function toArray(obj) { + var length = obj.length; + + // Some browse builtin objects can report typeof 'function' (e.g. NodeList in + // old versions of Safari). + !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? "development" !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : undefined; + + !(typeof length === 'number') ? "development" !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : undefined; + + !(length === 0 || length - 1 in obj) ? "development" !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : undefined; + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} + +module.exports = toArray; +},{"143":143}],154:[function(_dereq_,module,exports){ /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. @@ -21589,9 +18709,9 @@ module.exports = update; * @providesModule warning */ -"use strict"; +'use strict'; -var emptyFunction = _dereq_(129); +var emptyFunction = _dereq_(135); /** * Similar to invariant but only logs a warning if the condition is not met. @@ -21602,20 +18722,14 @@ var emptyFunction = _dereq_(129); var warning = emptyFunction; -if ("production" !== "development") { - warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); +if ("development" !== 'production') { + warning = function (condition, format) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; } - if (format.length < 10 || /^[s\W]*$/.test(format)) { - throw new Error( - 'The warning format should be able to uniquely identify this ' + - 'warning. Please, use a more descriptive format than: ' + format - ); + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { @@ -21624,19 +18738,22 @@ if ("production" !== "development") { if (!condition) { var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];}); - console.warn(message); + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); - } catch(x) {} + } catch (x) {} } }; } module.exports = warning; - -},{"129":129}]},{},[1])(1) +},{"135":135}]},{},[1])(1) });
\ No newline at end of file diff --git a/web/static/js/react-0.14.0.min.js b/web/static/js/react-0.14.0.min.js new file mode 100644 index 000000000..8e4bbee4a --- /dev/null +++ b/web/static/js/react-0.14.0.min.js @@ -0,0 +1,16 @@ +/** + * React v0.14.0 + * + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(i,u){if(!n[i]){if(!t[i]){var s="function"==typeof require&&require;if(!u&&s)return s(i,!0);if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,function(e){var n=t[i][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){"use strict";var r=e(35),o=e(45),a=e(61),i=e(23),u=e(103),s={};i(s,a),i(s,{findDOMNode:u("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:u("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:u("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:u("renderToString","ReactDOMServer","react-dom/server",o,o.renderToString),renderToStaticMarkup:u("renderToStaticMarkup","ReactDOMServer","react-dom/server",o,o.renderToStaticMarkup)}),s.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,t.exports=s},{103:103,23:23,35:35,45:45,61:61}],2:[function(e,t,n){"use strict";var r=e(63),o=e(105),a=e(135),i={componentDidMount:function(){this.props.autoFocus&&a(o(this))}},u={Mixin:i,focusDOMComponent:function(){a(r.getNode(this._rootNodeID))}};t.exports=u},{105:105,135:135,63:63}],3:[function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function a(e){switch(e){case w.topCompositionStart:return R.compositionStart;case w.topCompositionEnd:return R.compositionEnd;case w.topCompositionUpdate:return R.compositionUpdate}}function i(e,t){return e===w.topKeyDown&&t.keyCode===_}function u(e,t){switch(e){case w.topKeyUp:return-1!==b.indexOf(t.keyCode);case w.topKeyDown:return t.keyCode!==_;case w.topKeyPress:case w.topMouseDown:case w.topBlur:return!0;default:return!1}}function s(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function l(e,t,n,r,o){var l,c;if(E?l=a(e):S?u(e,r)&&(l=R.compositionEnd):i(e,r)&&(l=R.compositionStart),!l)return null;M&&(S||l!==R.compositionStart?l===R.compositionEnd&&S&&(c=S.getData()):S=m.getPooled(t));var p=g.getPooled(l,n,r,o);if(c)p.data=c;else{var d=s(r);null!==d&&(p.data=d)}return h.accumulateTwoPhaseDispatches(p),p}function c(e,t){switch(e){case w.topCompositionEnd:return s(t);case w.topKeyPress:var n=t.which;return n!==N?null:(I=!0,P);case w.topTextInput:var r=t.data;return r===P&&I?null:r;default:return null}}function p(e,t){if(S){if(e===w.topCompositionEnd||u(e,t)){var n=S.getData();return m.release(S),S=null,n}return null}switch(e){case w.topPaste:return null;case w.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case w.topCompositionEnd:return M?null:t.data;default:return null}}function d(e,t,n,r,o){var a;if(a=D?c(e,r):p(e,r),!a)return null;var i=y.getPooled(R.beforeInput,n,r,o);return i.data=a,h.accumulateTwoPhaseDispatches(i),i}var f=e(15),h=e(19),v=e(127),m=e(20),g=e(88),y=e(92),C=e(145),b=[9,13,27,32],_=229,E=v.canUseDOM&&"CompositionEvent"in window,x=null;v.canUseDOM&&"documentMode"in document&&(x=document.documentMode);var D=v.canUseDOM&&"TextEvent"in window&&!x&&!r(),M=v.canUseDOM&&(!E||x&&x>8&&11>=x),N=32,P=String.fromCharCode(N),w=f.topLevelTypes,R={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[w.topCompositionEnd,w.topKeyPress,w.topTextInput,w.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[w.topBlur,w.topCompositionEnd,w.topKeyDown,w.topKeyPress,w.topKeyUp,w.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[w.topBlur,w.topCompositionStart,w.topKeyDown,w.topKeyPress,w.topKeyUp,w.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[w.topBlur,w.topCompositionUpdate,w.topKeyDown,w.topKeyPress,w.topKeyUp,w.topMouseDown]}},I=!1,S=null,T={eventTypes:R,extractEvents:function(e,t,n,r,o){return[l(e,t,n,r,o),d(e,t,n,r,o)]}};t.exports=T},{127:127,145:145,15:15,19:19,20:20,88:88,92:92}],4:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},a=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){a.forEach(function(t){o[r(t,e)]=o[e]})});var i={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},u={isUnitlessNumber:o,shorthandPropertyExpansions:i};t.exports=u},{}],5:[function(e,t,n){"use strict";var r=e(4),o=e(127),a=e(69),i=(e(129),e(102)),u=e(140),s=e(147),l=(e(150),s(function(e){return u(e)})),c=!1,p="cssFloat";if(o.canUseDOM){var d=document.createElement("div").style;try{d.font=""}catch(f){c=!0}void 0===document.documentElement.style.cssFloat&&(p="styleFloat")}var h={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=l(n)+":",t+=i(n,r)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var o in t)if(t.hasOwnProperty(o)){var a=i(o,t[o]);if("float"===o&&(o=p),a)n[o]=a;else{var u=c&&r.shorthandPropertyExpansions[o];if(u)for(var s in u)n[s]="";else n[o]=""}}}};a.measureMethods(h,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),t.exports=h},{102:102,127:127,129:129,140:140,147:147,150:150,4:4,69:69}],6:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e(24),a=e(23),i=e(141);a(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?i(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),t.exports=r},{141:141,23:23,24:24}],7:[function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=x.getPooled(R.change,S,e,D(e));b.accumulateTwoPhaseDispatches(t),E.batchedUpdates(a,t)}function a(e){C.enqueueEvents(e),C.processEventQueue(!1)}function i(e,t){I=e,S=t,I.attachEvent("onchange",o)}function u(){I&&(I.detachEvent("onchange",o),I=null,S=null)}function s(e,t,n){return e===w.topChange?n:void 0}function l(e,t,n){e===w.topFocus?(u(),i(t,n)):e===w.topBlur&&u()}function c(e,t){I=e,S=t,T=e.value,k=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(I,"value",L),I.attachEvent("onpropertychange",d)}function p(){I&&(delete I.value,I.detachEvent("onpropertychange",d),I=null,S=null,T=null,k=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==T&&(T=t,o(e))}}function f(e,t,n){return e===w.topInput?n:void 0}function h(e,t,n){e===w.topFocus?(p(),c(t,n)):e===w.topBlur&&p()}function v(e,t,n){return e!==w.topSelectionChange&&e!==w.topKeyUp&&e!==w.topKeyDown||!I||I.value===T?void 0:(T=I.value,S)}function m(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===w.topClick?n:void 0}var y=e(15),C=e(16),b=e(19),_=e(127),E=e(81),x=e(90),D=e(111),M=e(116),N=e(117),P=e(145),w=y.topLevelTypes,R={change:{phasedRegistrationNames:{bubbled:P({onChange:null}),captured:P({onChangeCapture:null})},dependencies:[w.topBlur,w.topChange,w.topClick,w.topFocus,w.topInput,w.topKeyDown,w.topKeyUp,w.topSelectionChange]}},I=null,S=null,T=null,k=null,O=!1;_.canUseDOM&&(O=M("change")&&(!("documentMode"in document)||document.documentMode>8));var A=!1;_.canUseDOM&&(A=M("input")&&(!("documentMode"in document)||document.documentMode>9));var L={get:function(){return k.get.call(this)},set:function(e){T=""+e,k.set.call(this,e)}},U={eventTypes:R,extractEvents:function(e,t,n,o,a){var i,u;if(r(t)?O?i=s:u=l:N(t)?A?i=f:(i=v,u=h):m(t)&&(i=g),i){var c=i(e,t,n);if(c){var p=x.getPooled(R.change,c,o,a);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}u&&u(e,t,n)}};t.exports=U},{111:111,116:116,117:117,127:127,145:145,15:15,16:16,19:19,81:81,90:90}],8:[function(e,t,n){"use strict";var r=0,o={createReactRootIndex:function(){return r++}};t.exports=o},{}],9:[function(e,t,n){"use strict";function r(e,t,n){var r=n>=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var o=e(12),a=e(65),i=e(69),u=e(121),s=e(122),l=e(141),c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:s,processUpdates:function(e,t){for(var n,i=null,c=null,p=0;p<e.length;p++)if(n=e[p],n.type===a.MOVE_EXISTING||n.type===a.REMOVE_NODE){var d=n.fromIndex,f=n.parentNode.childNodes[d],h=n.parentID;f?void 0:l(!1),i=i||{},i[h]=i[h]||[],i[h][d]=f,c=c||[],c.push(f)}var v;if(v=t.length&&"string"==typeof t[0]?o.dangerouslyRenderMarkup(t):t,c)for(var m=0;m<c.length;m++)c[m].parentNode.removeChild(c[m]);for(var g=0;g<e.length;g++)switch(n=e[g],n.type){case a.INSERT_MARKUP:r(n.parentNode,v[n.markupIndex],n.toIndex);break;case a.MOVE_EXISTING:r(n.parentNode,i[n.parentID][n.fromIndex],n.toIndex);break;case a.SET_MARKUP:u(n.parentNode,n.content);break;case a.TEXT_CONTENT:s(n.parentNode,n.content);break;case a.REMOVE_NODE:}}};i.measureMethods(c,"DOMChildrenOperations",{updateTextContent:"updateTextContent"}),t.exports=c},{12:12,121:121,122:122,141:141,65:65,69:69}],10:[function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=e(141),a={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=a,n=e.Properties||{},i=e.DOMAttributeNamespaces||{},s=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&u._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){u.properties.hasOwnProperty(p)?o(!1):void 0;var d=p.toLowerCase(),f=n[p],h={attributeName:d,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseAttribute:r(f,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(f,t.MUST_USE_PROPERTY),hasSideEffects:r(f,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(f,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(f,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(f,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(f,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.mustUseAttribute&&h.mustUseProperty?o(!1):void 0,!h.mustUseProperty&&h.hasSideEffects?o(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o(!1),s.hasOwnProperty(p)){var v=s[p];h.attributeName=v}i.hasOwnProperty(p)&&(h.attributeNamespace=i[p]),l.hasOwnProperty(p)&&(h.propertyName=l[p]),c.hasOwnProperty(p)&&(h.mutationMethod=c[p]),u.properties[p]=h}}},i={},u={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<u._isCustomAttributeFunctions.length;t++){var n=u._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=i[e];return r||(i[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:a};t.exports=u},{141:141}],11:[function(e,t,n){"use strict";function r(e){return c.hasOwnProperty(e)?!0:l.hasOwnProperty(e)?!1:s.test(e)?(c[e]=!0,!0):(l[e]=!0,!1)}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&1>t||e.hasOverloadedBooleanValue&&t===!1}var a=e(10),i=e(69),u=e(119),s=(e(150),/^[a-zA-Z_][\w\.\-]*$/),l={},c={},p={createMarkupForID:function(e){return a.ID_ATTRIBUTE_NAME+"="+u(e)},setAttributeForID:function(e,t){e.setAttribute(a.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=a.properties.hasOwnProperty(e)?a.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+u(t)}return a.isCustomAttribute(e)?null==t?"":e+"="+u(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+u(t):""},setValueForProperty:function(e,t,n){var r=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(r){var i=r.mutationMethod;if(i)i(e,n);else if(o(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var u=r.attributeName,s=r.attributeNamespace;s?e.setAttributeNS(s,u,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(u,""):e.setAttribute(u,""+n)}else{var l=r.propertyName;r.hasSideEffects&&""+e[l]==""+n||(e[l]=n)}}else a.isCustomAttribute(t)&&p.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var o=n.propertyName,i=a.getDefaultValueForProperty(e.nodeName,o);n.hasSideEffects&&""+e[o]===i||(e[o]=i)}}else a.isCustomAttribute(t)&&e.removeAttribute(t)}};i.measureMethods(p,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),t.exports=p},{10:10,119:119,150:150,69:69}],12:[function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=e(127),a=e(132),i=e(133),u=e(137),s=e(141),l=/^(<[^ \/>]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){o.canUseDOM?void 0:s(!1);for(var t,n={},p=0;p<e.length;p++)e[p]?void 0:s(!1),t=r(e[p]),t=u(t)?t:"*",n[t]=n[t]||[],n[t][p]=e[p];var d=[],f=0;for(t in n)if(n.hasOwnProperty(t)){var h,v=n[t];for(h in v)if(v.hasOwnProperty(h)){var m=v[h];v[h]=m.replace(l,"$1 "+c+'="'+h+'" ')}for(var g=a(v.join(""),i),y=0;y<g.length;++y){var C=g[y];C.hasAttribute&&C.hasAttribute(c)&&(h=+C.getAttribute(c),C.removeAttribute(c),d.hasOwnProperty(h)?s(!1):void 0,d[h]=C,f+=1)}}return f!==d.length?s(!1):void 0,d.length!==e.length?s(!1):void 0,d},dangerouslyReplaceNodeWithMarkup:function(e,t){o.canUseDOM?void 0:s(!1),t?void 0:s(!1),"html"===e.tagName.toLowerCase()?s(!1):void 0;var n;n="string"==typeof t?a(t,i)[0]:t,e.parentNode.replaceChild(n,e)}};t.exports=p},{127:127,132:132,133:133,137:137,141:141}],13:[function(e,t,n){"use strict";var r=e(145),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];t.exports=o},{145:145}],14:[function(e,t,n){"use strict";var r=e(15),o=e(19),a=e(94),i=e(63),u=e(145),s=r.topLevelTypes,l=i.getFirstReactDOM,c={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},p=[null,null],d={eventTypes:c,extractEvents:function(e,t,n,r,u){if(e===s.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var d;if(t.window===t)d=t;else{var f=t.ownerDocument;d=f?f.defaultView||f.parentWindow:window}var h,v,m="",g="";if(e===s.topMouseOut?(h=t,m=n,v=l(r.relatedTarget||r.toElement),v?g=i.getID(v):v=d,v=v||d):(h=d,v=t,g=n),h===v)return null;var y=a.getPooled(c.mouseLeave,m,r,u);y.type="mouseleave",y.target=h,y.relatedTarget=v;var C=a.getPooled(c.mouseEnter,g,r,u);return C.type="mouseenter",C.target=v,C.relatedTarget=h,o.accumulateEnterLeaveDispatches(y,C,m,g),p[0]=y,p[1]=C,p}};t.exports=d},{145:145,15:15,19:19,63:63,94:94}],15:[function(e,t,n){"use strict";var r=e(144),o=r({bubbled:null,captured:null}),a=r({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough: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,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),i={topLevelTypes:a,PropagationPhases:o};t.exports=i},{144:144}],16:[function(e,t,n){"use strict";var r=e(17),o=e(18),a=e(54),i=e(100),u=e(107),s=e(141),l=(e(150),{}),c=null,p=function(e,t){e&&(o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return p(e,!0)},f=function(e){return p(e,!1)},h=null,v={injection:{injectMount:o.injection.injectMount,injectInstanceHandle:function(e){h=e},getInstanceHandle:function(){return h},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){"function"!=typeof n?s(!1):void 0;var o=l[t]||(l[t]={});o[e]=n;var a=r.registrationNameModules[t];a&&a.didPutListener&&a.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];return n&&n[e]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=l[t];o&&delete o[e]},deleteAllListeners:function(e){for(var t in l)if(l[t][e]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete l[t][e]}},extractEvents:function(e,t,n,o,a){for(var u,s=r.plugins,l=0;l<s.length;l++){var c=s[l];if(c){var p=c.extractEvents(e,t,n,o,a);p&&(u=i(u,p))}}return u},enqueueEvents:function(e){e&&(c=i(c,e))},processEventQueue:function(e){var t=c;c=null,e?u(t,d):u(t,f),c?s(!1):void 0,a.rethrowCaughtError()},__purge:function(){l={}},__getListenerBank:function(){return l}};t.exports=v},{100:100,107:107,141:141,150:150,17:17,18:18,54:54}],17:[function(e,t,n){"use strict";function r(){if(u)for(var e in s){var t=s[e],n=u.indexOf(e);if(n>-1?void 0:i(!1),!l.plugins[n]){t.extractEvents?void 0:i(!1),l.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i(!1)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?i(!1):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];a(u,t,n)}return!0}return e.registrationName?(a(e.registrationName,t,n),!0):!1}function a(e,t,n){l.registrationNameModules[e]?i(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e(141),u=null,s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){u?i(!1):void 0,u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?i(!1):void 0,s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=l},{141:141}],18:[function(e,t,n){"use strict";function r(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function o(e){return e===m.topMouseMove||e===m.topTouchMove}function a(e){return e===m.topMouseDown||e===m.topTouchStart}function i(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=v.Mount.getNode(r),t?f.invokeGuardedCallbackWithCatch(o,n,e,r):f.invokeGuardedCallback(o,n,e,r),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)i(e,t,n[o],r[o]);else n&&i(e,t,n,r);e._dispatchListeners=null,e._dispatchIDs=null}function s(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function l(e){var t=s(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchIDs;Array.isArray(t)?h(!1):void 0;var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function p(e){return!!e._dispatchListeners}var d=e(15),f=e(54),h=e(141),v=(e(150),{Mount:null,injectMount:function(e){v.Mount=e}}),m=d.topLevelTypes,g={isEndish:r,isMoveish:o,isStartish:a,executeDirectDispatch:c,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:l,hasDispatches:p,getNode:function(e){return v.Mount.getNode(e)},getID:function(e){return v.Mount.getID(e)},injection:v};t.exports=g},{141:141,15:15,150:150,54:54}],19:[function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return y(e,r)}function o(e,t,n){var o=t?g.bubbled:g.captured,a=r(e,n,o);a&&(n._dispatchListeners=v(n._dispatchListeners,a),n._dispatchIDs=v(n._dispatchIDs,e))}function a(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(e.dispatchMarker,o,e)}function u(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=y(e,r);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchIDs=v(n._dispatchIDs,e))}}function s(e){e&&e.dispatchConfig.registrationName&&u(e.dispatchMarker,null,e)}function l(e){m(e,a)}function c(e){m(e,i)}function p(e,t,n,r){h.injection.getInstanceHandle().traverseEnterLeave(n,r,u,e,t)}function d(e){m(e,s)}var f=e(15),h=e(16),v=(e(150),e(100)),m=e(107),g=f.PropagationPhases,y=h.getListener,C={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:p};t.exports=C},{100:100,107:107,15:15,150:150,16:16}],20:[function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=e(24),a=e(23),i=e(114);a(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[i()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),a=o.length;for(e=0;r>e&&n[e]===o[e];e++);var i=r-e;for(t=1;i>=t&&n[r-t]===o[a-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),o.addPoolingTo(r),t.exports=r},{114:114,23:23,24:24}],21:[function(e,t,n){"use strict";var r,o=e(10),a=e(127),i=o.injection.MUST_USE_ATTRIBUTE,u=o.injection.MUST_USE_PROPERTY,s=o.injection.HAS_BOOLEAN_VALUE,l=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(a.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:i|s,allowTransparency:i,alt:null,async:s,autoComplete:null,autoPlay:s,capture:i|s,cellPadding:null,cellSpacing:null,charSet:i,challenge:i,checked:u|s,classID:i,className:r?i:u,cols:i|p,colSpan:null,content:null,contentEditable:null,contextMenu:i,controls:u|s,coords:null,crossOrigin:null,data:null,dateTime:i,defer:s,dir:null,disabled:i|s,download:d,draggable:null,encType:null,form:i,formAction:i,formEncType:i,formMethod:i,formNoValidate:s,formTarget:i,frameBorder:i,headers:null,height:i,hidden:i|s,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:u,inputMode:i,is:i,keyParams:i,keyType:i,label:null,lang:null,list:i,loop:u|s,low:null,manifest:i,marginHeight:null,marginWidth:null,max:null,maxLength:i,media:i,mediaGroup:null,method:null,min:null,minLength:i,multiple:u|s,muted:u|s,name:null,noValidate:s,open:s,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:u|s,rel:null,required:s,role:i,rows:i|p,rowSpan:null,sandbox:null,scope:null,scoped:s,scrolling:null,seamless:i|s,selected:u|s,shape:null,size:i|p,sizes:i,span:p,spellCheck:null,src:null,srcDoc:u,srcSet:i,start:c,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:u|l,width:i,wmode:i,wrap:null,about:i,datatype:i,inlist:i,prefix:i,property:i,resource:i,"typeof":i,vocab:i,autoCapitalize:null,autoCorrect:null,autoSave:null,itemProp:i,itemScope:i|s,itemType:i,itemID:i,itemRef:i,results:null,security:i,unselectable:i},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=h},{10:10,127:127}],22:[function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?l(!1):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?l(!1):void 0}function a(e){r(e),null!=e.checked||null!=e.onChange?l(!1):void 0}function i(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var u=e(72),s=e(71),l=e(141),c=(e(150),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},d={},f={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var o=p[r](t,r,e,s.prop);o instanceof Error&&!(o.message in d)&&(d[o.message]=!0,i(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(a(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(a(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=f},{141:141,150:150,71:71,72:72}],23:[function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var a=arguments[o];if(null!=a){var i=Object(a);for(var u in i)r.call(i,u)&&(n[u]=i[u])}}return n}t.exports=r},{}],24:[function(e,t,n){"use strict";var r=e(141),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},a=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r),a}return new o(e,t,n,r)},s=function(e,t,n,r,o){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,r,o),i}return new a(e,t,n,r,o)},l=function(e){var t=this;e instanceof t?void 0:r(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,p=o,d=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=c),n.release=l,n},f={addPoolingTo:d,oneArgumentPooler:o,twoArgumentPooler:a,threeArgumentPooler:i,fourArgumentPooler:u,fiveArgumentPooler:s};t.exports=f},{141:141}],25:[function(e,t,n){"use strict";var r=(e(60),e(105)),o=(e(150),"_getDOMNodeDidWarn"),a={getDOMNode:function(){return this.constructor[o]=!0,r(this)}};t.exports=a},{105:105,150:150,60:60}],26:[function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=h++,d[e[m]]={}),d[e[m]]}var o=e(15),a=e(16),i=e(17),u=e(55),s=e(69),l=e(99),c=e(23),p=e(116),d={},f=!1,h=0,v={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked", +topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),g=c({},u,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,a=r(n),u=i.registrationNameDependencies[e],s=o.topLevelTypes,l=0;l<u.length;l++){var c=u[l];a.hasOwnProperty(c)&&a[c]||(c===s.topWheel?p("wheel")?g.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",n):p("mousewheel")?g.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",n):g.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",n):c===s.topScroll?p("scroll",!0)?g.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",n):g.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",g.ReactEventListener.WINDOW_HANDLE):c===s.topFocus||c===s.topBlur?(p("focus",!0)?(g.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",n),g.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",n)):p("focusin")&&(g.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",n),g.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",n)),a[s.topBlur]=!0,a[s.topFocus]=!0):v.hasOwnProperty(c)&&g.ReactEventListener.trapBubbledEvent(c,v[c],n),a[c]=!0)}},trapBubbledEvent:function(e,t,n){return g.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return g.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!f){var e=l.refreshScrollValues;g.ReactEventListener.monitorScrollValue(e),f=!0}},eventNameDispatchConfigs:a.eventNameDispatchConfigs,registrationNameModules:a.registrationNameModules,putListener:a.putListener,getListener:a.getListener,deleteListener:a.deleteListener,deleteAllListeners:a.deleteAllListeners});s.measureMethods(g,"ReactBrowserEventEmitter",{putListener:"putListener",deleteListener:"deleteListener"}),t.exports=g},{116:116,15:15,16:16,17:17,23:23,55:55,69:69,99:99}],27:[function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=a(t,null))}var o=e(74),a=e(115),i=e(123),u=e(124),s=(e(150),{instantiateChildren:function(e,t,n){if(null==e)return null;var o={};return u(e,r,o),o},updateChildren:function(e,t,n,r){if(!t&&!e)return null;var u;for(u in t)if(t.hasOwnProperty(u)){var s=e&&e[u],l=s&&s._currentElement,c=t[u];if(null!=s&&i(l,c))o.receiveComponent(s,c,n,r),t[u]=s;else{s&&o.unmountComponent(s,u);var p=a(c,null);t[u]=p}}for(u in e)!e.hasOwnProperty(u)||t&&t.hasOwnProperty(u)||o.unmountComponent(e[u]);return t},unmountChildren:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];o.unmountComponent(n)}}});t.exports=s},{115:115,123:123,124:124,150:150,74:74}],28:[function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"//")}function o(e,t){this.func=e,this.context=t,this.count=0}function a(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function i(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);g(e,a,r),o.release(r)}function u(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function s(e,t,n){var o=e.result,a=e.keyPrefix,i=e.func,u=e.context,s=i.call(u,t,e.count++);Array.isArray(s)?l(s,o,n,m.thatReturnsArgument):null!=s&&(v.isValidElement(s)&&(s=v.cloneAndReplaceKey(s,a+(s!==t?r(s.key||"")+"/":"")+n)),o.push(s))}function l(e,t,n,o,a){var i="";null!=n&&(i=r(n)+"/");var l=u.getPooled(t,i,o,a);g(e,s,l),u.release(l)}function c(e,t,n){if(null==e)return e;var r=[];return l(e,r,null,t,n),r}function p(e,t,n){return null}function d(e,t){return g(e,p,null)}function f(e){var t=[];return l(e,t,null,m.thatReturnsArgument),t}var h=e(24),v=e(50),m=e(133),g=e(124),y=h.twoArgumentPooler,C=h.fourArgumentPooler,b=/\/(?!\/)/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,y),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(u,C);var _={forEach:i,map:c,mapIntoWithKeyPrefixInternal:l,count:d,toArray:f};t.exports=_},{124:124,133:133,24:24,50:50}],29:[function(e,t,n){"use strict";function r(e,t){var n=E.hasOwnProperty(t)?E[t]:null;D.hasOwnProperty(t)&&(n!==b.OVERRIDE_BASE?m(!1):void 0),e.hasOwnProperty(t)&&(n!==b.DEFINE_MANY&&n!==b.DEFINE_MANY_MERGED?m(!1):void 0)}function o(e,t){if(t){"function"==typeof t?m(!1):void 0,d.isValidElement(t)?m(!1):void 0;var n=e.prototype;t.hasOwnProperty(C)&&x.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==C){var a=t[o];if(r(n,o),x.hasOwnProperty(o))x[o](e,a);else{var i=E.hasOwnProperty(o),l=n.hasOwnProperty(o),c="function"==typeof a,p=c&&!i&&!l&&t.autobind!==!1;if(p)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[o]=a,n[o]=a;else if(l){var f=E[o];!i||f!==b.DEFINE_MANY_MERGED&&f!==b.DEFINE_MANY?m(!1):void 0,f===b.DEFINE_MANY_MERGED?n[o]=u(n[o],a):f===b.DEFINE_MANY&&(n[o]=s(n[o],a))}else n[o]=a}}}}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in x;o?m(!1):void 0;var a=n in e;a?m(!1):void 0,e[n]=r}}}function i(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:m(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?m(!1):void 0,e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return i(o,n),i(o,r),o}}function s(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=l(e,n)}}var p=e(30),d=e(50),f=(e(71),e(70),e(67)),h=e(23),v=e(134),m=e(141),g=e(144),y=e(145),C=(e(150),y({mixins:null})),b=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),_=[],E={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},x={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=h({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=h({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=h({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},D={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t)},isMounted:function(){return this.updater.isMounted(this)},setProps:function(e,t){this.updater.enqueueSetProps(this,e),t&&this.updater.enqueueCallback(this,t)},replaceProps:function(e,t){this.updater.enqueueReplaceProps(this,e),t&&this.updater.enqueueCallback(this,t)}},M=function(){};h(M.prototype,p.prototype,D);var N={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindMap&&c(this),this.props=e,this.context=t,this.refs=v,this.updater=n||f,this.state=null;var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?m(!1):void 0,this.state=r};t.prototype=new M,t.prototype.constructor=t,_.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:m(!1);for(var n in E)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){_.push(e)}}};t.exports=N},{134:134,141:141,144:144,145:145,150:150,23:23,30:30,50:50,67:67,70:70,71:71}],30:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||o}var o=e(67),a=e(134),i=e(141);e(150);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?i(!1):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t)},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e)};t.exports=r},{134:134,141:141,150:150,67:67}],31:[function(e,t,n){"use strict";var r=e(40),o=e(63),a={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){o.purgeID(e)}};t.exports=a},{40:40,63:63}],32:[function(e,t,n){"use strict";var r=e(141),o=!1,a={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r(!1):void 0,a.unmountIDFromEnvironment=e.unmountIDFromEnvironment,a.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,a.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};t.exports=a},{141:141}],33:[function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function o(e){}var a=e(32),i=e(34),u=e(50),s=e(60),l=e(69),c=e(71),p=(e(70),e(74)),d=e(80),f=e(23),h=e(134),v=e(141),m=e(123);e(150);o.prototype.render=function(){var e=s.get(this)._currentElement.type;return e(this.props,this.context,this.updater)};var g=1,y={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=g++,this._rootNodeID=e;var r,a,i=this._processProps(this._currentElement.props),l=this._processContext(n),c=this._currentElement.type,f="prototype"in c;f&&(r=new c(i,l,d)),(!f||null===r||r===!1||u.isValidElement(r))&&(a=r,r=new o(c)),r.props=i,r.context=l,r.refs=h,r.updater=d,this._instance=r,s.set(r,this);var m=r.state;void 0===m&&(r.state=m=null),"object"!=typeof m||Array.isArray(m)?v(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,r.componentWillMount&&(r.componentWillMount(),this._pendingStateQueue&&(r.state=this._processPendingState(r.props,r.context))),void 0===a&&(a=this._renderValidatedComponent()),this._renderedComponent=this._instantiateReactComponent(a);var y=p.mountComponent(this._renderedComponent,e,t,this._processChildContext(n));return r.componentDidMount&&t.getReactMountReady().enqueue(r.componentDidMount,r),y},unmountComponent:function(){var e=this._instance;e.componentWillUnmount&&e.componentWillUnmount(),p.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._instance=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,s.remove(e)},_maskContext:function(e){var t=null,n=this._currentElement.type,r=n.contextTypes;if(!r)return h;t={};for(var o in r)t[o]=e[o];return t},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?v(!1):void 0;for(var o in r)o in t.childContextTypes?void 0:v(!1);return f({},e,r)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var o=this.getName();for(var a in e)if(e.hasOwnProperty(a)){var i;try{"function"!=typeof e[a]?v(!1):void 0,i=e[a](t,a,o,n)}catch(u){i=u}i instanceof Error&&(r(this),n===c.prop)}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&p.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(e,t,n,r,o){var a,i=this._instance,u=this._context===o?i.context:this._processContext(o);t===n?a=n.props:(a=this._processProps(n.props),i.componentWillReceiveProps&&i.componentWillReceiveProps(a,u));var s=this._processPendingState(a,u),l=this._pendingForceUpdate||!i.shouldComponentUpdate||i.shouldComponentUpdate(a,s,u);l?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,a,s,u,e,o)):(this._currentElement=n,this._context=o,i.props=a,i.state=s,i.context=u)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var a=f({},o?r[0]:n.state),i=o?1:0;i<r.length;i++){var u=r[i];f(a,"function"==typeof u?u.call(n,a,e,t):u)}return a},_performComponentUpdate:function(e,t,n,r,o,a){var i,u,s,l=this._instance,c=Boolean(l.componentDidUpdate);c&&(i=l.props,u=l.state,s=l.context),l.componentWillUpdate&&l.componentWillUpdate(t,n,r),this._currentElement=e,this._context=a,l.props=t,l.state=n,l.context=r,this._updateRenderedComponent(o,a),c&&o.getReactMountReady().enqueue(l.componentDidUpdate.bind(l,i,u,s),l)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(m(r,o))p.receiveComponent(n,o,e,this._processChildContext(t));else{var a=this._rootNodeID,i=n._rootNodeID;p.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(o);var u=p.mountComponent(this._renderedComponent,a,e,this._processChildContext(t));this._replaceNodeWithMarkupByID(i,u)}},_replaceNodeWithMarkupByID:function(e,t){a.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;i.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{i.current=null}return null===e||e===!1||u.isValidElement(e)?void 0:v(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?v(!1):void 0;var r=t.getPublicInstance(),o=n.refs===h?n.refs={}:n.refs;o[e]=r},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return e instanceof o?null:e},_instantiateReactComponent:null};l.measureMethods(y,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var C={Mixin:y};t.exports=C},{123:123,134:134,141:141,150:150,23:23,32:32,34:34,50:50,60:60,69:69,70:70,71:71,74:74,80:80}],34:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],35:[function(e,t,n){"use strict";var r=e(34),o=e(46),a=e(49),i=e(59),u=e(63),s=e(69),l=e(74),c=e(81),p=e(82),d=e(105),f=e(120);e(150);a.inject();var h=s.measure("React","render",u.render),v={findDOMNode:d,render:h,unmountComponentAtNode:u.unmountComponentAtNode,version:p,unstable_batchedUpdates:c.batchedUpdates,unstable_renderSubtreeIntoContainer:f};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:r,InstanceHandles:i,Mount:u,Reconciler:l,TextComponent:o});t.exports=v},{105:105,120:120,150:150,34:34,46:46,49:49,59:59,63:63,69:69,74:74,81:81,82:82}],36:[function(e,t,n){"use strict";var r={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},o={getNativeProps:function(e,t,n){if(!t.disabled)return t;var o={};for(var a in t)t.hasOwnProperty(a)&&!r[a]&&(o[a]=t[a]);return o}};t.exports=o},{}],37:[function(e,t,n){"use strict";function r(){return this}function o(){var e=this._reactInternalComponent;return!!e}function a(){}function i(e,t){var n=this._reactInternalComponent;n&&(T.enqueueSetPropsInternal(n,e),t&&T.enqueueCallbackInternal(n,t))}function u(e,t){var n=this._reactInternalComponent;n&&(T.enqueueReplacePropsInternal(n,e),t&&T.enqueueCallbackInternal(n,t))}function s(e,t){t&&(null!=t.dangerouslySetInnerHTML&&(null!=t.children?A(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML?void 0:A(!1)),null!=t.style&&"object"!=typeof t.style?A(!1):void 0)}function l(e,t,n,r){var o=R.findReactContainerForID(e);if(o){var a=o.nodeType===H?o.ownerDocument:o;V(t,a)}r.getReactMountReady().enqueue(c,{id:e,registrationName:t,listener:n})}function c(){var e=this;E.putListener(e.id,e.registrationName,e.listener)}function p(){var e=this;e._rootNodeID?void 0:A(!1);var t=R.getNode(e._rootNodeID);switch(t?void 0:A(!1),e._tag){case"iframe":e._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in z)z.hasOwnProperty(n)&&e._wrapperState.listeners.push(E.trapBubbledEvent(_.topLevelTypes[n],z[n],t));break;case"img":e._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topError,"error",t),E.trapBubbledEvent(_.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topReset,"reset",t),E.trapBubbledEvent(_.topLevelTypes.topSubmit,"submit",t)]}}function d(){M.mountReadyWrapper(this)}function f(){P.postUpdateWrapper(this)}function h(e){Z.call($,e)||(Q.test(e)?void 0:A(!1),$[e]=!0)}function v(e,t){return e.indexOf("-")>=0||null!=t.is}function m(e){h(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null}var g=e(2),y=e(5),C=e(10),b=e(11),_=e(15),E=e(26),x=e(31),D=e(36),M=e(41),N=e(42),P=e(43),w=e(47),R=e(63),I=e(64),S=e(69),T=e(80),k=e(23),O=e(104),A=e(141),L=(e(116),e(145)),U=e(121),F=e(122),B=(e(148),e(125),e(150),E.deleteListener),V=E.listenTo,j=E.registrationNameModules,W={string:!0,number:!0},K=L({style:null}),H=1,q=!1;try{Object.defineProperty({},"test",{get:function(){}}),q=!0}catch(Y){}var z={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},G={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},X={listing:!0,pre:!0,textarea:!0},Q=(k({menuitem:!0},G),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),$={},Z={}.hasOwnProperty;m.displayName="ReactDOMComponent",m.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e;var r=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(p,this);break;case"button":r=D.getNativeProps(this,r,n);break;case"input":M.mountWrapper(this,r,n),r=M.getNativeProps(this,r,n);break;case"option":N.mountWrapper(this,r,n),r=N.getNativeProps(this,r,n);break;case"select":P.mountWrapper(this,r,n),r=P.getNativeProps(this,r,n),n=P.processChildContext(this,r,n);break;case"textarea":w.mountWrapper(this,r,n),r=w.getNativeProps(this,r,n)}s(this,r);var o;if(t.useCreateElement){var a=n[R.ownerDocumentContextKey],i=a.createElement(this._currentElement.type);b.setAttributeForID(i,this._rootNodeID),R.getID(i),this._updateDOMProperties({},r,t,i),this._createInitialChildren(t,r,n,i),o=i}else{var u=this._createOpenTagMarkupAndPutListeners(t,r),l=this._createContentMarkup(t,r,n);o=!l&&G[this._tag]?u+"/>":u+">"+l+"</"+this._currentElement.type+">"}switch(this._tag){case"input":t.getReactMountReady().enqueue(d,this);case"button":case"select":case"textarea":r.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this)}return o},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(j.hasOwnProperty(r))o&&l(this._rootNodeID,r,o,e);else{r===K&&(o&&(o=this._previousStyleCopy=k({},t.style)),o=y.createMarkupForStyles(o));var a=null;a=null!=this._tag&&v(this._tag,t)?b.createMarkupForCustomAttribute(r,o):b.createMarkupForProperty(r,o),a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n;var i=b.createMarkupForID(this._rootNodeID);return n+" "+i},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var a=W[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)r=O(a);else if(null!=i){var u=this.mountChildren(i,e,n);r=u.join("")}}return X[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&U(r,o.__html);else{var a=W[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)F(r,a);else if(null!=i)for(var u=this.mountChildren(i,e,n),s=0;s<u.length;s++)r.appendChild(u[s])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){var o=t.props,a=this._currentElement.props;switch(this._tag){case"button":o=D.getNativeProps(this,o),a=D.getNativeProps(this,a);break;case"input":M.updateWrapper(this),o=M.getNativeProps(this,o),a=M.getNativeProps(this,a);break;case"option":o=N.getNativeProps(this,o),a=N.getNativeProps(this,a);break;case"select":o=P.getNativeProps(this,o),a=P.getNativeProps(this,a);break;case"textarea":w.updateWrapper(this),o=w.getNativeProps(this,o),a=w.getNativeProps(this,a)}s(this,a),this._updateDOMProperties(o,a,e,null),this._updateDOMChildren(o,a,e,r),!q&&this._nodeWithLegacyProperties&&(this._nodeWithLegacyProperties.props=a),"select"===this._tag&&e.getReactMountReady().enqueue(f,this)},_updateDOMProperties:function(e,t,n,r){var o,a,i;for(o in e)if(!t.hasOwnProperty(o)&&e.hasOwnProperty(o))if(o===K){var u=this._previousStyleCopy;for(a in u)u.hasOwnProperty(a)&&(i=i||{},i[a]="");this._previousStyleCopy=null}else j.hasOwnProperty(o)?e[o]&&B(this._rootNodeID,o):(C.properties[o]||C.isCustomAttribute(o))&&(r||(r=R.getNode(this._rootNodeID)),b.deleteValueForProperty(r,o));for(o in t){var s=t[o],c=o===K?this._previousStyleCopy:e[o];if(t.hasOwnProperty(o)&&s!==c)if(o===K)if(s?s=this._previousStyleCopy=k({},s):this._previousStyleCopy=null,c){for(a in c)!c.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(i=i||{},i[a]="");for(a in s)s.hasOwnProperty(a)&&c[a]!==s[a]&&(i=i||{},i[a]=s[a])}else i=s;else j.hasOwnProperty(o)?s?l(this._rootNodeID,o,s,n):c&&B(this._rootNodeID,o):v(this._tag,t)?(r||(r=R.getNode(this._rootNodeID)),b.setValueForAttribute(r,o,s)):(C.properties[o]||C.isCustomAttribute(o))&&(r||(r=R.getNode(this._rootNodeID)),null!=s?b.setValueForProperty(r,o,s):b.deleteValueForProperty(r,o))}i&&(r||(r=R.getNode(this._rootNodeID)),y.setValueForStyles(r,i))},_updateDOMChildren:function(e,t,n,r){var o=W[typeof e.children]?e.children:null,a=W[typeof t.children]?t.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,l=null!=a?null:t.children,c=null!=o||null!=i,p=null!=a||null!=u;null!=s&&null==l?this.updateChildren(null,n,r):c&&!p&&this.updateTextContent(""),null!=a?o!==a&&this.updateTextContent(""+a):null!=u?i!==u&&this.updateMarkup(""+u):null!=l&&this.updateChildren(l,n,r)},unmountComponent:function(){switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":var e=this._wrapperState.listeners;if(e)for(var t=0;t<e.length;t++)e[t].remove();break;case"input":M.unmountWrapper(this);break;case"html":case"head":case"body":A(!1)}if(this.unmountChildren(),E.deleteAllListeners(this._rootNodeID),x.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._wrapperState=null,this._nodeWithLegacyProperties){var n=this._nodeWithLegacyProperties;n._reactInternalComponent=null,this._nodeWithLegacyProperties=null}},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var e=R.getNode(this._rootNodeID);e._reactInternalComponent=this,e.getDOMNode=r,e.isMounted=o,e.setState=a,e.replaceState=a,e.forceUpdate=a,e.setProps=i,e.replaceProps=u,e.props=this._currentElement.props,this._nodeWithLegacyProperties=e}return this._nodeWithLegacyProperties}},S.measureMethods(m,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),k(m.prototype,m.Mixin,I.Mixin),t.exports=m},{10:10,104:104,11:11,116:116,121:121,122:122,125:125,141:141,145:145,148:148,15:15,150:150,2:2,23:23,26:26,31:31,36:36,41:41,42:42,43:43,47:47,5:5,63:63,64:64,69:69,80:80}],38:[function(e,t,n){"use strict";function r(e){return o.createFactory(e)}var o=e(50),a=(e(51),e(146)),i=a({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);t.exports=i},{146:146,50:50,51:51}],39:[function(e,t,n){"use strict";var r={useCreateElement:!1};t.exports=r},{}],40:[function(e,t,n){"use strict";var r=e(9),o=e(11),a=e(63),i=e(69),u=e(141),s={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:function(e,t,n){var r=a.getNode(e);s.hasOwnProperty(t)?u(!1):void 0,null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=a.getNode(e[n].parentID);r.processUpdates(e,t)}};i.measureMethods(l,"ReactDOMIDOperations",{dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=l},{11:11,141:141,63:63,69:69,9:9}],41:[function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=i.executeOnChange(t,e);s.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var a=u.getNode(this._rootNodeID),l=a;l.parentNode;)l=l.parentNode;for(var d=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),f=0;f<d.length;f++){var h=d[f];if(h!==a&&h.form===a.form){var v=u.getID(h);v?void 0:c(!1);var m=p[v];m?void 0:c(!1),s.asap(r,m)}}}return n}var a=e(40),i=e(22),u=e(63),s=e(81),l=e(23),c=e(141),p={},d={getNativeProps:function(e,t,n){var r=i.getValue(t),o=i.getChecked(t),a=l({},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=r?r:e._wrapperState.initialValue,checked:null!=o?o:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return a},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,onChange:o.bind(e)}},mountReadyWrapper:function(e){p[e._rootNodeID]=e},unmountWrapper:function(e){delete p[e._rootNodeID]},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&a.updatePropertyByID(e._rootNodeID,"checked",n||!1);var r=i.getValue(t);null!=r&&a.updatePropertyByID(e._rootNodeID,"value",""+r)}};t.exports=d},{141:141,22:22,23:23,40:40,63:63,81:81}],42:[function(e,t,n){"use strict";var r=e(28),o=e(43),a=e(23),i=(e(150),o.valueContextKey),u={mountWrapper:function(e,t,n){var r=n[i],o=null;if(null!=r)if(o=!1,Array.isArray(r)){for(var a=0;a<r.length;a++)if(""+r[a]==""+t.value){o=!0;break}}else o=""+r==""+t.value;e._wrapperState={selected:o}},getNativeProps:function(e,t,n){var o=a({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(o.selected=e._wrapperState.selected);var i="";return r.forEach(t.children,function(e){null!=e&&("string"==typeof e||"number"==typeof e)&&(i+=e)}),o.children=i,o}};t.exports=u},{150:150,23:23,28:28,43:43}],43:[function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=i.getValue(e);null!=t&&o(this,e,t)}}function o(e,t,n){var r,o,a=u.getNode(e._rootNodeID).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<a.length;o++){var i=r.hasOwnProperty(a[o].value);a[o].selected!==i&&(a[o].selected=i)}}else{for(r=""+n,o=0;o<a.length;o++)if(a[o].value===r)return void(a[o].selected=!0);a.length&&(a[0].selected=!0)}}function a(e){var t=this._currentElement.props,n=i.executeOnChange(t,e);return this._wrapperState.pendingUpdate=!0,s.asap(r,this),n}var i=e(22),u=e(63),s=e(81),l=e(23),c=(e(150),"__ReactDOMSelect_value$"+Math.random().toString(36).slice(2)),p={valueContextKey:c,getNativeProps:function(e,t,n){return l({},t,{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=i.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,onChange:a.bind(e),wasMultiple:Boolean(t.multiple)}},processChildContext:function(e,t,n){var r=l({},n);return r[c]=e._wrapperState.initialValue,r},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple; +e._wrapperState.wasMultiple=Boolean(t.multiple);var r=i.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,o(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?o(e,Boolean(t.multiple),t.defaultValue):o(e,Boolean(t.multiple),t.multiple?[]:""))}};t.exports=p},{150:150,22:22,23:23,63:63,81:81}],44:[function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var a=o.text.length,i=a+r;return{start:a,end:i}}function a(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,a=t.focusNode,i=t.focusOffset,u=t.getRangeAt(0);try{u.startContainer.nodeType,u.endContainer.nodeType}catch(s){return null}var l=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=l?0:u.toString().length,p=u.cloneRange();p.selectNodeContents(e),p.setEnd(u.startContainer,u.startOffset);var d=r(p.startContainer,p.startOffset,p.endContainer,p.endOffset),f=d?0:p.toString().length,h=f+c,v=document.createRange();v.setStart(n,o),v.setEnd(a,i);var m=v.collapsed;return{start:m?h:f,end:m?f:h}}function i(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),a="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>a){var i=a;a=o,o=i}var u=l(e,o),s=l(e,a);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>a?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=e(127),l=e(113),c=e(114),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:a,setOffsets:p?i:u};t.exports=d},{113:113,114:114,127:127}],45:[function(e,t,n){"use strict";var r=e(49),o=e(78),a=e(82);r.inject();var i={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:a};t.exports=i},{49:49,78:78,82:82}],46:[function(e,t,n){"use strict";var r=e(9),o=e(11),a=e(31),i=e(63),u=e(23),s=e(104),l=e(122),c=(e(125),function(e){});u(c.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,n){if(this._rootNodeID=e,t.useCreateElement){var r=n[i.ownerDocumentContextKey],a=r.createElement("span");return o.setAttributeForID(a,e),i.getID(a),l(a,this._stringText),a}var u=s(this._stringText);return t.renderToStaticMarkup?u:"<span "+o.createMarkupForID(e)+">"+u+"</span>"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=i.getNode(this._rootNodeID);r.updateTextContent(o,n)}}},unmountComponent:function(){a.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=c},{104:104,11:11,122:122,125:125,23:23,31:31,63:63,9:9}],47:[function(e,t,n){"use strict";function r(){this._rootNodeID&&c.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=a.executeOnChange(t,e);return u.asap(r,this),n}var a=e(22),i=e(40),u=e(81),s=e(23),l=e(141),c=(e(150),{getNativeProps:function(e,t,n){null!=t.dangerouslySetInnerHTML?l(!1):void 0;var r=s({},t,{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return r},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?l(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:l(!1),r=r[0]),n=""+r),null==n&&(n="");var i=a.getValue(t);e._wrapperState={initialValue:""+(null!=i?i:n),onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=a.getValue(t);null!=n&&i.updatePropertyByID(e._rootNodeID,"value",""+n)}});t.exports=c},{141:141,150:150,22:22,23:23,40:40,81:81}],48:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e(81),a=e(98),i=e(23),u=e(133),s={initialize:u,close:function(){d.isBatchingUpdates=!1}},l={initialize:u,close:o.flushBatchedUpdates.bind(o)},c=[l,s];i(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o,a):p.perform(e,null,t,n,r,o,a)}};t.exports=d},{133:133,23:23,81:81,98:98}],49:[function(e,t,n){"use strict";function r(){M||(M=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(u),g.EventPluginHub.injectInstanceHandle(y),g.EventPluginHub.injectMount(C),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:x,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:_,BeforeInputEventPlugin:o}),g.NativeComponent.injectGenericComponentClass(h),g.NativeComponent.injectTextComponentClass(v),g.Class.injectMixin(p),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(D),g.EmptyComponent.injectEmptyComponent("noscript"),g.Updates.injectReconcileTransaction(b),g.Updates.injectBatchingStrategy(f),g.RootIndex.injectCreateReactRootIndex(l.canUseDOM?i.createReactRootIndex:E.createReactRootIndex),g.Component.injectEnvironment(d))}var o=e(3),a=e(7),i=e(8),u=e(13),s=e(14),l=e(127),c=e(21),p=e(25),d=e(31),f=e(48),h=e(37),v=e(46),m=e(56),g=e(57),y=e(59),C=e(63),b=e(73),_=e(84),E=e(85),x=e(86),D=e(83),M=!1;t.exports={inject:r}},{127:127,13:13,14:14,21:21,25:25,3:3,31:31,37:37,46:46,48:48,56:56,57:57,59:59,63:63,7:7,73:73,8:8,83:83,84:84,85:85,86:86}],50:[function(e,t,n){"use strict";var r=e(34),o=e(23),a="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,i={key:!0,ref:!0,__self:!0,__source:!0},u=function(e,t,n,r,o,i,u){var s={$$typeof:a,type:e,key:t,ref:n,props:u,_owner:i};return s};u.createElement=function(e,t,n){var o,a={},s=null,l=null,c=null,p=null;if(null!=t){l=void 0===t.ref?null:t.ref,s=void 0===t.key?null:""+t.key,c=void 0===t.__self?null:t.__self,p=void 0===t.__source?null:t.__source;for(o in t)t.hasOwnProperty(o)&&!i.hasOwnProperty(o)&&(a[o]=t[o])}var d=arguments.length-2;if(1===d)a.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];a.children=f}if(e&&e.defaultProps){var v=e.defaultProps;for(o in v)"undefined"==typeof a[o]&&(a[o]=v[o])}return u(e,s,l,c,p,r.current,a)},u.createFactory=function(e){var t=u.createElement.bind(null,e);return t.type=e,t},u.cloneAndReplaceKey=function(e,t){var n=u(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},u.cloneAndReplaceProps=function(e,t){var n=u(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},u.cloneElement=function(e,t,n){var a,s=o({},e.props),l=e.key,c=e.ref,p=e._self,d=e._source,f=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,f=r.current),void 0!==t.key&&(l=""+t.key);for(a in t)t.hasOwnProperty(a)&&!i.hasOwnProperty(a)&&(s[a]=t[a])}var h=arguments.length-2;if(1===h)s.children=n;else if(h>1){for(var v=Array(h),m=0;h>m;m++)v[m]=arguments[m+2];s.children=v}return u(e.type,l,c,p,d,f,s)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.exports=u},{23:23,34:34}],51:[function(e,t,n){"use strict";function r(){if(p.current){var e=p.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e,t){e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,a("uniqueKey",e,t))}function a(e,t,n){var o=r();if(!o){var a="string"==typeof n?n:n.displayName||n.name;a&&(o=" Check the top-level render call using <"+a+">.")}var i=h[e]||(h[e]={});if(i[o])return null;i[o]=!0;var u={parentOrOwner:o,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==p.current&&(u.childOwner=" It was passed a child from "+t._owner.getName()+"."),u}function i(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];l.isValidElement(r)&&o(r,t)}else if(l.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var a=d(e);if(a&&a!==e.entries)for(var i,u=a.call(e);!(i=u.next()).done;)l.isValidElement(i.value)&&o(i.value,t)}}function u(e,t,n,o){for(var a in t)if(t.hasOwnProperty(a)){var i;try{"function"!=typeof t[a]?f(!1):void 0,i=t[a](n,a,e,o)}catch(u){i=u}i instanceof Error&&!(i.message in v)&&(v[i.message]=!0,r())}}function s(e){var t=e.type;if("function"==typeof t){var n=t.displayName||t.name;t.propTypes&&u(n,t.propTypes,e.props,c.prop),"function"==typeof t.getDefaultProps}}var l=e(50),c=e(71),p=(e(70),e(34)),d=e(112),f=e(141),h=(e(150),{}),v={},m={createElement:function(e,t,n){var r="string"==typeof e||"function"==typeof e,o=l.createElement.apply(this,arguments);if(null==o)return o;if(r)for(var a=2;a<arguments.length;a++)i(arguments[a],e);return s(o),o},createFactory:function(e){var t=m.createElement.bind(null,e);return t.type=e,t},cloneElement:function(e,t,n){for(var r=l.cloneElement.apply(this,arguments),o=2;o<arguments.length;o++)i(arguments[o],r.type);return s(r),r}};t.exports=m},{112:112,141:141,150:150,34:34,50:50,70:70,71:71}],52:[function(e,t,n){"use strict";var r,o=e(50),a=e(53),i=e(74),u=e(23),s={injectEmptyComponent:function(e){r=o.createElement(e)}},l=function(e){this._currentElement=null,this._rootNodeID=null,this._renderedComponent=e(r)};u(l.prototype,{construct:function(e){},mountComponent:function(e,t,n){return a.registerNullComponentID(e),this._rootNodeID=e,i.mountComponent(this._renderedComponent,e,t,n)},receiveComponent:function(){},unmountComponent:function(e,t,n){i.unmountComponent(this._renderedComponent),a.deregisterNullComponentID(this._rootNodeID),this._rootNodeID=null,this._renderedComponent=null}}),l.injection=s,t.exports=l},{23:23,50:50,53:53,74:74}],53:[function(e,t,n){"use strict";function r(e){return!!i[e]}function o(e){i[e]=!0}function a(e){delete i[e]}var i={},u={isNullComponentID:r,registerNullComponentID:o,deregisterNullComponentID:a};t.exports=u},{}],54:[function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(a){return void(null===o&&(o=a))}}var o=null,a={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};t.exports=a},{}],55:[function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=e(16),a={handleTopLevel:function(e,t,n,a,i){var u=o.extractEvents(e,t,n,a,i);r(u)}};t.exports=a},{16:16}],56:[function(e,t,n){"use strict";function r(e){var t=d.getID(e),n=p.getReactRootIDFromNodeID(t),r=d.findReactContainerForID(n),o=d.getFirstReactDOM(r);return o}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function a(e){i(e)}function i(e){for(var t=d.getFirstReactDOM(v(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var o=0;o<e.ancestors.length;o++){t=e.ancestors[o];var a=d.getID(t)||"";g._handleTopLevel(e.topLevelType,t,a,e.nativeEvent,v(e.nativeEvent))}}function u(e){var t=m(window);e(t)}var s=e(126),l=e(127),c=e(24),p=e(59),d=e(63),f=e(81),h=e(23),v=e(111),m=e(138);h(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(o,c.twoArgumentPooler);var g={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:l.canUseDOM?window:null,setHandleTopLevel:function(e){g._handleTopLevel=e},setEnabled:function(e){g._enabled=!!e},isEnabled:function(){return g._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,g.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,g.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=u.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(g._enabled){var n=o.getPooled(e,t);try{f.batchedUpdates(a,n)}finally{o.release(n)}}}};t.exports=g},{111:111,126:126,127:127,138:138,23:23,24:24,59:59,63:63,81:81}],57:[function(e,t,n){"use strict";var r=e(10),o=e(16),a=e(32),i=e(29),u=e(52),s=e(26),l=e(66),c=e(69),p=e(76),d=e(81),f={Component:a.injection,Class:i.injection,DOMProperty:r.injection,EmptyComponent:u.injection,EventPluginHub:o.injection,EventEmitter:s.injection,NativeComponent:l.injection,Perf:c.injection,RootIndex:p.injection,Updates:d.injection};t.exports=f},{10:10,16:16,26:26,29:29,32:32,52:52,66:66,69:69,76:76,81:81}],58:[function(e,t,n){"use strict";function r(e){return a(document.documentElement,e)}var o=e(44),a=e(130),i=e(135),u=e(136),s={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=u();return{focusedElem:e,selectionRange:s.hasSelectionCapabilities(e)?s.getSelection(e):null}},restoreSelection:function(e){var t=u(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(s.hasSelectionCapabilities(n)&&s.setSelection(n,o),i(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var a=e.createTextRange();a.collapse(!0),a.moveStart("character",n),a.moveEnd("character",r-n),a.select()}else o.setOffsets(e,t)}};t.exports=s},{130:130,135:135,136:136,44:44}],59:[function(e,t,n){"use strict";function r(e){return f+e.toString(36)}function o(e,t){return e.charAt(t)===f||t===e.length}function a(e){return""===e||e.charAt(0)===f&&e.charAt(e.length-1)!==f}function i(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function u(e){return e?e.substr(0,e.lastIndexOf(f)):""}function s(e,t){if(a(e)&&a(t)?void 0:d(!1),i(e,t)?void 0:d(!1),e===t)return e;var n,r=e.length+h;for(n=r;n<t.length&&!o(t,n);n++);return t.substr(0,n)}function l(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var r=0,i=0;n>=i;i++)if(o(e,i)&&o(t,i))r=i;else if(e.charAt(i)!==t.charAt(i))break;var u=e.substr(0,r);return a(u)?void 0:d(!1),u}function c(e,t,n,r,o,a){e=e||"",t=t||"",e===t?d(!1):void 0;var l=i(t,e);l||i(e,t)?void 0:d(!1);for(var c=0,p=l?u:s,f=e;;f=p(f,t)){var h;if(o&&f===e||a&&f===t||(h=n(f,l,r)),h===!1||f===t)break;c++<v?void 0:d(!1)}}var p=e(76),d=e(141),f=".",h=f.length,v=1e4,m={createReactRootID:function(){return r(p.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===f&&e.length>1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var a=l(e,t);a!==e&&c(e,a,n,r,!1,!0),a!==t&&c(a,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:l,_getNextDescendantID:s,isAncestorIDOf:i,SEPARATOR:f};t.exports=m},{141:141,76:76}],60:[function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=r},{}],61:[function(e,t,n){"use strict";var r=e(28),o=e(30),a=e(29),i=e(38),u=e(50),s=(e(51),e(72)),l=e(82),c=e(23),p=e(118),d=u.createElement,f=u.createFactory,h=u.cloneElement,v={Children:{map:r.map,forEach:r.forEach,count:r.count,toArray:r.toArray,only:p},Component:o,createElement:d,cloneElement:h,isValidElement:u.isValidElement,PropTypes:s,createClass:a.createClass,createFactory:f,createMixin:function(e){return e},DOM:i,version:l,__spread:c};t.exports=v},{118:118,23:23,28:28,29:29,30:30,38:38,50:50,51:51,72:72,82:82}],62:[function(e,t,n){"use strict";var r=e(101),o=/\/?>/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=a},{101:101}],63:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===W?e.documentElement:e.firstChild:null}function a(e){var t=o(e);return t&&Q.getID(t)}function i(e){var t=u(e);if(t)if(V.hasOwnProperty(t)){var n=V[t];n!==e&&(p(n,t)?L(!1):void 0,V[t]=e)}else V[t]=e;return t}function u(e){return e&&e.getAttribute&&e.getAttribute(B)||""}function s(e,t){var n=u(e);n!==t&&delete V[n],e.setAttribute(B,t),V[t]=e}function l(e){return V.hasOwnProperty(e)&&p(V[e],e)||(V[e]=Q.findReactNodeByID(e)),V[e]}function c(e){var t=N.get(e)._rootNodeID;return D.isNullComponentID(t)?null:(V.hasOwnProperty(t)&&p(V[t],t)||(V[t]=Q.findReactNodeByID(t)),V[t])}function p(e,t){if(e){u(e)!==t?L(!1):void 0;var n=Q.findReactContainerForID(t);if(n&&O(n,e))return!0}return!1}function d(e){delete V[e]}function f(e){var t=V[e];return t&&p(t,e)?void(G=t):!1}function h(e){G=null,M.traverseAncestors(e,f);var t=G;return G=null,t}function v(e,t,n,r,o,a){E.useCreateElement&&(a=T({},a),n.nodeType===W?a[H]=n:a[H]=n.ownerDocument);var i=R.mountComponent(e,t,r,a);e._renderedComponent._topLevelWrapper=e,Q._mountImageIntoNode(i,n,o,r)}function m(e,t,n,r,o){var a=S.ReactReconcileTransaction.getPooled(r);a.perform(v,null,e,t,n,a,r,o),S.ReactReconcileTransaction.release(a)}function g(e,t){for(R.unmountComponent(e),t.nodeType===W&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=a(e);return t?t!==M.getReactRootIDFromNodeID(t):!1}function C(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=u(e);if(t){var n,r=M.getReactRootIDFromNodeID(t),o=e;do if(n=u(o),o=o.parentNode,null==o)return null;while(n!==r);if(o===Y[r])return e}}return null}var b=e(10),_=e(26),E=(e(34),e(39)),x=e(50),D=e(53),M=e(59),N=e(60),P=e(62),w=e(69),R=e(74),I=e(80),S=e(81),T=e(23),k=e(134),O=e(130),A=e(115),L=e(141),U=e(121),F=e(123),B=(e(125),e(150),b.ID_ATTRIBUTE_NAME),V={},j=1,W=9,K=11,H="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),q={},Y={},z=[],G=null,X=function(){};X.prototype.isReactComponent={},X.prototype.render=function(){return this.props};var Q={TopLevelWrapper:X,_instancesByReactRootID:q,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return Q.scrollMonitor(n,function(){I.enqueueElementInternal(e,t),r&&I.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){!t||t.nodeType!==j&&t.nodeType!==W&&t.nodeType!==K?L(!1):void 0,_.ensureScrollValueMonitoring();var n=Q.registerContainer(t);return q[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var o=A(e,null),a=Q._registerComponent(o,t);return S.batchedUpdates(m,o,a,t,n,r),o},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?L(!1):void 0,Q._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){x.isValidElement(t)?void 0:L(!1);var i=new x(X,null,null,null,null,null,t),s=q[a(n)];if(s){var l=s._currentElement,c=l.props;if(F(c,t))return Q._updateRootComponent(s,i,n,r)._renderedComponent.getPublicInstance();Q.unmountComponentAtNode(n)}var p=o(n),d=p&&!!u(p),f=y(n),h=d&&!s&&!f,v=Q._renderNewRootComponent(i,n,h,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):k)._renderedComponent.getPublicInstance();return r&&r.call(v),v},render:function(e,t,n){return Q._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=a(e);return t&&(t=M.getReactRootIDFromNodeID(t)),t||(t=M.createReactRootID()),Y[t]=e,t},unmountComponentAtNode:function(e){!e||e.nodeType!==j&&e.nodeType!==W&&e.nodeType!==K?L(!1):void 0;var t=a(e),n=q[t];if(!n){var r=(y(e),u(e));return r&&r===M.getReactRootIDFromNodeID(r),!1}return S.batchedUpdates(g,n,e),delete q[t],delete Y[t],!0},findReactContainerForID:function(e){var t=M.getReactRootIDFromNodeID(e),n=Y[t];return n},findReactNodeByID:function(e){var t=Q.findReactContainerForID(e);return Q.findComponentRoot(t,e)},getFirstReactDOM:function(e){return C(e)},findComponentRoot:function(e,t){var n=z,r=0,o=h(t)||e;for(n[0]=o.firstChild,n.length=1;r<n.length;){for(var a,i=n[r++];i;){var u=Q.getID(i);u?t===u?a=i:M.isAncestorIDOf(u,t)&&(n.length=r=0,n.push(i.firstChild)):n.push(i.firstChild),i=i.nextSibling}if(a)return n.length=0,a}n.length=0,L(!1)},_mountImageIntoNode:function(e,t,n,a){if(!t||t.nodeType!==j&&t.nodeType!==W&&t.nodeType!==K?L(!1):void 0,n){var i=o(t);if(P.canReuseMarkup(e,i))return;var u=i.getAttribute(P.CHECKSUM_ATTR_NAME);i.removeAttribute(P.CHECKSUM_ATTR_NAME);var s=i.outerHTML;i.setAttribute(P.CHECKSUM_ATTR_NAME,u);var l=e,c=r(l,s);" (client) "+l.substring(c-20,c+20)+"\n (server) "+s.substring(c-20,c+20),t.nodeType===W?L(!1):void 0}if(t.nodeType===W?L(!1):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);t.appendChild(e)}else U(t,e)},ownerDocumentContextKey:H,getReactRootID:a,getID:i,setID:s,getNode:l,getNodeFromInstance:c,isValid:p,purgeID:d};w.measureMethods(Q,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),t.exports=Q},{10:10,115:115,121:121,123:123,125:125,130:130,134:134,141:141,150:150,23:23,26:26,34:34,39:39,50:50,53:53,59:59,60:60,62:62,69:69,74:74,80:80,81:81}],64:[function(e,t,n){"use strict";function r(e,t,n){m.push({parentID:e,parentNode:null,type:p.INSERT_MARKUP,markupIndex:g.push(t)-1,content:null,fromIndex:null,toIndex:n})}function o(e,t,n){m.push({parentID:e,parentNode:null,type:p.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:t,toIndex:n})}function a(e,t){m.push({parentID:e,parentNode:null,type:p.REMOVE_NODE,markupIndex:null,content:null,fromIndex:t,toIndex:null})}function i(e,t){m.push({parentID:e,parentNode:null,type:p.SET_MARKUP,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function u(e,t){m.push({parentID:e,parentNode:null,type:p.TEXT_CONTENT,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function s(){m.length&&(c.processChildrenUpdates(m,g),l())}function l(){m.length=0,g.length=0}var c=e(32),p=e(65),d=(e(34),e(74)),f=e(27),h=e(106),v=0,m=[],g=[],y={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return f.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r){var o;return o=h(t),f.updateChildren(e,o,n,r)},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],a=0;for(var i in r)if(r.hasOwnProperty(i)){var u=r[i],s=this._rootNodeID+i,l=d.mountComponent(u,s,t,n);u._mountIndex=a++,o.push(l)}return o},updateTextContent:function(e){v++;var t=!0;try{var n=this._renderedChildren;f.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChild(n[r]);this.setTextContent(e),t=!1}finally{v--,v||(t?l():s())}},updateMarkup:function(e){v++;var t=!0;try{var n=this._renderedChildren;f.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setMarkup(e),t=!1}finally{v--,v||(t?l():s())}},updateChildren:function(e,t,n){v++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{v--,v||(r?l():s())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=this._reconcilerUpdateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var a,i=0,u=0;for(a in o)if(o.hasOwnProperty(a)){var s=r&&r[a],l=o[a];s===l?(this.moveChild(s,u,i),i=Math.max(s._mountIndex,i),s._mountIndex=u):(s&&(i=Math.max(s._mountIndex,i),this._unmountChild(s)),this._mountChildByNameAtIndex(l,a,u,t,n)),u++}for(a in r)!r.hasOwnProperty(a)||o&&o.hasOwnProperty(a)||this._unmountChild(r[a])}},unmountChildren:function(){var e=this._renderedChildren;f.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&o(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){r(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){a(this._rootNodeID,e._mountIndex)},setTextContent:function(e){u(this._rootNodeID,e)},setMarkup:function(e){i(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,o){var a=this._rootNodeID+t,i=d.mountComponent(e,a,r,o);e._mountIndex=n,this.createChild(e,i)},_unmountChild:function(e){this.removeChild(e),e._mountIndex=null}}};t.exports=y},{106:106,27:27,32:32,34:34,65:65,74:74}],65:[function(e,t,n){"use strict";var r=e(144),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});t.exports=o},{144:144}],66:[function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=l(t)),n}function o(e){return c?void 0:s(!1),new c(e.type,e.props)}function a(e){return new d(e)}function i(e){return e instanceof d}var u=e(23),s=e(141),l=null,c=null,p={},d=null,f={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){d=e},injectComponentClasses:function(e){u(p,e)}},h={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:a,isTextComponent:i,injection:f};t.exports=h},{141:141,23:23}],67:[function(e,t,n){"use strict";function r(e,t){}var o=(e(150),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}});t.exports=o},{150:150}],68:[function(e,t,n){"use strict";var r=e(141),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){o.isValidOwner(n)?void 0:r(!1),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){o.isValidOwner(n)?void 0:r(!1),n.getPublicInstance().refs[t]===e.getPublicInstance()&&n.detachRef(t)}};t.exports=o},{141:141}],69:[function(e,t,n){"use strict";function r(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};t.exports=o},{}],70:[function(e,t,n){"use strict";var r={};t.exports=r},{}],71:[function(e,t,n){"use strict";var r=e(144),o=r({prop:null,context:null,childContext:null});t.exports=o},{144:144}],72:[function(e,t,n){"use strict";function r(e){function t(t,n,r,o,a,i){if(o=o||E,i=i||r,null==n[r]){var u=C[a];return t?new Error("Required "+u+" `"+i+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,a,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,a){var i=t[n],u=v(i);if(u!==e){var s=C[o],l=m(i);return new Error("Invalid "+s+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function a(){return r(b.thatReturns(null))}function i(e){function t(t,n,r,o,a){var i=t[n];if(!Array.isArray(i)){var u=C[o],s=v(i);return new Error("Invalid "+u+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<i.length;l++){var c=e(i,l,r,o,a+"["+l+"]");if(c instanceof Error)return c}return null}return r(t)}function u(){function e(e,t,n,r,o){if(!y.isValidElement(e[t])){var a=C[r];return new Error("Invalid "+a+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return r(e)}function s(e){function t(t,n,r,o,a){if(!(t[n]instanceof e)){var i=C[o],u=e.name||E,s=g(t[n]);return new Error("Invalid "+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return r(t)}function l(e){function t(t,n,r,o,a){for(var i=t[n],u=0;u<e.length;u++)if(i===e[u])return null;var s=C[o],l=JSON.stringify(e);return new Error("Invalid "+s+" `"+a+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+l+"."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function c(e){function t(t,n,r,o,a){var i=t[n],u=v(i);if("object"!==u){var s=C[o];return new Error("Invalid "+s+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var l in i)if(i.hasOwnProperty(l)){var c=e(i,l,r,o,a+"."+l);if(c instanceof Error)return c}return null}return r(t)}function p(e){function t(t,n,r,o,a){for(var i=0;i<e.length;i++){var u=e[i];if(null==u(t,n,r,o,a))return null}var s=C[o];return new Error("Invalid "+s+" `"+a+"` supplied to "+("`"+r+"`."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function d(){function e(e,t,n,r,o){if(!h(e[t])){var a=C[r];return new Error("Invalid "+a+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e)}function f(e){function t(t,n,r,o,a){var i=t[n],u=v(i);if("object"!==u){var s=C[o];return new Error("Invalid "+s+" `"+a+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var c=e[l];if(c){var p=c(i,l,r,o,a+"."+l);if(p)return p}}return null}return r(t)}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||y.isValidElement(e))return!0;var t=_(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!h(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!h(o[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function m(e){var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){return e.constructor&&e.constructor.name?e.constructor.name:"<<anonymous>>"}var y=e(50),C=e(70),b=e(133),_=e(112),E="<<anonymous>>",x={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:a(),arrayOf:i,element:u(),instanceOf:s,node:d(),objectOf:c,oneOf:l,oneOfType:p,shape:f};t.exports=x},{112:112,133:133,50:50,70:70}],73:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.useCreateElement=!e&&u.useCreateElement}var o=e(6),a=e(24),i=e(26),u=e(39),s=e(58),l=e(98),c=e(23),p={initialize:s.getSelectionInformation,close:s.restoreSelection},d={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,d,f],v={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};c(r.prototype,l.Mixin,v),a.addPoolingTo(r),t.exports=r},{23:23,24:24,26:26,39:39,58:58,6:6,98:98}],74:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e(75),a={mountComponent:function(e,t,n,o){var a=e.mountComponent(t,n,o);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),a},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,a){var i=e._currentElement;if(t!==i||a!==e._context){var u=o.shouldUpdateRefs(i,t);u&&o.detachRefs(e,i),e.receiveComponent(t,n,a),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};t.exports=a},{75:75}],75:[function(e,t,n){"use strict"; +function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):a.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):a.removeComponentAsRefFrom(t,e,n)}var a=e(68),i={};i.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},i.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t._owner!==e._owner||t.ref!==e.ref},i.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},t.exports=i},{68:68}],76:[function(e,t,n){"use strict";var r={injectCreateReactRootIndex:function(e){o.createReactRootIndex=e}},o={createReactRootIndex:null,injection:r};t.exports=o},{}],77:[function(e,t,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(e){}};t.exports=r},{}],78:[function(e,t,n){"use strict";function r(e){i.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=u.createReactRootID();return t=c.getPooled(!1),t.perform(function(){var r=f(e,null),o=r.mountComponent(n,t,d);return s.addChecksumToMarkup(o)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(a)}}function o(e){i.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=u.createReactRootID();return t=c.getPooled(!0),t.perform(function(){var r=f(e,null);return r.mountComponent(n,t,d)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(a)}}var a=e(48),i=e(50),u=e(59),s=e(62),l=e(77),c=e(79),p=e(81),d=e(134),f=e(115),h=e(141);t.exports={renderToString:r,renderToStaticMarkup:o}},{115:115,134:134,141:141,48:48,50:50,59:59,62:62,77:77,79:79,81:81}],79:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=a.getPooled(null),this.useCreateElement=!1}var o=e(24),a=e(6),i=e(98),u=e(23),s=e(133),l={initialize:function(){this.reactMountReady.reset()},close:s},c=[l],p={getTransactionWrappers:function(){return c},getReactMountReady:function(){return this.reactMountReady},destructor:function(){a.release(this.reactMountReady),this.reactMountReady=null}};u(r.prototype,i.Mixin,p),o.addPoolingTo(r),t.exports=r},{133:133,23:23,24:24,6:6,98:98}],80:[function(e,t,n){"use strict";function r(e){u.enqueueUpdate(e)}function o(e,t){var n=i.get(e);return n?n:null}var a=(e(34),e(50)),i=e(60),u=e(81),s=e(23),l=e(141),c=(e(150),{isMounted:function(e){var t=i.get(e);return t?!!t._renderedComponent:!1},enqueueCallback:function(e,t){"function"!=typeof t?l(!1):void 0;var n=o(e);return n?(n._pendingCallbacks?n._pendingCallbacks.push(t):n._pendingCallbacks=[t],void r(n)):null},enqueueCallbackInternal:function(e,t){"function"!=typeof t?l(!1):void 0,e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var a=n._pendingStateQueue||(n._pendingStateQueue=[]);a.push(t),r(n)}},enqueueSetProps:function(e,t){var n=o(e,"setProps");n&&c.enqueueSetPropsInternal(n,t)},enqueueSetPropsInternal:function(e,t){var n=e._topLevelWrapper;n?void 0:l(!1);var o=n._pendingElement||n._currentElement,i=o.props,u=s({},i.props,t);n._pendingElement=a.cloneAndReplaceProps(o,a.cloneAndReplaceProps(i,u)),r(n)},enqueueReplaceProps:function(e,t){var n=o(e,"replaceProps");n&&c.enqueueReplacePropsInternal(n,t)},enqueueReplacePropsInternal:function(e,t){var n=e._topLevelWrapper;n?void 0:l(!1);var o=n._pendingElement||n._currentElement,i=o.props;n._pendingElement=a.cloneAndReplaceProps(o,a.cloneAndReplaceProps(i,t)),r(n)},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}});t.exports=c},{141:141,150:150,23:23,34:34,50:50,60:60,81:81}],81:[function(e,t,n){"use strict";function r(){N.ReactReconcileTransaction&&b?void 0:m(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=N.ReactReconcileTransaction.getPooled(!1)}function a(e,t,n,o,a,i){r(),b.batchedUpdates(e,t,n,o,a,i)}function i(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;t!==g.length?m(!1):void 0,g.sort(i);for(var n=0;t>n;n++){var r=g[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,f.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var a=0;a<o.length;a++)e.callbackQueue.enqueue(o[a],r.getPublicInstance())}}function s(e){return r(),b.isBatchingUpdates?void g.push(e):void b.batchedUpdates(s,e)}function l(e,t){b.isBatchingUpdates?void 0:m(!1),y.enqueue(e,t),C=!0}var c=e(6),p=e(24),d=e(69),f=e(74),h=e(98),v=e(23),m=e(141),g=[],y=c.getPooled(),C=!1,b=null,_={initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),D()):g.length=0}},E={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[_,E];v(o.prototype,h.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,c.release(this.callbackQueue),this.callbackQueue=null,N.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return h.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),p.addPoolingTo(o);var D=function(){for(;g.length||C;){if(g.length){var e=o.getPooled();e.perform(u,null,e),o.release(e)}if(C){C=!1;var t=y;y=c.getPooled(),t.notifyAll(),c.release(t)}}};D=d.measure("ReactUpdates","flushBatchedUpdates",D);var M={injectReconcileTransaction:function(e){e?void 0:m(!1),N.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:m(!1),"function"!=typeof e.batchedUpdates?m(!1):void 0,"boolean"!=typeof e.isBatchingUpdates?m(!1):void 0,b=e}},N={ReactReconcileTransaction:null,batchedUpdates:a,enqueueUpdate:s,flushBatchedUpdates:D,injection:M,asap:l};t.exports=N},{141:141,23:23,24:24,6:6,69:69,74:74,98:98}],82:[function(e,t,n){"use strict";t.exports="0.14.0"},{}],83:[function(e,t,n){"use strict";var r=e(10),o=r.injection.MUST_USE_ATTRIBUTE,a={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},i={Properties:{clipPath:o,cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,xlinkActuate:o,xlinkArcrole:o,xlinkHref:o,xlinkRole:o,xlinkShow:o,xlinkTitle:o,xlinkType:o,xmlBase:o,xmlLang:o,xmlSpace:o,y1:o,y2:o,y:o},DOMAttributeNamespaces:{xlinkActuate:a.xlink,xlinkArcrole:a.xlink,xlinkHref:a.xlink,xlinkRole:a.xlink,xlinkShow:a.xlink,xlinkTitle:a.xlink,xlinkType:a.xlink,xmlBase:a.xml,xmlLang:a.xml,xmlSpace:a.xml},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}};t.exports=i},{10:10}],84:[function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&s.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(b||null==g||g!==c())return null;var n=r(g);if(!C||!f(C,n)){C=n;var o=l.getPooled(m.select,y,e,t);return o.type="select",o.target=g,i.accumulateTwoPhaseDispatches(o),o}return null}var a=e(15),i=e(19),u=e(127),s=e(58),l=e(90),c=e(136),p=e(117),d=e(145),f=e(148),h=a.topLevelTypes,v=u.canUseDOM&&"documentMode"in document&&document.documentMode<=11,m={select:{phasedRegistrationNames:{bubbled:d({onSelect:null}),captured:d({onSelectCapture:null})},dependencies:[h.topBlur,h.topContextMenu,h.topFocus,h.topKeyDown,h.topMouseDown,h.topMouseUp,h.topSelectionChange]}},g=null,y=null,C=null,b=!1,_=!1,E=d({onSelect:null}),x={eventTypes:m,extractEvents:function(e,t,n,r,a){if(!_)return null;switch(e){case h.topFocus:(p(t)||"true"===t.contentEditable)&&(g=t,y=n,C=null);break;case h.topBlur:g=null,y=null,C=null;break;case h.topMouseDown:b=!0;break;case h.topContextMenu:case h.topMouseUp:return b=!1,o(r,a);case h.topSelectionChange:if(v)break;case h.topKeyDown:case h.topKeyUp:return o(r,a)}return null},didPutListener:function(e,t,n){t===E&&(_=!0)}};t.exports=x},{117:117,127:127,136:136,145:145,148:148,15:15,19:19,58:58,90:90}],85:[function(e,t,n){"use strict";var r=Math.pow(2,53),o={createReactRootIndex:function(){return Math.ceil(Math.random()*r)}};t.exports=o},{}],86:[function(e,t,n){"use strict";var r=e(15),o=e(126),a=e(19),i=e(63),u=e(87),s=e(90),l=e(91),c=e(93),p=e(94),d=e(89),f=e(95),h=e(96),v=e(97),m=e(133),g=e(108),y=e(141),C=e(145),b=r.topLevelTypes,_={abort:{phasedRegistrationNames:{bubbled:C({onAbort:!0}),captured:C({onAbortCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:C({onBlur:!0}),captured:C({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:C({onCanPlay:!0}),captured:C({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:C({onCanPlayThrough:!0}),captured:C({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:C({onClick:!0}),captured:C({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:C({onContextMenu:!0}),captured:C({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:C({onCopy:!0}),captured:C({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:C({onCut:!0}),captured:C({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:C({onDoubleClick:!0}),captured:C({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:C({onDrag:!0}),captured:C({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:C({onDragEnd:!0}),captured:C({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:C({onDragEnter:!0}),captured:C({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:C({onDragExit:!0}),captured:C({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:C({onDragLeave:!0}),captured:C({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:C({onDragOver:!0}),captured:C({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:C({onDragStart:!0}),captured:C({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:C({onDrop:!0}),captured:C({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:C({onDurationChange:!0}),captured:C({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:C({onEmptied:!0}),captured:C({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:C({onEncrypted:!0}),captured:C({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:C({onEnded:!0}),captured:C({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:C({onError:!0}),captured:C({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:C({onFocus:!0}),captured:C({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:C({onInput:!0}),captured:C({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:C({onKeyDown:!0}),captured:C({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:C({onKeyPress:!0}),captured:C({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:C({onKeyUp:!0}),captured:C({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:C({onLoad:!0}),captured:C({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:C({onLoadedData:!0}),captured:C({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:C({onLoadedMetadata:!0}),captured:C({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:C({onLoadStart:!0}),captured:C({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:C({onMouseDown:!0}),captured:C({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:C({onMouseMove:!0}),captured:C({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:C({onMouseOut:!0}),captured:C({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:C({onMouseOver:!0}),captured:C({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:C({onMouseUp:!0}),captured:C({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:C({onPaste:!0}),captured:C({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:C({onPause:!0}),captured:C({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:C({onPlay:!0}),captured:C({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:C({onPlaying:!0}),captured:C({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:C({onProgress:!0}),captured:C({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:C({onRateChange:!0}),captured:C({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:C({onReset:!0}),captured:C({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:C({onScroll:!0}),captured:C({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:C({onSeeked:!0}),captured:C({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:C({onSeeking:!0}),captured:C({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:C({onStalled:!0}),captured:C({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:C({onSubmit:!0}),captured:C({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:C({onSuspend:!0}),captured:C({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:C({onTimeUpdate:!0}),captured:C({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:C({onTouchCancel:!0}),captured:C({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:C({onTouchEnd:!0}),captured:C({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:C({onTouchMove:!0}),captured:C({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:C({onTouchStart:!0}),captured:C({onTouchStartCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:C({onVolumeChange:!0}),captured:C({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:C({onWaiting:!0}),captured:C({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:C({onWheel:!0}),captured:C({onWheelCapture:!0})}}},E={topAbort:_.abort,topBlur:_.blur,topCanPlay:_.canPlay,topCanPlayThrough:_.canPlayThrough,topClick:_.click,topContextMenu:_.contextMenu,topCopy:_.copy,topCut:_.cut,topDoubleClick:_.doubleClick,topDrag:_.drag,topDragEnd:_.dragEnd,topDragEnter:_.dragEnter,topDragExit:_.dragExit,topDragLeave:_.dragLeave,topDragOver:_.dragOver,topDragStart:_.dragStart,topDrop:_.drop,topDurationChange:_.durationChange,topEmptied:_.emptied,topEncrypted:_.encrypted,topEnded:_.ended,topError:_.error,topFocus:_.focus,topInput:_.input,topKeyDown:_.keyDown,topKeyPress:_.keyPress,topKeyUp:_.keyUp,topLoad:_.load,topLoadedData:_.loadedData,topLoadedMetadata:_.loadedMetadata,topLoadStart:_.loadStart,topMouseDown:_.mouseDown,topMouseMove:_.mouseMove,topMouseOut:_.mouseOut,topMouseOver:_.mouseOver,topMouseUp:_.mouseUp,topPaste:_.paste,topPause:_.pause,topPlay:_.play,topPlaying:_.playing,topProgress:_.progress,topRateChange:_.rateChange,topReset:_.reset,topScroll:_.scroll,topSeeked:_.seeked,topSeeking:_.seeking,topStalled:_.stalled,topSubmit:_.submit,topSuspend:_.suspend,topTimeUpdate:_.timeUpdate,topTouchCancel:_.touchCancel,topTouchEnd:_.touchEnd,topTouchMove:_.touchMove,topTouchStart:_.touchStart,topVolumeChange:_.volumeChange,topWaiting:_.waiting,topWheel:_.wheel};for(var x in E)E[x].dependencies=[x];var D=C({onClick:null}),M={},N={eventTypes:_,extractEvents:function(e,t,n,r,o){var i=E[e];if(!i)return null;var m;switch(e){case b.topAbort:case b.topCanPlay:case b.topCanPlayThrough:case b.topDurationChange:case b.topEmptied:case b.topEncrypted:case b.topEnded:case b.topError:case b.topInput:case b.topLoad:case b.topLoadedData:case b.topLoadedMetadata:case b.topLoadStart:case b.topPause:case b.topPlay:case b.topPlaying:case b.topProgress:case b.topRateChange:case b.topReset:case b.topSeeked:case b.topSeeking:case b.topStalled:case b.topSubmit:case b.topSuspend:case b.topTimeUpdate:case b.topVolumeChange:case b.topWaiting:m=s;break;case b.topKeyPress:if(0===g(r))return null;case b.topKeyDown:case b.topKeyUp:m=c;break;case b.topBlur:case b.topFocus:m=l;break;case b.topClick:if(2===r.button)return null;case b.topContextMenu:case b.topDoubleClick:case b.topMouseDown:case b.topMouseMove:case b.topMouseOut:case b.topMouseOver:case b.topMouseUp:m=p;break;case b.topDrag:case b.topDragEnd:case b.topDragEnter:case b.topDragExit:case b.topDragLeave:case b.topDragOver:case b.topDragStart:case b.topDrop:m=d;break;case b.topTouchCancel:case b.topTouchEnd:case b.topTouchMove:case b.topTouchStart:m=f;break;case b.topScroll:m=h;break;case b.topWheel:m=v;break;case b.topCopy:case b.topCut:case b.topPaste:m=u}m?void 0:y(!1);var C=m.getPooled(i,n,r,o);return a.accumulateTwoPhaseDispatches(C),C},didPutListener:function(e,t,n){if(t===D){var r=i.getNode(e);M[e]||(M[e]=o.listen(r,"click",m))}},willDeleteListener:function(e,t){t===D&&(M[e].remove(),delete M[e])}};t.exports=N},{108:108,126:126,133:133,141:141,145:145,15:15,19:19,63:63,87:87,89:89,90:90,91:91,93:93,94:94,95:95,96:96,97:97}],87:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(90),a={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,a),t.exports=r},{90:90}],88:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(90),a={data:null};o.augmentClass(r,a),t.exports=r},{90:90}],89:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(94),a={dataTransfer:null};o.augmentClass(r,a),t.exports=r},{94:94}],90:[function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n,this.target=r,this.currentTarget=r;var o=this.constructor.Interface;for(var a in o)if(o.hasOwnProperty(a)){var u=o[a];u?this[a]=u(n):this[a]=n[a]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;s?this.isDefaultPrevented=i.thatReturnsTrue:this.isDefaultPrevented=i.thatReturnsFalse,this.isPropagationStopped=i.thatReturnsFalse}var o=e(24),a=e(23),i=e(133),u=(e(150),{type:null,currentTarget:i.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});a(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=i.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=i.thatReturnsTrue)},persist:function(){this.isPersistent=i.thatReturnsTrue},isPersistent:i.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);a(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=a({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.fourArgumentPooler)},o.addPoolingTo(r,o.fourArgumentPooler),t.exports=r},{133:133,150:150,23:23,24:24}],91:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a={relatedTarget:null};o.augmentClass(r,a),t.exports=r},{96:96}],92:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(90),a={data:null};o.augmentClass(r,a),t.exports=r},{90:90}],93:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a=e(108),i=e(109),u=e(110),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:u,charCode:function(e){return"keypress"===e.type?a(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?a(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,s),t.exports=r},{108:108,109:109,110:110,96:96}],94:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a=e(99),i=e(110),u={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:i,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+a.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+a.currentScrollTop}};o.augmentClass(r,u),t.exports=r},{110:110,96:96,99:99}],95:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a=e(110),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:a};o.augmentClass(r,i),t.exports=r},{110:110,96:96}],96:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(90),a=e(111),i={view:function(e){if(e.view)return e.view;var t=a(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,i),t.exports=r},{111:111,90:90}],97:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(94),a={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,a),t.exports=r},{94:94}],98:[function(e,t,n){"use strict";var r=e(141),o={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(e,t,n,o,a,i,u,s){this.isInTransaction()?r(!1):void 0;var l,c;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,n,o,a,i,u,s),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=a.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===a.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){this.isInTransaction()?void 0:r(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,i=t[n],u=this.wrapperInitData[n];try{o=!0,u!==a.OBSERVED_ERROR&&i.close&&i.close.call(this,u),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(s){}}}this.wrapperInitData.length=0}},a={Mixin:o,OBSERVED_ERROR:{}};t.exports=a},{141:141}],99:[function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};t.exports=r},{}],100:[function(e,t,n){"use strict";function r(e,t){if(null==t?o(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=e(141);t.exports=r},{141:141}],101:[function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0,a=e.length,i=-4&a;i>r;){for(;r<Math.min(r+4096,i);r+=4)n+=(t+=e.charCodeAt(r))+(t+=e.charCodeAt(r+1))+(t+=e.charCodeAt(r+2))+(t+=e.charCodeAt(r+3));t%=o,n%=o}for(;a>r;r++)n+=t+=e.charCodeAt(r);return t%=o,n%=o,t|n<<16}var o=65521;t.exports=r},{}],102:[function(e,t,n){"use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||a.hasOwnProperty(e)&&a[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=e(4),a=o.isUnitlessNumber;t.exports=r},{4:4}],103:[function(e,t,n){"use strict";function r(e,t,n,r,o){return o}e(23),e(150);t.exports=r},{150:150,23:23}],104:[function(e,t,n){"use strict";function r(e){return a[e]}function o(e){return(""+e).replace(i,r)}var a={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;t.exports=o},{}],105:[function(e,t,n){"use strict";function r(e){return null==e?null:1===e.nodeType?e:o.has(e)?a.getNodeFromInstance(e):(null!=e.render&&"function"==typeof e.render?i(!1):void 0,void i(!1))}var o=(e(34),e(60)),a=e(63),i=e(141);e(150);t.exports=r},{141:141,150:150,34:34,60:60,63:63}],106:[function(e,t,n){"use strict";function r(e,t,n){var r=e,o=void 0===r[n];o&&null!=t&&(r[n]=t)}function o(e){if(null==e)return e;var t={};return a(e,r,t),t}var a=e(124);e(150);t.exports=o},{124:124,150:150}],107:[function(e,t,n){"use strict";var r=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=r},{}],108:[function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],109:[function(e,t,n){"use strict";function r(e){if(e.key){var t=a[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var o=e(108),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{108:108}],110:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=a[e];return r?!!n[r]:!1}function o(e){return r}var a={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],111:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=r},{}],112:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[a]);return"function"==typeof t?t:void 0}var o="function"==typeof Symbol&&Symbol.iterator,a="@@iterator";t.exports=r},{}],113:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function a(e,t){for(var n=r(e),a=0,i=0;n;){if(3===n.nodeType){if(i=a+n.textContent.length,t>=a&&i>=t)return{node:n,offset:t-a};a=i}n=r(o(n))}}t.exports=a},{}],114:[function(e,t,n){"use strict";function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=e(127),a=null;t.exports=r},{127:127}],115:[function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function o(e){var t;if(null===e||e===!1)t=new i(o);else if("object"==typeof e){var n=e;!n||"function"!=typeof n.type&&"string"!=typeof n.type?l(!1):void 0,t="string"==typeof n.type?u.createInternalComponent(n):r(n.type)?new n.type(n):new c}else"string"==typeof e||"number"==typeof e?t=u.createInstanceForText(e):l(!1);return t.construct(e),t._mountIndex=0,t._mountImage=null,t}var a=e(33),i=e(52),u=e(66),s=e(23),l=e(141),c=(e(150),function(){});s(c.prototype,a.Mixin,{_instantiateReactComponent:o}),t.exports=o},{141:141,150:150,23:23,33:33,52:52,66:66}],116:[function(e,t,n){"use strict";function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,a=e(127);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{127:127}],117:[function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&o[e.type]||"textarea"===t)}var o={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=r},{}],118:[function(e,t,n){"use strict";function r(e){return o.isValidElement(e)?void 0:a(!1),e}var o=e(50),a=e(141);t.exports=r},{141:141,50:50}],119:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e(104);t.exports=r},{104:104}],120:[function(e,t,n){"use strict";var r=e(63);t.exports=r.renderSubtreeIntoContainer},{63:63}],121:[function(e,t,n){"use strict";var r=e(127),o=/^[ \r\n\t\f]/,a=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,i=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(i=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var u=document.createElement("div");u.innerHTML=" ",""===u.innerHTML&&(i=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&a.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=i},{127:127}],122:[function(e,t,n){"use strict";var r=e(127),o=e(104),a=e(121),i=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){a(e,o(t))})),t.exports=i},{104:104,121:121,127:127}],123:[function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,a=typeof t;return"string"===o||"number"===o?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}t.exports=r},{}],124:[function(e,t,n){"use strict";function r(e){return v[e]}function o(e,t){return e&&null!=e.key?i(e.key):t.toString(36)}function a(e){return(""+e).replace(m,r)}function i(e){return"$"+a(e)}function u(e,t,n,r){var a=typeof e;if(("undefined"===a||"boolean"===a)&&(e=null),null===e||"string"===a||"number"===a||l.isValidElement(e))return n(r,e,""===t?f+o(e,0):t),1;var s,c,v=0,m=""===t?f:t+h;if(Array.isArray(e))for(var g=0;g<e.length;g++)s=e[g],c=m+o(s,g),v+=u(s,c,n,r);else{var y=p(e);if(y){var C,b=y.call(e);if(y!==e.entries)for(var _=0;!(C=b.next()).done;)s=C.value,c=m+o(s,_++),v+=u(s,c,n,r);else for(;!(C=b.next()).done;){ +var E=C.value;E&&(s=E[1],c=m+i(E[0])+h+o(s,0),v+=u(s,c,n,r))}}else"object"===a&&(String(e),d(!1))}return v}function s(e,t,n){return null==e?0:u(e,"",t,n)}var l=(e(34),e(50)),c=e(59),p=e(112),d=e(141),f=(e(150),c.SEPARATOR),h=":",v={"=":"=0",".":"=1",":":"=2"},m=/[=.:]/g;t.exports=s},{112:112,141:141,150:150,34:34,50:50,59:59}],125:[function(e,t,n){"use strict";var r=(e(23),e(133)),o=(e(150),r);t.exports=o},{133:133,150:150,23:23}],126:[function(e,t,n){"use strict";var r=e(133),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},{133:133}],127:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],128:[function(e,t,n){"use strict";function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;t.exports=r},{}],129:[function(e,t,n){"use strict";function r(e){return o(e.replace(a,"ms-"))}var o=e(128),a=/^-ms-/;t.exports=r},{128:128}],130:[function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,a=t;if(n=!1,r&&a){if(r===a)return!0;if(o(r))return!1;if(o(a)){e=r,t=a.parentNode,n=!0;continue e}return r.contains?r.contains(a):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(a)):!1}return!1}}var o=e(143);t.exports=r},{143:143}],131:[function(e,t,n){"use strict";function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function o(e){return r(e)?Array.isArray(e)?e.slice():a(e):[e]}var a=e(149);t.exports=o},{149:149}],132:[function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=l;l?void 0:s(!1);var o=r(e),a=o&&u(o);if(a){n.innerHTML=a[1]+e+a[2];for(var c=a[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:s(!1),i(p).forEach(t));for(var d=i(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var a=e(127),i=e(131),u=e(137),s=e(141),l=a.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},{127:127,131:131,137:137,141:141}],133:[function(e,t,n){"use strict";function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],134:[function(e,t,n){"use strict";var r={};t.exports=r},{}],135:[function(e,t,n){"use strict";function r(e){try{e.focus()}catch(t){}}t.exports=r},{}],136:[function(e,t,n){"use strict";function r(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=r},{}],137:[function(e,t,n){"use strict";function r(e){return i?void 0:a(!1),d.hasOwnProperty(e)||(e="*"),u.hasOwnProperty(e)||("*"===e?i.innerHTML="<link />":i.innerHTML="<"+e+"></"+e+">",u[e]=!i.firstChild),u[e]?d[e]:null}var o=e(127),a=e(141),i=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'<select multiple="true">',"</select>"],l=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,u[e]=!0}),t.exports=r},{127:127,141:141}],138:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],139:[function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],140:[function(e,t,n){"use strict";function r(e){return o(e).replace(a,"-ms-")}var o=e(139),a=/^ms-/;t.exports=r},{139:139}],141:[function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var s;if(void 0===t)s=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,o,a,i,u],c=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return l[c++]}))}throw s.framesToPop=1,s}};t.exports=r},{}],142:[function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],143:[function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=e(142);t.exports=r},{142:142}],144:[function(e,t,n){"use strict";var r=e(141),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{141:141}],145:[function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],146:[function(e,t,n){"use strict";function r(e,t,n){if(!e)return null;var r={};for(var a in e)o.call(e,a)&&(r[a]=t.call(n,e[a],a,e));return r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],147:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],148:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=o.bind(t),i=0;i<n.length;i++)if(!a(n[i])||e[n[i]]!==t[n[i]])return!1;return!0}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],149:[function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?o(!1):void 0,"number"!=typeof t?o(!1):void 0,0===t||t-1 in e?void 0:o(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),a=0;t>a;a++)r[a]=e[a];return r}var o=e(141);t.exports=r},{141:141}],150:[function(e,t,n){"use strict";var r=e(133),o=r;t.exports=o},{133:133}]},{},[1])(1)});
\ No newline at end of file diff --git a/web/static/js/react-bootstrap-0.25.1.min.js b/web/static/js/react-bootstrap-0.25.1.min.js deleted file mode 100644 index 7c8c52a79..000000000 --- a/web/static/js/react-bootstrap-0.25.1.min.js +++ /dev/null @@ -1,13 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactBootstrap=t(require("react")):e.ReactBootstrap=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t,n,r){return e}var o=(n(17)["default"],n(149)["default"],n(2)["default"]),s=n(72)["default"];t.__esModule=!0;var a=n(12),i=(o(a),n(23)),l=o(i),u=n(36),p=o(u),d=n(11),f=o(d),c=n(9),h=o(c),m=n(8),v=o(m),y=n(103),g=o(y);t.Accordion=g["default"];var b=n(104),T=o(b);t.Affix=T["default"];var P=n(49),x=o(P);t.AffixMixin=x["default"];var E=n(105),C=o(E);t.Alert=C["default"];var _=n(106),N=o(_);t.Badge=N["default"];var O=n(5),w=o(O);t.BootstrapMixin=w["default"];var S=n(25),k=o(S);t.Button=k["default"];var M=n(50),D=o(M);t.ButtonGroup=D["default"];var A=n(51),I=o(A);t.ButtonInput=I["default"];var R=n(107),L=o(R);t.ButtonToolbar=L["default"];var j=n(108),K=o(j);t.Carousel=K["default"];var B=n(109),F=o(B);t.CarouselItem=F["default"];var W=n(52),H=o(W);t.Col=H["default"];var U=n(110),V=o(U);t.CollapsibleMixin=V["default"];var q=n(111),z=o(q);t.CollapsibleNav=z["default"];var G=n(27),Y=o(G);t.Dropdown=Y["default"];var $=n(112),X=o($);t.DropdownButton=X["default"];var Z=n(63),J=o(Z);t.NavDropdown=J["default"];var Q=n(136),ee=o(Q);t.SplitButton=ee["default"];var te=n(114),ne=o(te);t.FadeMixin=ne["default"];var re=n(33),oe=o(re);t.Glyphicon=oe["default"];var se=n(56),ae=o(se);t.Grid=ae["default"];var ie=n(116),le=o(ie);t.Input=le["default"];var ue=n(57),pe=o(ue);t.Interpolate=pe["default"];var de=n(117),fe=o(de);t.Jumbotron=fe["default"];var ce=n(118),he=o(ce);t.Label=he["default"];var me=n(119),ve=o(me);t.ListGroup=ve["default"];var ye=n(120),ge=o(ye);t.ListGroupItem=ge["default"];var be=n(121),Te=o(be);t.MenuItem=Te["default"];var Pe=n(122),xe=o(Pe);t.Modal=xe["default"];var Ee=n(60),Ce=o(Ee);t.ModalHeader=Ce["default"];var _e=n(61),Ne=o(_e);t.ModalTitle=Ne["default"];var Oe=n(58),we=o(Oe);t.ModalBody=we["default"];var Se=n(59),ke=o(Se);t.ModalFooter=ke["default"];var Me=n(62),De=o(Me);t.Nav=De["default"];var Ae=n(124),Ie=o(Ae);t.Navbar=Ie["default"];var Re=n(64),Le=o(Re);t.NavItem=Le["default"];var je=n(65),Ke=o(je);t.Overlay=Ke["default"];var Be=n(125),Fe=o(Be);t.OverlayTrigger=Fe["default"];var We=n(126),He=o(We);t.PageHeader=He["default"];var Ue=n(127),Ve=o(Ue);t.PageItem=Ve["default"];var qe=n(128),ze=o(qe);t.Pager=ze["default"];var Ge=n(129),Ye=o(Ge);t.Pagination=Ye["default"];var $e=n(131),Xe=o($e);t.Panel=Xe["default"];var Ze=n(66),Je=o(Ze);t.PanelGroup=Je["default"];var Qe=n(132),et=o(Qe);t.Popover=et["default"];var tt=n(135),nt=o(tt);t.ProgressBar=nt["default"];var rt=n(67),ot=o(rt);t.Row=ot["default"];var st=n(14),at=o(st);t.SafeAnchor=at["default"];var it=o(Q);t.SplitButton=it["default"];var lt=n(28),ut=o(lt);t.styleMaps=ut["default"];var pt=n(138),dt=o(pt);t.SubNav=dt["default"];var ft=n(68),ct=o(ft);t.Tab=ct["default"];var ht=n(139),mt=o(ht);t.TabbedArea=mt["default"];var vt=n(140),yt=o(vt);t.Table=yt["default"];var gt=n(69),bt=o(gt);t.TabPane=bt["default"];var Tt=n(70),Pt=o(Tt);t.Tabs=Pt["default"];var xt=n(141),Et=o(xt);t.Thumbnail=Et["default"];var Ct=n(142),_t=o(Ct);t.Tooltip=_t["default"];var Nt=n(143),Ot=o(Nt);t.Well=Ot["default"];var wt=n(133),St=o(wt);t.Portal=St["default"];var kt=n(134),Mt=o(kt);t.Position=Mt["default"];var Dt=n(26),At=o(Dt);t.Collapse=At["default"];var It=n(32),Rt=o(It);t.Fade=Rt["default"];var Lt=n(54),jt=s(Lt);t.FormControls=jt;var Kt={childrenValueInputValidation:p["default"],createChainedFunction:f["default"],ValidComponentChildren:h["default"],CustomPropTypes:v["default"],domUtils:r(l["default"],"utils/domUtils","npm install dom-helpers")};t.utils=Kt},function(t,n){t.exports=e},function(e,t){"use strict";t["default"]=function(e){return e&&e.__esModule?e:{"default":e}},t.__esModule=!0},function(e,t,n){"use strict";var r=n(147)["default"];t["default"]=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.__esModule=!0},function(e,t,n){var r;/*! - Copyright (c) 2015 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames - */ -!function(){"use strict";function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e+=" "+n;else if(Array.isArray(n))e+=" "+o.apply(null,n);else if("object"===r)for(var s in n)n.hasOwnProperty(s)&&n[s]&&(e+=" "+s)}}return e.substr(1)}"undefined"!=typeof e&&e.exports?e.exports=o:(r=function(){return o}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}()},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(1),s=r(o),a=n(28),i=r(a),l=n(8),u=r(l),p={propTypes:{bsClass:u["default"].keyOf(i["default"].CLASSES),bsStyle:s["default"].PropTypes.oneOf(i["default"].STYLES),bsSize:u["default"].keyOf(i["default"].SIZES)},getBsClassSet:function(){var e={},t=this.props.bsClass&&i["default"].CLASSES[this.props.bsClass];if(t){e[t]=!0;var n=t+"-",r=this.props.bsSize&&i["default"].SIZES[this.props.bsSize];r&&(e[n+r]=!0),this.props.bsStyle&&(i["default"].STYLES.indexOf(this.props.bsStyle)>=0?e[n+this.props.bsStyle]=!0:e[this.props.bsStyle]=!0)}return e},prefixClass:function(e){return i["default"].CLASSES[this.props.bsClass]+"-"+e}};t["default"]=p,e.exports=t["default"]},function(e,t){"use strict";t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.__esModule=!0},function(e,t,n){"use strict";var r=n(148)["default"],o=n(151)["default"];t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=r(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o?o(e,t):e.__proto__=t)},t.__esModule=!0},function(e,t,n){"use strict";function r(e){function t(t,n,r,o){return o=o||g,null!=n[r]?e(n,r,o):t?new Error("Required prop '"+r+"' was not specified in '"+o+"'."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e,t,n,r){return"Invalid prop '"+t+"' of value '"+e[t]+"'"+(" supplied to '"+n+"'"+r)}function s(){function e(e,t,n){return"object"!=typeof e[t]||"function"!=typeof e[t].render&&1!==e[t].nodeType?new Error(o(e,t,n,", expected a DOM element or an object that has a `render` method")):void 0}return r(e)}function a(e){function t(t,n,r){var s=t[n];if(!e.hasOwnProperty(s)){var a=JSON.stringify(p(e));return new Error(o(t,n,r,", expected one of "+a+"."))}}return r(t)}function i(e){function t(t,n,r){var o=e.map(function(e){return t[e]}).reduce(function(e,t){return e+(void 0!==t?1:0)},0);if(o>1){var s=e[0],a=e.slice(1),i=a.join(", ")+" and "+s;return new Error("Invalid prop '"+n+"', only one of the following may be provided: "+i)}}return t}function l(e){if(void 0===e)throw new Error("No validations provided");if(!(e instanceof Array))throw new Error("Invalid argument must be an array");if(0===e.length)throw new Error("No validations provided");return function(t,n,r){for(var o=0;o<e.length;o++){var s=e[o](t,n,r);if(void 0!==s&&null!==s)return s}}}function u(){function e(e,t,n){var r=o(e,t,n,". Expected an Element `type`");if("function"!=typeof e[t]){if(c["default"].isValidElement(e[t]))return new Error(r+", not an actual Element");if("string"!=typeof e[t])return new Error(r+" such as a tag name or return value of React.createClass(...)")}}return r(e)}var p=n(17)["default"],d=n(2)["default"];t.__esModule=!0;var f=n(1),c=d(f),h=n(48),m=d(h),v=n(144),y=d(v),g="<<anonymous>>",b={deprecated:function(e,t){return function(n,r,o){return null!=n[r]&&m["default"](!1,'"'+r+'" property of "'+o+'" has been deprecated.\n'+t),e(n,r,o)}},isRequiredForA11y:function(e){return function(t,n,r){return null==t[n]?new Error("The prop `"+n+"` is required to make "+r+" accessible for users using assistive technologies such as screen readers `"):e(t,n,r)}},requiredRoles:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r(function(e,n,r){var o=void 0,s=y["default"](e.children),a=function(e,t){return e===t.props.bsRole};return t.every(function(e){return s.some(function(t){return a(e,t)})?!0:(o=e,!1)}),o?new Error("(children) "+r+" - Missing a required child with bsRole: "+o+". "+(r+" must have at least one child of each of the following bsRoles: "+t.join(", "))):void 0})},exclusiveRoles:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r(function(e,n,r){var o=y["default"](e.children),s=void 0;return t.every(function(e){var t=o.filter(function(t){return t.props.bsRole===e});return t.length>1?(s=e,!1):!0}),s?new Error("(children) "+r+" - Duplicate children detected of bsRole: "+s+". Only one child each allowed with the following bsRoles: "+t.join(", ")):void 0})},mountable:s(),elementType:u(),keyOf:a,singlePropFrom:i,all:l};t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){var r=0;return u["default"].Children.map(e,function(e){if(u["default"].isValidElement(e)){var o=r;return r++,t.call(n,e,o)}return e})}function o(e,t,n){var r=0;return u["default"].Children.forEach(e,function(e){u["default"].isValidElement(e)&&(t.call(n,e,r),r++)})}function s(e){var t=0;return u["default"].Children.forEach(e,function(e){u["default"].isValidElement(e)&&t++}),t}function a(e){var t=!1;return u["default"].Children.forEach(e,function(e){!t&&u["default"].isValidElement(e)&&(t=!0)}),t}var i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l);t["default"]={map:r,forEach:o,numberOf:s,hasValidComponent:a},e.exports=t["default"]},function(e,t){"use strict";t["default"]=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},t.__esModule=!0},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return t.filter(function(e){return null!=e}).reduce(function(e,t){if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(){for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}},null)}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){var r=void 0;"object"==typeof e?r=e.message:(r=e+" is deprecated. Use "+t+" instead.",n&&(r+="\nYou can read more about it at "+n)),u[r]||(l["default"](!1,r),u[r]=!0)}var o=n(7)["default"],s=n(6)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(48),l=a(i),u={};r.wrapper=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;t>a;a++)n[a-1]=arguments[a];return function(e){function t(){s(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.componentWillMount=function(){if(r.apply(void 0,n),e.prototype.componentWillMount){for(var t,o=arguments.length,s=Array(o),a=0;o>a;a++)s[a]=arguments[a];(t=e.prototype.componentWillMount).call.apply(t,[this].concat(s))}},t}(e)},t["default"]=r,e.exports=t["default"]},function(e,t,n){function r(e){return o(e)?e:Object(e)}var o=n(16);e.exports=r},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(11),p=a(u),d=function(e){function t(n){o(this,t),e.call(this,n),this.handleClick=this.handleClick.bind(this)}return r(t,e),t.prototype.handleClick=function(e){void 0===this.props.href&&e.preventDefault()},t.prototype.render=function(){return l["default"].createElement("a",s({role:this.props.href?void 0:"button"},this.props,{onClick:p["default"](this.props.onClick,this.handleClick),href:this.props.href||""}))},t}(l["default"].Component);t["default"]=d,d.propTypes={href:l["default"].PropTypes.string,onClick:l["default"].PropTypes.func},e.exports=t["default"]},function(e,t,n){var r=n(30),o=n(21),s=n(22),a="[object Array]",i=Object.prototype,l=i.toString,u=r(Array,"isArray"),p=u||function(e){return s(e)&&o(e.length)&&l.call(e)==a};e.exports=p},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){e.exports={"default":n(156),__esModule:!0}},function(e,t){var n=e.exports={};"number"==typeof __e&&(__e=n)},function(e,t){"use strict";function n(e){return e&&e.ownerDocument||document}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";e.exports=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&r>=e}var r=9007199254740991;e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function r(e){var t=p["default"].findDOMNode(e);return h["default"](t&&t.ownerDocument||document)}function o(e){var t=r(e);return v["default"](t)}function s(e){return r(e).defaultView.getComputedStyle(e,null)}function a(){return Math.max(document.documentElement.offsetHeight,document.height,document.body.scrollHeight,document.body.offsetHeight)}function i(e){var t={width:e.offsetWidth||0,height:e.offsetHeight||0};if("undefined"!=typeof e.getBoundingClientRect){var n=e.getBoundingClientRect(),r=n.width,o=n.height;t.width=r||t.width,t.height=o||t.height}return t}var l=n(2)["default"];t.__esModule=!0;var u=n(1),p=l(u),d=n(20),f=l(d),c=n(19),h=l(c),m=n(175),v=l(m),y=n(76),g=l(y),b=n(173),T=l(b),P=n(40),x=l(P),E=n(77),C=l(E),_=n(78),N=l(_),O=n(41),w=l(O);t["default"]={canUseDom:f["default"],css:w["default"],getComputedStyles:s,contains:g["default"],ownerWindow:o,ownerDocument:r,getOffset:x["default"],getDocumentHeight:a,getPosition:N["default"],getSize:i,activeElement:T["default"],offsetParent:C["default"]},e.exports=t["default"]},function(e,t,n){var r,o,s;!function(n,a){o=[t],r=a,s="function"==typeof r?r.apply(t,o):r,!(void 0!==s&&(e.exports=s))}(this,function(e){var t=e;t.interopRequireDefault=function(e){return e&&e.__esModule?e:{"default":e}},t._extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}})},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=n(8),f=o(d),c=n(51),h=o(c),m=a["default"].createClass({displayName:"Button",mixins:[p["default"]],propTypes:{active:a["default"].PropTypes.bool,disabled:a["default"].PropTypes.bool,block:a["default"].PropTypes.bool,navItem:a["default"].PropTypes.bool,navDropdown:a["default"].PropTypes.bool,componentClass:f["default"].elementType,href:a["default"].PropTypes.string,target:a["default"].PropTypes.string,type:a["default"].PropTypes.oneOf(h["default"].types)},getDefaultProps:function(){return{active:!1,block:!1,bsClass:"button",bsStyle:"default",disabled:!1,navItem:!1,navDropdown:!1}},render:function(){var e=this.props.navDropdown?{}:this.getBsClassSet(),t=void 0;return e=r({active:this.props.active,"btn-block":this.props.block},e),this.props.navItem?this.renderNavItem(e):(t=this.props.href||this.props.target||this.props.navDropdown?"renderAnchor":"renderButton",this[t](e))},renderAnchor:function(e){var t=this.props.componentClass||"a",n=this.props.href||"#";return e.disabled=this.props.disabled,a["default"].createElement(t,r({},this.props,{href:n,className:l["default"](this.props.className,e),role:"button"}),this.props.children)},renderButton:function(e){var t=this.props.componentClass||"button";return a["default"].createElement(t,r({},this.props,{type:this.props.type||"button",className:l["default"](this.props.className,e)}),this.props.children)},renderNavItem:function(e){var t={active:this.props.active};return a["default"].createElement("li",{className:l["default"](t)},this.renderAnchor(e))}});t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n=t["offset"+T(e)],r=x[e];return n+parseInt(c["default"].css(t,r[0]),10)+parseInt(c["default"].css(t,r[1]),10)}var o=n(7)["default"],s=n(6)["default"],a=n(3)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(99),d=i(p),f=n(23),c=i(f),h=n(8),m=i(h),v=n(12),y=i(v),g=n(11),b=i(g),T=function(e){return e[0].toUpperCase()+e.substr(1)},P=function(e){return e.offsetHeight},x={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]},E=function(e){function t(n,r){s(this,t),e.call(this,n,r),this.onEnterListener=this.handleEnter.bind(this),this.onEnteringListener=this.handleEntering.bind(this),this.onEnteredListener=this.handleEntered.bind(this),this.onExitListener=this.handleExit.bind(this),this.onExitingListener=this.handleExiting.bind(this)}return o(t,e),t.prototype.render=function(){var e=b["default"](this.onEnterListener,this.props.onEnter),t=b["default"](this.onEnteringListener,this.props.onEntering),n=b["default"](this.onEnteredListener,this.props.onEntered),r=b["default"](this.onExitListener,this.props.onExit),o=b["default"](this.onExitingListener,this.props.onExiting);return u["default"].createElement(d["default"],a({ref:"transition"},this.props,{"aria-expanded":this.props.role?this.props["in"]:null,className:"width"===this._dimension()?"width":"",exitedClassName:"collapse",exitingClassName:"collapsing",enteredClassName:"collapse in",enteringClassName:"collapsing",onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:this.props.onExited}),this.props.children)},t.prototype.handleEnter=function(e){var t=this._dimension();e.style[t]="0"},t.prototype.handleEntering=function(e){var t=this._dimension();e.style[t]=this._getScrollDimensionValue(e,t)},t.prototype.handleEntered=function(e){var t=this._dimension();e.style[t]=null},t.prototype.handleExit=function(e){var t=this._dimension();e.style[t]=this.props.getDimensionValue(t,e)+"px"},t.prototype.handleExiting=function(e){var t=this._dimension();P(e),e.style[t]="0"},t.prototype._dimension=function(){return"function"==typeof this.props.dimension?this.props.dimension():this.props.dimension},t.prototype._getTransitionInstance=function(){return this.refs.transition},t.prototype._getScrollDimensionValue=function(e,t){return e["scroll"+T(t)]+"px"},t}(u["default"].Component);E.propTypes={"in":u["default"].PropTypes.bool,unmountOnExit:u["default"].PropTypes.bool,transitionAppear:u["default"].PropTypes.bool,timeout:u["default"].PropTypes.number,duration:m["default"].all([u["default"].PropTypes.number,function(e){return null!=e.duration&&y["default"]("Collapse `duration`","the `timeout` prop"),null}]),onEnter:u["default"].PropTypes.func,onEntering:u["default"].PropTypes.func,onEntered:u["default"].PropTypes.func,onExit:u["default"].PropTypes.func,onExiting:u["default"].PropTypes.func,onExited:u["default"].PropTypes.func,dimension:u["default"].PropTypes.oneOfType([u["default"].PropTypes.oneOf(["height","width"]),u["default"].PropTypes.func]),getDimensionValue:u["default"].PropTypes.func,role:u["default"].PropTypes.string},E.defaultProps={"in":!1,timeout:300,unmountOnExit:!1,transitionAppear:!1,dimension:"height",getDimensionValue:r},t["default"]=E,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(81),p=a(u),d=n(4),f=a(d),c=n(230),h=a(c),m=n(50),v=a(m),y=n(53),g=a(y),b=n(113),T=a(b),P=n(8),x=a(P),E=n(11),C=a(E),_=n(185),N=a(_),O=n(95),w=a(O),S="toggle-btn",k=g["default"].defaultProps.bsRole;t.TOGGLE_ROLE=k;var M=T["default"].defaultProps.bsRole;t.MENU_ROLE=M;var D=function(e){function t(n){o(this,t),e.call(this,n),this.Toggle=g["default"],this.toggleOpen=this.toggleOpen.bind(this),this.handleClick=this.handleClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleClose=this.handleClose.bind(this),this.extractChildren=this.extractChildren.bind(this),this.refineMenu=this.refineMenu.bind(this),this.refineToggle=this.refineToggle.bind(this),this.childExtractors=[{key:"toggle",matches:function(e){return e.props.bsRole===k},refine:this.refineToggle},{key:"menu",exclusive:!0,matches:function(e){return e.props.bsRole===M},refine:this.refineMenu}],this.state={}}return r(t,e),t.prototype.componentDidMount=function(){var e=this.refs.menu;this.props.open&&e.focusNext&&e.focusNext()},t.prototype.componentDidUpdate=function(e,t){var n=this.refs.menu;this.props.open&&!e.open&&n.focusNext&&n.focusNext()},t.prototype.render=function(){var e=this.extractChildren(),t=this.props.componentClass,n=w["default"](this.props,["id"]),r={open:this.props.open,dropdown:!this.props.dropup,dropup:this.props.dropup};return l["default"].createElement(t,s({},n,{className:f["default"](this.props.className,r)}),e)},t.prototype.toggleOpen=function(){var e=!this.props.open;this.props.onToggle&&this.props.onToggle(e)},t.prototype.handleClick=function(e){this.props.disabled||this.toggleOpen()},t.prototype.handleKeyDown=function(e){var t=this,n=function(){t.refs.menu.focusNext&&t.refs.menu.focusNext()};switch(e.keyCode){case p["default"].codes.down:this.props.open?n():this.toggleOpen(),e.preventDefault();break;case p["default"].codes.esc:case p["default"].codes.tab:this.props.open&&this.handleClose(e)}},t.prototype.handleClose=function(e){if(this.props.open&&(e&&e.keyCode===p["default"].codes.tab?setTimeout(this.toggleOpen):this.toggleOpen(),e&&"keydown"===e.type&&e.keyCode===p["default"].codes.esc)){var t=l["default"].findDOMNode(this.refs[S]);e.preventDefault(),e.stopPropagation(),t.focus()}},t.prototype.extractChildren=function(){var e=this,t=!!this.props.open,n={};return l["default"].Children.map(this.props.children,function(r){var o=N["default"](e.childExtractors,function(e){return e.matches(r)});if(o){if(n[o.key])return!1;n[o.key]=o.exclusive,r=o.refine(r,t)}return r})},t.prototype.refineMenu=function(e,t){var n={ref:"menu",open:t,labelledBy:this.props.id,pullRight:this.props.pullRight};return n.onClose=C["default"](e.props.onClose,this.props.onClose,this.handleClose),n.onSelect=C["default"](e.props.onSelect,this.props.onSelect,this.handleClose),i.cloneElement(e,n,e.props.children)},t.prototype.refineToggle=function(e,t){var n={open:t,id:this.props.id,ref:S};return n.onClick=C["default"](e.props.onClick,this.handleClick),n.onKeyDown=C["default"](e.props.onKeyDown,this.handleKeyDown),i.cloneElement(e,n,e.props.children)},t}(l["default"].Component);D.Toggle=g["default"],D.TOGGLE_REF=S,D.defaultProps={componentClass:v["default"]},D.propTypes={dropup:l["default"].PropTypes.bool,id:x["default"].isRequiredForA11y(l["default"].PropTypes.oneOfType([l["default"].PropTypes.string,l["default"].PropTypes.number])),componentClass:x["default"].elementType,children:x["default"].all([x["default"].requiredRoles(k,M),x["default"].exclusiveRoles(M)]),disabled:l["default"].PropTypes.bool,pullRight:l["default"].PropTypes.bool,open:l["default"].PropTypes.bool,onClose:l["default"].PropTypes.func,onToggle:l["default"].PropTypes.func,onSelect:l["default"].PropTypes.func},D=h["default"](D,{open:"onToggle"}),D.Toggle=g["default"],D.Menu=T["default"],t["default"]=D},function(e,t){"use strict";t.__esModule=!0;var n={CLASSES:{alert:"alert",button:"btn","button-group":"btn-group","button-toolbar":"btn-toolbar",column:"col","input-group":"input-group",form:"form",glyphicon:"glyphicon",label:"label",thumbnail:"thumbnail","list-group-item":"list-group-item",panel:"panel","panel-group":"panel-group",pagination:"pagination","progress-bar":"progress-bar",nav:"nav",navbar:"navbar",modal:"modal",row:"row",well:"well"},STYLES:["default","primary","success","info","warning","danger","link","inline","tabs","pills"],addStyle:function(e){n.STYLES.push(e)},SIZES:{large:"lg",medium:"md",small:"sm",xsmall:"xs",lg:"lg",md:"md",sm:"sm",xs:"xs"},GRID_COLUMNS:12};t["default"]=n,e.exports=t["default"]},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){function r(e,t){var n=null==e?void 0:e[t];return o(n)?n:void 0}var o=n(218);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(1),s=r(o),a=n(19),i=r(a);t["default"]=function(e){return i["default"](s["default"].findDOMNode(e))},e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(99),p=a(u),d=n(8),f=a(d),c=n(12),h=a(c),m=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props.timeout||this.props.duration;return l["default"].createElement(p["default"],s({},this.props,{timeout:e,className:"fade",enteredClassName:"in",enteringClassName:"in"}),this.props.children)},t}(l["default"].Component);m.propTypes={"in":l["default"].PropTypes.bool,unmountOnExit:l["default"].PropTypes.bool,transitionAppear:l["default"].PropTypes.bool,timeout:l["default"].PropTypes.number,duration:f["default"].all([l["default"].PropTypes.number,function(e){return null!=e.duration&&h["default"]("Fade `duration`","the `timeout` prop"),null}]),onEnter:l["default"].PropTypes.func,onEntering:l["default"].PropTypes.func,onEntered:l["default"].PropTypes.func,onExit:l["default"].PropTypes.func,onExiting:l["default"].PropTypes.func,onExited:l["default"].PropTypes.func},m.defaultProps={"in":!1,timeout:300,unmountOnExit:!1,transitionAppear:!1},t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=a["default"].createClass({displayName:"Glyphicon",propTypes:{bsClass:a["default"].PropTypes.string,glyph:a["default"].PropTypes.string.isRequired,formControlFeedback:a["default"].PropTypes.bool},getDefaultProps:function(){return{bsClass:"glyphicon",formControlFeedback:!1}},render:function(){var e,t=l["default"](this.props.className,(e={},e[this.props.bsClass]=!0,e["glyphicon-"+this.props.glyph]=!0,e["form-control-feedback"]=this.props.formControlFeedback,e));return a["default"].createElement("span",r({},this.props,{className:t}),this.props.children)}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=n(55),f=a(d),c=n(33),h=a(c),m=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.getInputDOMNode=function(){return l["default"].findDOMNode(this.refs.input)},t.prototype.getValue=function(){if("static"===this.props.type)return this.props.value;if(this.props.type)return"select"===this.props.type&&this.props.multiple?this.getSelectedOptions():this.getInputDOMNode().value;throw"Cannot use getValue without specifying input type."},t.prototype.getChecked=function(){return this.getInputDOMNode().checked},t.prototype.getSelectedOptions=function(){var e=[];return Array.prototype.forEach.call(this.getInputDOMNode().getElementsByTagName("option"),function(t){if(t.selected){var n=t.getAttribute("value")||t.innerHtml;e.push(n)}}),e},t.prototype.isCheckboxOrRadio=function(){return"checkbox"===this.props.type||"radio"===this.props.type},t.prototype.isFile=function(){return"file"===this.props.type},t.prototype.renderInputGroup=function(e){var t=this.props.addonBefore?l["default"].createElement("span",{className:"input-group-addon",key:"addonBefore"},this.props.addonBefore):null,n=this.props.addonAfter?l["default"].createElement("span",{className:"input-group-addon",key:"addonAfter"},this.props.addonAfter):null,r=this.props.buttonBefore?l["default"].createElement("span",{className:"input-group-btn"},this.props.buttonBefore):null,o=this.props.buttonAfter?l["default"].createElement("span",{className:"input-group-btn"},this.props.buttonAfter):null,s=void 0;switch(this.props.bsSize){case"small":s="input-group-sm";break;case"large":s="input-group-lg"}return t||n||r||o?l["default"].createElement("div",{className:p["default"](s,"input-group"),key:"input-group"},t,r,e,n,o):e},t.prototype.renderIcon=function(){if(!this.props.hasFeedback)return null;if(this.props.feedbackIcon)return l["default"].cloneElement(this.props.feedbackIcon,{formControlFeedback:!0});switch(this.props.bsStyle){case"success":return l["default"].createElement(h["default"],{formControlFeedback:!0,glyph:"ok",key:"icon"});case"warning":return l["default"].createElement(h["default"],{formControlFeedback:!0,glyph:"warning-sign",key:"icon"});case"error":return l["default"].createElement(h["default"],{formControlFeedback:!0,glyph:"remove",key:"icon"});default:return l["default"].createElement("span",{className:"form-control-feedback",key:"icon"})}},t.prototype.renderHelp=function(){return this.props.help?l["default"].createElement("span",{className:"help-block",key:"help"},this.props.help):null},t.prototype.renderCheckboxAndRadioWrapper=function(e){var t={checkbox:"checkbox"===this.props.type,radio:"radio"===this.props.type};return l["default"].createElement("div",{className:p["default"](t),key:"checkboxRadioWrapper"},e)},t.prototype.renderWrapper=function(e){return this.props.wrapperClassName?l["default"].createElement("div",{className:this.props.wrapperClassName,key:"wrapper"},e):e},t.prototype.renderLabel=function(e){var t={"control-label":!this.isCheckboxOrRadio()};return t[this.props.labelClassName]=this.props.labelClassName,this.props.label?l["default"].createElement("label",{htmlFor:this.props.id,className:p["default"](t),key:"label"},e,this.props.label):e},t.prototype.renderInput=function(){if(!this.props.type)return this.props.children;switch(this.props.type){case"select":return l["default"].createElement("select",s({},this.props,{className:p["default"](this.props.className,"form-control"),ref:"input",key:"input"}),this.props.children);case"textarea":return l["default"].createElement("textarea",s({},this.props,{className:p["default"](this.props.className,"form-control"),ref:"input",key:"input"}));case"static":return l["default"].createElement("p",s({},this.props,{className:p["default"](this.props.className,"form-control-static"),ref:"input",key:"input"}),this.props.value);default:var e=this.isCheckboxOrRadio()||this.isFile()?"":"form-control";return l["default"].createElement("input",s({},this.props,{className:p["default"](this.props.className,e),ref:"input",key:"input"}))}},t.prototype.renderFormGroup=function(e){return l["default"].createElement(f["default"],this.props,e)},t.prototype.renderChildren=function(){return this.isCheckboxOrRadio()?this.renderWrapper([this.renderCheckboxAndRadioWrapper(this.renderLabel(this.renderInput())),this.renderHelp()]):[this.renderLabel(),this.renderWrapper([this.renderInputGroup(this.renderInput()),this.renderIcon(),this.renderHelp()])]},t.prototype.render=function(){var e=this.renderChildren();return this.renderFormGroup(e)},t}(l["default"].Component);m.propTypes={type:l["default"].PropTypes.string,label:l["default"].PropTypes.node,help:l["default"].PropTypes.node,addonBefore:l["default"].PropTypes.node,addonAfter:l["default"].PropTypes.node,buttonBefore:l["default"].PropTypes.node,buttonAfter:l["default"].PropTypes.node,bsSize:l["default"].PropTypes.oneOf(["small","medium","large"]),bsStyle:l["default"].PropTypes.oneOf(["success","warning","error"]),hasFeedback:l["default"].PropTypes.bool,feedbackIcon:l["default"].PropTypes.node,id:l["default"].PropTypes.oneOfType([l["default"].PropTypes.string,l["default"].PropTypes.number]),groupClassName:l["default"].PropTypes.string,wrapperClassName:l["default"].PropTypes.string,labelClassName:l["default"].PropTypes.string,multiple:l["default"].PropTypes.bool,disabled:l["default"].PropTypes.bool,value:l["default"].PropTypes.any},m.defaultProps={disabled:!1,hasFeedback:!1,multiple:!1},t["default"]=m,e.exports=t["default"]},function(e,t){"use strict";function n(){var e=document.createElement("div"),t=e.style;"AnimationEvent"in window||delete a.animationend.animation,"TransitionEvent"in window||delete a.transitionend.transition;for(var n in a){var r=a[n];for(var o in r)if(o in t){i.push(r[o]);break}}}function r(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}t.__esModule=!0;var s=!("undefined"==typeof window||!window.document||!window.document.createElement),a={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},i=[];s&&n();var l={addEndEventListener:function(e,t){return 0===i.length?void window.setTimeout(t,0):void i.forEach(function(n){r(e,n,t)})},removeEndEventListener:function(e,t){0!==i.length&&i.forEach(function(n){o(e,n,t)})}};t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){var r=i.singlePropFrom(l)(e,t,n);if(!r){var o=a["default"].PropTypes.oneOfType(u);r=o(e,t,n)}return r}var o=n(2)["default"];t.__esModule=!0,t["default"]=r;var s=n(1),a=o(s),i=n(8),l=["children","value"],u=[a["default"].PropTypes.number,a["default"].PropTypes.string];e.exports=t["default"]},function(e,t,n){var r=n(166),o=n(18),s="prototype",a=function(e,t){return function(){return e.apply(t,arguments)}},i=function(e,t,n){var l,u,p,d,f=e&i.G,c=e&i.P,h=f?r:e&i.S?r[t]:(r[t]||{})[s],m=f?o:o[t]||(o[t]={});f&&(n=t);for(l in n)u=!(e&i.F)&&h&&l in h,u&&l in m||(p=u?h[l]:n[l],f&&"function"!=typeof h[l]?d=n[l]:e&i.B&&u?d=a(p,r):e&i.W&&h[l]==p?!function(e){d=function(t){return this instanceof e?new e(t):e(t)},d[s]=e[s]}(p):d=c&&"function"==typeof p?a(Function.call,p):p,m[l]=d,c&&((m[s]||(m[s]={}))[l]=p))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,e.exports=i},function(e,t){e.exports=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}},function(e,t){"use strict";e.exports=function(e){return e===e.window?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}},function(e,t,n){"use strict";var r=n(76),o=n(39),s=n(19);e.exports=function(e){var t=s(e),n=o(t),a=t&&t.documentElement,i={top:0,left:0,height:0,width:0};if(t)return r(a,e)?(void 0!==e.getBoundingClientRect&&(i=e.getBoundingClientRect()),(i.width||i.height)&&(i={top:i.top+(n.pageYOffset||a.scrollTop)-(a.clientTop||0),left:i.left+(n.pageXOffset||a.scrollLeft)-(a.clientLeft||0),width:(null==i.width?e.offsetWidth:i.width)||0,height:(null==i.height?e.offsetHeight:i.height)||0}),i):i}},function(e,t,n){"use strict";var r=n(80),o=n(182),s=n(177),a=n(178),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var l="",u=t;if("string"==typeof t){if(void 0===n)return e.style[r(t)]||s(e).getPropertyValue(o(t));(u={})[t]=n}for(var p in u)i.call(u,p)&&(u[p]||0===u[p]?l+=o(p)+":"+u[p]+";":a(e,o(p)));e.style.cssText+=";"+l}},function(e,t,n){function r(e,t,n){if("function"!=typeof e)return o;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,s){return e.call(t,n,r,o,s)};case 5:return function(n,r,o,s,a){return e.call(t,n,r,o,s,a)}}return function(){return e.apply(t,arguments)}}var o=n(96);e.exports=r},function(e,t,n){function r(e){return null!=e&&s(o(e))}var o=n(88),s=n(21);e.exports=r},function(e,t,n){function r(e){return s(e)&&o(e)&&i.call(e,"callee")&&!l.call(e,"callee")}var o=n(43),s=n(22),a=Object.prototype,i=a.hasOwnProperty,l=a.propertyIsEnumerable;e.exports=r},function(e,t,n){var r=n(30),o=n(43),s=n(16),a=n(216),i=r(Object,"keys"),l=i?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&o(e)?a(e):s(e)?i(e):[]}:a;e.exports=l},function(e,t,n){function r(e){if(null==e)return[];l(e)||(e=Object(e));var t=e.length;t=t&&i(t)&&(s(e)||o(e))&&t||0;for(var n=e.constructor,r=-1,u="function"==typeof n&&n.prototype===e,d=Array(t),f=t>0;++r<t;)d[r]=r+"";for(var c in e)f&&a(c,t)||"constructor"==c&&(u||!p.call(e,c))||d.push(c);return d}var o=n(44),s=n(15),a=n(89),i=n(21),l=n(16),u=Object.prototype,p=u.hasOwnProperty; -e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(1),s=r(o),a=n(102),i=r(a),l=n(31),u=r(l),p=n(100),d=r(p),f=s["default"].createClass({displayName:"Portal",propTypes:{container:s["default"].PropTypes.oneOfType([i["default"],s["default"].PropTypes.func])},componentDidMount:function(){this._renderOverlay()},componentDidUpdate:function(){this._renderOverlay()},componentWillUnmount:function(){this._unrenderOverlay(),this._unmountOverlayTarget()},_mountOverlayTarget:function(){this._overlayTarget||(this._overlayTarget=document.createElement("div"),this.getContainerDOMNode().appendChild(this._overlayTarget))},_unmountOverlayTarget:function(){this._overlayTarget&&(this.getContainerDOMNode().removeChild(this._overlayTarget),this._overlayTarget=null)},_renderOverlay:function(){var e=this.props.children?s["default"].Children.only(this.props.children):null;null!==e?(this._mountOverlayTarget(),this._overlayInstance=s["default"].render(e,this._overlayTarget)):(this._unrenderOverlay(),this._unmountOverlayTarget())},_unrenderOverlay:function(){this._overlayTarget&&(s["default"].unmountComponentAtNode(this._overlayTarget),this._overlayInstance=null)},render:function(){return null},getOverlayDOMNode:function(){if(!this.isMounted())throw new Error("getOverlayDOMNode(): A component must be mounted to have a DOM node.");return this._overlayInstance?this._overlayInstance.getWrappedDOMNode?this._overlayInstance.getWrappedDOMNode():s["default"].findDOMNode(this._overlayInstance):null},getContainerDOMNode:function(){return d["default"](this.props.container,u["default"](this).body)}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(228),o=r;e.exports=o},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(1),s=r(o),a=n(23),i=r(a),l=n(71),u=r(l),p={propTypes:{offset:s["default"].PropTypes.number,offsetTop:s["default"].PropTypes.number,offsetBottom:s["default"].PropTypes.number},getInitialState:function(){return{affixClass:"affix-top"}},getPinnedOffset:function(e){return this.pinnedOffset?this.pinnedOffset:(e.className=e.className.replace(/affix-top|affix-bottom|affix/,""),e.className+=e.className.length?" affix":"affix",this.pinnedOffset=i["default"].getOffset(e).top-window.pageYOffset,this.pinnedOffset)},checkPosition:function(){var e=void 0,t=void 0,n=void 0,r=void 0,o=void 0,a=void 0,l=void 0,u=void 0,p=void 0;this.isMounted()&&(e=s["default"].findDOMNode(this),t=i["default"].getDocumentHeight(),n=window.pageYOffset,r=i["default"].getOffset(e),"top"===this.affixed&&(r.top+=n),o=null!=this.props.offsetTop?this.props.offsetTop:this.props.offset,a=null!=this.props.offsetBottom?this.props.offsetBottom:this.props.offset,(null!=o||null!=a)&&(null==o&&(o=0),null==a&&(a=0),l=null!=this.unpin&&n+this.unpin<=r.top?!1:null!=a&&r.top+e.offsetHeight>=t-a?"bottom":null!=o&&o>=n?"top":!1,this.affixed!==l&&(null!=this.unpin&&(e.style.top=""),u="affix"+(l?"-"+l:""),this.affixed=l,this.unpin="bottom"===l?this.getPinnedOffset(e):null,"bottom"===l&&(e.className=e.className.replace(/affix-top|affix-bottom|affix/,"affix-bottom"),p=t-a-e.offsetHeight-i["default"].getOffset(e).top),this.setState({affixClass:u,affixPositionTop:p}))))},checkPositionWithEventLoop:function(){setTimeout(this.checkPosition,0)},componentDidMount:function(){this._onWindowScrollListener=u["default"].listen(window,"scroll",this.checkPosition),this._onDocumentClickListener=u["default"].listen(i["default"].ownerDocument(this),"click",this.checkPositionWithEventLoop)},componentWillUnmount:function(){this._onWindowScrollListener&&this._onWindowScrollListener.remove(),this._onDocumentClickListener&&this._onDocumentClickListener.remove()},componentDidUpdate:function(e,t){t.affixClass===this.state.affixClass&&this.checkPositionWithEventLoop()}};t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=n(8),f=o(d),c=a["default"].createClass({displayName:"ButtonGroup",mixins:[p["default"]],propTypes:{vertical:a["default"].PropTypes.bool,justified:a["default"].PropTypes.bool,block:f["default"].all([a["default"].PropTypes.bool,function(e,t,n){return e.block&&!e.vertical?new Error("The block property requires the vertical property to be set to have any effect"):void 0}])},getDefaultProps:function(){return{block:!1,bsClass:"button-group",justified:!1,vertical:!1}},render:function(){var e=this.getBsClassSet();return e["btn-group"]=!this.props.vertical,e["btn-group-vertical"]=this.props.vertical,e["btn-group-justified"]=this.props.justified,e["btn-block"]=this.props.block,a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(10)["default"],a=n(3)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(25),d=i(p),f=n(55),c=i(f),h=n(34),m=i(h),v=n(36),y=i(v),g=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.renderFormGroup=function(e){var t=this.props,n=(t.bsStyle,t.value,s(t,["bsStyle","value"]));return u["default"].createElement(c["default"],n,e)},t.prototype.renderInput=function(){var e=this.props,t=e.children,n=e.value,r=s(e,["children","value"]),o=t?t:n;return u["default"].createElement(d["default"],a({},r,{componentClass:"input",ref:"input",key:"input",value:o}))},t}(m["default"]);g.types=["button","reset","submit"],g.defaultProps={type:"button"},g.propTypes={type:u["default"].PropTypes.oneOf(g.types),bsStyle:function(e){return null},children:y["default"],value:y["default"]},t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(17)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(28),d=s(p),f=n(8),c=s(f),h=i["default"].createClass({displayName:"Col",propTypes:{xs:i["default"].PropTypes.number,sm:i["default"].PropTypes.number,md:i["default"].PropTypes.number,lg:i["default"].PropTypes.number,xsOffset:i["default"].PropTypes.number,smOffset:i["default"].PropTypes.number,mdOffset:i["default"].PropTypes.number,lgOffset:i["default"].PropTypes.number,xsPush:i["default"].PropTypes.number,smPush:i["default"].PropTypes.number,mdPush:i["default"].PropTypes.number,lgPush:i["default"].PropTypes.number,xsPull:i["default"].PropTypes.number,smPull:i["default"].PropTypes.number,mdPull:i["default"].PropTypes.number,lgPull:i["default"].PropTypes.number,componentClass:c["default"].elementType},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props.componentClass,t={};return o(d["default"].SIZES).forEach(function(e){var n=d["default"].SIZES[e],r=n,o=n+"-";this.props[r]&&(t["col-"+o+this.props[r]]=!0),r=n+"Offset",o=n+"-offset-",this.props[r]>=0&&(t["col-"+o+this.props[r]]=!0),r=n+"Push",o=n+"-push-",this.props[r]>=0&&(t["col-"+o+this.props[r]]=!0),r=n+"Pull",o=n+"-pull-",this.props[r]>=0&&(t["col-"+o+this.props[r]]=!0)},this),i["default"].createElement(e,r({},this.props,{className:u["default"](this.props.className,t)}),this.props.children)}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=n(25),f=a(d),c=n(8),h=a(c),m=n(14),v=a(m),y=l["default"].createElement("span",null," ",l["default"].createElement("span",{className:"caret"})),g=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props.noCaret?null:y,t={"dropdown-toggle":!0},n=this.props.useAnchor?v["default"]:f["default"];return l["default"].createElement(n,s({},this.props,{className:p["default"](t,this.props.className),type:"button","aria-haspopup":!0,"aria-expanded":this.props.open}),this.props.title||this.props.children,e)},t}(l["default"].Component);t["default"]=g;var b=h["default"].singlePropFrom(["title","children"]);g.defaultProps={open:!1,useAnchor:!1,bsRole:"toggle"},g.propTypes={bsRole:l["default"].PropTypes.string,children:b,noCaret:l["default"].PropTypes.bool,open:l["default"].PropTypes.bool,title:b,useAnchor:l["default"].PropTypes.bool},g.isToggle=!0,g.titleProp="title",g.onClickProp="onClick",e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(115),s=r(o);t.Static=s["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e={"form-group":!this.props.standalone,"form-group-lg":!this.props.standalone&&"large"===this.props.bsSize,"form-group-sm":!this.props.standalone&&"small"===this.props.bsSize,"has-feedback":this.props.hasFeedback,"has-success":"success"===this.props.bsStyle,"has-warning":"warning"===this.props.bsStyle,"has-error":"error"===this.props.bsStyle};return i["default"].createElement("div",{className:u["default"](e,this.props.groupClassName)},this.props.children)},t}(i["default"].Component);p.defaultProps={hasFeedback:!1,standalone:!1},p.propTypes={standalone:i["default"].PropTypes.bool,hasFeedback:i["default"].PropTypes.bool,bsSize:function(e){return e.standalone&&void 0!==e.bsSize?new Error("bsSize will not be used when `standalone` is set."):i["default"].PropTypes.oneOf(["small","medium","large"]).apply(null,arguments)},bsStyle:i["default"].PropTypes.oneOf(["success","warning","error"]),groupClassName:i["default"].PropTypes.string},t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(8),p=o(u),d=a["default"].createClass({displayName:"Grid",propTypes:{fluid:a["default"].PropTypes.bool,componentClass:p["default"].elementType},getDefaultProps:function(){return{componentClass:"div",fluid:!1}},render:function(){var e=this.props.componentClass,t=this.props.fluid?"container-fluid":"container";return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,t)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(9),l=o(i),u=/\%\((.+?)\)s/,p=a["default"].createClass({displayName:"Interpolate",propTypes:{component:a["default"].PropTypes.node,format:a["default"].PropTypes.string,unsafe:a["default"].PropTypes.bool},getDefaultProps:function(){return{component:"span",unsafe:!1}},render:function(){var e=l["default"].hasValidComponent(this.props.children)||"string"==typeof this.props.children?this.props.children:this.props.format,t=this.props.component,n=this.props.unsafe===!0,o=r({},this.props);if(delete o.children,delete o.format,delete o.component,delete o.unsafe,n){var s=e.split(u).reduce(function(e,t,n){var r=void 0;if(n%2===0?r=t:(r=o[t],delete o[t]),a["default"].isValidElement(r))throw new Error("cannot interpolate a React component into unsafe text");return e+=r},"");return o.dangerouslySetInnerHTML={__html:s},a["default"].createElement(t,o)}var i=e.split(u).reduce(function(e,t,n){var r=void 0;if(n%2===0){if(0===t.length)return e;r=t}else r=o[t],delete o[t];return e.push(r),e},[]);return a["default"].createElement(t,o,i)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("div",s({},this.props,{className:p["default"](this.props.className,this.props.modalClassName)}),this.props.children)},t}(l["default"].Component);d.propTypes={modalClassName:l["default"].PropTypes.string},d.defaultProps={modalClassName:"modal-body"},t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("div",s({},this.props,{className:p["default"](this.props.className,this.props.modalClassName)}),this.props.children)},t}(l["default"].Component);d.propTypes={modalClassName:l["default"].PropTypes.string},d.defaultProps={modalClassName:"modal-footer"},t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("div",s({},this.props,{className:p["default"](this.props.className,this.props.modalClassName)}),this.props.closeButton&&l["default"].createElement("button",{className:"close",onClick:this.props.onHide},l["default"].createElement("span",{"aria-hidden":"true"},"×")),this.props.children)},t}(l["default"].Component);d.__isModalHeader=!0,d.propTypes={"aria-label":l["default"].PropTypes.string,modalClassName:l["default"].PropTypes.string,closeButton:l["default"].PropTypes.bool,onHide:l["default"].PropTypes.func},d.defaultProps={"aria-label":"Close",modalClassName:"modal-header",closeButton:!1},t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("h4",s({},this.props,{className:p["default"](this.props.className,this.props.modalClassName)}),this.props.children)},t}(l["default"].Component);d.propTypes={modalClassName:l["default"].PropTypes.string},d.defaultProps={modalClassName:"modal-title"},t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(5),l=o(i),u=n(26),p=o(u),d=n(4),f=o(d),c=n(9),h=o(c),m=n(11),v=o(m),y=a["default"].createClass({displayName:"Nav",mixins:[l["default"]],propTypes:{activeHref:a["default"].PropTypes.string,activeKey:a["default"].PropTypes.any,bsStyle:a["default"].PropTypes.oneOf(["tabs","pills"]),stacked:a["default"].PropTypes.bool,justified:a["default"].PropTypes.bool,onSelect:a["default"].PropTypes.func,collapsible:a["default"].PropTypes.bool,className:a["default"].PropTypes.string,id:a["default"].PropTypes.oneOfType([a["default"].PropTypes.string,a["default"].PropTypes.number]),ulClassName:a["default"].PropTypes.string,ulId:a["default"].PropTypes.string,expanded:a["default"].PropTypes.bool,navbar:a["default"].PropTypes.bool,eventKey:a["default"].PropTypes.any,pullRight:a["default"].PropTypes.bool,right:a["default"].PropTypes.bool},getDefaultProps:function(){return{bsClass:"nav",collapsible:!1,expanded:!0,justified:!1,navbar:!1,pullRight:!1,right:!1,stacked:!1}},render:function(){var e=this.props.collapsible?"navbar-collapse":null;return this.props.navbar&&!this.props.collapsible?this.renderUl():a["default"].createElement(p["default"],{"in":this.props.expanded},a["default"].createElement("nav",r({},this.props,{className:f["default"](this.props.className,e)}),this.renderUl()))},renderUl:function(){var e=this.getBsClassSet();return e["nav-stacked"]=this.props.stacked,e["nav-justified"]=this.props.justified,e["navbar-nav"]=this.props.navbar,e["pull-right"]=this.props.pullRight,e["navbar-right"]=this.props.right,a["default"].createElement("ul",r({},this.props,{role:"tabs"===this.props.bsStyle?"tablist":null,className:f["default"](this.props.ulClassName,e),id:this.props.ulId,ref:"ul"}),h["default"].map(this.props.children,this.renderNavItem))},getChildActiveProp:function(e){return e.props.active?!0:null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey?!0:null!=this.props.activeHref&&e.props.href===this.props.activeHref?!0:e.props.active},renderNavItem:function(e,t){return s.cloneElement(e,{role:"tabs"===this.props.bsStyle?"tab":null,active:this.getChildActiveProp(e),activeKey:this.props.activeKey,activeHref:this.props.activeHref,onSelect:v["default"](e.props.onSelect,this.props.onSelect),key:e.key?e.key:t,navItem:!0})}});t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(10)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(27),d=i(p),f=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.title,r=e.noCaret,o=a(e,["children","title","noCaret"]);return u["default"].createElement(d["default"],s({},o,{componentClass:"li"}),u["default"].createElement(d["default"].Toggle,{useAnchor:!0,disabled:o.disabled,noCaret:r},n),u["default"].createElement(d["default"].Menu,null,t))},t}(u["default"].Component);f.propTypes=s({noCaret:u["default"].PropTypes.bool,title:u["default"].PropTypes.node.isRequired},d["default"].propTypes),t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(10)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(5),d=s(p),f=n(14),c=s(f),h=i["default"].createClass({displayName:"NavItem",mixins:[d["default"]],propTypes:{linkId:i["default"].PropTypes.string,onSelect:i["default"].PropTypes.func,active:i["default"].PropTypes.bool,disabled:i["default"].PropTypes.bool,href:i["default"].PropTypes.string,role:i["default"].PropTypes.string,title:i["default"].PropTypes.node,eventKey:i["default"].PropTypes.any,target:i["default"].PropTypes.string,"aria-controls":i["default"].PropTypes.string},getDefaultProps:function(){return{active:!1,disabled:!1}},render:function(){var e=this.props,t=e.role,n=e.linkId,s=e.disabled,a=e.active,l=e.href,p=e.title,d=e.target,f=e.children,h=e["aria-controls"],m=r(e,["role","linkId","disabled","active","href","title","target","children","aria-controls"]),v={active:a,disabled:s},y={role:t,href:l,title:p,target:d,id:n,onClick:this.handleClick};return t||"#"!==l||(y.role="button"),i["default"].createElement("li",o({},m,{role:"presentation",className:u["default"](m.className,v)}),i["default"].createElement(c["default"],o({},y,{"aria-selected":a,"aria-controls":h}),f))},handleClick:function(e){this.props.onSelect&&(e.preventDefault(),this.props.disabled||this.props.onSelect(this.props.eventKey,this.props.href,this.props.target))}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(10)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(223),d=i(p),f=n(8),c=i(f),h=n(32),m=i(h),v=n(4),y=i(v),g=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.animation,r=a(e,["children","animation"]);return n===!0&&(n=m["default"]),n||(t=l.cloneElement(t,{className:y["default"]("in",t.props.className)})),u["default"].createElement(d["default"],s({},r,{transition:n}),t)},t}(u["default"].Component);g.propTypes=s({},d["default"].propTypes,{show:u["default"].PropTypes.bool,rootClose:u["default"].PropTypes.bool,onHide:u["default"].PropTypes.func,animation:u["default"].PropTypes.oneOfType([u["default"].PropTypes.bool,c["default"].elementType]),onEnter:u["default"].PropTypes.func,onEntering:u["default"].PropTypes.func,onEntered:u["default"].PropTypes.func,onExit:u["default"].PropTypes.func,onExiting:u["default"].PropTypes.func,onExited:u["default"].PropTypes.func}),g.defaultProps={animation:m["default"],rootClose:!1,show:!1},t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(10)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(5),d=s(p),f=n(9),c=s(f),h=i["default"].createClass({displayName:"PanelGroup",mixins:[d["default"]],propTypes:{accordion:i["default"].PropTypes.bool,activeKey:i["default"].PropTypes.any,className:i["default"].PropTypes.string,children:i["default"].PropTypes.node,defaultActiveKey:i["default"].PropTypes.any,onSelect:i["default"].PropTypes.func},getDefaultProps:function(){return{accordion:!1,bsClass:"panel-group"}},getInitialState:function(){var e=this.props.defaultActiveKey;return{activeKey:e}},render:function(){var e=this.getBsClassSet(),t=this.props,n=t.className,s=r(t,["className"]);return this.props.accordion&&(s.role="tablist"),i["default"].createElement("div",o({},s,{className:u["default"](n,e),onSelect:null}),c["default"].map(s.children,this.renderPanel))},renderPanel:function(e,t){var n=null!=this.props.activeKey?this.props.activeKey:this.state.activeKey,r={bsStyle:e.props.bsStyle||this.props.bsStyle,key:e.key?e.key:t,ref:e.ref};return this.props.accordion&&(r.headerRole="tab",r.panelRole="tabpanel",r.collapsible=!0,r.expanded=e.props.eventKey===n,r.onSelect=this.handleSelect),a.cloneElement(e,r)},shouldComponentUpdate:function(){return!this._isChanging},handleSelect:function(e,t){e.preventDefault(),this.props.onSelect&&(this._isChanging=!0,this.props.onSelect(t),this._isChanging=!1),this.state.activeKey===t&&(t=null),this.setState({activeKey:t})}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(8),p=o(u),d=a["default"].createClass({displayName:"Row",propTypes:{componentClass:p["default"].elementType},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props.componentClass;return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,"row")}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(35),p=o(u),d=a["default"].createClass({displayName:"Tab",propTypes:{active:a["default"].PropTypes.bool,animation:a["default"].PropTypes.bool,onAnimateOutEnd:a["default"].PropTypes.func,disabled:a["default"].PropTypes.bool,title:a["default"].PropTypes.node},getDefaultProps:function(){return{animation:!0}},getInitialState:function(){return{animateIn:!1,animateOut:!1}},componentWillReceiveProps:function(e){this.props.animation&&(this.state.animateIn||!e.active||this.props.active?this.state.animateOut||e.active||!this.props.active||this.setState({animateOut:!0}):this.setState({animateIn:!0}))},componentDidUpdate:function(){this.state.animateIn&&setTimeout(this.startAnimateIn,0),this.state.animateOut&&p["default"].addEndEventListener(a["default"].findDOMNode(this),this.stopAnimateOut)},startAnimateIn:function(){this.isMounted()&&this.setState({animateIn:!1})},stopAnimateOut:function(){this.isMounted()&&(this.setState({animateOut:!1}),this.props.onAnimateOutEnd&&this.props.onAnimateOutEnd())},render:function(){var e={"tab-pane":!0,fade:!0,active:this.props.active||this.state.animateOut,"in":this.props.active&&!this.state.animateIn};return a["default"].createElement("div",r({},this.props,{title:void 0,role:"tabpanel","aria-hidden":!this.props.active,className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(1),s=r(o),a=n(12),i=r(a),l=n(68),u=r(l),p=s["default"].createClass({displayName:"TabPane",componentWillMount:function(){i["default"]("TabPane","Tab","https://github.com/react-bootstrap/react-bootstrap/pull/1091")},render:function(){return s["default"].createElement(u["default"],this.props)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){var t=void 0;return E["default"].forEach(e,function(e){null==t&&(t=e.props.eventKey)}),t}var o=n(3)["default"],s=n(10)["default"],a=n(17)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(52),d=i(p),f=n(56),c=i(f),h=n(62),m=i(h),v=n(64),y=i(v),g=n(67),b=i(g),T=n(28),P=i(T),x=n(9),E=i(x),C=function(e,t){return t.props.id?t.props.id:e.id&&e.id+"___pane___"+t.props.eventKey},_=function(e,t){return t.props.id?t.props.id+"___tab":e.id&&e.id+"___tab___"+t.props.eventKey},N=u["default"].createClass({displayName:"Tabs",propTypes:{activeKey:u["default"].PropTypes.any,defaultActiveKey:u["default"].PropTypes.any,bsStyle:u["default"].PropTypes.oneOf(["tabs","pills"]),animation:u["default"].PropTypes.bool,id:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),onSelect:u["default"].PropTypes.func,position:u["default"].PropTypes.oneOf(["top","left","right"]),tabWidth:u["default"].PropTypes.oneOfType([u["default"].PropTypes.number,u["default"].PropTypes.object]),paneWidth:u["default"].PropTypes.oneOfType([u["default"].PropTypes.number,u["default"].PropTypes.object])},getDefaultProps:function(){return{animation:!0,tabWidth:2,position:"top"}},getInitialState:function(){var e=null!=this.props.defaultActiveKey?this.props.defaultActiveKey:r(this.props.children);return{activeKey:e,previousActiveKey:null}},componentWillReceiveProps:function(e){var t=this;null!=e.activeKey&&e.activeKey!==this.props.activeKey&&!function(){var n=t.props.activeKey;u["default"].Children.forEach(e.children,function(e){return u["default"].isValidElement(e)&&e.props.eventKey===n?void t.setState({previousActiveKey:n}):void 0})}()},handlePaneAnimateOutEnd:function(){this.setState({previousActiveKey:null})},render:function(){var e=this.props,t=e.id,n=e.className,r=e.style,a=e.position,i=e.bsStyle,l=e.tabWidth,p=e.paneWidth,f=e.children,h=s(e,["id","className","style","position","bsStyle","tabWidth","paneWidth","children"]),v="left"===a||"right"===a;null==i&&(i=v?"pills":"tabs");var y={id:t,className:n,style:r},g=o({},h,{bsStyle:i,stacked:v,activeKey:this.getActiveKey(),onSelect:this.handleSelect,ref:"tabs",role:"tablist"}),T=E["default"].map(f,this.renderTab),P={className:"tab-content",ref:"panes"},x=E["default"].map(f,this.renderPane);if(v){var C=this.getColProps({tabWidth:l,paneWidth:p}),_=C.tabsColProps,N=C.panesColProps,O=u["default"].createElement(d["default"],o({componentClass:m["default"]},g,_),T),w=u["default"].createElement(d["default"],o({},P,N),x),S=void 0;return S="left"===a?u["default"].createElement(b["default"],y,O,w):u["default"].createElement(b["default"],y,w,O),u["default"].createElement(c["default"],null,S)}return u["default"].createElement("div",y,u["default"].createElement(m["default"],g,T),u["default"].createElement("div",P,x))},getActiveKey:function(){return void 0!==this.props.activeKey?this.props.activeKey:this.state.activeKey},renderPane:function(e,t){var n=this.state.previousActiveKey,r=e.props.eventKey===this.getActiveKey(),o=null==n,s=null!=n&&e.props.eventKey===n;return l.cloneElement(e,{active:r&&(o||!this.props.animation),id:C(this.props,e),"aria-labelledby":_(this.props,e),key:e.key?e.key:t,animation:this.props.animation,onAnimateOutEnd:s?this.handlePaneAnimateOutEnd:null})},renderTab:function(e){if(null==e.props.title)return null;var t=e.props,n=t.eventKey,r=t.title,o=t.disabled;return u["default"].createElement(y["default"],{linkId:_(this.props,e),ref:"tab"+n,"aria-controls":C(this.props,e),eventKey:n,disabled:o},r)},getColProps:function(e){var t=e.tabWidth,n=e.paneWidth,r=void 0;r=t instanceof Object?t:{xs:t};var o=void 0;return null==n?(o={},a(r).forEach(function(e){o[e]=P["default"].GRID_COLUMNS-r[e]})):o=n instanceof Object?n:{xs:n},{tabsColProps:r,panesColProps:o}},shouldComponentUpdate:function(){return!this._isChanging},handleSelect:function(e){if(this.props.onSelect)return this._isChanging=!0,this.props.onSelect(e),void(this._isChanging=!1);var t=this.getActiveKey();e!==t&&this.setState({activeKey:e,previousActiveKey:t})}});t["default"]=N,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0}};t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";t["default"]=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t},t.__esModule=!0},function(e,t,n){e.exports=function(e,t){var r=n(37),o=(n(18).Object||{})[e]||Object[e],s={};s[e]=t(o),r(r.S+r.F*n(165)(function(){o(1)}),"Object",s)}},function(e,t,n){var r=n(163);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";var r=n(20),o=function(){};r&&(o=function(){return document.addEventListener?function(e,t,n,r){return e.addEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.attachEvent("on"+t,n)}:void 0}()),e.exports=o},function(e,t,n){"use strict";var r=n(20),o=function(){var e=r&&document.documentElement;return e&&e.contains?function(e,t){return e.contains(t)}:e&&e.compareDocumentPosition?function(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}:function(e,t){if(t)do if(t===e)return!0;while(t=t.parentNode);return!1}}();e.exports=o},function(e,t,n){"use strict";function r(e){return e.nodeName&&e.nodeName.toLowerCase()}function o(e){for(var t=i["default"](e),n=e&&e.offsetParent;n&&"html"!==r(e)&&"static"===u["default"](n,"position");)n=n.offsetParent;return n||t.documentElement}var s=n(24);t.__esModule=!0,t["default"]=o;var a=n(19),i=s.interopRequireDefault(a),l=n(41),u=s.interopRequireDefault(l);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e.nodeName&&e.nodeName.toLowerCase()}function o(e,t){var n,o={top:0,left:0};return"fixed"===m["default"](e,"position")?n=e.getBoundingClientRect():(t=t||u["default"](e),n=i["default"](e),"html"!==r(t)&&(o=i["default"](t)),o.top+=parseInt(m["default"](t,"borderTopWidth"),10)-d["default"](t)||0,o.left+=parseInt(m["default"](t,"borderLeftWidth"),10)-c["default"](t)||0),s._extends({},n,{top:n.top-o.top-(parseInt(m["default"](e,"marginTop"),10)||0),left:n.left-o.left-(parseInt(m["default"](e,"marginLeft"),10)||0)})}var s=n(24);t.__esModule=!0,t["default"]=o;var a=n(40),i=s.interopRequireDefault(a),l=n(77),u=s.interopRequireDefault(l),p=n(79),d=s.interopRequireDefault(p),f=n(176),c=s.interopRequireDefault(f),h=n(41),m=s.interopRequireDefault(h);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(39);e.exports=function(e,t){var n=r(e);return void 0===t?n?"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop:e.scrollTop:void(n?n.scrollTo("pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft,t):e.scrollTop=t)}},function(e,t,n){"use strict";var r=n(180),o=/^-ms-/;e.exports=function(e){return r(e.replace(o,"ms-"))}},function(e,t){t=e.exports=function(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return s[e];var o=String(e),a=n[o.toLowerCase()];if(a)return a;var a=r[o.toLowerCase()];return a?a:1===o.length?o.charCodeAt(0):void 0};var n=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,"delete":46,command:91,"right click":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,"break":19,caps:20,"return":13,escape:27,spc:32,pgup:33,pgdn:33,ins:45,del:46,cmd:91};/*! - * Programatically add the following - */ -for(o=97;123>o;o++)n[String.fromCharCode(o)]=o-32;for(var o=48;58>o;o++)n[o-48]=o;for(o=1;13>o;o++)n["f"+o]=o+111;for(o=0;10>o;o++)n["numpad "+o]=o+96;var s=t.names=t.title={};for(o in n)s[n[o]]=o;for(var a in r)n[a]=r[a]},function(e,t){function n(e,t){if("function"!=typeof e)throw new TypeError(r);return t=o(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,s=o(n.length-t,0),a=Array(s);++r<s;)a[r]=n[t+r];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,n[0],a);case 2:return e.call(this,n[0],n[1],a)}var i=Array(t+1);for(r=-1;++r<t;)i[r]=n[r];return i[t]=a,e.apply(this,i)}}var r="Expected a function",o=Math.max;e.exports=n},function(e,t,n){function r(e,t,n,u){u||(u=[]);for(var p=-1,d=e.length;++p<d;){var f=e[p];l(f)&&i(f)&&(n||a(f)||s(f))?t?r(f,t,n,u):o(u,f):n||(u[u.length]=f)}return u}var o=n(188),s=n(44),a=n(15),i=n(43),l=n(22);e.exports=r},function(e,t,n){var r=n(208),o=r();e.exports=o},function(e,t,n){function r(e,t,n){if(null!=e){void 0!==n&&n in o(e)&&(t=[n]);for(var r=0,s=t.length;null!=e&&s>r;)e=e[t[r++]];return r&&r==s?e:void 0}}var o=n(13);e.exports=r},function(e,t,n){function r(e,t,n,i,l,u){return e===t?!0:null==e||null==t||!s(e)&&!a(t)?e!==e&&t!==t:o(e,t,r,n,i,l,u)}var o=n(198),s=n(16),a=n(22);e.exports=r},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},function(e,t,n){var r=n(87),o=r("length");e.exports=o},function(e,t){function n(e,t){return e="number"==typeof e||r.test(e)?+e:-1,t=null==t?o:t,e>-1&&e%1==0&&t>e}var r=/^\d+$/,o=9007199254740991;e.exports=n},function(e,t,n){function r(e,t){var n=typeof e;if("string"==n&&i.test(e)||"number"==n)return!0;if(o(e))return!1;var r=!a.test(e);return r||null!=t&&e in s(t)}var o=n(15),s=n(13),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=r},function(e,t,n){function r(e){return e===e&&!o(e)}var o=n(16);e.exports=r},function(e,t,n){function r(e,t){e=o(e);for(var n=-1,r=t.length,s={};++n<r;){var a=t[n];a in e&&(s[a]=e[a])}return s}var o=n(13);e.exports=r},function(e,t,n){function r(e,t){var n={};return o(e,function(e,r,o){t(e,r,o)&&(n[r]=e)}),n}var o=n(195);e.exports=r},function(e,t,n){function r(e){if(s(e))return e;var t=[];return o(e).replace(a,function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)}),t}var o=n(204),s=n(15),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,i=/\\(\\)?/g;e.exports=r},function(e,t,n){var r=n(187),o=n(191),s=n(83),a=n(42),i=n(46),l=n(92),u=n(93),p=n(82),d=p(function(e,t){if(null==e)return{};if("function"!=typeof t[0]){var t=r(s(t),String);return l(e,o(i(e),t))}var n=a(t[0],t[1],3);return u(e,function(e,t,r){return!n(e,t,r)})});e.exports=d},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(1),u=r(l),p=n(4),d=r(p),f=n(31),c=r(f),h=n(100),m=r(h),v=n(226),y=n(102),g=r(y),b=function(e){function t(n,r){s(this,t),e.call(this,n,r),this.state={positionLeft:null,positionTop:null,arrowOffsetLeft:null,arrowOffsetTop:null},this._needsFlush=!1,this._lastTarget=null}return a(t,e),t.prototype.componentDidMount=function(){this.updatePosition()},t.prototype.componentWillReceiveProps=function(){this._needsFlush=!0},t.prototype.componentDidUpdate=function(e){this._needsFlush&&(this._needsFlush=!1,this.updatePosition(e.placement!==this.props.placement))},t.prototype.componentWillUnmount=function(){this._lastTarget=null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=o(e,["children","className"]),s=this.state,a=s.positionLeft,p=s.positionTop,f=o(s,["positionLeft","positionTop"]),c=u["default"].Children.only(t);return l.cloneElement(c,i({},r,f,{positionLeft:a,positionTop:p,className:d["default"](n,c.props.className),style:i({},c.props.style,{left:a,top:p})}))},t.prototype.getTargetSafe=function(){if(!this.props.target)return null;var e=this.props.target(this.props);return e?e:null},t.prototype.updatePosition=function(e){var t=this.getTargetSafe();if(t!==this._lastTarget||e){if(this._lastTarget=t,!t)return void this.setState({positionLeft:null,positionTop:null,arrowOffsetLeft:null,arrowOffsetTop:null});var n=u["default"].findDOMNode(this),r=m["default"](this.props.container,c["default"](this).body);this.setState(v.calcOverlayPosition(this.props.placement,n,t,r,this.props.containerPadding))}},t}(u["default"].Component);b.propTypes={target:u["default"].PropTypes.func,container:g["default"],containerPadding:u["default"].PropTypes.number,placement:u["default"].PropTypes.oneOf(["top","right","bottom","left"])},b.displayName="Position",b.defaultProps={containerPadding:0,placement:"right"},t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}function a(e){e.nativeEvent[m]=!0}t.__esModule=!0;var i=n(1),l=r(i),u=n(224),p=r(u),d=n(225),f=r(d),c=n(31),h=r(c),m="__click_was_inside",v=function(e){function t(n){o(this,t),e.call(this,n),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleDocumentKeyUp=this.handleDocumentKeyUp.bind(this)}return s(t,e),t.prototype.bindRootCloseHandlers=function(){var e=h["default"](this);this._onDocumentClickListener=p["default"](e,"click",this.handleDocumentClick),this._onDocumentKeyupListener=p["default"](e,"keyup",this.handleDocumentKeyUp)},t.prototype.handleDocumentClick=function(e){e[m]||this.props.onRootClose()},t.prototype.handleDocumentKeyUp=function(e){27===e.keyCode&&this.props.onRootClose()},t.prototype.unbindRootCloseHandlers=function(){this._onDocumentClickListener&&this._onDocumentClickListener.remove(),this._onDocumentKeyupListener&&this._onDocumentKeyupListener.remove()},t.prototype.componentDidMount=function(){this.bindRootCloseHandlers()},t.prototype.render=function(){var e=this.props,t=e.noWrap,n=e.children,r=l["default"].Children.only(n);return t?l["default"].cloneElement(r,{onClick:f["default"](a,r.props.onClick)}):l["default"].createElement("div",{onClick:a},r)},t.prototype.getWrappedDOMNode=function(){var e=l["default"].findDOMNode(this);return this.props.noWrap?e:e.firstChild},t.prototype.componentWillUnmount=function(){this.unbindRootCloseHandlers()},t}(l["default"].Component);t["default"]=v,v.displayName="RootCloseWrapper",v.propTypes={onRootClose:l["default"].PropTypes.func.isRequired,noWrap:l["default"].PropTypes.bool},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}function i(){}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(1),p=r(u),d=n(179),f=r(d),c=n(75),h=r(c),m=n(4),v=r(m),y=f["default"].end,g=0;t.UNMOUNTED=g;var b=1;t.EXITED=b;var T=2;t.ENTERING=T;var P=3;t.ENTERED=P;var x=4;t.EXITING=x;var E=function(e){function t(n,r){s(this,t),e.call(this,n,r);var o=void 0;o=n["in"]?n.transitionAppear?b:P:n.unmountOnExit?g:b,this.state={status:o},this.nextCallback=null}return a(t,e),t.prototype.componentDidMount=function(){this.props.transitionAppear&&this.props["in"]&&this.performEnter(this.props)},t.prototype.componentWillReceiveProps=function(e){var t=this.state.status;e["in"]?t===x?this.performEnter(e):this.props.unmountOnExit?t===g&&this.setState({status:b}):t===b&&this.performEnter(e):(t===T||t===P)&&this.performExit(e)},t.prototype.componentDidUpdate=function(){this.props.unmountOnExit&&this.state.status===b&&(this.props["in"]?this.performEnter(this.props):this.setState({status:g}))},t.prototype.componentWillUnmount=function(){this.cancelNextCallback()},t.prototype.performEnter=function(e){var t=this;this.cancelNextCallback();var n=p["default"].findDOMNode(this);e.onEnter(n),this.safeSetState({status:T},function(){t.props.onEntering(n),t.onTransitionEnd(n,function(){t.safeSetState({status:P},function(){t.props.onEntered(n)})})})},t.prototype.performExit=function(e){var t=this;this.cancelNextCallback();var n=p["default"].findDOMNode(this);e.onExit(n),this.safeSetState({status:x},function(){t.props.onExiting(n),t.onTransitionEnd(n,function(){t.safeSetState({status:b},function(){t.props.onExited(n)})})})},t.prototype.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.prototype.safeSetState=function(e,t){this.setState(e,this.setNextCallback(t))},t.prototype.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},t.prototype.onTransitionEnd=function(e,t){this.setNextCallback(t),e?(h["default"](e,y,this.nextCallback),setTimeout(this.nextCallback,this.props.timeout)):setTimeout(this.nextCallback,0)},t.prototype.render=function(){var e=this.state.status;if(e===g)return null;var n=this.props,r=n.children,s=n.className,a=o(n,["children","className"]);Object.keys(t.propTypes).forEach(function(e){return delete a[e]});var i=void 0;e===b?i=this.props.exitedClassName:e===T?i=this.props.enteringClassName:e===P?i=this.props.enteredClassName:e===x&&(i=this.props.exitingClassName);var u=p["default"].Children.only(r);return p["default"].cloneElement(u,l({},a,{className:v["default"](u.props.className,s,i)}))},t}(p["default"].Component);E.propTypes={"in":p["default"].PropTypes.bool,unmountOnExit:p["default"].PropTypes.bool,transitionAppear:p["default"].PropTypes.bool,timeout:p["default"].PropTypes.number,exitedClassName:p["default"].PropTypes.string,exitingClassName:p["default"].PropTypes.string,enteredClassName:p["default"].PropTypes.string,enteringClassName:p["default"].PropTypes.string,onEnter:p["default"].PropTypes.func,onEntering:p["default"].PropTypes.func,onEntered:p["default"].PropTypes.func,onExit:p["default"].PropTypes.func,onExiting:p["default"].PropTypes.func,onExited:p["default"].PropTypes.func},E.displayName="Transition",E.defaultProps={"in":!1,unmountOnExit:!1,transitionAppear:!1,timeout:5e3,onEnter:i,onEntering:i,onEntered:i,onExit:i,onExiting:i,onExited:i},t["default"]=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return e="function"==typeof e?e():e,a["default"].findDOMNode(e)||t}t.__esModule=!0,t["default"]=o;var s=n(1),a=r(s);e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n,r){return"Invalid prop '"+t+"' of value '"+e[t]+"'"+(" supplied to '"+n+"'"+r)}function r(e){function t(t,n,r,o){return o=o||"<<anonymous>>",null!=n[r]?e(n,r,o):t?new Error("Required prop '"+r+"' was not specified in '"+o+"'."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}t.__esModule=!0,t.errMsg=n,t.createChainableTypeChecker=r},function(e,t,n){"use strict";function r(e,t,n){return"object"!=typeof e[t]||"function"!=typeof e[t].render&&1!==e[t].nodeType?new Error(o.errMsg(e,t,n,", expected a DOM element or an object that has a `render` method")):void 0}t.__esModule=!0;var o=n(101);t["default"]=o.createChainableTypeChecker(r),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(66),l=o(i),u=a["default"].createClass({displayName:"Accordion",render:function(){return a["default"].createElement(l["default"],r({},this.props,{accordion:!0}),this.props.children)}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(49),p=o(u),d=a["default"].createClass({displayName:"Affix",mixins:[p["default"]],render:function(){var e=r({top:this.state.affixPositionTop},this.props.style);return a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,this.state.affixClass),style:e}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=a["default"].createClass({displayName:"Alert",mixins:[p["default"]],propTypes:{onDismiss:a["default"].PropTypes.func,dismissAfter:a["default"].PropTypes.number,closeLabel:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"alert",bsStyle:"info",closeLabel:"Close Alert"}},renderDismissButton:function(){return a["default"].createElement("button",{type:"button",className:"close","aria-label":this.props.closeLabel,onClick:this.props.onDismiss},a["default"].createElement("span",{"aria-hidden":"true"},"×"))},render:function(){var e=this.getBsClassSet(),t=!!this.props.onDismiss;return e["alert-dismissable"]=t,a["default"].createElement("div",r({},this.props,{role:"alert",className:l["default"](this.props.className,e)}),t?this.renderDismissButton():null,this.props.children)},componentDidMount:function(){this.props.dismissAfter&&this.props.onDismiss&&(this.dismissTimer=setTimeout(this.props.onDismiss,this.props.dismissAfter))},componentWillUnmount:function(){clearTimeout(this.dismissTimer)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(9),l=o(i),u=n(4),p=o(u),d=a["default"].createClass({displayName:"Badge",propTypes:{pullRight:a["default"].PropTypes.bool},getDefaultProps:function(){return{pullRight:!1}},hasContent:function(){return l["default"].hasValidComponent(this.props.children)||a["default"].Children.count(this.props.children)>1||"string"==typeof this.props.children||"number"==typeof this.props.children},render:function(){var e={"pull-right":this.props.pullRight,badge:this.hasContent()};return a["default"].createElement("span",r({},this.props,{className:p["default"](this.props.className,e)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=a["default"].createClass({displayName:"ButtonToolbar",mixins:[p["default"]],getDefaultProps:function(){return{bsClass:"button-toolbar"}},render:function(){var e=this.getBsClassSet();return a["default"].createElement("div",r({},this.props,{role:"toolbar",className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=n(9),f=o(d),c=n(33),h=o(c),m=a["default"].createClass({displayName:"Carousel",mixins:[p["default"]],propTypes:{slide:a["default"].PropTypes.bool,indicators:a["default"].PropTypes.bool,interval:a["default"].PropTypes.number,controls:a["default"].PropTypes.bool,pauseOnHover:a["default"].PropTypes.bool,wrap:a["default"].PropTypes.bool,onSelect:a["default"].PropTypes.func,onSlideEnd:a["default"].PropTypes.func,activeIndex:a["default"].PropTypes.number,defaultActiveIndex:a["default"].PropTypes.number,direction:a["default"].PropTypes.oneOf(["prev","next"]),prevIcon:a["default"].PropTypes.node,nextIcon:a["default"].PropTypes.node},getDefaultProps:function(){return{slide:!0,interval:5e3,pauseOnHover:!0,wrap:!0,indicators:!0,controls:!0,prevIcon:a["default"].createElement(h["default"],{glyph:"chevron-left"}),nextIcon:a["default"].createElement(h["default"],{glyph:"chevron-right"})}},getInitialState:function(){return{activeIndex:null==this.props.defaultActiveIndex?0:this.props.defaultActiveIndex,previousActiveIndex:null,direction:null}},getDirection:function(e,t){return e===t?null:e>t?"prev":"next"},componentWillReceiveProps:function(e){var t=this.getActiveIndex();null!=e.activeIndex&&e.activeIndex!==t&&(clearTimeout(this.timeout),this.setState({previousActiveIndex:t,direction:null!=e.direction?e.direction:this.getDirection(t,e.activeIndex)}))},componentDidMount:function(){this.waitForNext()},componentWillUnmount:function(){clearTimeout(this.timeout)},next:function(e){e&&e.preventDefault();var t=this.getActiveIndex()+1,n=f["default"].numberOf(this.props.children);if(t>n-1){if(!this.props.wrap)return;t=0}this.handleSelect(t,"next")},prev:function(e){e&&e.preventDefault();var t=this.getActiveIndex()-1;if(0>t){if(!this.props.wrap)return;t=f["default"].numberOf(this.props.children)-1}this.handleSelect(t,"prev")},pause:function(){this.isPaused=!0,clearTimeout(this.timeout)},play:function(){this.isPaused=!1,this.waitForNext()},waitForNext:function(){!this.isPaused&&this.props.slide&&this.props.interval&&null==this.props.activeIndex&&(this.timeout=setTimeout(this.next,this.props.interval))},handleMouseOver:function(){this.props.pauseOnHover&&this.pause()},handleMouseOut:function(){this.isPaused&&this.play()},render:function(){var e={carousel:!0,slide:this.props.slide};return a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e),onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut}),this.props.indicators?this.renderIndicators():null,a["default"].createElement("div",{className:"carousel-inner",ref:"inner"},f["default"].map(this.props.children,this.renderItem)),this.props.controls?this.renderControls():null)},renderPrev:function(){return a["default"].createElement("a",{className:"left carousel-control",href:"#prev",key:0,onClick:this.prev},this.props.prevIcon)},renderNext:function(){return a["default"].createElement("a",{className:"right carousel-control",href:"#next",key:1,onClick:this.next},this.props.nextIcon)},renderControls:function(){if(!this.props.wrap){var e=this.getActiveIndex(),t=f["default"].numberOf(this.props.children);return[0!==e?this.renderPrev():null,e!==t-1?this.renderNext():null]}return[this.renderPrev(),this.renderNext()]},renderIndicator:function(e,t){var n=t===this.getActiveIndex()?"active":null;return a["default"].createElement("li",{key:t,className:n,onClick:this.handleSelect.bind(this,t,null)})},renderIndicators:function(){var e=[];return f["default"].forEach(this.props.children,function(t,n){e.push(this.renderIndicator(t,n)," ")},this),a["default"].createElement("ol",{className:"carousel-indicators"},e)},getActiveIndex:function(){return null!=this.props.activeIndex?this.props.activeIndex:this.state.activeIndex},handleItemAnimateOutEnd:function(){this.setState({previousActiveIndex:null,direction:null},function(){this.waitForNext(),this.props.onSlideEnd&&this.props.onSlideEnd()})},renderItem:function(e,t){var n=this.getActiveIndex(),r=t===n,o=null!=this.state.previousActiveIndex&&this.state.previousActiveIndex===t&&this.props.slide;return s.cloneElement(e,{active:r,ref:e.ref,key:e.key?e.key:t,index:t,animateOut:o,animateIn:r&&null!=this.state.previousActiveIndex&&this.props.slide,direction:this.state.direction,onAnimateOutEnd:o?this.handleItemAnimateOutEnd:null})},handleSelect:function(e,t){if(clearTimeout(this.timeout),this.isMounted()){var n=this.getActiveIndex();if(t=t||this.getDirection(n,e),this.props.onSelect&&this.props.onSelect(e,t),null==this.props.activeIndex&&e!==n){if(null!=this.state.previousActiveIndex)return;this.setState({activeIndex:e,previousActiveIndex:n,direction:t})}}}});t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(35),p=o(u),d=a["default"].createClass({displayName:"CarouselItem",propTypes:{direction:a["default"].PropTypes.oneOf(["prev","next"]),onAnimateOutEnd:a["default"].PropTypes.func,active:a["default"].PropTypes.bool,animateIn:a["default"].PropTypes.bool,animateOut:a["default"].PropTypes.bool,caption:a["default"].PropTypes.node,index:a["default"].PropTypes.number},getInitialState:function(){return{direction:null}},getDefaultProps:function(){return{active:!1,animateIn:!1,animateOut:!1}},handleAnimateOutEnd:function(){this.props.onAnimateOutEnd&&this.isMounted()&&this.props.onAnimateOutEnd(this.props.index)},componentWillReceiveProps:function(e){this.props.active!==e.active&&this.setState({direction:null})},componentDidUpdate:function(e){!this.props.active&&e.active&&p["default"].addEndEventListener(a["default"].findDOMNode(this),this.handleAnimateOutEnd),this.props.active!==e.active&&setTimeout(this.startAnimation,20)},startAnimation:function(){this.isMounted()&&this.setState({direction:"prev"===this.props.direction?"right":"left"})},render:function(){var e={item:!0,active:this.props.active&&!this.props.animateIn||this.props.animateOut,next:this.props.active&&this.props.animateIn&&"next"===this.props.direction,prev:this.props.active&&this.props.animateIn&&"prev"===this.props.direction};return this.state.direction&&(this.props.animateIn||this.props.animateOut)&&(e[this.state.direction]=!0),a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children,this.props.caption?this.renderCaption():null)},renderCaption:function(){return a["default"].createElement("div",{className:"carousel-caption"},this.props.caption)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(1),s=r(o),a=n(35),i=r(a),l=n(12),u=r(l),p={propTypes:{defaultExpanded:s["default"].PropTypes.bool,expanded:s["default"].PropTypes.bool},getInitialState:function(){var e=null!=this.props.defaultExpanded?this.props.defaultExpanded:null!=this.props.expanded?this.props.expanded:!1;return{expanded:e,collapsing:!1}},componentWillMount:function(){u["default"]("CollapsibleMixin","Collapse Component")},componentWillUpdate:function(e,t){var n=null!=e.expanded?e.expanded:t.expanded;if(n!==this.isExpanded()){var r=this.getCollapsibleDOMNode(),o=this.dimension(),s="0";n||(s=this.getCollapsibleDimensionValue()),r.style[o]=s+"px",this._afterWillUpdate()}},componentDidUpdate:function(e,t){this._checkToggleCollapsing(e,t),this._checkStartAnimation()},_afterWillUpdate:function(){},_checkStartAnimation:function(){if(this.state.collapsing){var e=this.getCollapsibleDOMNode(),t=this.dimension(),n=this.getCollapsibleDimensionValue(),r=void 0;r=this.isExpanded()?n+"px":"0px",e.style[t]=r}},_checkToggleCollapsing:function(e,t){var n=null!=e.expanded?e.expanded:t.expanded,r=this.isExpanded();n!==r&&(n?this._handleCollapse():this._handleExpand())},_handleExpand:function(){var e=this,t=this.getCollapsibleDOMNode(),n=this.dimension(),r=function o(){e._removeEndEventListener(t,o),t.style[n]="",e.setState({collapsing:!1})};this._addEndEventListener(t,r),this.setState({collapsing:!0})},_handleCollapse:function(){var e=this,t=this.getCollapsibleDOMNode(),n=function r(){e._removeEndEventListener(t,r),e.setState({collapsing:!1})};this._addEndEventListener(t,n),this.setState({collapsing:!0})},_addEndEventListener:function(e,t){i["default"].addEndEventListener(e,t)},_removeEndEventListener:function(e,t){i["default"].removeEndEventListener(e,t)},dimension:function(){return"function"==typeof this.getCollapsibleDimension?this.getCollapsibleDimension():"height"},isExpanded:function(){return null!=this.props.expanded?this.props.expanded:this.state.expanded},getCollapsibleClassSet:function(e){var t={};return"string"==typeof e&&e.split(" ").forEach(function(e){e&&(t[e]=!0)}),t.collapsing=this.state.collapsing,t.collapse=!this.state.collapsing,t["in"]=this.isExpanded()&&!this.state.collapsing,t}};t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(1),s=r(o),a=n(5),i=r(a),l=n(26),u=r(l),p=n(4),d=r(p),f=n(9),c=r(f),h=n(11),m=r(h),v=s["default"].createClass({displayName:"CollapsibleNav",mixins:[i["default"]],propTypes:{onSelect:s["default"].PropTypes.func,activeHref:s["default"].PropTypes.string,activeKey:s["default"].PropTypes.any,collapsible:s["default"].PropTypes.bool,expanded:s["default"].PropTypes.bool,eventKey:s["default"].PropTypes.any},getDefaultProps:function(){return{collapsible:!1,expanded:!1}},render:function(){var e=this.props.collapsible?"navbar-collapse":null,t=this.props.collapsible?this.renderCollapsibleNavChildren:this.renderChildren,n=s["default"].createElement("div",{eventKey:this.props.eventKey,className:d["default"](this.props.className,e)},c["default"].map(this.props.children,t));return this.props.collapsible?s["default"].createElement(u["default"],{"in":this.props.expanded},n):n},getChildActiveProp:function(e){return e.props.active?!0:null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey?!0:null!=this.props.activeHref&&e.props.href===this.props.activeHref?!0:e.props.active},renderChildren:function(e,t){var n=e.key?e.key:t;return o.cloneElement(e,{activeKey:this.props.activeKey,activeHref:this.props.activeHref,ref:"nocollapse_"+n,key:n,navItem:!0})},renderCollapsibleNavChildren:function(e,t){var n=e.key?e.key:t;return o.cloneElement(e,{active:this.getChildActiveProp(e),activeKey:this.props.activeKey,activeHref:this.props.activeHref,onSelect:m["default"](e.props.onSelect,this.props.onSelect),ref:"collapsible_"+n,key:n,navItem:!0})}});t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(10)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(5),d=i(p),f=n(27),c=i(f),h=n(63),m=i(h),v=n(8),y=i(v),g=n(12),b=i(g),T=n(95),P=i(T),x=function(e){function t(n){o(this,t),e.call(this,n)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.title,n=e.navItem,r=a(e,["title","navItem"]),o=P["default"](r,c["default"].ControlledComponent.propTypes);return n?u["default"].createElement(m["default"],this.props):u["default"].createElement(c["default"],r,u["default"].createElement(c["default"].Toggle,o,t),u["default"].createElement(c["default"].Menu,null,this.props.children))},t}(u["default"].Component);x.propTypes=s({noCaret:u["default"].PropTypes.bool,navItem:y["default"].all([u["default"].PropTypes.bool,function(e,t,n){e.navItem&&b["default"]("navItem","NavDropdown component","https://github.com/react-bootstrap/react-bootstrap/issues/526")}]),title:u["default"].PropTypes.node.isRequired},c["default"].propTypes,d["default"].propTypes),x.defaultProps={pullRight:!1,dropup:!1,navItem:!1,noCaret:!1},t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(81),u=s(l),p=n(4),d=s(p),f=n(98),c=s(f),h=n(9),m=s(h),v=n(11),y=s(v),g=function(e){function t(n){o(this,t),e.call(this,n),this.focusNext=this.focusNext.bind(this),this.focusPrevious=this.focusPrevious.bind(this),this.getFocusableMenuItems=this.getFocusableMenuItems.bind(this),this.getItemsAndActiveIndex=this.getItemsAndActiveIndex.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}return r(t,e),t.prototype.handleKeyDown=function(e){switch(e.keyCode){case u["default"].codes.down:this.focusNext(),e.preventDefault();break;case u["default"].codes.up:this.focusPrevious(),e.preventDefault();break;case u["default"].codes.esc:case u["default"].codes.tab:this.props.onClose(e)}},t.prototype.focusNext=function(){var e=this.getItemsAndActiveIndex(),t=e.items,n=e.activeItemIndex;return n===t.length-1?void t[0].focus():void t[n+1].focus()},t.prototype.focusPrevious=function(){var e=this.getItemsAndActiveIndex(),t=e.items,n=e.activeItemIndex;return 0===n?void t[t.length-1].focus():void t[n-1].focus()},t.prototype.getItemsAndActiveIndex=function(){var e=this.getFocusableMenuItems(),t=document.activeElement,n=e.indexOf(t);return{items:e,activeItemIndex:n}},t.prototype.getFocusableMenuItems=function(){var e=i["default"].findDOMNode(this);return void 0===e?[]:[].slice.call(e.querySelectorAll('[tabIndex="-1"]'),0)},t.prototype.render=function(){var e=this,t=m["default"].map(this.props.children,function(t){var n=t.props||{},r=n.children,o=n.onKeyDown,s=n.onSelect;return i["default"].cloneElement(t,{onKeyDown:y["default"](o,e.handleKeyDown),onSelect:y["default"](s,e.props.onSelect)},r)}),n={"dropdown-menu":!0,"dropdown-menu-right":this.props.pullRight},r=i["default"].createElement("ul",{className:d["default"](this.props.className,n),role:"menu","aria-labelledby":this.props.labelledBy},t);return this.props.open&&(r=i["default"].createElement(c["default"],{noWrap:!0,onRootClose:this.props.onClose},r)),r},t}(i["default"].Component);g.defaultProps={bsRole:"menu",pullRight:!1},g.propTypes={open:i["default"].PropTypes.bool,pullRight:i["default"].PropTypes.bool,onClose:i["default"].PropTypes.func,labelledBy:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.number]),onSelect:i["default"].PropTypes.func},t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n=e.querySelectorAll("."+t.join("."));n=[].map.call(n,function(e){return e});for(var r=0;r<t.length;r++)if(!e.className.match(new RegExp("\\b"+t[r]+"\\b")))return n;return n.unshift(e),n}var o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(23),l=o(i),u=n(12),p=o(u);t["default"]={componentWillMount:function(){p["default"]("FadeMixin","Fade Component")},_fadeIn:function(){var e=void 0;this.isMounted()&&(e=r(a["default"].findDOMNode(this),["fade"]),e.length&&e.forEach(function(e){e.className+=" in"}))},_fadeOut:function(){var e=r(this._fadeOutEl,["fade","in"]);e.length&&e.forEach(function(e){e.className=e.className.replace(/\bin\b/,"")}),setTimeout(this._handleFadeOutEnd,300)},_handleFadeOutEnd:function(){this._fadeOutEl&&this._fadeOutEl.parentNode&&this._fadeOutEl.parentNode.removeChild(this._fadeOutEl)},componentDidMount:function(){document.querySelectorAll&&setTimeout(this._fadeIn,20)},componentWillUnmount:function(){var e=r(a["default"].findDOMNode(this),["fade"]),t=this.props.container&&a["default"].findDOMNode(this.props.container)||l["default"].ownerDocument(this).body;e.length&&(this._fadeOutEl=document.createElement("div"),t.appendChild(this._fadeOutEl),this._fadeOutEl.appendChild(a["default"].findDOMNode(this).cloneNode(!0)),setTimeout(this._fadeOut,20))}},e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=n(34),f=a(d),c=n(36),h=a(c),m=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.getValue=function(){var e=this.props,t=e.children,n=e.value;return t?t:n},t.prototype.renderInput=function(){return l["default"].createElement("p",s({},this.props,{className:p["default"](this.props.className,"form-control-static"),ref:"input",key:"input"}),this.getValue())},t}(f["default"]);m.propTypes={value:h["default"],children:h["default"]},t["default"]=m,e.exports=t["default"]},function(e,t,n){ -"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(2)["default"],a=n(72)["default"];t.__esModule=!0;var i=n(1),l=s(i),u=n(34),p=s(u),d=n(54),f=a(d),c=n(12),h=s(c),m=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return"static"===this.props.type?(h["default"]("Input type=static","StaticText"),l["default"].createElement(f.Static,this.props)):e.prototype.render.call(this)},t}(p["default"]);m.propTypes={type:l["default"].PropTypes.string},t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(8),p=o(u),d=a["default"].createClass({displayName:"Jumbotron",propTypes:{componentClass:p["default"].elementType},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props.componentClass;return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,"jumbotron")}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=a["default"].createClass({displayName:"Label",mixins:[p["default"]],getDefaultProps:function(){return{bsClass:"label",bsStyle:"default"}},render:function(){var e=this.getBsClassSet();return a["default"].createElement("span",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=n(9),f=a(d),c=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this,t=f["default"].map(this.props.children,function(e,t){return i.cloneElement(e,{key:e.key?e.key:t})}),n=!1;return this.props.children?l["default"].Children.forEach(this.props.children,function(t){e.isAnchorOrButton(t.props)&&(n=!0)}):n=!0,n?this.renderDiv(t):this.renderUL(t)},t.prototype.isAnchorOrButton=function(e){return e.href||e.onClick},t.prototype.renderUL=function(e){var t=f["default"].map(e,function(e,t){return i.cloneElement(e,{listItem:!0})});return l["default"].createElement("ul",s({},this.props,{className:p["default"](this.props.className,"list-group")}),t)},t.prototype.renderDiv=function(e){return l["default"].createElement("div",s({},this.props,{className:p["default"](this.props.className,"list-group")}),e)},t}(l["default"].Component);c.propTypes={className:l["default"].PropTypes.string,id:l["default"].PropTypes.oneOfType([l["default"].PropTypes.string,l["default"].PropTypes.number])},t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(5),l=o(i),u=n(4),p=o(u),d=a["default"].createClass({displayName:"ListGroupItem",mixins:[l["default"]],propTypes:{bsStyle:a["default"].PropTypes.oneOf(["danger","info","success","warning"]),className:a["default"].PropTypes.string,active:a["default"].PropTypes.any,disabled:a["default"].PropTypes.any,header:a["default"].PropTypes.node,listItem:a["default"].PropTypes.bool,onClick:a["default"].PropTypes.func,eventKey:a["default"].PropTypes.any,href:a["default"].PropTypes.string,target:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"list-group-item",listItem:!1}},render:function(){var e=this.getBsClassSet();return e.active=this.props.active,e.disabled=this.props.disabled,this.props.href?this.renderAnchor(e):this.props.onClick?this.renderButton(e):this.props.listItem?this.renderLi(e):this.renderSpan(e)},renderLi:function(e){return a["default"].createElement("li",r({},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},renderAnchor:function(e){return a["default"].createElement("a",r({},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},renderButton:function(e){return a["default"].createElement("button",r({type:"button"},this.props,{className:p["default"](this.props.className,e)}),this.props.children)},renderSpan:function(e){return a["default"].createElement("span",r({},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},renderStructuredContent:function(){var e=void 0;e=a["default"].isValidElement(this.props.header)?s.cloneElement(this.props.header,{key:"header",className:p["default"](this.props.header.props.className,"list-group-item-heading")}):a["default"].createElement("h4",{key:"header",className:"list-group-item-heading"},this.props.header);var t=a["default"].createElement("p",{key:"content",className:"list-group-item-text"},this.props.children);return[e,t]}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(8),d=s(p),f=n(14),c=s(f),h=function(e){function t(n){o(this,t),e.call(this,n),this.handleClick=this.handleClick.bind(this)}return r(t,e),t.prototype.handleClick=function(e){(!this.props.href||this.props.disabled)&&e.preventDefault(),this.props.disabled||this.props.onSelect&&this.props.onSelect(e,this.props.eventKey)},t.prototype.render=function(){if(this.props.divider)return i["default"].createElement("li",{role:"separator",className:"divider"});if(this.props.header)return i["default"].createElement("li",{role:"heading",className:"dropdown-header"},this.props.children);var e={disabled:this.props.disabled};return i["default"].createElement("li",{role:"presentation",className:u["default"](this.props.className,e),style:this.props.style},i["default"].createElement(c["default"],{role:"menuitem",tabIndex:"-1",id:this.props.id,target:this.props.target,title:this.props.title,href:this.props.href||"",onKeyDown:this.props.onKeyDown,onClick:this.handleClick},this.props.children))},t}(i["default"].Component);t["default"]=h,h.propTypes={disabled:i["default"].PropTypes.bool,divider:d["default"].all([i["default"].PropTypes.bool,function(e,t,n){return e.divider&&e.children?new Error("Children will not be rendered for dividers"):void 0}]),eventKey:i["default"].PropTypes.oneOfType([i["default"].PropTypes.number,i["default"].PropTypes.string]),header:i["default"].PropTypes.bool,href:i["default"].PropTypes.string,target:i["default"].PropTypes.string,title:i["default"].PropTypes.string,onKeyDown:i["default"].PropTypes.func,onSelect:i["default"].PropTypes.func,id:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.number])},h.defaultProps={divider:!1,disabled:!1,header:!1},e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n=v["default"].ownerDocument(t);return e===n.body||e===n.documentElement?n.documentElement.clientHeight:e.clientHeight}function o(e){return e.props.container&&f["default"].findDOMNode(e.props.container)||v["default"].ownerDocument(e).body}function s(e,t){var n=v["default"].ownerDocument(e),r=!n.addEventListener,o=void 0;return B&&B.remove(),r?(document.attachEvent("onfocusin",t),o=function(){return document.detachEvent("onfocusin",t)}):(document.addEventListener("focus",t,!0),o=function(){return document.removeEventListener("focus",t,!0)}),B={remove:o}}var a=n(3)["default"],i=n(10)["default"],l=n(150)["default"],u=n(17)["default"],p=n(2)["default"];t.__esModule=!0;var d=n(1),f=p(d),c=n(4),h=p(c),m=n(23),v=p(m),y=n(183),g=p(y),b=n(71),T=p(b),P=n(11),x=p(P),E=n(8),C=p(E),_=n(47),N=p(_),O=n(32),w=p(O),S=n(123),k=p(S),M=n(58),D=p(M),A=n(60),I=p(A),R=n(61),L=p(R),j=n(59),K=p(j),B=void 0,F=f["default"].createClass({displayName:"Modal",propTypes:a({},N["default"].propTypes,k["default"].propTypes,{backdrop:f["default"].PropTypes.oneOf(["static",!0,!1]),keyboard:f["default"].PropTypes.bool,animation:f["default"].PropTypes.bool,dialogComponent:C["default"].elementType,autoFocus:f["default"].PropTypes.bool,enforceFocus:f["default"].PropTypes.bool,bsStyle:f["default"].PropTypes.string,show:f["default"].PropTypes.bool}),getDefaultProps:function(){return{bsClass:"modal",dialogComponent:k["default"],show:!1,animation:!0,backdrop:!0,keyboard:!0,autoFocus:!0,enforceFocus:!0}},getInitialState:function(){return{exited:!this.props.show}},render:function(){var e=this.props,t=(e.children,e.animation),n=e.backdrop,r=i(e,["children","animation","backdrop"]),o=r.onExit,s=r.onExiting,l=r.onEnter,u=r.onEntering,p=r.onEntered,d=!!r.show,c=r.dialogComponent,m=d||t&&!this.state.exited;if(!m)return null;var v=f["default"].createElement(c,a({},r,{ref:this._setDialogRef,className:h["default"](this.props.className,{"in":d&&!t}),onClick:n===!0?this.handleBackdropClick:null}),this.renderContent());return t&&(v=f["default"].createElement(w["default"],{transitionAppear:!0,unmountOnExit:!0,"in":d,timeout:F.TRANSITION_DURATION,onExit:o,onExiting:s,onExited:this.handleHidden,onEnter:l,onEntering:u,onEntered:p},v)),n&&(v=this.renderBackdrop(v)),f["default"].createElement(N["default"],{container:r.container},v)},renderContent:function(){var e=this;return f["default"].Children.map(this.props.children,function(t){return t&&t.type&&t.type.__isModalHeader?d.cloneElement(t,{onHide:x["default"](e.props.onHide,t.props.onHide)}):t})},renderBackdrop:function(e){var t=this.props,n=t.animation,r=t.bsClass,o=F.BACKDROP_TRANSITION_DURATION,s=this.props.backdrop===!0?this.handleBackdropClick:null,a=f["default"].createElement("div",{ref:"backdrop",className:h["default"](r+"-backdrop",{"in":this.props.show&&!n}),onClick:s});return f["default"].createElement("div",{ref:"modal"},n?f["default"].createElement(w["default"],{transitionAppear:!0,"in":this.props.show,timeout:o},a):a,e)},_setDialogRef:function(e){l(this.refs)&&!u(this.refs).length&&(this.refs={}),this.refs.dialog=e,this.props.backdrop||(this.refs.modal=e)},componentWillReceiveProps:function(e){e.show?this.setState({exited:!1}):e.animation||this.setState({exited:!0})},componentWillUpdate:function(e){e.show&&this.checkForFocus()},componentDidMount:function(){this.props.show&&this.onShow()},componentDidUpdate:function(e){var t=this.props.animation;!e.show||this.props.show||t?!e.show&&this.props.show&&this.onShow():this.onHide()},componentWillUnmount:function(){this.props.show&&this.onHide()},onShow:function(){var e=this,t=v["default"].ownerDocument(this),n=v["default"].ownerWindow(this);this._onDocumentKeyupListener=T["default"].listen(t,"keyup",this.handleDocumentKeyUp),this._onWindowResizeListener=T["default"].listen(n,"resize",this.handleWindowResize),this.props.enforceFocus&&(this._onFocusinListener=s(this,this.enforceFocus));var a=o(this);a.className+=a.className.length?" modal-open":"modal-open",this._containerIsOverflowing=a.scrollHeight>r(a,this),this._originalPadding=a.style.paddingRight,this._containerIsOverflowing&&(a.style.paddingRight=parseInt(this._originalPadding||0,10)+g["default"]()+"px"),this.props.backdrop&&this.iosClickHack(),this.setState(this._getStyles(),function(){return e.focusModalContent()})},onHide:function(){this._onDocumentKeyupListener.remove(),this._onWindowResizeListener.remove(),this._onFocusinListener&&this._onFocusinListener.remove();var e=o(this);e.style.paddingRight=this._originalPadding,e.className=e.className.replace(/ ?modal-open/,""),this.restoreLastFocus()},handleHidden:function(){if(this.setState({exited:!0}),this.onHide(),this.props.onExited){var e;(e=this.props).onExited.apply(e,arguments)}},handleBackdropClick:function(e){e.target===e.currentTarget&&this.props.onHide()},handleDocumentKeyUp:function(e){this.props.keyboard&&27===e.keyCode&&this.props.onHide()},handleWindowResize:function(){this.setState(this._getStyles())},checkForFocus:function(){v["default"].canUseDom&&(this.lastFocus=v["default"].activeElement(document))},focusModalContent:function(){var e=f["default"].findDOMNode(this.refs.dialog),t=v["default"].activeElement(v["default"].ownerDocument(this)),n=t&&v["default"].contains(e,t);e&&this.props.autoFocus&&!n&&(this.lastFocus=t,e.focus())},restoreLastFocus:function(){this.lastFocus&&this.lastFocus.focus&&(this.lastFocus.focus(),this.lastFocus=null)},enforceFocus:function(){if(this.isMounted()){var e=v["default"].activeElement(v["default"].ownerDocument(this)),t=f["default"].findDOMNode(this.refs.dialog);t&&t!==e&&!v["default"].contains(t,e)&&t.focus()}},iosClickHack:function(){f["default"].findDOMNode(this.refs.modal).onclick=function(){},f["default"].findDOMNode(this.refs.backdrop).onclick=function(){}},_getStyles:function(){if(!v["default"].canUseDom)return{};var e=f["default"].findDOMNode(this.refs.modal),t=e.scrollHeight,n=o(this),s=this._containerIsOverflowing,a=t>r(n,this);return{dialogStyles:{paddingRight:s&&!a?g["default"]():void 0,paddingLeft:!s&&a?g["default"]():void 0}}}});F.Body=D["default"],F.Header=I["default"],F.Title=L["default"],F.Footer=K["default"],F.Dialog=k["default"],F.TRANSITION_DURATION=300,F.BACKDROP_TRANSITION_DURATION=150,t["default"]=F,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=a["default"].createClass({displayName:"ModalDialog",mixins:[p["default"]],propTypes:{onHide:a["default"].PropTypes.func.isRequired,dialogClassName:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"modal",closeButton:!0}},render:function(){var e=r({display:"block"},this.props.style),t=this.props.bsClass,n=this.getBsClassSet();return delete n.modal,n[t+"-dialog"]=!0,a["default"].createElement("div",r({},this.props,{title:null,tabIndex:"-1",role:"dialog",style:e,className:l["default"](this.props.className,t)}),a["default"].createElement("div",{className:l["default"](this.props.dialogClassName,n)},a["default"].createElement("div",{className:t+"-content",role:"document"},this.props.children)))}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(5),l=o(i),u=n(4),p=o(u),d=n(9),f=o(d),c=n(11),h=o(c),m=n(8),v=o(m),y=a["default"].createClass({displayName:"Navbar",mixins:[l["default"]],propTypes:{fixedTop:a["default"].PropTypes.bool,fixedBottom:a["default"].PropTypes.bool,staticTop:a["default"].PropTypes.bool,inverse:a["default"].PropTypes.bool,fluid:a["default"].PropTypes.bool,role:a["default"].PropTypes.string,componentClass:v["default"].elementType,brand:a["default"].PropTypes.node,toggleButton:a["default"].PropTypes.node,toggleNavKey:a["default"].PropTypes.oneOfType([a["default"].PropTypes.string,a["default"].PropTypes.number]),onToggle:a["default"].PropTypes.func,navExpanded:a["default"].PropTypes.bool,defaultNavExpanded:a["default"].PropTypes.bool},getDefaultProps:function(){return{bsClass:"navbar",bsStyle:"default",role:"navigation",componentClass:"nav",fixedTop:!1,fixedBottom:!1,staticTop:!1,inverse:!1,fluid:!1,defaultNavExpanded:!1}},getInitialState:function(){return{navExpanded:this.props.defaultNavExpanded}},shouldComponentUpdate:function(){return!this._isChanging},handleToggle:function(){this.props.onToggle&&(this._isChanging=!0,this.props.onToggle(),this._isChanging=!1),this.setState({navExpanded:!this.state.navExpanded})},isNavExpanded:function(){return null!=this.props.navExpanded?this.props.navExpanded:this.state.navExpanded},render:function(){var e=this.getBsClassSet(),t=this.props.componentClass;return e["navbar-fixed-top"]=this.props.fixedTop,e["navbar-fixed-bottom"]=this.props.fixedBottom,e["navbar-static-top"]=this.props.staticTop,e["navbar-inverse"]=this.props.inverse,a["default"].createElement(t,r({},this.props,{className:p["default"](this.props.className,e)}),a["default"].createElement("div",{className:this.props.fluid?"container-fluid":"container"},this.props.brand||this.props.toggleButton||null!=this.props.toggleNavKey?this.renderHeader():null,f["default"].map(this.props.children,this.renderChild)))},renderChild:function(e,t){return s.cloneElement(e,{navbar:!0,collapsible:null!=this.props.toggleNavKey&&this.props.toggleNavKey===e.props.eventKey,expanded:null!=this.props.toggleNavKey&&this.props.toggleNavKey===e.props.eventKey&&this.isNavExpanded(),key:e.key?e.key:t})},renderHeader:function(){var e=void 0;return this.props.brand&&(e=a["default"].isValidElement(this.props.brand)?s.cloneElement(this.props.brand,{className:p["default"](this.props.brand.props.className,"navbar-brand")}):a["default"].createElement("span",{className:"navbar-brand"},this.props.brand)),a["default"].createElement("div",{className:"navbar-header"},e,this.props.toggleButton||null!=this.props.toggleNavKey?this.renderToggleButton():null)},renderToggleButton:function(){var e=void 0;return a["default"].isValidElement(this.props.toggleButton)?s.cloneElement(this.props.toggleButton,{className:p["default"](this.props.toggleButton.props.className,"navbar-toggle"),onClick:h["default"](this.handleToggle,this.props.toggleButton.props.onClick)}):(e=null!=this.props.toggleButton?this.props.toggleButton:[a["default"].createElement("span",{className:"sr-only",key:0},"Toggle navigation"),a["default"].createElement("span",{className:"icon-bar",key:1}),a["default"].createElement("span",{className:"icon-bar",key:2}),a["default"].createElement("span",{className:"icon-bar",key:3})],a["default"].createElement("button",{className:"navbar-toggle",type:"button",onClick:this.handleToggle},e))}});t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)?t.indexOf(e)>=0:e===t}var o=n(3)["default"],s=n(17)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(11),p=a(u),d=n(145),f=a(d),c=n(65),h=a(c),m=n(48),v=a(m),y=n(221),g=a(y),b=l["default"].createClass({displayName:"OverlayTrigger",propTypes:o({},h["default"].propTypes,{trigger:l["default"].PropTypes.oneOfType([l["default"].PropTypes.oneOf(["click","hover","focus"]),l["default"].PropTypes.arrayOf(l["default"].PropTypes.oneOf(["click","hover","focus"]))]),delay:l["default"].PropTypes.number,delayShow:l["default"].PropTypes.number,delayHide:l["default"].PropTypes.number,defaultOverlayShown:l["default"].PropTypes.bool,overlay:l["default"].PropTypes.node.isRequired,onBlur:l["default"].PropTypes.func,onClick:l["default"].PropTypes.func,onFocus:l["default"].PropTypes.func,onMouseEnter:l["default"].PropTypes.func,onMouseLeave:l["default"].PropTypes.func,target:function(){},onHide:function(){},show:function(){}}),getDefaultProps:function(){return{defaultOverlayShown:!1,trigger:["hover","focus"]}},getInitialState:function(){return{isOverlayShown:this.props.defaultOverlayShown}},show:function(){this.setState({isOverlayShown:!0})},hide:function(){this.setState({isOverlayShown:!1})},toggle:function(){this.state.isOverlayShown?this.hide():this.show()},componentDidMount:function(){this._mountNode=document.createElement("div"),l["default"].render(this._overlay,this._mountNode)},componentWillUnmount:function(){l["default"].unmountComponentAtNode(this._mountNode),this._mountNode=null,clearTimeout(this._hoverDelay)},componentDidUpdate:function(){this._mountNode&&l["default"].render(this._overlay,this._mountNode)},getOverlayTarget:function(){return l["default"].findDOMNode(this)},getOverlay:function(){var e=o({},g["default"](this.props,s(h["default"].propTypes)),{show:this.state.isOverlayShown,onHide:this.hide,target:this.getOverlayTarget,onExit:this.props.onExit,onExiting:this.props.onExiting,onExited:this.props.onExited,onEnter:this.props.onEnter,onEntering:this.props.onEntering,onEntered:this.props.onEntered}),t=i.cloneElement(this.props.overlay,{placement:e.placement,container:e.container});return l["default"].createElement(h["default"],e,t)},render:function(){var e=l["default"].Children.only(this.props.children),t={"aria-describedby":this.props.overlay.props.id};return this._overlay=this.getOverlay(),t.onClick=p["default"](e.props.onClick,this.props.onClick),r("click",this.props.trigger)&&(t.onClick=p["default"](this.toggle,t.onClick)),r("hover",this.props.trigger)&&(v["default"](!("hover"===this.props.trigger),'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibilty of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),t.onMouseOver=p["default"](this.handleDelayedShow,this.props.onMouseOver),t.onMouseOut=p["default"](this.handleDelayedHide,this.props.onMouseOut)),r("focus",this.props.trigger)&&(t.onFocus=p["default"](this.handleDelayedShow,this.props.onFocus),t.onBlur=p["default"](this.handleDelayedHide,this.props.onBlur)),i.cloneElement(e,t)},handleDelayedShow:function(){var e=this;if(null!=this._hoverDelay)return clearTimeout(this._hoverDelay),void(this._hoverDelay=null);var t=null!=this.props.delayShow?this.props.delayShow:this.props.delay;return t?void(this._hoverDelay=setTimeout(function(){e._hoverDelay=null,e.show()},t)):void this.show()},handleDelayedHide:function(){var e=this;if(null!=this._hoverDelay)return clearTimeout(this._hoverDelay),void(this._hoverDelay=null);var t=null!=this.props.delayHide?this.props.delayHide:this.props.delay;return t?void(this._hoverDelay=setTimeout(function(){e._hoverDelay=null,e.hide()},t)):void this.hide()}});b.withContext=f["default"](b,"overlay"),t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=a["default"].createClass({displayName:"PageHeader",render:function(){return a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,"page-header")}),a["default"].createElement("h1",null,this.props.children))}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(14),p=o(u),d=a["default"].createClass({displayName:"PageItem",propTypes:{href:a["default"].PropTypes.string,target:a["default"].PropTypes.string,title:a["default"].PropTypes.string,disabled:a["default"].PropTypes.bool,previous:a["default"].PropTypes.bool,next:a["default"].PropTypes.bool,onSelect:a["default"].PropTypes.func,eventKey:a["default"].PropTypes.any},getDefaultProps:function(){return{disabled:!1,previous:!1,next:!1}},render:function(){var e={disabled:this.props.disabled,previous:this.props.previous,next:this.props.next};return a["default"].createElement("li",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement(p["default"],{href:this.props.href,title:this.props.title,target:this.props.target,onClick:this.handleSelect},this.props.children))},handleSelect:function(e){(this.props.onSelect||this.props.disabled)&&(e.preventDefault(),this.props.disabled||this.props.onSelect(this.props.eventKey,this.props.href,this.props.target))}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(9),p=o(u),d=n(11),f=o(d),c=a["default"].createClass({displayName:"Pager",propTypes:{onSelect:a["default"].PropTypes.func},render:function(){return a["default"].createElement("ul",r({},this.props,{className:l["default"](this.props.className,"pager")}),p["default"].map(this.props.children,this.renderPageItem))},renderPageItem:function(e,t){return s.cloneElement(e,{onSelect:f["default"](e.props.onSelect,this.props.onSelect),key:e.key?e.key:t})}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=n(130),f=o(d),c=n(8),h=o(c),m=n(14),v=o(m),y=a["default"].createClass({displayName:"Pagination",mixins:[p["default"]],propTypes:{activePage:a["default"].PropTypes.number,items:a["default"].PropTypes.number,maxButtons:a["default"].PropTypes.number,ellipsis:a["default"].PropTypes.bool,first:a["default"].PropTypes.bool,last:a["default"].PropTypes.bool,prev:a["default"].PropTypes.bool,next:a["default"].PropTypes.bool,onSelect:a["default"].PropTypes.func,buttonComponentClass:h["default"].elementType},getDefaultProps:function(){return{activePage:1,items:1,maxButtons:0,first:!1,last:!1,prev:!1,next:!1,ellipsis:!0,buttonComponentClass:v["default"],bsClass:"pagination"}},renderPageButtons:function(){var e=[],t=void 0,n=void 0,r=void 0,o=this.props,s=o.maxButtons,i=o.activePage,l=o.items,u=o.onSelect,p=o.ellipsis,d=o.buttonComponentClass;if(s){var c=i-parseInt(s/2,10);t=c>1?c:1,r=l>=t+s,r?n=t+s-1:(n=l,t=l-s+1,1>t&&(t=1))}else t=1,n=l;for(var h=t;n>=h;h++)e.push(a["default"].createElement(f["default"],{key:h,eventKey:h,active:h===i,onSelect:u,buttonComponentClass:d},h));return s&&r&&p&&e.push(a["default"].createElement(f["default"],{key:"ellipsis",disabled:!0,buttonComponentClass:d},a["default"].createElement("span",{"aria-label":"More"},"..."))),e},renderPrev:function(){return this.props.prev?a["default"].createElement(f["default"],{key:"prev",eventKey:this.props.activePage-1,disabled:1===this.props.activePage,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"Previous"},"‹")):null},renderNext:function(){return this.props.next?a["default"].createElement(f["default"],{key:"next",eventKey:this.props.activePage+1,disabled:this.props.activePage>=this.props.items,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"Next"},"›")):null},renderFirst:function(){return this.props.first?a["default"].createElement(f["default"],{key:"first",eventKey:1,disabled:1===this.props.activePage,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"First"},"«")):null},renderLast:function(){return this.props.last?a["default"].createElement(f["default"],{key:"last",eventKey:this.props.items,disabled:this.props.activePage>=this.props.items,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"Last"},"»")):null},render:function(){return a["default"].createElement("ul",r({},this.props,{className:l["default"](this.props.className,this.getBsClassSet())}),this.renderFirst(),this.renderPrev(),this.renderPageButtons(),this.renderNext(),this.renderLast())}});t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(10)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(5),d=s(p),f=n(146),c=s(f),h=n(8),m=s(h),v=i["default"].createClass({displayName:"PaginationButton",mixins:[d["default"]],propTypes:{className:i["default"].PropTypes.string,eventKey:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.number]),onSelect:i["default"].PropTypes.func,disabled:i["default"].PropTypes.bool,active:i["default"].PropTypes.bool,buttonComponentClass:m["default"].elementType},getDefaultProps:function(){return{active:!1,disabled:!1}},handleClick:function(e){if(!this.props.disabled&&this.props.onSelect){var t=c["default"](this.props.eventKey);this.props.onSelect(e,t)}},render:function(){var e=r({active:this.props.active,disabled:this.props.disabled},this.getBsClassSet()),t=this.props,n=t.className,s=o(t,["className"]),a=this.props.buttonComponentClass;return i["default"].createElement("li",{className:u["default"](n,e)},i["default"].createElement(a,r({},s,{onClick:this.handleClick})))}});t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(10)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(5),d=s(p),f=n(26),c=s(f),h=i["default"].createClass({displayName:"Panel",mixins:[d["default"]],propTypes:{collapsible:i["default"].PropTypes.bool,onSelect:i["default"].PropTypes.func,header:i["default"].PropTypes.node,id:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.number]),footer:i["default"].PropTypes.node,defaultExpanded:i["default"].PropTypes.bool,expanded:i["default"].PropTypes.bool,eventKey:i["default"].PropTypes.any,headerRole:i["default"].PropTypes.string,panelRole:i["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"panel",bsStyle:"default",defaultExpanded:!1}},getInitialState:function(){return{expanded:this.props.defaultExpanded}},handleSelect:function(e){e.selected=!0,this.props.onSelect?this.props.onSelect(e,this.props.eventKey):e.preventDefault(),e.selected&&this.handleToggle()},handleToggle:function(){this.setState({expanded:!this.state.expanded})},isExpanded:function(){return null!=this.props.expanded?this.props.expanded:this.state.expanded},render:function(){var e=this.props,t=e.headerRole,n=e.panelRole,s=r(e,["headerRole","panelRole"]);return i["default"].createElement("div",o({},s,{className:u["default"](this.props.className,this.getBsClassSet()),id:this.props.collapsible?null:this.props.id,onSelect:null}),this.renderHeading(t),this.props.collapsible?this.renderCollapsibleBody(n):this.renderBody(),this.renderFooter())},renderCollapsibleBody:function(e){var t={className:this.prefixClass("collapse"),id:this.props.id,ref:"panel","aria-hidden":!this.isExpanded()};return e&&(t.role=e),i["default"].createElement(c["default"],{"in":this.isExpanded()},i["default"].createElement("div",t,this.renderBody()))},renderBody:function(){function e(){return{key:l.length}}function t(t){l.push(a.cloneElement(t,e()))}function n(t){l.push(i["default"].createElement("div",o({className:p},e()),t))}function r(){0!==u.length&&(n(u),u=[])}var s=this.props.children,l=[],u=[],p=this.prefixClass("body");return Array.isArray(s)&&0!==s.length?(s.forEach(function(e){this.shouldRenderFill(e)?(r(),t(e)):u.push(e)}.bind(this)),r()):this.shouldRenderFill(s)?t(s):n(s),l},shouldRenderFill:function(e){return i["default"].isValidElement(e)&&null!=e.props.fill},renderHeading:function(e){var t=this.props.header;if(!t)return null;if(!i["default"].isValidElement(t)||Array.isArray(t))t=this.props.collapsible?this.renderCollapsibleTitle(t,e):t;else{var n=u["default"](this.prefixClass("title"),t.props.className);t=this.props.collapsible?a.cloneElement(t,{className:n,children:this.renderAnchor(t.props.children,e)}):a.cloneElement(t,{className:n})}return i["default"].createElement("div",{className:this.prefixClass("heading")},t)},renderAnchor:function(e,t){return i["default"].createElement("a",{href:"#"+(this.props.id||""),"aria-controls":this.props.collapsible?this.props.id:null,className:this.isExpanded()?null:"collapsed","aria-expanded":this.isExpanded(),"aria-selected":this.isExpanded(),onClick:this.handleSelect,role:t},e)},renderCollapsibleTitle:function(e,t){return i["default"].createElement("h4",{className:this.prefixClass("title"),role:"presentation"},this.renderAnchor(e,t))},renderFooter:function(){return this.props.footer?i["default"].createElement("div",{className:this.prefixClass("footer")},this.props.footer):null}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=n(8),f=o(d),c=a["default"].createClass({displayName:"Popover",mixins:[p["default"]],propTypes:{id:f["default"].isRequiredForA11y(a["default"].PropTypes.oneOfType([a["default"].PropTypes.string,a["default"].PropTypes.number])),placement:a["default"].PropTypes.oneOf(["top","right","bottom","left"]),positionLeft:a["default"].PropTypes.number,positionTop:a["default"].PropTypes.number,arrowOffsetLeft:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),arrowOffsetTop:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),title:a["default"].PropTypes.node},getDefaultProps:function(){ -return{placement:"right"}},render:function(){var e,t=(e={popover:!0},e[this.props.placement]=!0,e),n=r({left:this.props.positionLeft,top:this.props.positionTop,display:"block"},this.props.style),o={left:this.props.arrowOffsetLeft,top:this.props.arrowOffsetTop};return a["default"].createElement("div",r({role:"tooltip"},this.props,{className:l["default"](this.props.className,t),style:n,title:null}),a["default"].createElement("div",{className:"arrow",style:o}),this.props.title?this.renderTitle():null,a["default"].createElement("div",{className:"popover-content"},this.props.children))},renderTitle:function(){return a["default"].createElement("h3",{className:"popover-title"},this.props.title)}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(12),s=r(o),a=n(47),i=r(a);t["default"]=s["default"].wrapper(i["default"],{message:"The Portal component is deprecated in react-bootstrap. It has been moved to a more generic library: react-overlays. You can read more at: http://react-bootstrap.github.io/react-overlays/examples/#portal and https://github.com/react-bootstrap/react-bootstrap/issues/1084"}),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(12),s=r(o),a=n(97),i=r(a);t["default"]=s["default"].wrapper(i["default"],{message:"The Position component is deprecated in react-bootstrap. It has been moved to a more generic library: react-overlays. You can read more at: http://react-bootstrap.github.io/react-overlays/examples/#position and https://github.com/react-bootstrap/react-bootstrap/issues/1084"}),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){if(e[t]){var r=function(){var r=void 0,o=void 0;return l["default"].Children.forEach(e[t],function(e){e.type!==y&&(o=e.type.displayName?e.type.displayName:e.type,r=new Error("Children of "+n+" can contain only ProgressBar components. Found "+o))}),{v:r}}();if("object"==typeof r)return r.v}}var o=n(3)["default"],s=n(10)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(57),p=a(u),d=n(5),f=a(d),c=n(4),h=a(c),m=n(9),v=a(m),y=l["default"].createClass({displayName:"ProgressBar",propTypes:{min:i.PropTypes.number,now:i.PropTypes.number,max:i.PropTypes.number,label:i.PropTypes.node,srOnly:i.PropTypes.bool,striped:i.PropTypes.bool,active:i.PropTypes.bool,children:r,className:l["default"].PropTypes.string,interpolateClass:i.PropTypes.node,isChild:i.PropTypes.bool},mixins:[f["default"]],getDefaultProps:function(){return{bsClass:"progress-bar",min:0,max:100,active:!1,isChild:!1,srOnly:!1,striped:!1}},getPercentage:function(e,t,n){var r=1e3;return Math.round((e-t)/(n-t)*100*r)/r},render:function(){if(this.props.isChild)return this.renderProgressBar();var e=void 0;return e=this.props.children?v["default"].map(this.props.children,this.renderChildBar):this.renderProgressBar(),l["default"].createElement("div",o({},this.props,{className:h["default"](this.props.className,"progress"),min:null,max:null,label:null,"aria-valuetext":null}),e)},renderChildBar:function(e,t){return i.cloneElement(e,{isChild:!0,key:e.key?e.key:t})},renderProgressBar:function(){var e=this.props,t=e.className,n=e.label,r=e.now,a=e.min,i=e.max,u=s(e,["className","label","now","min","max"]),p=this.getPercentage(r,a,i);"string"==typeof n&&(n=this.renderLabel(p)),this.props.srOnly&&(n=l["default"].createElement("span",{className:"sr-only"},n));var d=h["default"](t,this.getBsClassSet(),{active:this.props.active,"progress-bar-striped":this.props.active||this.props.striped});return l["default"].createElement("div",o({},u,{className:d,role:"progressbar",style:{width:p+"%"},"aria-valuenow":this.props.now,"aria-valuemin":this.props.min,"aria-valuemax":this.props.max}),n)},renderLabel:function(e){var t=this.props.interpolateClass||p["default"];return l["default"].createElement(t,{now:this.props.now,min:this.props.min,max:this.props.max,percent:e,bsStyle:this.props.bsStyle},this.props.label)}});t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(10)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(5),d=i(p),f=n(25),c=i(f),h=n(27),m=i(h),v=n(137),y=i(v),g=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.title,r=e.onClick,o=e.target,s=e.href,i=e.bsStyle,l=a(e,["children","title","onClick","target","href","bsStyle"]),p=l.disabled,d=u["default"].createElement(c["default"],{onClick:r,bsStyle:i,disabled:p,target:o,href:s},n);return u["default"].createElement(m["default"],l,d,u["default"].createElement(y["default"],{"aria-label":n,bsStyle:i,disabled:p}),u["default"].createElement(m["default"].Menu,null,t))},t}(u["default"].Component);g.propTypes=s({},m["default"].propTypes,d["default"].propTypes,{onClick:function(){},target:u["default"].PropTypes.string,href:u["default"].PropTypes.string,title:u["default"].PropTypes.node.isRequired}),g.defaultProps={disabled:!1,dropup:!1,pullRight:!1},g.Toggle=y["default"],t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(7)["default"],o=n(6)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(53),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement(p["default"],s({},this.props,{useAnchor:!1,noCaret:!1}))},t}(l["default"].Component);t["default"]=d,d.defaultProps=p["default"].defaultProps,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(9),p=o(u),d=n(11),f=o(d),c=n(5),h=o(c),m=n(14),v=o(m),y=a["default"].createClass({displayName:"SubNav",mixins:[h["default"]],propTypes:{onSelect:a["default"].PropTypes.func,active:a["default"].PropTypes.bool,activeHref:a["default"].PropTypes.string,activeKey:a["default"].PropTypes.any,disabled:a["default"].PropTypes.bool,eventKey:a["default"].PropTypes.any,href:a["default"].PropTypes.string,title:a["default"].PropTypes.string,text:a["default"].PropTypes.node,target:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"nav",active:!1,disabled:!1}},handleClick:function(e){this.props.onSelect&&(e.preventDefault(),this.props.disabled||this.props.onSelect(this.props.eventKey,this.props.href,this.props.target))},isActive:function(){return this.isChildActive(this)},isChildActive:function(e){if(e.props.active)return!0;if(null!=this.props.activeKey&&this.props.activeKey===e.props.eventKey)return!0;if(null!=this.props.activeHref&&this.props.activeHref===e.props.href)return!0;if(e.props.children){var t=!1;return p["default"].forEach(e.props.children,function(e){this.isChildActive(e)&&(t=!0)},this),t}return!1},getChildActiveProp:function(e){return e.props.active?!0:null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey?!0:null!=this.props.activeHref&&e.props.href===this.props.activeHref?!0:e.props.active},render:function(){var e={active:this.isActive(),disabled:this.props.disabled};return a["default"].createElement("li",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement(v["default"],{href:this.props.href,title:this.props.title,target:this.props.target,onClick:this.handleClick},this.props.text),a["default"].createElement("ul",{className:"nav"},p["default"].map(this.props.children,this.renderNavItem)))},renderNavItem:function(e,t){return s.cloneElement(e,{active:this.getChildActiveProp(e),onSelect:f["default"](e.props.onSelect,this.props.onSelect),key:e.key?e.key:t})}});t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(10)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(70),u=s(l),p=n(69),d=s(p),f=n(9),c=s(f),h=n(12),m=s(h),v=i["default"].createClass({displayName:"TabbedArea",componentWillMount:function(){m["default"]("TabbedArea","Tabs","https://github.com/react-bootstrap/react-bootstrap/pull/1091")},render:function(){var e=this.props,t=e.children,n=r(e,["children"]),s=c["default"].map(t,function(e){var t=e.props,n=t.tab,s=r(t,["tab"]);return i["default"].createElement(d["default"],o({title:n},s))});return i["default"].createElement(u["default"],n,s)}});t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=a["default"].createClass({displayName:"Table",propTypes:{striped:a["default"].PropTypes.bool,bordered:a["default"].PropTypes.bool,condensed:a["default"].PropTypes.bool,hover:a["default"].PropTypes.bool,responsive:a["default"].PropTypes.bool},getDefaultProps:function(){return{bordered:!1,condensed:!1,hover:!1,responsive:!1,striped:!1}},render:function(){var e={table:!0,"table-striped":this.props.striped,"table-bordered":this.props.bordered,"table-condensed":this.props.condensed,"table-hover":this.props.hover},t=a["default"].createElement("table",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children);return this.props.responsive?a["default"].createElement("div",{className:"table-responsive"},t):t}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=n(14),f=o(d),c=a["default"].createClass({displayName:"Thumbnail",mixins:[p["default"]],propTypes:{alt:a["default"].PropTypes.string,href:a["default"].PropTypes.string,src:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"thumbnail"}},render:function(){var e=this.getBsClassSet();return this.props.href?a["default"].createElement(f["default"],r({},this.props,{href:this.props.href,className:l["default"](this.props.className,e)}),a["default"].createElement("img",{src:this.props.src,alt:this.props.alt})):this.props.children?a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement("img",{src:this.props.src,alt:this.props.alt}),a["default"].createElement("div",{className:"caption"},this.props.children)):a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement("img",{src:this.props.src,alt:this.props.alt}))}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=n(8),f=o(d),c=a["default"].createClass({displayName:"Tooltip",mixins:[p["default"]],propTypes:{id:f["default"].isRequiredForA11y(a["default"].PropTypes.oneOfType([a["default"].PropTypes.string,a["default"].PropTypes.number])),placement:a["default"].PropTypes.oneOf(["top","right","bottom","left"]),positionLeft:a["default"].PropTypes.number,positionTop:a["default"].PropTypes.number,arrowOffsetLeft:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),arrowOffsetTop:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),title:a["default"].PropTypes.node},getDefaultProps:function(){return{placement:"right"}},render:function(){var e,t=(e={tooltip:!0},e[this.props.placement]=!0,e),n=r({left:this.props.positionLeft,top:this.props.positionTop},this.props.style),o={left:this.props.arrowOffsetLeft,top:this.props.arrowOffsetTop};return a["default"].createElement("div",r({role:"tooltip"},this.props,{className:l["default"](this.props.className,t),style:n}),a["default"].createElement("div",{className:"tooltip-arrow",style:o}),a["default"].createElement("div",{className:"tooltip-inner"},this.props.children))}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(5),p=o(u),d=a["default"].createClass({displayName:"Well",mixins:[p["default"]],getDefaultProps:function(){return{bsClass:"well"}},render:function(){var e=this.getBsClassSet();return a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){var t=[];return void 0===e?t:(a["default"].forEach(e,function(e){t.push(e)}),t)}var o=n(2)["default"];t.__esModule=!0,t["default"]=r;var s=n(9),a=o(s);e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){return function(n){var r=function(e){function t(){s(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.getChildContext=function(){return this.props.context},t.prototype.render=function(){var e=this.props,t=e.wrapped,n=(e.context,i(e,["wrapped","context"]));return p["default"].cloneElement(t,n)},t}(p["default"].Component);r.childContextTypes=n;var l=function(){function n(){s(this,n)}return n.prototype.render=function(){var n=a({},this.props);return n[t]=this.getWrappedOverlay(),p["default"].createElement(e,n,this.props.children)},n.prototype.getWrappedOverlay=function(){return p["default"].createElement(r,{context:this.context,wrapped:this.props[t]})},n}();return l.contextTypes=n,l}}var o=n(7)["default"],s=n(6)["default"],a=n(3)["default"],i=n(10)["default"],l=n(2)["default"];t.__esModule=!0,t["default"]=r;var u=n(1),p=l(u);e.exports=t["default"]},function(e,t){"use strict";function n(e){var t=!1;return{eventKey:e,preventSelection:function(){t=!0},isSelectionPrevented:function(){return t}}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){e.exports={"default":n(152),__esModule:!0}},function(e,t,n){e.exports={"default":n(153),__esModule:!0}},function(e,t,n){e.exports={"default":n(154),__esModule:!0}},function(e,t,n){e.exports={"default":n(155),__esModule:!0}},function(e,t,n){e.exports={"default":n(157),__esModule:!0}},function(e,t,n){n(169),e.exports=n(18).Object.assign},function(e,t,n){var r=n(29);e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(29);e.exports=function(e,t,n){return r.setDesc(e,t,n)}},function(e,t,n){n(170),e.exports=n(18).Object.isFrozen},function(e,t,n){n(171),e.exports=n(18).Object.keys},function(e,t,n){n(172),e.exports=n(18).Object.setPrototypeOf},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(38);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(74),o=n(167),s=n(164);e.exports=Object.assign||function(e,t){for(var n=r(e),a=arguments.length,i=1;a>i;)for(var l,u=o(arguments[i++]),p=s(u),d=p.length,f=0;d>f;)n[l=p[f++]]=u[l];return n}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(158);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(29);e.exports=function(e){var t=r.getKeys(e),n=r.getSymbols;if(n)for(var o,s=n(e),a=r.isEnum,i=0;s.length>i;)a.call(e,o=s[i++])&&t.push(o);return t}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n="undefined"!=typeof self&&self.Math==Math?self:Function("return this")();e.exports=n,"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(161);e.exports=0 in Object("z")?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(29).getDesc,o=n(38),s=n(159),a=function(e,t){if(s(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t){try{t=n(162)(Function.call,r(Object.prototype,"__proto__").set,2),t({},[])}catch(o){e=!0}return function(n,r){return a(n,r),e?n.__proto__=r:t(n,r),n}}():void 0),check:a}},function(e,t,n){var r=n(37);r(r.S,"Object",{assign:n(160)})},function(e,t,n){var r=n(38);n(73)("isFrozen",function(e){return function(t){return r(t)?e?e(t):!1:!0}})},function(e,t,n){var r=n(74);n(73)("keys",function(e){return function(t){return e(r(t))}})},function(e,t,n){var r=n(37);r(r.S,"Object",{setPrototypeOf:n(168).set})},function(e,t,n){"use strict";function r(){var e=void 0===arguments[0]?document:arguments[0];try{return e.activeElement}catch(t){}}var o=n(24);t.__esModule=!0,t["default"]=r;var s=n(19);o.interopRequireDefault(s);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(20),o=function(){};r&&(o=function(){return document.addEventListener?function(e,t,n,r){return e.removeEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.detachEvent("on"+t,n)}:void 0}()),e.exports=o},function(e,t,n){"use strict";function r(e){var t=a["default"](e);return t&&t.defaultView||t.parentWindow}var o=n(24);t.__esModule=!0,t["default"]=r;var s=n(19),a=o.interopRequireDefault(s);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(39);e.exports=function(e,t){var n=r(e);return void 0===t?n?"pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft:e.scrollLeft:void(n?n.scrollTo(t,"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop):e.scrollLeft=t)}},function(e,t,n){"use strict";var r=n(24),o=n(80),s=r.interopRequireDefault(o),a=/^(top|right|bottom|left)$/,i=/^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;e.exports=function(e){if(!e)throw new TypeError("No Element passed to `getComputedStyle()`");var t=e.ownerDocument;return"defaultView"in t?t.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null):{getPropertyValue:function(t){var n=e.style;t=s["default"](t),"float"==t&&(t="styleFloat");var r=e.currentStyle[t]||null;if(null==r&&n&&n[t]&&(r=n[t]),i.test(r)&&!a.test(t)){var o=n.left,l=e.runtimeStyle,u=l&&l.left;u&&(l.left=e.currentStyle.left),n.left="fontSize"===t?"1em":r,r=n.pixelLeft+"px",n.left=o,u&&(l.left=u)}return r}}}},function(e,t){"use strict";e.exports=function(e,t){return"removeProperty"in e.style?e.style.removeProperty(t):e.style.removeAttribute(t)}},function(e,t,n){"use strict";function r(){var e,t="",n={O:"otransitionend",Moz:"transitionend",Webkit:"webkitTransitionEnd",ms:"MSTransitionEnd"},r=document.createElement("div");for(var o in n)if(u.call(n,o)&&void 0!==r.style[o+"TransitionProperty"]){t="-"+o.toLowerCase()+"-",e=n[o];break}return e||void 0===r.style.transitionProperty||(e="transitionend"),{end:e,prefix:t}}var o,s,a,i,l=n(20),u=Object.prototype.hasOwnProperty,p="transform",d={};l&&(d=r(),p=d.prefix+p,a=d.prefix+"transition-property",s=d.prefix+"transition-duration",i=d.prefix+"transition-delay",o=d.prefix+"transition-timing-function"),e.exports={transform:p,end:d.end,property:a,timing:o,delay:i,duration:s}},function(e,t){"use strict";var n=/-(.)/g;e.exports=function(e){return e.replace(n,function(e,t){return t.toUpperCase()})}},function(e,t){"use strict";var n=/([A-Z])/g;e.exports=function(e){return e.replace(n,"-$1").toLowerCase()}},function(e,t,n){"use strict";var r=n(181),o=/^ms-/;e.exports=function(e){return r(e).replace(o,"-ms-")}},function(e,t,n){"use strict";var r,o=n(20);e.exports=function(e){if((!r||e)&&o){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),r=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return r}},function(e,t){function n(e){var t=e?e.length:0;return t?e[t-1]:void 0}e.exports=n},function(e,t,n){var r=n(192),o=n(210),s=o(r);e.exports=s},function(e,t,n){(function(t){function r(e){var t=e?e.length:0;for(this.data={hash:i(null),set:new a};t--;)this.push(e[t])}var o=n(206),s=n(30),a=s(t,"Set"),i=s(Object,"create");r.prototype.push=o,e.exports=r}).call(t,function(){return this}())},function(e,t){function n(e,t){for(var n=-1,r=e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t,n){function r(e,t,n){var r=typeof e;return"function"==r?void 0===t?e:a(e,t,n):null==e?i:"object"==r?o(e):void 0===t?l(e):s(e,t)}var o=n(200),s=n(201),a=n(42),i=n(96),l=n(222);e.exports=r},function(e,t,n){function r(e,t){var n=e?e.length:0,r=[];if(!n)return r;var l=-1,u=o,p=!0,d=p&&t.length>=i?a(t):null,f=t.length;d&&(u=s,p=!1,t=d);e:for(;++l<n;){var c=e[l];if(p&&c===c){for(var h=f;h--;)if(t[h]===c)continue e;r.push(c)}else u(t,c,0)<0&&r.push(c)}return r}var o=n(197),s=n(205),a=n(209),i=200;e.exports=r},function(e,t,n){var r=n(196),o=n(207),s=o(r);e.exports=s},function(e,t){function n(e,t,n,r){var o;return n(e,function(e,n,s){return t(e,n,s)?(o=r?n:e,!1):void 0}),o}e.exports=n},function(e,t){function n(e,t,n){for(var r=e.length,o=n?r:-1;n?o--:++o<r;)if(t(e[o],o,e))return o;return-1}e.exports=n},function(e,t,n){function r(e,t){return o(e,t,s)}var o=n(84),s=n(46);e.exports=r},function(e,t,n){function r(e,t){return o(e,t,s)}var o=n(84),s=n(45);e.exports=r},function(e,t,n){function r(e,t,n){if(t!==t)return o(e,n);for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}var o=n(215);e.exports=r},function(e,t,n){function r(e,t,n,r,f,m,v){var y=i(e),g=i(t),b=p,T=p;y||(b=h.call(e),b==u?b=d:b!=d&&(y=l(e))),g||(T=h.call(t),T==u?T=d:T!=d&&(g=l(t)));var P=b==d,x=T==d,E=b==T;if(E&&!y&&!P)return s(e,t,b);if(!f){var C=P&&c.call(e,"__wrapped__"),_=x&&c.call(t,"__wrapped__");if(C||_)return n(C?e.value():e,_?t.value():t,r,f,m,v)}if(!E)return!1;m||(m=[]),v||(v=[]);for(var N=m.length;N--;)if(m[N]==e)return v[N]==t;m.push(e),v.push(t);var O=(y?o:a)(e,t,n,r,f,m,v);return m.pop(),v.pop(),O}var o=n(211),s=n(212),a=n(213),i=n(15),l=n(219),u="[object Arguments]",p="[object Array]",d="[object Object]",f=Object.prototype,c=f.hasOwnProperty,h=f.toString;e.exports=r},function(e,t,n){function r(e,t,n){var r=t.length,a=r,i=!n;if(null==e)return!a;for(e=s(e);r--;){var l=t[r];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<a;){l=t[r];var u=l[0],p=e[u],d=l[1];if(i&&l[2]){if(void 0===p&&!(u in e))return!1}else{var f=n?n(p,d,u):void 0;if(!(void 0===f?o(d,p,n,!0):f))return!1}}return!0}var o=n(86),s=n(13);e.exports=r},function(e,t,n){function r(e){var t=s(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null==e?!1:e[n]===r&&(void 0!==r||n in a(e))}}return function(e){return o(e,t)}}var o=n(199),s=n(214),a=n(13);e.exports=r},function(e,t,n){function r(e,t){var n=i(e),r=l(e)&&u(t),c=e+"";return e=f(e),function(i){if(null==i)return!1;var l=c;if(i=d(i),(n||!r)&&!(l in i)){if(i=1==e.length?i:o(i,a(e,0,-1)),null==i)return!1;l=p(e),i=d(i)}return i[l]===t?void 0!==t||l in i:s(t,i[l],void 0,!0)}}var o=n(85),s=n(86),a=n(203),i=n(15),l=n(90),u=n(91),p=n(184),d=n(13),f=n(94);e.exports=r},function(e,t,n){function r(e){var t=e+"";return e=s(e),function(n){return o(n,e,t)}}var o=n(85),s=n(94);e.exports=r},function(e,t){function n(e,t,n){var r=-1,o=e.length;t=null==t?0:+t||0,0>t&&(t=-t>o?0:o+t),n=void 0===n||n>o?o:+n||0,0>n&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++r<o;)s[r]=e[r+t];return s}e.exports=n},function(e,t){function n(e){return null==e?"":e+""}e.exports=n},function(e,t,n){function r(e,t){var n=e.data,r="string"==typeof t||o(t)?n.set.has(t):n.hash[t];return r?0:-1}var o=n(16);e.exports=r},function(e,t,n){function r(e){var t=this.data;"string"==typeof e||o(e)?t.set.add(e):t.hash[e]=!0}var o=n(16);e.exports=r},function(e,t,n){function r(e,t){return function(n,r){var i=n?o(n):0;if(!s(i))return e(n,r);for(var l=t?i:-1,u=a(n);(t?l--:++l<i)&&r(u[l],l,u)!==!1;);return n}}var o=n(88),s=n(21),a=n(13);e.exports=r},function(e,t,n){function r(e){return function(t,n,r){for(var s=o(t),a=r(t),i=a.length,l=e?i:-1;e?l--:++l<i;){var u=a[l];if(n(s[u],u,s)===!1)break}return t}}var o=n(13);e.exports=r},function(e,t,n){(function(t){function r(e){return i&&a?new o(e):null}var o=n(186),s=n(30),a=s(t,"Set"),i=s(Object,"create");e.exports=r}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return function(n,r,l){if(r=o(r,l,3),i(n)){var u=a(n,r,t);return u>-1?n[u]:void 0}return s(n,r,e)}}var o=n(190),s=n(193),a=n(194),i=n(15);e.exports=r},function(e,t,n){function r(e,t,n,r,s,a,i){var l=-1,u=e.length,p=t.length;if(u!=p&&!(s&&p>u))return!1;for(;++l<u;){var d=e[l],f=t[l],c=r?r(s?f:d,s?d:f,l):void 0;if(void 0!==c){if(c)continue;return!1}if(s){if(!o(t,function(e){return d===e||n(d,e,r,s,a,i)}))return!1}else if(d!==f&&!n(d,f,r,s,a,i))return!1}return!0}var o=n(189);e.exports=r},function(e,t){function n(e,t,n){switch(n){case r:case o:return+e==+t;case s:return e.name==t.name&&e.message==t.message;case a:return e!=+e?t!=+t:e==+t;case i:case l:return e==t+""}return!1}var r="[object Boolean]",o="[object Date]",s="[object Error]",a="[object Number]",i="[object RegExp]",l="[object String]";e.exports=n},function(e,t,n){function r(e,t,n,r,s,i,l){var u=o(e),p=u.length,d=o(t),f=d.length;if(p!=f&&!s)return!1;for(var c=p;c--;){var h=u[c];if(!(s?h in t:a.call(t,h)))return!1}for(var m=s;++c<p;){h=u[c];var v=e[h],y=t[h],g=r?r(s?y:v,s?v:y,h):void 0;if(!(void 0===g?n(v,y,r,s,i,l):g))return!1;m||(m="constructor"==h)}if(!m){var b=e.constructor,T=t.constructor;if(b!=T&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof T&&T instanceof T))return!1}return!0}var o=n(45),s=Object.prototype,a=s.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){for(var t=s(e),n=t.length;n--;)t[n][2]=o(t[n][1]);return t}var o=n(91),s=n(220);e.exports=r},function(e,t){function n(e,t,n){for(var r=e.length,o=t+(n?0:-1);n?o--:++o<r;){var s=e[o];if(s!==s)return o}return-1}e.exports=n},function(e,t,n){function r(e){for(var t=l(e),n=t.length,r=n&&e.length,u=!!r&&i(r)&&(s(e)||o(e)),d=-1,f=[];++d<n;){var c=t[d];(u&&a(c,r)||p.call(e,c))&&f.push(c)}return f}var o=n(44),s=n(15),a=n(89),i=n(21),l=n(46),u=Object.prototype,p=u.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return o(e)&&i.call(e)==s}var o=n(16),s="[object Function]",a=Object.prototype,i=a.toString;e.exports=r},function(e,t,n){function r(e){return null==e?!1:o(e)?p.test(l.call(e)):s(e)&&a.test(e)}var o=n(217),s=n(22),a=/^\[object .+?Constructor\]$/,i=Object.prototype,l=Function.prototype.toString,u=i.hasOwnProperty,p=RegExp("^"+l.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t,n){function r(e){return s(e)&&o(e.length)&&!!S[M.call(e)]}var o=n(21),s=n(22),a="[object Arguments]",i="[object Array]",l="[object Boolean]",u="[object Date]",p="[object Error]",d="[object Function]",f="[object Map]",c="[object Number]",h="[object Object]",m="[object RegExp]",v="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",T="[object Float32Array]",P="[object Float64Array]",x="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",_="[object Uint8Array]",N="[object Uint8ClampedArray]",O="[object Uint16Array]",w="[object Uint32Array]",S={};S[T]=S[P]=S[x]=S[E]=S[C]=S[_]=S[N]=S[O]=S[w]=!0,S[a]=S[i]=S[b]=S[l]=S[u]=S[p]=S[d]=S[f]=S[c]=S[h]=S[m]=S[v]=S[y]=S[g]=!1;var k=Object.prototype,M=k.toString;e.exports=r},function(e,t,n){function r(e){e=s(e);for(var t=-1,n=o(e),r=n.length,a=Array(r);++t<r;){var i=n[t];a[t]=[i,e[i]]}return a}var o=n(45),s=n(13);e.exports=r},function(e,t,n){var r=n(83),o=n(42),s=n(92),a=n(93),i=n(82),l=i(function(e,t){return null==e?{}:"function"==typeof t[0]?a(e,o(t[0],t[1],3)):s(e,r(t))});e.exports=l},function(e,t,n){function r(e){return a(e)?o(e):s(e)}var o=n(87),s=n(202),a=n(90);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(1),u=r(l),p=n(47),d=r(p),f=n(97),c=r(f),h=n(98),m=r(h),v=n(227),y=r(v),g=function(e){function t(n,r){s(this,t),e.call(this,n,r),this.state={exited:!n.show},this.onHiddenListener=this.handleHidden.bind(this)}return a(t,e),t.prototype.componentWillReceiveProps=function(e){e.show?this.setState({exited:!1}):e.transition||this.setState({exited:!0})},t.prototype.render=function(){var e=this.props,t=e.container,n=e.containerPadding,r=e.target,s=e.placement,a=e.rootClose,i=e.children,l=e.transition,p=o(e,["container","containerPadding","target","placement","rootClose","children","transition"]),f=p.show||l&&!this.state.exited;if(!f)return null;var h=i;if(h=u["default"].createElement(c["default"],{container:t,containerPadding:n,target:r,placement:s},h),l){var v=p.onExit,y=p.onExiting,g=p.onEnter,b=p.onEntering,T=p.onEntered;h=u["default"].createElement(l,{"in":p.show,transitionAppear:!0,onExit:v,onExiting:y,onExited:this.onHiddenListener,onEnter:g,onEntering:b,onEntered:T},h)}return a&&(h=u["default"].createElement(m["default"],{onRootClose:p.onHide},h)),u["default"].createElement(d["default"],{container:t},h)},t.prototype.handleHidden=function(){if(this.setState({exited:!0}),this.props.onExited){var e;(e=this.props).onExited.apply(e,arguments)}},t}(u["default"].Component);g.propTypes=i({},d["default"].propTypes,c["default"].propTypes,{show:u["default"].PropTypes.bool,rootClose:u["default"].PropTypes.bool,onHide:u["default"].PropTypes.func,transition:y["default"],onEnter:u["default"].PropTypes.func,onEntering:u["default"].PropTypes.func,onEntered:u["default"].PropTypes.func,onExit:u["default"].PropTypes.func,onExiting:u["default"].PropTypes.func,onExited:u["default"].PropTypes.func}),t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(75),s=r(o),a=n(174),i=r(a);t["default"]=function(e,t,n){return s["default"](e,t,n),{remove:function(){i["default"](e,t,n)}}},e.exports=t["default"]},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return t.filter(function(e){return null!=e}).reduce(function(e,t){if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(){for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}},null)}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n,r){var o=h.getContainerDimensions(n),s=o.scroll,a=o.height,i=e-r-s,l=e+r-s+t;return 0>i?-i:l>a?a-l:0}function s(e,t,n,r){var o=h.getContainerDimensions(n),s=o.width,a=e-r,i=e+r+t;return 0>a?-a:i>s?s-i:0}t.__esModule=!0;var a=n(31),i=r(a),l=n(40),u=r(l),p=n(78),d=r(p),f=n(79),c=r(f),h={getContainerDimensions:function(e){var t=void 0,n=void 0,r=void 0;if("BODY"===e.tagName)t=window.innerWidth,n=window.innerHeight,r=c["default"](i["default"](e).documentElement)||c["default"](e);else{var o=u["default"](e);t=o.width,n=o.height,r=c["default"](e)}return{width:t,height:n,scroll:r}},getPosition:function(e,t){var n="BODY"===t.tagName?u["default"](e):d["default"](e,t);return n},calcOverlayPosition:function(e,t,n,r,a){var i=h.getPosition(n,r),l=u["default"](t),p=l.height,d=l.width,f=void 0,c=void 0,m=void 0,v=void 0; -if("left"===e||"right"===e){c=i.top+(i.height-p)/2,f="left"===e?i.left-d:i.left+i.width;var y=o(c,p,r,a);c+=y,v=50*(1-2*y/p)+"%",m=void 0}else{if("top"!==e&&"bottom"!==e)throw new Error('calcOverlayPosition(): No such placement of "'+e+'" found.');f=i.left+(i.width-d)/2,c="top"===e?i.top-p:i.top+i.height;var g=s(f,d,r,a);f+=g,m=50*(1-2*g/d)+"%",v=void 0}return{positionLeft:f,positionTop:c,arrowOffsetLeft:m,arrowOffsetTop:v}}};t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){var r=i.errMsg(e,t,n,". Expected an Element `type`");if("function"!=typeof e[t]){if(a["default"].isValidElement(e[t]))return new Error(r+", not an actual Element");if("string"!=typeof e[t])return new Error(r+" such as a tag name or return value of React.createClass(...)")}}t.__esModule=!0;var s=n(1),a=r(s),i=n(101);t["default"]=i.createChainableTypeChecker(o),e.exports=t["default"]},function(e,t){function n(e){return function(){return e}}function r(){}r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function s(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){function n(n,r){function o(e,n){var o=d.getLinkName(e),s=this.props[r[e]];o&&a(this.props,o)&&!s&&(s=this.props[o].requestChange);for(var i=arguments.length,l=Array(i>2?i-2:0),u=2;i>u;u++)l[u-2]=arguments[u];t(this,e,s,n,l)}function a(e,t){return void 0!==e[t]}var l,p=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],f=n.displayName||n.name||"Component",c=d.getType(n).propTypes;l=d.uncontrolledPropTypes(r,c,f);var h=d.transform(p,function(e,t){e[t]=function(){var e=this.refs.controlled;return e[t].apply(e,arguments)}},{}),m=u["default"].createClass(i({displayName:"Uncontrolled("+f+")",mixins:e,propTypes:l},h,{componentWillMount:function(){var e=this.props,t=Object.keys(r);this._values=d.transform(t,function(t,n){t[n]=e[d.defaultKey(n)]},{})},render:function(){var e=this,t={},l=this.props,p=(l.valueLink,l.checkedLink,s(l,["valueLink","checkedLink"]));return d.each(r,function(n,r){var s=d.getLinkName(r),i=e.props[r];s&&!a(e.props,r)&&a(e.props,s)&&(i=e.props[s].value),t[r]=void 0!==i?i:e._values[r],t[n]=o.bind(e,r)}),t=i({ref:"controlled"},p,t),u["default"].createElement(n,t)}}));return m.ControlledComponent=n,m}return n}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t["default"]=a;var l=n(1),u=o(l),p=n(232),d=r(p);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n,r,o){n&&(e._notifying=!0,n.call.apply(n,[e,r].concat(o)),e._notifying=!1),e._values[t]=r,e.forceUpdate()}t.__esModule=!0;var s=n(229),a=r(s),i={shouldComponentUpdate:function(){return!this._notifying}};t["default"]=a["default"]([i],o),e.exports=t["default"]},function(e,t,n){"use strict";var r=function(e,t,n,r,o,s,a,i){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,s,a,i],p=0;l=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[p++]}))}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return function(r,o,s){return void 0!==r[o]?r[e]?t&&t(r,o,n):new Error("You have provided a `"+o+"` prop to `"+n+"` without an `"+e+"` handler. This will render a read-only field. If the field should be mutable use `"+l(o)+"`. Otherwise, set `"+e+"`"):void 0}}function s(e,t,n){var r={};return r}function a(e){return 0===v[0]&&v[1]>=13?e:e.type}function i(e){return"value"===e?"valueLink":"checked"===e?"checkedLink":null}function l(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function u(e,t,n){return function(){for(var r=arguments.length,o=Array(r),s=0;r>s;s++)o[s]=arguments[s];t&&t.call.apply(t,[e].concat(o)),n&&n.call.apply(n,[e].concat(o))}}function p(e,t,n){return d(e,t.bind(null,n=n||(Array.isArray(e)?[]:{}))),n}function d(e,t,n){if(Array.isArray(e))return e.forEach(t,n);for(var r in e)f(e,r)&&t.call(n,e[r],r,e)}function f(e,t){return e?Object.prototype.hasOwnProperty.call(e,t):!1}t.__esModule=!0,t.customPropType=o,t.uncontrolledPropTypes=s,t.getType=a,t.getLinkName=i,t.defaultKey=l,t.chain=u,t.transform=p,t.each=d,t.has=f;var c=n(1),h=r(c),m=n(231),v=(r(m),h["default"].version.split(".").map(parseFloat));t.version=v}])}); diff --git a/web/static/js/react-bootstrap-0.25.1.js b/web/static/js/react-bootstrap-0.27.1.js index db5326612..30bc165ef 100644 --- a/web/static/js/react-bootstrap-0.25.1.js +++ b/web/static/js/react-bootstrap-0.27.1.js @@ -1,13 +1,13 @@ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("react")); + module.exports = factory(require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) - define(["react"], factory); + define(["react", "react-dom"], factory); else if(typeof exports === 'object') - exports["ReactBootstrap"] = factory(require("react")); + exports["ReactBootstrap"] = factory(require("react"), require("react-dom")); else - root["ReactBootstrap"] = factory(root["React"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_32__) { + root["ReactBootstrap"] = factory(root["React"], root["ReactDOM"]); +})(this, function(__WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_34__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -56,423 +56,401 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _Object$keys = __webpack_require__(1)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; - var _Object$defineProperty = __webpack_require__(11)['default']; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - var _interopRequireWildcard = __webpack_require__(15)['default']; + var _interopRequireWildcard = __webpack_require__(2)['default']; exports.__esModule = true; - var _utilsDeprecationWarning = __webpack_require__(16); - - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); - - var _utilsDomUtils = __webpack_require__(31); - - var _utilsDomUtils2 = _interopRequireDefault(_utilsDomUtils); - - var _utilsChildrenValueInputValidation = __webpack_require__(52); + var _utilsChildrenValueInputValidation = __webpack_require__(3); var _utilsChildrenValueInputValidation2 = _interopRequireDefault(_utilsChildrenValueInputValidation); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _utilsCreateChainedFunction = __webpack_require__(6); var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - var _utilsCustomPropTypes = __webpack_require__(53); - - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); - - var _Accordion2 = __webpack_require__(57); + var _Accordion2 = __webpack_require__(8); var _Accordion3 = _interopRequireDefault(_Accordion2); exports.Accordion = _Accordion3['default']; - var _Affix2 = __webpack_require__(71); + var _Affix2 = __webpack_require__(32); var _Affix3 = _interopRequireDefault(_Affix2); exports.Affix = _Affix3['default']; - var _AffixMixin2 = __webpack_require__(72); + var _AffixMixin2 = __webpack_require__(33); var _AffixMixin3 = _interopRequireDefault(_AffixMixin2); exports.AffixMixin = _AffixMixin3['default']; - var _Alert2 = __webpack_require__(74); + var _Alert2 = __webpack_require__(44); var _Alert3 = _interopRequireDefault(_Alert2); exports.Alert = _Alert3['default']; - var _Badge2 = __webpack_require__(75); + var _Badge2 = __webpack_require__(45); var _Badge3 = _interopRequireDefault(_Badge2); exports.Badge = _Badge3['default']; - var _BootstrapMixin2 = __webpack_require__(69); + var _BootstrapMixin2 = __webpack_require__(28); var _BootstrapMixin3 = _interopRequireDefault(_BootstrapMixin2); exports.BootstrapMixin = _BootstrapMixin3['default']; - var _Button2 = __webpack_require__(76); + var _Breadcrumb2 = __webpack_require__(46); + + var _Breadcrumb3 = _interopRequireDefault(_Breadcrumb2); + + exports.Breadcrumb = _Breadcrumb3['default']; + + var _BreadcrumbItem2 = __webpack_require__(47); + + var _BreadcrumbItem3 = _interopRequireDefault(_BreadcrumbItem2); + + exports.BreadcrumbItem = _BreadcrumbItem3['default']; + + var _Button2 = __webpack_require__(62); var _Button3 = _interopRequireDefault(_Button2); exports.Button = _Button3['default']; - var _ButtonGroup2 = __webpack_require__(81); + var _ButtonGroup2 = __webpack_require__(68); var _ButtonGroup3 = _interopRequireDefault(_ButtonGroup2); exports.ButtonGroup = _ButtonGroup3['default']; - var _ButtonInput2 = __webpack_require__(77); + var _ButtonInput2 = __webpack_require__(64); var _ButtonInput3 = _interopRequireDefault(_ButtonInput2); exports.ButtonInput = _ButtonInput3['default']; - var _ButtonToolbar2 = __webpack_require__(82); + var _ButtonToolbar2 = __webpack_require__(70); var _ButtonToolbar3 = _interopRequireDefault(_ButtonToolbar2); exports.ButtonToolbar = _ButtonToolbar3['default']; - var _Carousel2 = __webpack_require__(83); + var _Carousel2 = __webpack_require__(71); var _Carousel3 = _interopRequireDefault(_Carousel2); exports.Carousel = _Carousel3['default']; - var _CarouselItem2 = __webpack_require__(84); + var _CarouselItem2 = __webpack_require__(72); var _CarouselItem3 = _interopRequireDefault(_CarouselItem2); exports.CarouselItem = _CarouselItem3['default']; - var _Col2 = __webpack_require__(86); + var _Col2 = __webpack_require__(74); var _Col3 = _interopRequireDefault(_Col2); exports.Col = _Col3['default']; - var _CollapsibleMixin2 = __webpack_require__(87); - - var _CollapsibleMixin3 = _interopRequireDefault(_CollapsibleMixin2); - - exports.CollapsibleMixin = _CollapsibleMixin3['default']; - - var _CollapsibleNav2 = __webpack_require__(88); + var _CollapsibleNav2 = __webpack_require__(79); var _CollapsibleNav3 = _interopRequireDefault(_CollapsibleNav2); exports.CollapsibleNav = _CollapsibleNav3['default']; - var _Dropdown2 = __webpack_require__(93); + var _Dropdown2 = __webpack_require__(92); var _Dropdown3 = _interopRequireDefault(_Dropdown2); exports.Dropdown = _Dropdown3['default']; - var _DropdownButton2 = __webpack_require__(171); + var _DropdownButton2 = __webpack_require__(177); var _DropdownButton3 = _interopRequireDefault(_DropdownButton2); exports.DropdownButton = _DropdownButton3['default']; - var _NavDropdown2 = __webpack_require__(172); - - var _NavDropdown3 = _interopRequireDefault(_NavDropdown2); - - exports.NavDropdown = _NavDropdown3['default']; - - var _SplitButton3 = __webpack_require__(173); - - var _SplitButton4 = _interopRequireDefault(_SplitButton3); - - exports.SplitButton = _SplitButton4['default']; - - var _FadeMixin2 = __webpack_require__(175); - - var _FadeMixin3 = _interopRequireDefault(_FadeMixin2); - - exports.FadeMixin = _FadeMixin3['default']; - - var _Glyphicon2 = __webpack_require__(80); + var _Glyphicon2 = __webpack_require__(67); var _Glyphicon3 = _interopRequireDefault(_Glyphicon2); exports.Glyphicon = _Glyphicon3['default']; - var _Grid2 = __webpack_require__(176); + var _Grid2 = __webpack_require__(178); var _Grid3 = _interopRequireDefault(_Grid2); exports.Grid = _Grid3['default']; - var _Input2 = __webpack_require__(177); + var _Image2 = __webpack_require__(179); + + var _Image3 = _interopRequireDefault(_Image2); + + exports.Image = _Image3['default']; + + var _Input2 = __webpack_require__(180); var _Input3 = _interopRequireDefault(_Input2); exports.Input = _Input3['default']; - var _Interpolate2 = __webpack_require__(180); + var _Interpolate2 = __webpack_require__(184); var _Interpolate3 = _interopRequireDefault(_Interpolate2); exports.Interpolate = _Interpolate3['default']; - var _Jumbotron2 = __webpack_require__(181); + var _Jumbotron2 = __webpack_require__(185); var _Jumbotron3 = _interopRequireDefault(_Jumbotron2); exports.Jumbotron = _Jumbotron3['default']; - var _Label2 = __webpack_require__(182); + var _Label2 = __webpack_require__(186); var _Label3 = _interopRequireDefault(_Label2); exports.Label = _Label3['default']; - var _ListGroup2 = __webpack_require__(183); + var _ListGroup2 = __webpack_require__(187); var _ListGroup3 = _interopRequireDefault(_ListGroup2); exports.ListGroup = _ListGroup3['default']; - var _ListGroupItem2 = __webpack_require__(184); + var _ListGroupItem2 = __webpack_require__(188); var _ListGroupItem3 = _interopRequireDefault(_ListGroupItem2); exports.ListGroupItem = _ListGroupItem3['default']; - var _MenuItem2 = __webpack_require__(185); + var _MenuItem2 = __webpack_require__(189); var _MenuItem3 = _interopRequireDefault(_MenuItem2); exports.MenuItem = _MenuItem3['default']; - var _Modal2 = __webpack_require__(186); + var _Modal2 = __webpack_require__(190); var _Modal3 = _interopRequireDefault(_Modal2); exports.Modal = _Modal3['default']; - var _ModalHeader2 = __webpack_require__(198); + var _ModalBody2 = __webpack_require__(201); - var _ModalHeader3 = _interopRequireDefault(_ModalHeader2); + var _ModalBody3 = _interopRequireDefault(_ModalBody2); - exports.ModalHeader = _ModalHeader3['default']; + exports.ModalBody = _ModalBody3['default']; - var _ModalTitle2 = __webpack_require__(199); + var _ModalFooter2 = __webpack_require__(204); - var _ModalTitle3 = _interopRequireDefault(_ModalTitle2); + var _ModalFooter3 = _interopRequireDefault(_ModalFooter2); - exports.ModalTitle = _ModalTitle3['default']; + exports.ModalFooter = _ModalFooter3['default']; - var _ModalBody2 = __webpack_require__(197); + var _ModalHeader2 = __webpack_require__(202); - var _ModalBody3 = _interopRequireDefault(_ModalBody2); + var _ModalHeader3 = _interopRequireDefault(_ModalHeader2); - exports.ModalBody = _ModalBody3['default']; + exports.ModalHeader = _ModalHeader3['default']; - var _ModalFooter2 = __webpack_require__(200); + var _ModalTitle2 = __webpack_require__(203); - var _ModalFooter3 = _interopRequireDefault(_ModalFooter2); + var _ModalTitle3 = _interopRequireDefault(_ModalTitle2); - exports.ModalFooter = _ModalFooter3['default']; + exports.ModalTitle = _ModalTitle3['default']; - var _Nav2 = __webpack_require__(201); + var _Nav2 = __webpack_require__(205); var _Nav3 = _interopRequireDefault(_Nav2); exports.Nav = _Nav3['default']; - var _Navbar2 = __webpack_require__(202); + var _Navbar2 = __webpack_require__(206); var _Navbar3 = _interopRequireDefault(_Navbar2); exports.Navbar = _Navbar3['default']; - var _NavItem2 = __webpack_require__(203); + var _NavBrand2 = __webpack_require__(207); + + var _NavBrand3 = _interopRequireDefault(_NavBrand2); + + exports.NavBrand = _NavBrand3['default']; + + var _NavDropdown2 = __webpack_require__(208); + + var _NavDropdown3 = _interopRequireDefault(_NavDropdown2); + + exports.NavDropdown = _NavDropdown3['default']; + + var _NavItem2 = __webpack_require__(209); var _NavItem3 = _interopRequireDefault(_NavItem2); exports.NavItem = _NavItem3['default']; - var _Overlay2 = __webpack_require__(204); + var _Overlay2 = __webpack_require__(210); var _Overlay3 = _interopRequireDefault(_Overlay2); exports.Overlay = _Overlay3['default']; - var _OverlayTrigger2 = __webpack_require__(209); + var _OverlayTrigger2 = __webpack_require__(219); var _OverlayTrigger3 = _interopRequireDefault(_OverlayTrigger2); exports.OverlayTrigger = _OverlayTrigger3['default']; - var _PageHeader2 = __webpack_require__(212); + var _PageHeader2 = __webpack_require__(221); var _PageHeader3 = _interopRequireDefault(_PageHeader2); exports.PageHeader = _PageHeader3['default']; - var _PageItem2 = __webpack_require__(213); + var _PageItem2 = __webpack_require__(222); var _PageItem3 = _interopRequireDefault(_PageItem2); exports.PageItem = _PageItem3['default']; - var _Pager2 = __webpack_require__(214); + var _Pager2 = __webpack_require__(223); var _Pager3 = _interopRequireDefault(_Pager2); exports.Pager = _Pager3['default']; - var _Pagination2 = __webpack_require__(215); + var _Pagination2 = __webpack_require__(224); var _Pagination3 = _interopRequireDefault(_Pagination2); exports.Pagination = _Pagination3['default']; - var _Panel2 = __webpack_require__(218); + var _Panel2 = __webpack_require__(227); var _Panel3 = _interopRequireDefault(_Panel2); exports.Panel = _Panel3['default']; - var _PanelGroup2 = __webpack_require__(66); + var _PanelGroup2 = __webpack_require__(25); var _PanelGroup3 = _interopRequireDefault(_PanelGroup2); exports.PanelGroup = _PanelGroup3['default']; - var _Popover2 = __webpack_require__(219); + var _Popover2 = __webpack_require__(228); var _Popover3 = _interopRequireDefault(_Popover2); exports.Popover = _Popover3['default']; - var _ProgressBar2 = __webpack_require__(220); + var _ProgressBar2 = __webpack_require__(229); var _ProgressBar3 = _interopRequireDefault(_ProgressBar2); exports.ProgressBar = _ProgressBar3['default']; - var _Row2 = __webpack_require__(221); + var _ResponsiveEmbed2 = __webpack_require__(230); + + var _ResponsiveEmbed3 = _interopRequireDefault(_ResponsiveEmbed2); + + exports.ResponsiveEmbed = _ResponsiveEmbed3['default']; + + var _Row2 = __webpack_require__(231); var _Row3 = _interopRequireDefault(_Row2); exports.Row = _Row3['default']; - var _SafeAnchor2 = __webpack_require__(100); + var _SafeAnchor2 = __webpack_require__(49); var _SafeAnchor3 = _interopRequireDefault(_SafeAnchor2); exports.SafeAnchor = _SafeAnchor3['default']; + var _SplitButton3 = __webpack_require__(232); + + var _SplitButton4 = _interopRequireDefault(_SplitButton3); + + exports.SplitButton = _SplitButton4['default']; + var _SplitButton5 = _interopRequireDefault(_SplitButton3); exports.SplitButton = _SplitButton5['default']; - var _styleMaps2 = __webpack_require__(70); + var _styleMaps2 = __webpack_require__(29); var _styleMaps3 = _interopRequireDefault(_styleMaps2); exports.styleMaps = _styleMaps3['default']; - var _SubNav2 = __webpack_require__(222); + var _SubNav2 = __webpack_require__(234); var _SubNav3 = _interopRequireDefault(_SubNav2); exports.SubNav = _SubNav3['default']; - var _Tab2 = __webpack_require__(223); + var _Tab2 = __webpack_require__(235); var _Tab3 = _interopRequireDefault(_Tab2); exports.Tab = _Tab3['default']; - var _TabbedArea2 = __webpack_require__(224); - - var _TabbedArea3 = _interopRequireDefault(_TabbedArea2); - - exports.TabbedArea = _TabbedArea3['default']; - - var _Table2 = __webpack_require__(227); + var _Table2 = __webpack_require__(236); var _Table3 = _interopRequireDefault(_Table2); exports.Table = _Table3['default']; - var _TabPane2 = __webpack_require__(226); - - var _TabPane3 = _interopRequireDefault(_TabPane2); - - exports.TabPane = _TabPane3['default']; - - var _Tabs2 = __webpack_require__(225); + var _Tabs2 = __webpack_require__(237); var _Tabs3 = _interopRequireDefault(_Tabs2); exports.Tabs = _Tabs3['default']; - var _Thumbnail2 = __webpack_require__(228); + var _Thumbnail2 = __webpack_require__(238); var _Thumbnail3 = _interopRequireDefault(_Thumbnail2); exports.Thumbnail = _Thumbnail3['default']; - var _Tooltip2 = __webpack_require__(229); + var _Tooltip2 = __webpack_require__(239); var _Tooltip3 = _interopRequireDefault(_Tooltip2); exports.Tooltip = _Tooltip3['default']; - var _Well2 = __webpack_require__(230); + var _Well2 = __webpack_require__(240); var _Well3 = _interopRequireDefault(_Well2); exports.Well = _Well3['default']; - var _Portal2 = __webpack_require__(231); - - var _Portal3 = _interopRequireDefault(_Portal2); - - exports.Portal = _Portal3['default']; - - var _Position2 = __webpack_require__(232); - - var _Position3 = _interopRequireDefault(_Position2); - - exports.Position = _Position3['default']; - - var _Collapse2 = __webpack_require__(89); + var _Collapse2 = __webpack_require__(80); var _Collapse3 = _interopRequireDefault(_Collapse2); exports.Collapse = _Collapse3['default']; - var _Fade2 = __webpack_require__(195); + var _Fade2 = __webpack_require__(199); var _Fade3 = _interopRequireDefault(_Fade2); exports.Fade = _Fade3['default']; - var _FormControls2 = __webpack_require__(178); + var _FormControls2 = __webpack_require__(181); var _FormControls = _interopRequireWildcard(_FormControls2); @@ -480,207 +458,12 @@ return /******/ (function(modules) { // webpackBootstrap var utils = { childrenValueInputValidation: _utilsChildrenValueInputValidation2['default'], createChainedFunction: _utilsCreateChainedFunction2['default'], - ValidComponentChildren: _utilsValidComponentChildren2['default'], - CustomPropTypes: _utilsCustomPropTypes2['default'], - domUtils: createDeprecationWrapper(_utilsDomUtils2['default'], 'utils/domUtils', 'npm install dom-helpers') + ValidComponentChildren: _utilsValidComponentChildren2['default'] }; - exports.utils = utils; - function createDeprecationWrapper(obj, deprecated, instead, link) { - var wrapper = {}; - - if (false) { - return obj; - } - - _Object$keys(obj).forEach(function (key) { - _Object$defineProperty(wrapper, key, { - get: function get() { - _utilsDeprecationWarning2['default'](deprecated, instead, link); - return obj[key]; - }, - set: function set(x) { - obj[key] = x; - } - }); - }); - - return wrapper; - } /***/ }, /* 1 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(2), __esModule: true }; - -/***/ }, -/* 2 */ -/***/ function(module, exports, __webpack_require__) { - - __webpack_require__(3); - module.exports = __webpack_require__(9).Object.keys; - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - // 19.1.2.14 Object.keys(O) - var toObject = __webpack_require__(4); - - __webpack_require__(6)('keys', function($keys){ - return function keys(it){ - return $keys(toObject(it)); - }; - }); - -/***/ }, -/* 4 */ -/***/ function(module, exports, __webpack_require__) { - - // 7.1.13 ToObject(argument) - var defined = __webpack_require__(5); - module.exports = function(it){ - return Object(defined(it)); - }; - -/***/ }, -/* 5 */ -/***/ function(module, exports) { - - // 7.2.1 RequireObjectCoercible(argument) - module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; - }; - -/***/ }, -/* 6 */ -/***/ function(module, exports, __webpack_require__) { - - // most Object methods by ES6 should accept primitives - module.exports = function(KEY, exec){ - var $def = __webpack_require__(7) - , fn = (__webpack_require__(9).Object || {})[KEY] || Object[KEY] - , exp = {}; - exp[KEY] = exec(fn); - $def($def.S + $def.F * __webpack_require__(10)(function(){ fn(1); }), 'Object', exp); - }; - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - var global = __webpack_require__(8) - , core = __webpack_require__(9) - , PROTOTYPE = 'prototype'; - var ctx = function(fn, that){ - return function(){ - return fn.apply(that, arguments); - }; - }; - var $def = function(type, name, source){ - var key, own, out, exp - , isGlobal = type & $def.G - , isProto = type & $def.P - , target = isGlobal ? global : type & $def.S - ? global[name] : (global[name] || {})[PROTOTYPE] - , exports = isGlobal ? core : core[name] || (core[name] = {}); - if(isGlobal)source = name; - for(key in source){ - // contains in native - own = !(type & $def.F) && target && key in target; - if(own && key in exports)continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - if(isGlobal && typeof target[key] != 'function')exp = source[key]; - // bind timers to global for call from export context - else if(type & $def.B && own)exp = ctx(out, global); - // wrap global constructors for prevent change them in library - else if(type & $def.W && target[key] == out)!function(C){ - exp = function(param){ - return this instanceof C ? new C(param) : C(param); - }; - exp[PROTOTYPE] = C[PROTOTYPE]; - }(out); - else exp = isProto && typeof out == 'function' ? ctx(Function.call, out) : out; - // export - exports[key] = exp; - if(isProto)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; - } - }; - // type bitmap - $def.F = 1; // forced - $def.G = 2; // global - $def.S = 4; // static - $def.P = 8; // proto - $def.B = 16; // bind - $def.W = 32; // wrap - module.exports = $def; - -/***/ }, -/* 8 */ -/***/ function(module, exports) { - - var global = typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); - module.exports = global; - if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef - -/***/ }, -/* 9 */ -/***/ function(module, exports) { - - var core = module.exports = {}; - if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef - -/***/ }, -/* 10 */ -/***/ function(module, exports) { - - module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } - }; - -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(12), __esModule: true }; - -/***/ }, -/* 12 */ -/***/ function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(13); - module.exports = function defineProperty(it, key, desc){ - return $.setDesc(it, key, desc); - }; - -/***/ }, -/* 13 */ -/***/ function(module, exports) { - - var $Object = Object; - module.exports = { - create: $Object.create, - getProto: $Object.getPrototypeOf, - isEnum: {}.propertyIsEnumerable, - getDesc: $Object.getOwnPropertyDescriptor, - setDesc: $Object.defineProperty, - setDescs: $Object.defineProperties, - getKeys: $Object.keys, - getNames: $Object.getOwnPropertyNames, - getSymbols: $Object.getOwnPropertySymbols, - each: [].forEach - }; - -/***/ }, -/* 14 */ /***/ function(module, exports) { "use strict"; @@ -694,7 +477,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.__esModule = true; /***/ }, -/* 15 */ +/* 2 */ /***/ function(module, exports) { "use strict"; @@ -719,1162 +502,65 @@ return /******/ (function(modules) { // webpackBootstrap exports.__esModule = true; /***/ }, -/* 16 */ +/* 3 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; - - var _classCallCheck = __webpack_require__(28)['default']; - - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; + exports['default'] = valueValidation; - var _reactLibWarning = __webpack_require__(29); - - var _reactLibWarning2 = _interopRequireDefault(_reactLibWarning); + var _react = __webpack_require__(4); - var warned = {}; + var _react2 = _interopRequireDefault(_react); - function deprecationWarning(oldname, newname, link) { - var message = undefined; + var _reactPropTypesLibSinglePropFrom = __webpack_require__(5); - if (typeof oldname === 'object') { - message = oldname.message; - } else { - message = oldname + ' is deprecated. Use ' + newname + ' instead.'; + var _reactPropTypesLibSinglePropFrom2 = _interopRequireDefault(_reactPropTypesLibSinglePropFrom); - if (link) { - message += '\nYou can read more about it at ' + link; - } - } + function valueValidation(props, propName, componentName) { + var error = _reactPropTypesLibSinglePropFrom2['default']('children', 'value')(props, propName, componentName); - if (warned[message]) { - return; + if (!error) { + error = _react2['default'].PropTypes.node(props, propName, componentName); } - _reactLibWarning2['default'](false, message); - warned[message] = true; + return error; } - deprecationWarning.wrapper = function (Component) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - return (function (_Component) { - _inherits(DeprecatedComponent, _Component); - - function DeprecatedComponent() { - _classCallCheck(this, DeprecatedComponent); - - _Component.apply(this, arguments); - } - - DeprecatedComponent.prototype.componentWillMount = function componentWillMount() { - deprecationWarning.apply(undefined, args); - - if (_Component.prototype.componentWillMount) { - var _Component$prototype$componentWillMount; - - for (var _len2 = arguments.length, methodArgs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - methodArgs[_key2] = arguments[_key2]; - } - - (_Component$prototype$componentWillMount = _Component.prototype.componentWillMount).call.apply(_Component$prototype$componentWillMount, [this].concat(methodArgs)); - } - }; - - return DeprecatedComponent; - })(Component); - }; - - exports['default'] = deprecationWarning; module.exports = exports['default']; /***/ }, -/* 17 */ -/***/ function(module, exports, __webpack_require__) { - - "use strict"; - - var _Object$create = __webpack_require__(18)["default"]; - - var _Object$setPrototypeOf = __webpack_require__(20)["default"]; - - exports["default"] = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = _Object$create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) _Object$setPrototypeOf ? _Object$setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; - }; - - exports.__esModule = true; - -/***/ }, -/* 18 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(19), __esModule: true }; - -/***/ }, -/* 19 */ -/***/ function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(13); - module.exports = function create(P, D){ - return $.create(P, D); - }; - -/***/ }, -/* 20 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(21), __esModule: true }; - -/***/ }, -/* 21 */ -/***/ function(module, exports, __webpack_require__) { - - __webpack_require__(22); - module.exports = __webpack_require__(9).Object.setPrototypeOf; - -/***/ }, -/* 22 */ -/***/ function(module, exports, __webpack_require__) { - - // 19.1.3.19 Object.setPrototypeOf(O, proto) - var $def = __webpack_require__(7); - $def($def.S, 'Object', {setPrototypeOf: __webpack_require__(23).set}); - -/***/ }, -/* 23 */ -/***/ function(module, exports, __webpack_require__) { - - // Works with __proto__ only. Old v8 can't work with null proto objects. - /* eslint-disable no-proto */ - var getDesc = __webpack_require__(13).getDesc - , isObject = __webpack_require__(24) - , anObject = __webpack_require__(25); - var check = function(O, proto){ - anObject(O); - if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); - }; - module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} // eslint-disable-line - ? function(buggy, set){ - try { - set = __webpack_require__(26)(Function.call, getDesc(Object.prototype, '__proto__').set, 2); - set({}, []); - } catch(e){ buggy = true; } - return function setPrototypeOf(O, proto){ - check(O, proto); - if(buggy)O.__proto__ = proto; - else set(O, proto); - return O; - }; - }() - : undefined), - check: check - }; - -/***/ }, -/* 24 */ -/***/ function(module, exports) { - - // http://jsperf.com/core-js-isobject - module.exports = function(it){ - return it !== null && (typeof it == 'object' || typeof it == 'function'); - }; - -/***/ }, -/* 25 */ -/***/ function(module, exports, __webpack_require__) { - - var isObject = __webpack_require__(24); - module.exports = function(it){ - if(!isObject(it))throw TypeError(it + ' is not an object!'); - return it; - }; - -/***/ }, -/* 26 */ -/***/ function(module, exports, __webpack_require__) { - - // optional / simple context binding - var aFunction = __webpack_require__(27); - module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } return function(/* ...args */){ - return fn.apply(that, arguments); - }; - }; - -/***/ }, -/* 27 */ -/***/ function(module, exports) { - - module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; - }; - -/***/ }, -/* 28 */ +/* 4 */ /***/ function(module, exports) { - "use strict"; - - exports["default"] = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - }; - - exports.__esModule = true; - -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule warning - */ - - "use strict"; - - var emptyFunction = __webpack_require__(30); - - /** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - - var warning = emptyFunction; - - if (true) { - warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); - } - - if (format.length < 10 || /^[s\W]*$/.test(format)) { - throw new Error( - 'The warning format should be able to uniquely identify this ' + - 'warning. Please, use a more descriptive format than: ' + format - ); - } - - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } - - if (!condition) { - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];}); - console.warn(message); - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch(x) {} - } - }; - } - - module.exports = warning; - + module.exports = __WEBPACK_EXTERNAL_MODULE_4__; /***/ }, -/* 30 */ +/* 5 */ /***/ function(module, exports) { /** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule emptyFunction - */ - - function makeEmptyFunction(arg) { - return function() { - return arg; - }; - } - - /** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. - */ - function emptyFunction() {} - - emptyFunction.thatReturns = makeEmptyFunction; - emptyFunction.thatReturnsFalse = makeEmptyFunction(false); - emptyFunction.thatReturnsTrue = makeEmptyFunction(true); - emptyFunction.thatReturnsNull = makeEmptyFunction(null); - emptyFunction.thatReturnsThis = function() { return this; }; - emptyFunction.thatReturnsArgument = function(arg) { return arg; }; - - module.exports = emptyFunction; - - -/***/ }, -/* 31 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _domHelpersUtilInDOM = __webpack_require__(33); - - var _domHelpersUtilInDOM2 = _interopRequireDefault(_domHelpersUtilInDOM); - - var _domHelpersOwnerDocument = __webpack_require__(34); - - var _domHelpersOwnerDocument2 = _interopRequireDefault(_domHelpersOwnerDocument); - - var _domHelpersOwnerWindow = __webpack_require__(35); - - var _domHelpersOwnerWindow2 = _interopRequireDefault(_domHelpersOwnerWindow); - - var _domHelpersQueryContains = __webpack_require__(37); - - var _domHelpersQueryContains2 = _interopRequireDefault(_domHelpersQueryContains); - - var _domHelpersActiveElement = __webpack_require__(38); - - var _domHelpersActiveElement2 = _interopRequireDefault(_domHelpersActiveElement); - - var _domHelpersQueryOffset = __webpack_require__(39); - - var _domHelpersQueryOffset2 = _interopRequireDefault(_domHelpersQueryOffset); - - var _domHelpersQueryOffsetParent = __webpack_require__(41); - - var _domHelpersQueryOffsetParent2 = _interopRequireDefault(_domHelpersQueryOffsetParent); - - var _domHelpersQueryPosition = __webpack_require__(49); - - var _domHelpersQueryPosition2 = _interopRequireDefault(_domHelpersQueryPosition); - - var _domHelpersStyle = __webpack_require__(42); - - var _domHelpersStyle2 = _interopRequireDefault(_domHelpersStyle); - - function ownerDocument(componentOrElement) { - var elem = _react2['default'].findDOMNode(componentOrElement); - return _domHelpersOwnerDocument2['default'](elem && elem.ownerDocument || document); - } - - function ownerWindow(componentOrElement) { - var doc = ownerDocument(componentOrElement); - return _domHelpersOwnerWindow2['default'](doc); - } - - //TODO remove in 0.26 - function getComputedStyles(elem) { - return ownerDocument(elem).defaultView.getComputedStyle(elem, null); - } - - /** - * Get the height of the document - * - * @returns {documentHeight: number} - */ - function getDocumentHeight() { - return Math.max(document.documentElement.offsetHeight, document.height, document.body.scrollHeight, document.body.offsetHeight); - } - - /** - * Get an element's size + * Checks if only one of the listed properties is in use. An error is given + * if multiple have a value * - * @param {HTMLElement} elem - * @returns {{width: number, height: number}} - */ - function getSize(elem) { - var rect = { - width: elem.offsetWidth || 0, - height: elem.offsetHeight || 0 - }; - if (typeof elem.getBoundingClientRect !== 'undefined') { - var _elem$getBoundingClientRect = elem.getBoundingClientRect(); - - var width = _elem$getBoundingClientRect.width; - var height = _elem$getBoundingClientRect.height; - - rect.width = width || rect.width; - rect.height = height || rect.height; - } - return rect; - } - - exports['default'] = { - canUseDom: _domHelpersUtilInDOM2['default'], - css: _domHelpersStyle2['default'], - getComputedStyles: getComputedStyles, - contains: _domHelpersQueryContains2['default'], - ownerWindow: ownerWindow, - ownerDocument: ownerDocument, - getOffset: _domHelpersQueryOffset2['default'], - getDocumentHeight: getDocumentHeight, - getPosition: _domHelpersQueryPosition2['default'], - getSize: getSize, - activeElement: _domHelpersActiveElement2['default'], - offsetParent: _domHelpersQueryOffsetParent2['default'] - }; - module.exports = exports['default']; - -/***/ }, -/* 32 */ -/***/ function(module, exports) { - - module.exports = __WEBPACK_EXTERNAL_MODULE_32__; - -/***/ }, -/* 33 */ -/***/ function(module, exports) { - - 'use strict'; - module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - -/***/ }, -/* 34 */ -/***/ function(module, exports) { - - "use strict"; - - exports.__esModule = true; - exports["default"] = ownerDocument; - - function ownerDocument(node) { - return node && node.ownerDocument || document; - } - - module.exports = exports["default"]; - -/***/ }, -/* 35 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var babelHelpers = __webpack_require__(36); - - exports.__esModule = true; - exports['default'] = ownerWindow; - - var _ownerDocument = __webpack_require__(34); - - var _ownerDocument2 = babelHelpers.interopRequireDefault(_ownerDocument); - - function ownerWindow(node) { - var doc = (0, _ownerDocument2['default'])(node); - return doc && doc.defaultView || doc.parentWindow; - } - - module.exports = exports['default']; - -/***/ }, -/* 36 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) { - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof exports === "object") { - factory(exports); - } else { - factory(root.babelHelpers = {}); - } - })(this, function (global) { - var babelHelpers = global; - - babelHelpers.interopRequireDefault = function (obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; - }; - - babelHelpers._extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - }) - -/***/ }, -/* 37 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - var canUseDOM = __webpack_require__(33); - - var contains = (function () { - var root = canUseDOM && document.documentElement; - - return root && root.contains ? function (context, node) { - return context.contains(node); - } : root && root.compareDocumentPosition ? function (context, node) { - return context === node || !!(context.compareDocumentPosition(node) & 16); - } : function (context, node) { - if (node) do { - if (node === context) return true; - } while (node = node.parentNode); - - return false; - }; - })(); - - module.exports = contains; - -/***/ }, -/* 38 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var babelHelpers = __webpack_require__(36); - - exports.__esModule = true; - - /**
- * document.activeElement
- */ - exports['default'] = activeElement; - - var _ownerDocument = __webpack_require__(34); - - var _ownerDocument2 = babelHelpers.interopRequireDefault(_ownerDocument); - - function activeElement() { - var doc = arguments[0] === undefined ? document : arguments[0]; - - try { - return doc.activeElement; - } catch (e) {} - } - - module.exports = exports['default']; - -/***/ }, -/* 39 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - var contains = __webpack_require__(37), - getWindow = __webpack_require__(40), - ownerDocument = __webpack_require__(34); - - module.exports = function offset(node) { - var doc = ownerDocument(node), - win = getWindow(doc), - docElem = doc && doc.documentElement, - box = { top: 0, left: 0, height: 0, width: 0 }; - - if (!doc) return; - - // Make sure it's not a disconnected DOM node - if (!contains(docElem, node)) return box; - - if (node.getBoundingClientRect !== undefined) box = node.getBoundingClientRect(); - - if (box.width || box.height) { - - box = { - top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0), - left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0), - width: (box.width == null ? node.offsetWidth : box.width) || 0, - height: (box.height == null ? node.offsetHeight : box.height) || 0 - }; - } - - return box; - }; - -/***/ }, -/* 40 */ -/***/ function(module, exports) { - - 'use strict'; - - module.exports = function getWindow(node) { - return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false; - }; - -/***/ }, -/* 41 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var babelHelpers = __webpack_require__(36); - - exports.__esModule = true; - exports['default'] = offsetParent; - - var _ownerDocument = __webpack_require__(34); - - var _ownerDocument2 = babelHelpers.interopRequireDefault(_ownerDocument); - - var _style = __webpack_require__(42); - - var _style2 = babelHelpers.interopRequireDefault(_style); - - function nodeName(node) { - return node.nodeName && node.nodeName.toLowerCase(); - } - - function offsetParent(node) { - var doc = (0, _ownerDocument2['default'])(node), - offsetParent = node && node.offsetParent; - - while (offsetParent && nodeName(node) !== 'html' && (0, _style2['default'])(offsetParent, 'position') === 'static') { - offsetParent = offsetParent.offsetParent; - } - - return offsetParent || doc.documentElement; - } - - module.exports = exports['default']; - -/***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var camelize = __webpack_require__(43), - hyphenate = __webpack_require__(45), - _getComputedStyle = __webpack_require__(47), - removeStyle = __webpack_require__(48); - - var has = Object.prototype.hasOwnProperty; - - module.exports = function style(node, property, value) { - var css = '', - props = property; - - if (typeof property === 'string') { - - if (value === undefined) return node.style[camelize(property)] || _getComputedStyle(node).getPropertyValue(hyphenate(property));else (props = {})[property] = value; - } - - for (var key in props) if (has.call(props, key)) { - !props[key] && props[key] !== 0 ? removeStyle(node, hyphenate(key)) : css += hyphenate(key) + ':' + props[key] + ';'; - } - - node.style.cssText += ';' + css; - }; - -/***/ }, -/* 43 */ -/***/ function(module, exports, __webpack_require__) { - - /**
- * Copyright 2014-2015, Facebook, Inc.
- * All rights reserved.
- * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js
- */ - - 'use strict'; - var camelize = __webpack_require__(44); - var msPattern = /^-ms-/; - - module.exports = function camelizeStyleName(string) { - return camelize(string.replace(msPattern, 'ms-')); - }; - -/***/ }, -/* 44 */ -/***/ function(module, exports) { - - "use strict"; - - var rHyphen = /-(.)/g; - - module.exports = function camelize(string) { - return string.replace(rHyphen, function (_, chr) { - return chr.toUpperCase(); - }); - }; - -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - /**
- * Copyright 2013-2014, Facebook, Inc.
- * All rights reserved.
- * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
+ * @param props + * @param propName + * @param componentName + * @returns {Error|undefined} */ - - "use strict"; - - var hyphenate = __webpack_require__(46); - var msPattern = /^ms-/; - - module.exports = function hyphenateStyleName(string) { - return hyphenate(string).replace(msPattern, "-ms-"); - }; - -/***/ }, -/* 46 */ -/***/ function(module, exports) { - - 'use strict'; - - var rUpper = /([A-Z])/g; - - module.exports = function hyphenate(string) { - return string.replace(rUpper, '-$1').toLowerCase(); - }; - -/***/ }, -/* 47 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var babelHelpers = __webpack_require__(36); - - var _utilCamelizeStyle = __webpack_require__(43); - - var _utilCamelizeStyle2 = babelHelpers.interopRequireDefault(_utilCamelizeStyle); - - var rposition = /^(top|right|bottom|left)$/; - var rnumnonpx = /^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i; - - module.exports = function _getComputedStyle(node) { - if (!node) throw new TypeError('No Element passed to `getComputedStyle()`'); - var doc = node.ownerDocument; - - return 'defaultView' in doc ? doc.defaultView.opener ? node.ownerDocument.defaultView.getComputedStyle(node, null) : window.getComputedStyle(node, null) : { //ie 8 "magic" from: https://github.com/jquery/jquery/blob/1.11-stable/src/css/curCSS.js#L72 - getPropertyValue: function getPropertyValue(prop) { - var style = node.style; - - prop = (0, _utilCamelizeStyle2['default'])(prop); - - if (prop == 'float') prop = 'styleFloat'; - - var current = node.currentStyle[prop] || null; - - if (current == null && style && style[prop]) current = style[prop]; - - if (rnumnonpx.test(current) && !rposition.test(prop)) { - // Remember the original values - var left = style.left; - var runStyle = node.runtimeStyle; - var rsLeft = runStyle && runStyle.left; - - // Put in the new values to get a computed value out - if (rsLeft) runStyle.left = node.currentStyle.left; - - style.left = prop === 'fontSize' ? '1em' : current; - current = style.pixelLeft + 'px'; - - // Revert the changed values - style.left = left; - if (rsLeft) runStyle.left = rsLeft; - } - - return current; - } - }; - }; - -/***/ }, -/* 48 */ -/***/ function(module, exports) { - 'use strict'; - module.exports = function removeStyle(node, key) { - return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key); - }; - -/***/ }, -/* 49 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var babelHelpers = __webpack_require__(36); - exports.__esModule = true; - exports['default'] = position; + exports['default'] = createSinglePropFromChecker; - var _offset = __webpack_require__(39); - - var _offset2 = babelHelpers.interopRequireDefault(_offset); - - var _offsetParent = __webpack_require__(41); - - var _offsetParent2 = babelHelpers.interopRequireDefault(_offsetParent); - - var _scrollTop = __webpack_require__(50); - - var _scrollTop2 = babelHelpers.interopRequireDefault(_scrollTop); - - var _scrollLeft = __webpack_require__(51); - - var _scrollLeft2 = babelHelpers.interopRequireDefault(_scrollLeft); - - var _style = __webpack_require__(42); - - var _style2 = babelHelpers.interopRequireDefault(_style); - - function nodeName(node) { - return node.nodeName && node.nodeName.toLowerCase(); - } - - function position(node, offsetParent) { - var parentOffset = { top: 0, left: 0 }, - offset; - - // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, - // because it is its only offset parent - if ((0, _style2['default'])(node, 'position') === 'fixed') { - offset = node.getBoundingClientRect(); - } else { - offsetParent = offsetParent || (0, _offsetParent2['default'])(node); - offset = (0, _offset2['default'])(node); - - if (nodeName(offsetParent) !== 'html') parentOffset = (0, _offset2['default'])(offsetParent); - - parentOffset.top += parseInt((0, _style2['default'])(offsetParent, 'borderTopWidth'), 10) - (0, _scrollTop2['default'])(offsetParent) || 0; - parentOffset.left += parseInt((0, _style2['default'])(offsetParent, 'borderLeftWidth'), 10) - (0, _scrollLeft2['default'])(offsetParent) || 0; - } - - // Subtract parent offsets and node margins - return babelHelpers._extends({}, offset, { - top: offset.top - parentOffset.top - (parseInt((0, _style2['default'])(node, 'marginTop'), 10) || 0), - left: offset.left - parentOffset.left - (parseInt((0, _style2['default'])(node, 'marginLeft'), 10) || 0) - }); - } - - module.exports = exports['default']; - -/***/ }, -/* 50 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - var getWindow = __webpack_require__(40); - - module.exports = function scrollTop(node, val) { - var win = getWindow(node); - - if (val === undefined) return win ? 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop : node.scrollTop; - - if (win) win.scrollTo('pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft, val);else node.scrollTop = val; - }; - -/***/ }, -/* 51 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - var getWindow = __webpack_require__(40); - - module.exports = function scrollTop(node, val) { - var win = getWindow(node); - - if (val === undefined) return win ? 'pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft : node.scrollLeft; - - if (win) win.scrollTo(val, 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop);else node.scrollLeft = val; - }; - -/***/ }, -/* 52 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - exports['default'] = valueValidation; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _CustomPropTypes = __webpack_require__(53); - - var propList = ['children', 'value']; - var typeList = [_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]; - - function valueValidation(props, propName, componentName) { - var error = _CustomPropTypes.singlePropFrom(propList)(props, propName, componentName); - if (!error) { - var oneOfType = _react2['default'].PropTypes.oneOfType(typeList); - error = oneOfType(props, propName, componentName); + function createSinglePropFromChecker() { + for (var _len = arguments.length, arrOfProps = Array(_len), _key = 0; _key < _len; _key++) { + arrOfProps[_key] = arguments[_key]; } - return error; - } - - module.exports = exports['default']; -/***/ }, -/* 53 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$keys = __webpack_require__(1)['default']; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _reactLibWarning = __webpack_require__(29); - - var _reactLibWarning2 = _interopRequireDefault(_reactLibWarning); - - var _childrenToArray = __webpack_require__(54); - - var _childrenToArray2 = _interopRequireDefault(_childrenToArray); - - var ANONYMOUS = '<<anonymous>>'; - - /** - * Create chain-able isRequired validator - * - * Largely copied directly from: - * https://github.com/facebook/react/blob/0.11-stable/src/core/ReactPropTypes.js#L94 - */ - function createChainableTypeChecker(validate) { - function checkType(isRequired, props, propName, componentName) { - componentName = componentName || ANONYMOUS; - if (props[propName] == null) { - if (isRequired) { - return new Error('Required prop \'' + propName + '\' was not specified in \'' + componentName + '\'.'); - } - } else { - return validate(props, propName, componentName); - } - } - - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); - - return chainedCheckType; - } - - var CustomPropTypes = { - - deprecated: function deprecated(propType, explanation) { - return function (props, propName, componentName) { - if (props[propName] != null) { - _reactLibWarning2['default'](false, '"' + propName + '" property of "' + componentName + '" has been deprecated.\n' + explanation); - } - - return propType(props, propName, componentName); - }; - }, - - isRequiredForA11y: function isRequiredForA11y(propType) { - return function (props, propName, componentName) { - if (props[propName] == null) { - return new Error('The prop `' + propName + '` is required to make ' + componentName + ' accessible ' + 'for users using assistive technologies such as screen readers `'); - } - - return propType(props, propName, componentName); - }; - }, - - requiredRoles: function requiredRoles() { - for (var _len = arguments.length, roles = Array(_len), _key = 0; _key < _len; _key++) { - roles[_key] = arguments[_key]; - } - - return createChainableTypeChecker(function requiredRolesValidator(props, propName, component) { - var missing = undefined; - var children = _childrenToArray2['default'](props.children); - - var inRole = function inRole(role, child) { - return role === child.props.bsRole; - }; - - roles.every(function (role) { - if (!children.some(function (child) { - return inRole(role, child); - })) { - missing = role; - return false; - } - return true; - }); - - if (missing) { - return new Error('(children) ' + component + ' - Missing a required child with bsRole: ' + missing + '. ' + (component + ' must have at least one child of each of the following bsRoles: ' + roles.join(', '))); - } - }); - }, - - exclusiveRoles: function exclusiveRoles() { - for (var _len2 = arguments.length, roles = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - roles[_key2] = arguments[_key2]; - } - - return createChainableTypeChecker(function exclusiveRolesValidator(props, propName, component) { - var children = _childrenToArray2['default'](props.children); - var duplicate = undefined; - - roles.every(function (role) { - var childrenWithRole = children.filter(function (child) { - return child.props.bsRole === role; - }); - - if (childrenWithRole.length > 1) { - duplicate = role; - return false; - } - return true; - }); - - if (duplicate) { - return new Error('(children) ' + component + ' - Duplicate children detected of bsRole: ' + duplicate + '. ' + ('Only one child each allowed with the following bsRoles: ' + roles.join(', '))); - } - }); - }, - - /** - * Checks whether a prop provides a DOM element - * - * The element can be provided in two forms: - * - Directly passed - * - Or passed an object that has a `render` method - * - * @param props - * @param propName - * @param componentName - * @returns {Error|undefined} - */ - mountable: createMountableChecker(), - - /** - * Checks whether a prop provides a type of element. - * - * The type of element can be provided in two forms: - * - tag name (string) - * - a return value of React.createClass(...) - * - * @param props - * @param propName - * @param componentName - * @returns {Error|undefined} - */ - elementType: createElementTypeChecker(), - - /** - * Checks whether a prop matches a key of an associated object - * - * @param props - * @param propName - * @param componentName - * @returns {Error|undefined} - */ - keyOf: createKeyOfChecker, - /** - * Checks if only one of the listed properties is in use. An error is given - * if multiple have a value - * - * @param props - * @param propName - * @param componentName - * @returns {Error|undefined} - */ - singlePropFrom: createSinglePropFromChecker, - - all: all - }; - - function errMsg(props, propName, componentName, msgContinuation) { - return 'Invalid prop \'' + propName + '\' of value \'' + props[propName] + '\'' + (' supplied to \'' + componentName + '\'' + msgContinuation); - } - - function createMountableChecker() { - function validate(props, propName, componentName) { - if (typeof props[propName] !== 'object' || typeof props[propName].render !== 'function' && props[propName].nodeType !== 1) { - return new Error(errMsg(props, propName, componentName, ', expected a DOM element or an object that has a `render` method')); - } - } - - return createChainableTypeChecker(validate); - } - - function createKeyOfChecker(obj) { - function validate(props, propName, componentName) { - var propValue = props[propName]; - if (!obj.hasOwnProperty(propValue)) { - var valuesString = JSON.stringify(_Object$keys(obj)); - return new Error(errMsg(props, propName, componentName, ', expected one of ' + valuesString + '.')); - } - } - return createChainableTypeChecker(validate); - } - - function createSinglePropFromChecker(arrOfProps) { function validate(props, propName, componentName) { var usedPropCount = arrOfProps.map(function (listedProp) { return props[listedProp]; @@ -1893,93 +579,65 @@ return /******/ (function(modules) { // webpackBootstrap return validate; } - function all(propTypes) { - if (propTypes === undefined) { - throw new Error('No validations provided'); - } - - if (!(propTypes instanceof Array)) { - throw new Error('Invalid argument must be an array'); - } - - if (propTypes.length === 0) { - throw new Error('No validations provided'); - } - - return function (props, propName, componentName) { - for (var i = 0; i < propTypes.length; i++) { - var result = propTypes[i](props, propName, componentName); - - if (result !== undefined && result !== null) { - return result; - } - } - }; - } - - function createElementTypeChecker() { - function validate(props, propName, componentName) { - var errBeginning = errMsg(props, propName, componentName, '. Expected an Element `type`'); - - if (typeof props[propName] !== 'function') { - if (_react2['default'].isValidElement(props[propName])) { - return new Error(errBeginning + ', not an actual Element'); - } - - if (typeof props[propName] !== 'string') { - return new Error(errBeginning + ' such as a tag name or return value of React.createClass(...)'); - } - } - } - - return createChainableTypeChecker(validate); - } - - exports['default'] = CustomPropTypes; module.exports = exports['default']; /***/ }, -/* 54 */ -/***/ function(module, exports, __webpack_require__) { +/* 6 */ +/***/ function(module, exports) { + /** + * Safe chained function + * + * Will only create a new function if needed, + * otherwise will pass back existing functions or null. + * + * @param {function} functions to chain + * @returns {function|null} + */ 'use strict'; - var _interopRequireDefault = __webpack_require__(14)['default']; - exports.__esModule = true; - exports['default'] = childrenAsArray; - - var _ValidComponentChildren = __webpack_require__(55); - - var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren); + function createChainedFunction() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } - function childrenAsArray(children) { - var result = []; + return funcs.filter(function (f) { + return f != null; + }).reduce(function (acc, f) { + if (typeof f !== 'function') { + throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.'); + } - if (children === undefined) { - return result; - } + if (acc === null) { + return f; + } - _ValidComponentChildren2['default'].forEach(children, function (child) { - result.push(child); - }); + return function chainedFunction() { + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } - return result; + acc.apply(this, args); + f.apply(this, args); + }; + }, null); } + exports['default'] = createChainedFunction; module.exports = exports['default']; /***/ }, -/* 55 */ +/* 7 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); @@ -2067,77 +725,73 @@ return /******/ (function(modules) { // webpackBootstrap return hasValid; } - exports['default'] = { - map: mapValidComponents, - forEach: forEachValidComponents, - numberOf: numberOfValidComponents, - hasValidComponent: hasValidComponent - }; - module.exports = exports['default']; + function find(children, finder) { + var child = undefined; -/***/ }, -/* 56 */ -/***/ function(module, exports) { + forEachValidComponents(children, function (c, idx) { + if (!child && finder(c, idx, children)) { + child = c; + } + }); + + return child; + } /** - * Safe chained function + * Finds children that are typically specified as `props.children`, + * but only iterates over children that are "valid components". * - * Will only create a new function if needed, - * otherwise will pass back existing functions or null. + * The provided forEachFunc(child, index) will be called for each + * leaf child with the index reflecting the position relative to "valid components". * - * @param {function} functions to chain - * @returns {function|null} + * @param {?*} children Children tree container. + * @param {function(*, int)} findFunc. + * @param {*} findContext Context for findContext. + * @returns {array} of children that meet the findFunc return statement */ - 'use strict'; - - exports.__esModule = true; - function createChainedFunction() { - for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { - funcs[_key] = arguments[_key]; - } - - return funcs.filter(function (f) { - return f != null; - }).reduce(function (acc, f) { - if (typeof f !== 'function') { - throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.'); - } - - if (acc === null) { - return f; - } + function findValidComponents(children, func, context) { + var index = 0; + var returnChildren = []; - return function chainedFunction() { - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; + _react2['default'].Children.forEach(children, function (child) { + if (_react2['default'].isValidElement(child)) { + if (func.call(context, child, index)) { + returnChildren.push(child); } + index++; + } + }); - acc.apply(this, args); - f.apply(this, args); - }; - }, null); + return returnChildren; } - exports['default'] = createChainedFunction; + exports['default'] = { + map: mapValidComponents, + forEach: forEachValidComponents, + numberOf: numberOfValidComponents, + find: find, + findValidComponents: findValidComponents, + hasValidComponent: hasValidComponent + }; module.exports = exports['default']; /***/ }, -/* 57 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _PanelGroup = __webpack_require__(66); + var _PanelGroup = __webpack_require__(25); var _PanelGroup2 = _interopRequireDefault(_PanelGroup); @@ -2157,12 +811,12 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 58 */ +/* 9 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var _Object$assign = __webpack_require__(59)["default"]; + var _Object$assign = __webpack_require__(10)["default"]; exports["default"] = _Object$assign || function (target) { for (var i = 1; i < arguments.length; i++) { @@ -2181,37 +835,117 @@ return /******/ (function(modules) { // webpackBootstrap exports.__esModule = true; /***/ }, -/* 59 */ +/* 10 */ /***/ function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(60), __esModule: true }; + module.exports = { "default": __webpack_require__(11), __esModule: true }; /***/ }, -/* 60 */ +/* 11 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(61); - module.exports = __webpack_require__(9).Object.assign; + __webpack_require__(12); + module.exports = __webpack_require__(15).Object.assign; /***/ }, -/* 61 */ +/* 12 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) - var $def = __webpack_require__(7); - $def($def.S, 'Object', {assign: __webpack_require__(62)}); + var $def = __webpack_require__(13); + + $def($def.S + $def.F, 'Object', {assign: __webpack_require__(16)}); /***/ }, -/* 62 */ +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(14) + , core = __webpack_require__(15) + , PROTOTYPE = 'prototype'; + var ctx = function(fn, that){ + return function(){ + return fn.apply(that, arguments); + }; + }; + var $def = function(type, name, source){ + var key, own, out, exp + , isGlobal = type & $def.G + , isProto = type & $def.P + , target = isGlobal ? global : type & $def.S + ? global[name] : (global[name] || {})[PROTOTYPE] + , exports = isGlobal ? core : core[name] || (core[name] = {}); + if(isGlobal)source = name; + for(key in source){ + // contains in native + own = !(type & $def.F) && target && key in target; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + if(isGlobal && typeof target[key] != 'function')exp = source[key]; + // bind timers to global for call from export context + else if(type & $def.B && own)exp = ctx(out, global); + // wrap global constructors for prevent change them in library + else if(type & $def.W && target[key] == out)!function(C){ + exp = function(param){ + return this instanceof C ? new C(param) : C(param); + }; + exp[PROTOTYPE] = C[PROTOTYPE]; + }(out); + else exp = isProto && typeof out == 'function' ? ctx(Function.call, out) : out; + // export + exports[key] = exp; + if(isProto)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; + } + }; + // type bitmap + $def.F = 1; // forced + $def.G = 2; // global + $def.S = 4; // static + $def.P = 8; // proto + $def.B = 16; // bind + $def.W = 32; // wrap + module.exports = $def; + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var UNDEFINED = 'undefined'; + var global = module.exports = typeof window != UNDEFINED && window.Math == Math + ? window : typeof self != UNDEFINED && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + var core = module.exports = {version: '1.2.1'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }, +/* 16 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.1 Object.assign(target, source, ...) - var toObject = __webpack_require__(4) - , IObject = __webpack_require__(63) - , enumKeys = __webpack_require__(65); - /* eslint-disable no-unused-vars */ - module.exports = Object.assign || function assign(target, source){ - /* eslint-enable no-unused-vars */ + var toObject = __webpack_require__(17) + , IObject = __webpack_require__(19) + , enumKeys = __webpack_require__(21) + , has = __webpack_require__(23); + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = __webpack_require__(24)(function(){ + var a = Object.assign + , A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K; + }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) , l = arguments.length , i = 1; @@ -2221,23 +955,43 @@ return /******/ (function(modules) { // webpackBootstrap , length = keys.length , j = 0 , key; - while(length > j)T[key = keys[j++]] = S[key]; + while(length > j)if(has(S, key = keys[j++]))T[key] = S[key]; } return T; + } : Object.assign; + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(18); + module.exports = function(it){ + return Object(defined(it)); }; /***/ }, -/* 63 */ +/* 18 */ +/***/ function(module, exports) { + + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; + }; + +/***/ }, +/* 19 */ /***/ function(module, exports, __webpack_require__) { // indexed object, fallback for non-array-like ES3 strings - var cof = __webpack_require__(64); + var cof = __webpack_require__(20); module.exports = 0 in Object('z') ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }, -/* 64 */ +/* 20 */ /***/ function(module, exports) { var toString = {}.toString; @@ -2247,11 +1001,11 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 65 */ +/* 21 */ /***/ function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols - var $ = __webpack_require__(13); + var $ = __webpack_require__(22); module.exports = function(it){ var keys = $.getKeys(it) , getSymbols = $.getSymbols; @@ -2266,7 +1020,46 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 66 */ +/* 22 */ +/***/ function(module, exports) { + + var $Object = Object; + module.exports = { + create: $Object.create, + getProto: $Object.getPrototypeOf, + isEnum: {}.propertyIsEnumerable, + getDesc: $Object.getOwnPropertyDescriptor, + setDesc: $Object.defineProperty, + setDescs: $Object.defineProperties, + getKeys: $Object.keys, + getNames: $Object.getOwnPropertyNames, + getSymbols: $Object.getOwnPropertySymbols, + each: [].forEach + }; + +/***/ }, +/* 23 */ +/***/ function(module, exports) { + + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ + return hasOwnProperty.call(it, key); + }; + +/***/ }, +/* 24 */ +/***/ function(module, exports) { + + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; + +/***/ }, +/* 25 */ /***/ function(module, exports, __webpack_require__) { /* eslint react/prop-types: [2, {ignore: "bsStyle"}] */ @@ -2274,27 +1067,27 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); @@ -2392,7 +1185,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 67 */ +/* 26 */ /***/ function(module, exports) { "use strict"; @@ -2412,7 +1205,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.__esModule = true; /***/ }, -/* 68 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -2420,12 +1213,14 @@ return /******/ (function(modules) { // webpackBootstrap Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ + /* global define */ (function () { 'use strict'; - function classNames () { + var hasOwn = {}.hasOwnProperty; + function classNames () { var classes = ''; for (var i = 0; i < arguments.length; i++) { @@ -2434,15 +1229,13 @@ return /******/ (function(modules) { // webpackBootstrap var argType = typeof arg; - if ('string' === argType || 'number' === argType) { + if (argType === 'string' || argType === 'number') { classes += ' ' + arg; - } else if (Array.isArray(arg)) { classes += ' ' + classNames.apply(null, arg); - - } else if ('object' === argType) { + } else if (argType === 'object') { for (var key in arg) { - if (arg.hasOwnProperty(key) && arg[key]) { + if (hasOwn.call(arg, key) && arg[key]) { classes += ' ' + key; } } @@ -2454,39 +1247,38 @@ return /******/ (function(modules) { // webpackBootstrap if (typeof module !== 'undefined' && module.exports) { module.exports = classNames; - } else if (true){ - // AMD. Register as an anonymous module. + } else if (true) { + // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_RESULT__ = function () { return classNames; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { window.classNames = classNames; } - }()); /***/ }, -/* 69 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _styleMaps = __webpack_require__(70); + var _styleMaps = __webpack_require__(29); var _styleMaps2 = _interopRequireDefault(_styleMaps); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibKeyOf = __webpack_require__(30); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibKeyOf2 = _interopRequireDefault(_reactPropTypesLibKeyOf); var BootstrapMixin = { propTypes: { @@ -2494,7 +1286,7 @@ return /******/ (function(modules) { // webpackBootstrap * bootstrap className * @private */ - bsClass: _utilsCustomPropTypes2['default'].keyOf(_styleMaps2['default'].CLASSES), + bsClass: _reactPropTypesLibKeyOf2['default'](_styleMaps2['default'].CLASSES), /** * Style variants * @type {("default"|"primary"|"success"|"info"|"warning"|"danger"|"link")} @@ -2504,7 +1296,7 @@ return /******/ (function(modules) { // webpackBootstrap * Size variants * @type {("xsmall"|"small"|"medium"|"large"|"xs"|"sm"|"md"|"lg")} */ - bsSize: _utilsCustomPropTypes2['default'].keyOf(_styleMaps2['default'].SIZES) + bsSize: _reactPropTypesLibKeyOf2['default'](_styleMaps2['default'].SIZES) }, getBsClassSet: function getBsClassSet() { @@ -2542,7 +1334,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 70 */ +/* 29 */ /***/ function(module, exports) { 'use strict'; @@ -2592,26 +1384,98 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 71 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + exports.__esModule = true; + exports['default'] = keyOf; + + var _common = __webpack_require__(31); + + /** + * Checks whether a prop matches a key of an associated object + * + * @param props + * @param propName + * @param componentName + * @returns {Error|undefined} + */ - var _interopRequireDefault = __webpack_require__(14)['default']; + function keyOf(obj) { + function validate(props, propName, componentName) { + var propValue = props[propName]; + if (!obj.hasOwnProperty(propValue)) { + var valuesString = JSON.stringify(Object.keys(obj)); + return new Error(_common.errMsg(props, propName, componentName, ', expected one of ' + valuesString + '.')); + } + } + return _common.createChainableTypeChecker(validate); + } + + module.exports = exports['default']; + +/***/ }, +/* 31 */ +/***/ function(module, exports) { + + 'use strict'; exports.__esModule = true; + exports.errMsg = errMsg; + exports.createChainableTypeChecker = createChainableTypeChecker; - var _react = __webpack_require__(32); + function errMsg(props, propName, componentName, msgContinuation) { + return 'Invalid prop \'' + propName + '\' of value \'' + props[propName] + '\'' + (' supplied to \'' + componentName + '\'' + msgContinuation); + } + + /** + * Create chain-able isRequired validator + * + * Largely copied directly from: + * https://github.com/facebook/react/blob/0.11-stable/src/core/ReactPropTypes.js#L94 + */ + + function createChainableTypeChecker(validate) { + function checkType(isRequired, props, propName, componentName) { + componentName = componentName || '<<anonymous>>'; + if (props[propName] == null) { + if (isRequired) { + return new Error('Required prop \'' + propName + '\' was not specified in \'' + componentName + '\'.'); + } + } else { + return validate(props, propName, componentName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + +/***/ }, +/* 32 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _AffixMixin = __webpack_require__(72); + var _AffixMixin = __webpack_require__(33); var _AffixMixin2 = _interopRequireDefault(_AffixMixin); @@ -2641,24 +1505,32 @@ return /******/ (function(modules) { // webpackBootstrap // we don't want to expose the `style` property /***/ }, -/* 72 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _utilsDomUtils = __webpack_require__(31); + var _reactDom = __webpack_require__(34); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _utilsDomUtils = __webpack_require__(35); var _utilsDomUtils2 = _interopRequireDefault(_utilsDomUtils); - var _utilsEventListener = __webpack_require__(73); + var _domHelpersQueryOffset = __webpack_require__(39); + + var _domHelpersQueryOffset2 = _interopRequireDefault(_domHelpersQueryOffset); + + var _utilsEventListener = __webpack_require__(43); var _utilsEventListener2 = _interopRequireDefault(_utilsEventListener); @@ -2683,7 +1555,7 @@ return /******/ (function(modules) { // webpackBootstrap DOMNode.className = DOMNode.className.replace(/affix-top|affix-bottom|affix/, ''); DOMNode.className += DOMNode.className.length ? ' affix' : 'affix'; - this.pinnedOffset = _utilsDomUtils2['default'].getOffset(DOMNode).top - window.pageYOffset; + this.pinnedOffset = _domHelpersQueryOffset2['default'](DOMNode).top - window.pageYOffset; return this.pinnedOffset; }, @@ -2704,10 +1576,10 @@ return /******/ (function(modules) { // webpackBootstrap return; } - DOMNode = _react2['default'].findDOMNode(this); + DOMNode = _reactDom2['default'].findDOMNode(this); scrollHeight = _utilsDomUtils2['default'].getDocumentHeight(); scrollTop = window.pageYOffset; - position = _utilsDomUtils2['default'].getOffset(DOMNode); + position = _domHelpersQueryOffset2['default'](DOMNode); if (this.affixed === 'top') { position.top += scrollTop; @@ -2751,7 +1623,7 @@ return /******/ (function(modules) { // webpackBootstrap if (affix === 'bottom') { DOMNode.className = DOMNode.className.replace(/affix-top|affix-bottom|affix/, 'affix-bottom'); - affixPositionTop = scrollHeight - offsetBottom - DOMNode.offsetHeight - _utilsDomUtils2['default'].getOffset(DOMNode).top; + affixPositionTop = scrollHeight - offsetBottom - DOMNode.offsetHeight - _domHelpersQueryOffset2['default'](DOMNode).top; } this.setState({ @@ -2790,7 +1662,235 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 73 */ +/* 34 */ +/***/ function(module, exports) { + + module.exports = __WEBPACK_EXTERNAL_MODULE_34__; + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _reactDom = __webpack_require__(34); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _domHelpersOwnerDocument = __webpack_require__(36); + + var _domHelpersOwnerDocument2 = _interopRequireDefault(_domHelpersOwnerDocument); + + var _domHelpersOwnerWindow = __webpack_require__(37); + + var _domHelpersOwnerWindow2 = _interopRequireDefault(_domHelpersOwnerWindow); + + function ownerDocument(componentOrElement) { + var elem = _reactDom2['default'].findDOMNode(componentOrElement); + return _domHelpersOwnerDocument2['default'](elem && elem.ownerDocument || document); + } + + function ownerWindow(componentOrElement) { + var doc = ownerDocument(componentOrElement); + return _domHelpersOwnerWindow2['default'](doc); + } + + /** + * Get the height of the document + * + * @returns {documentHeight: number} + */ + function getDocumentHeight() { + return Math.max(document.documentElement.offsetHeight, document.height, document.body.scrollHeight, document.body.offsetHeight); + } + + /** + * Get an element's size + * + * @param {HTMLElement} elem + * @returns {{width: number, height: number}} + */ + function getSize(elem) { + var rect = { + width: elem.offsetWidth || 0, + height: elem.offsetHeight || 0 + }; + if (typeof elem.getBoundingClientRect !== 'undefined') { + var _elem$getBoundingClientRect = elem.getBoundingClientRect(); + + var width = _elem$getBoundingClientRect.width; + var height = _elem$getBoundingClientRect.height; + + rect.width = width || rect.width; + rect.height = height || rect.height; + } + return rect; + } + + exports['default'] = { + ownerWindow: ownerWindow, + ownerDocument: ownerDocument, + getDocumentHeight: getDocumentHeight, + getSize: getSize + }; + module.exports = exports['default']; + +/***/ }, +/* 36 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + exports["default"] = ownerDocument; + + function ownerDocument(node) { + return node && node.ownerDocument || document; + } + + module.exports = exports["default"]; + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(38); + + exports.__esModule = true; + exports['default'] = ownerWindow; + + var _ownerDocument = __webpack_require__(36); + + var _ownerDocument2 = babelHelpers.interopRequireDefault(_ownerDocument); + + function ownerWindow(node) { + var doc = (0, _ownerDocument2['default'])(node); + return doc && doc.defaultView || doc.parentWindow; + } + + module.exports = exports['default']; + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === "object") { + factory(exports); + } else { + factory(root.babelHelpers = {}); + } + })(this, function (global) { + var babelHelpers = global; + + babelHelpers.interopRequireDefault = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + babelHelpers._extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + }) + +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var contains = __webpack_require__(40), + getWindow = __webpack_require__(42), + ownerDocument = __webpack_require__(36); + + module.exports = function offset(node) { + var doc = ownerDocument(node), + win = getWindow(doc), + docElem = doc && doc.documentElement, + box = { top: 0, left: 0, height: 0, width: 0 }; + + if (!doc) return; + + // Make sure it's not a disconnected DOM node + if (!contains(docElem, node)) return box; + + if (node.getBoundingClientRect !== undefined) box = node.getBoundingClientRect(); + + if (box.width || box.height) { + + box = { + top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0), + left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0), + width: (box.width == null ? node.offsetWidth : box.width) || 0, + height: (box.height == null ? node.offsetHeight : box.height) || 0 + }; + } + + return box; + }; + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var canUseDOM = __webpack_require__(41); + + var contains = (function () { + var root = canUseDOM && document.documentElement; + + return root && root.contains ? function (context, node) { + return context.contains(node); + } : root && root.compareDocumentPosition ? function (context, node) { + return context === node || !!(context.compareDocumentPosition(node) & 16); + } : function (context, node) { + if (node) do { + if (node === context) return true; + } while (node = node.parentNode); + + return false; + }; + })(); + + module.exports = contains; + +/***/ }, +/* 41 */ +/***/ function(module, exports) { + + 'use strict'; + module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/***/ }, +/* 42 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function getWindow(node) { + return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false; + }; + +/***/ }, +/* 43 */ /***/ function(module, exports) { /** @@ -2853,26 +1953,26 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 74 */ +/* 44 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); @@ -2901,16 +2001,27 @@ return /******/ (function(modules) { // webpackBootstrap { type: 'button', className: 'close', - 'aria-label': this.props.closeLabel, - onClick: this.props.onDismiss }, + onClick: this.props.onDismiss, + 'aria-hidden': 'true' }, _react2['default'].createElement( 'span', - { 'aria-hidden': 'true' }, + null, '×' ) ); }, + renderSrOnlyDismissButton: function renderSrOnlyDismissButton() { + return _react2['default'].createElement( + 'button', + { + type: 'button', + className: 'close sr-only', + onClick: this.props.onDismiss }, + this.props.closeLabel + ); + }, + render: function render() { var classes = this.getBsClassSet(); var isDismissable = !!this.props.onDismiss; @@ -2921,7 +2032,8 @@ return /******/ (function(modules) { // webpackBootstrap 'div', _extends({}, this.props, { role: 'alert', className: _classnames2['default'](this.props.className, classes) }), isDismissable ? this.renderDismissButton() : null, - this.props.children + this.props.children, + isDismissable ? this.renderSrOnlyDismissButton() : null ); }, @@ -2940,26 +2052,26 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 75 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -2998,34 +2110,500 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 76 */ +/* 46 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; + + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _utilsValidComponentChildren = __webpack_require__(7); + + var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); + + var Breadcrumb = _react2['default'].createClass({ + displayName: 'Breadcrumb', + + propTypes: { + /** + * bootstrap className + * @private + */ + bsClass: _react2['default'].PropTypes.string + }, + + getDefaultProps: function getDefaultProps() { + return { + bsClass: 'breadcrumb' + }; + }, + + render: function render() { + var _props = this.props; + var className = _props.className; + + var props = _objectWithoutProperties(_props, ['className']); + + return _react2['default'].createElement( + 'ol', + _extends({}, props, { + role: 'navigation', + 'aria-label': 'breadcrumbs', + className: _classnames2['default'](className, this.props.bsClass) }), + _utilsValidComponentChildren2['default'].map(this.props.children, this.renderBreadcrumbItem) + ); + }, + + renderBreadcrumbItem: function renderBreadcrumbItem(child, index) { + return _react.cloneElement(child, { key: child.key ? child.key : index }); + } + }); + + exports['default'] = Breadcrumb; + module.exports = exports['default']; + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _objectWithoutProperties = __webpack_require__(26)['default']; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(4); + + var _react2 = _interopRequireDefault(_react); + + var _warning = __webpack_require__(48); + + var _warning2 = _interopRequireDefault(_warning); + + var _SafeAnchor = __webpack_require__(49); + + var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); + + var BreadcrumbItem = _react2['default'].createClass({ + displayName: 'BreadcrumbItem', + + propTypes: { + /** + * If set to true, renders `span` instead of `a` + */ + active: _react2['default'].PropTypes.bool, + /** + * HTML id for the wrapper `li` element + */ + id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), + /** + * HTML id for the inner `a` element + */ + linkId: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), + /** + * `href` attribute for the inner `a` element + */ + href: _react2['default'].PropTypes.string, + /** + * `title` attribute for the inner `a` element + */ + title: _react2['default'].PropTypes.node, + /** + * `target` attribute for the inner `a` element + */ + target: _react2['default'].PropTypes.string + }, + + getDefaultProps: function getDefaultProps() { + return { + active: false + }; + }, + + render: function render() { + var _props = this.props; + var active = _props.active; + var className = _props.className; + var id = _props.id; + var linkId = _props.linkId; + var children = _props.children; + var href = _props.href; + var title = _props.title; + var target = _props.target; + + var props = _objectWithoutProperties(_props, ['active', 'className', 'id', 'linkId', 'children', 'href', 'title', 'target']); + + _warning2['default'](!(href && active), '[react-bootstrap] `href` and `active` properties cannot be set at the same time'); + + var linkProps = { + href: href, + title: title, + target: target, + id: linkId + }; + + return _react2['default'].createElement( + 'li', + { id: id, className: _classnames2['default'](className, { active: active }) }, + active ? _react2['default'].createElement( + 'span', + props, + children + ) : _react2['default'].createElement( + _SafeAnchor2['default'], + _extends({}, props, linkProps), + children + ) + ); + } + }); + + exports['default'] = BreadcrumbItem; + module.exports = exports['default']; + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + 'use strict'; + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = function() {}; + + if (true) { + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.length < 10 || (/^[s\W]*$/).test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); + } + + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; + } + + module.exports = warning; + + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _inherits = __webpack_require__(50)['default']; + + var _classCallCheck = __webpack_require__(61)['default']; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _react = __webpack_require__(4); + + var _react2 = _interopRequireDefault(_react); + + var _utilsCreateChainedFunction = __webpack_require__(6); + + var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); + + /** + * Note: This is intended as a stop-gap for accessibility concerns that the + * Bootstrap CSS does not address as they have styled anchors and not buttons + * in many cases. + */ + + var SafeAnchor = (function (_React$Component) { + _inherits(SafeAnchor, _React$Component); + + function SafeAnchor(props) { + _classCallCheck(this, SafeAnchor); + + _React$Component.call(this, props); + + this.handleClick = this.handleClick.bind(this); + } + + SafeAnchor.prototype.handleClick = function handleClick(event) { + if (this.props.href === undefined) { + event.preventDefault(); + } + }; + + SafeAnchor.prototype.render = function render() { + return _react2['default'].createElement('a', _extends({ role: this.props.href ? undefined : 'button' + }, this.props, { + onClick: _utilsCreateChainedFunction2['default'](this.props.onClick, this.handleClick), + href: this.props.href || '' })); + }; + + return SafeAnchor; + })(_react2['default'].Component); + + exports['default'] = SafeAnchor; + + SafeAnchor.propTypes = { + href: _react2['default'].PropTypes.string, + onClick: _react2['default'].PropTypes.func + }; + module.exports = exports['default']; + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _Object$create = __webpack_require__(51)["default"]; + + var _Object$setPrototypeOf = __webpack_require__(53)["default"]; + + exports["default"] = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + + subClass.prototype = _Object$create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _Object$setPrototypeOf ? _Object$setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + }; + + exports.__esModule = true; + +/***/ }, +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(52), __esModule: true }; + +/***/ }, +/* 52 */ +/***/ function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(22); + module.exports = function create(P, D){ + return $.create(P, D); + }; + +/***/ }, +/* 53 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(54), __esModule: true }; + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(55); + module.exports = __webpack_require__(15).Object.setPrototypeOf; + +/***/ }, +/* 55 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $def = __webpack_require__(13); + $def($def.S, 'Object', {setPrototypeOf: __webpack_require__(56).set}); + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var getDesc = __webpack_require__(22).getDesc + , isObject = __webpack_require__(57) + , anObject = __webpack_require__(58); + var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line no-proto + function(test, buggy, set){ + try { + set = __webpack_require__(59)(Function.call, getDesc(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + +/***/ }, +/* 57 */ +/***/ function(module, exports) { + + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + +/***/ }, +/* 58 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(57); + module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; + }; + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(60); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; + +/***/ }, +/* 60 */ +/***/ function(module, exports) { + + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; + +/***/ }, +/* 61 */ +/***/ function(module, exports) { + + "use strict"; + + exports["default"] = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + + exports.__esModule = true; + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _react = __webpack_require__(4); + + var _react2 = _interopRequireDefault(_react); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibElementType = __webpack_require__(63); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); - var _ButtonInput = __webpack_require__(77); + var _ButtonInput = __webpack_require__(64); var _ButtonInput2 = _interopRequireDefault(_ButtonInput); @@ -3043,7 +2621,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * You can use a custom element for this component */ - componentClass: _utilsCustomPropTypes2['default'].elementType, + componentClass: _reactPropTypesLibElementType2['default'], href: _react2['default'].PropTypes.string, target: _react2['default'].PropTypes.string, /** @@ -3085,7 +2663,6 @@ return /******/ (function(modules) { // webpackBootstrap }, renderAnchor: function renderAnchor(classes) { - var Component = this.props.componentClass || 'a'; var href = this.props.href || '#'; classes.disabled = this.props.disabled; @@ -3129,40 +2706,86 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 77 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _react = __webpack_require__(4); - var _classCallCheck = __webpack_require__(28)['default']; + var _react2 = _interopRequireDefault(_react); - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _common = __webpack_require__(31); - var _extends = __webpack_require__(58)['default']; + /** + * Checks whether a prop provides a type of element. + * + * The type of element can be provided in two forms: + * - tag name (string) + * - a return value of React.createClass(...) + * + * @param props + * @param propName + * @param componentName + * @returns {Error|undefined} + */ - var _interopRequireDefault = __webpack_require__(14)['default']; + function validate(props, propName, componentName) { + var errBeginning = _common.errMsg(props, propName, componentName, '. Expected an Element `type`'); + + if (typeof props[propName] !== 'function') { + if (_react2['default'].isValidElement(props[propName])) { + return new Error(errBeginning + ', not an actual Element'); + } + + if (typeof props[propName] !== 'string') { + return new Error(errBeginning + ' such as a tag name or return value of React.createClass(...)'); + } + } + } + + exports['default'] = _common.createChainableTypeChecker(validate); + module.exports = exports['default']; + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _inherits = __webpack_require__(50)['default']; + + var _classCallCheck = __webpack_require__(61)['default']; + + var _objectWithoutProperties = __webpack_require__(26)['default']; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _Button = __webpack_require__(76); + var _Button = __webpack_require__(62); var _Button2 = _interopRequireDefault(_Button); - var _FormGroup = __webpack_require__(78); + var _FormGroup = __webpack_require__(65); var _FormGroup2 = _interopRequireDefault(_FormGroup); - var _InputBase2 = __webpack_require__(79); + var _InputBase2 = __webpack_require__(66); var _InputBase3 = _interopRequireDefault(_InputBase2); - var _utilsChildrenValueInputValidation = __webpack_require__(52); + var _utilsChildrenValueInputValidation = __webpack_require__(3); var _utilsChildrenValueInputValidation2 = _interopRequireDefault(_utilsChildrenValueInputValidation); @@ -3211,8 +2834,8 @@ return /******/ (function(modules) { // webpackBootstrap ButtonInput.propTypes = { type: _react2['default'].PropTypes.oneOf(ButtonInput.types), - bsStyle: function bsStyle(props) { - //defer to Button propTypes of bsStyle + bsStyle: function bsStyle() { + // defer to Button propTypes of bsStyle return null; }, children: _utilsChildrenValueInputValidation2['default'], @@ -3223,24 +2846,24 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 78 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -3297,34 +2920,34 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 79 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _classnames = __webpack_require__(27); - var _react2 = _interopRequireDefault(_react); + var _classnames2 = _interopRequireDefault(_classnames); - var _classnames = __webpack_require__(68); + var _react = __webpack_require__(4); - var _classnames2 = _interopRequireDefault(_classnames); + var _react2 = _interopRequireDefault(_react); - var _FormGroup = __webpack_require__(78); + var _FormGroup = __webpack_require__(65); var _FormGroup2 = _interopRequireDefault(_FormGroup); - var _Glyphicon = __webpack_require__(80); + var _Glyphicon = __webpack_require__(67); var _Glyphicon2 = _interopRequireDefault(_Glyphicon); @@ -3338,7 +2961,7 @@ return /******/ (function(modules) { // webpackBootstrap } InputBase.prototype.getInputDOMNode = function getInputDOMNode() { - return _react2['default'].findDOMNode(this.refs.input); + return this.refs.input; }; InputBase.prototype.getValue = function getValue() { @@ -3347,12 +2970,10 @@ return /******/ (function(modules) { // webpackBootstrap } else if (this.props.type) { if (this.props.type === 'select' && this.props.multiple) { return this.getSelectedOptions(); - } else { - return this.getInputDOMNode().value; } - } else { - throw 'Cannot use getValue without specifying input type.'; + return this.getInputDOMNode().value; } + throw new Error('Cannot use getValue without specifying input type.'); }; InputBase.prototype.getChecked = function getChecked() { @@ -3566,22 +3187,22 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 80 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -3629,32 +3250,32 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 81 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibAll = __webpack_require__(69); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll); var ButtonGroup = _react2['default'].createClass({ displayName: 'ButtonGroup', @@ -3668,11 +3289,11 @@ return /******/ (function(modules) { // webpackBootstrap * Display block buttons, only useful when used with the "vertical" prop. * @type {bool} */ - block: _utilsCustomPropTypes2['default'].all([_react2['default'].PropTypes.bool, function (props, propName, componentName) { + block: _reactPropTypesLibAll2['default'](_react2['default'].PropTypes.bool, function (props) { if (props.block && !props.vertical) { return new Error('The block property requires the vertical property to be set to have any effect'); } - }]) + }) }, getDefaultProps: function getDefaultProps() { @@ -3704,26 +3325,67 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 82 */ +/* 69 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = all; + + function all() { + for (var _len = arguments.length, propTypes = Array(_len), _key = 0; _key < _len; _key++) { + propTypes[_key] = arguments[_key]; + } + + if (propTypes === undefined) { + throw new Error('No validations provided'); + } + + if (propTypes.some(function (propType) { + return typeof propType !== 'function'; + })) { + throw new Error('Invalid arguments, must be functions'); + } + + if (propTypes.length === 0) { + throw new Error('No validations provided'); + } + + return function validate(props, propName, componentName) { + for (var i = 0; i < propTypes.length; i++) { + var result = propTypes[i](props, propName, componentName); + + if (result !== undefined && result !== null) { + return result; + } + } + }; + } + + module.exports = exports['default']; + +/***/ }, +/* 70 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); @@ -3755,34 +3417,34 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 83 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - var _Glyphicon = __webpack_require__(80); + var _Glyphicon = __webpack_require__(67); var _Glyphicon2 = _interopRequireDefault(_Glyphicon); @@ -3978,9 +3640,11 @@ return /******/ (function(modules) { // webpackBootstrap }, renderIndicators: function renderIndicators() { + var _this = this; + var indicators = []; _utilsValidComponentChildren2['default'].forEach(this.props.children, function (child, index) { - indicators.push(this.renderIndicator(child, index), + indicators.push(_this.renderIndicator(child, index), // Force whitespace between indicator elements, bootstrap // requires this for correct spacing of elements. @@ -3999,14 +3663,16 @@ return /******/ (function(modules) { // webpackBootstrap }, handleItemAnimateOutEnd: function handleItemAnimateOutEnd() { + var _this2 = this; + this.setState({ previousActiveIndex: null, direction: null }, function () { - this.waitForNext(); + _this2.waitForNext(); - if (this.props.onSlideEnd) { - this.props.onSlideEnd(); + if (_this2.props.onSlideEnd) { + _this2.props.onSlideEnd(); } }); }, @@ -4061,26 +3727,30 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 84 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _reactDom = __webpack_require__(34); - var _classnames2 = _interopRequireDefault(_classnames); + var _reactDom2 = _interopRequireDefault(_reactDom); - var _utilsTransitionEvents = __webpack_require__(85); + var _utilsTransitionEvents = __webpack_require__(73); var _utilsTransitionEvents2 = _interopRequireDefault(_utilsTransitionEvents); @@ -4127,7 +3797,7 @@ return /******/ (function(modules) { // webpackBootstrap componentDidUpdate: function componentDidUpdate(prevProps) { if (!this.props.active && prevProps.active) { - _utilsTransitionEvents2['default'].addEndEventListener(_react2['default'].findDOMNode(this), this.handleAnimateOutEnd); + _utilsTransitionEvents2['default'].addEndEventListener(_reactDom2['default'].findDOMNode(this), this.handleAnimateOutEnd); } if (this.props.active !== prevProps.active) { @@ -4178,7 +3848,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 85 */ +/* 73 */ /***/ function(module, exports) { /** @@ -4242,6 +3912,7 @@ return /******/ (function(modules) { // webpackBootstrap } for (var baseEventName in EVENT_NAME_MAP) { + // eslint-disable-line guard-for-in var baseEvents = EVENT_NAME_MAP[baseEventName]; for (var styleName in baseEvents) { if (styleName in style) { @@ -4296,34 +3967,34 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 86 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _Object$keys = __webpack_require__(1)['default']; + var _Object$keys = __webpack_require__(75)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _styleMaps = __webpack_require__(70); + var _styleMaps = __webpack_require__(29); var _styleMaps2 = _interopRequireDefault(_styleMaps); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibElementType = __webpack_require__(63); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); var Col = _react2['default'].createClass({ displayName: 'Col', @@ -4460,7 +4131,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * You can use a custom element for this component */ - componentClass: _utilsCustomPropTypes2['default'].elementType + componentClass: _reactPropTypesLibElementType2['default'] }, getDefaultProps: function getDefaultProps() { @@ -4470,6 +4141,8 @@ return /******/ (function(modules) { // webpackBootstrap }, render: function render() { + var _this = this; + var ComponentClass = this.props.componentClass; var classes = {}; @@ -4478,26 +4151,26 @@ return /******/ (function(modules) { // webpackBootstrap var prop = size; var classPart = size + '-'; - if (this.props[prop]) { - classes['col-' + classPart + this.props[prop]] = true; + if (_this.props[prop]) { + classes['col-' + classPart + _this.props[prop]] = true; } prop = size + 'Offset'; classPart = size + '-offset-'; - if (this.props[prop] >= 0) { - classes['col-' + classPart + this.props[prop]] = true; + if (_this.props[prop] >= 0) { + classes['col-' + classPart + _this.props[prop]] = true; } prop = size + 'Push'; classPart = size + '-push-'; - if (this.props[prop] >= 0) { - classes['col-' + classPart + this.props[prop]] = true; + if (_this.props[prop] >= 0) { + classes['col-' + classPart + _this.props[prop]] = true; } prop = size + 'Pull'; classPart = size + '-pull-'; - if (this.props[prop] >= 0) { - classes['col-' + classPart + this.props[prop]] = true; + if (_this.props[prop] >= 0) { + classes['col-' + classPart + _this.props[prop]] = true; } }, this); @@ -4513,226 +4186,75 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 87 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _utilsTransitionEvents = __webpack_require__(85); - - var _utilsTransitionEvents2 = _interopRequireDefault(_utilsTransitionEvents); - - var _utilsDeprecationWarning = __webpack_require__(16); - - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); - - var CollapsibleMixin = { - - propTypes: { - defaultExpanded: _react2['default'].PropTypes.bool, - expanded: _react2['default'].PropTypes.bool - }, - - getInitialState: function getInitialState() { - var defaultExpanded = this.props.defaultExpanded != null ? this.props.defaultExpanded : this.props.expanded != null ? this.props.expanded : false; - - return { - expanded: defaultExpanded, - collapsing: false - }; - }, - - componentWillMount: function componentWillMount() { - _utilsDeprecationWarning2['default']('CollapsibleMixin', 'Collapse Component'); - }, - - componentWillUpdate: function componentWillUpdate(nextProps, nextState) { - var willExpanded = nextProps.expanded != null ? nextProps.expanded : nextState.expanded; - if (willExpanded === this.isExpanded()) { - return; - } - - // if the expanded state is being toggled, ensure node has a dimension value - // this is needed for the animation to work and needs to be set before - // the collapsing class is applied (after collapsing is applied the in class - // is removed and the node's dimension will be wrong) - - var node = this.getCollapsibleDOMNode(); - var dimension = this.dimension(); - var value = '0'; - - if (!willExpanded) { - value = this.getCollapsibleDimensionValue(); - } - - node.style[dimension] = value + 'px'; - - this._afterWillUpdate(); - }, - - componentDidUpdate: function componentDidUpdate(prevProps, prevState) { - // check if expanded is being toggled; if so, set collapsing - this._checkToggleCollapsing(prevProps, prevState); - - // check if collapsing was turned on; if so, start animation - this._checkStartAnimation(); - }, - - // helps enable test stubs - _afterWillUpdate: function _afterWillUpdate() {}, - - _checkStartAnimation: function _checkStartAnimation() { - if (!this.state.collapsing) { - return; - } - - var node = this.getCollapsibleDOMNode(); - var dimension = this.dimension(); - var value = this.getCollapsibleDimensionValue(); - - // setting the dimension here starts the transition animation - var result = undefined; - if (this.isExpanded()) { - result = value + 'px'; - } else { - result = '0px'; - } - node.style[dimension] = result; - }, - - _checkToggleCollapsing: function _checkToggleCollapsing(prevProps, prevState) { - var wasExpanded = prevProps.expanded != null ? prevProps.expanded : prevState.expanded; - var isExpanded = this.isExpanded(); - if (wasExpanded !== isExpanded) { - if (wasExpanded) { - this._handleCollapse(); - } else { - this._handleExpand(); - } - } - }, - - _handleExpand: function _handleExpand() { - var _this = this; - - var node = this.getCollapsibleDOMNode(); - var dimension = this.dimension(); - - var complete = function complete() { - _this._removeEndEventListener(node, complete); - // remove dimension value - this ensures the collapsible item can grow - // in dimension after initial display (such as an image loading) - node.style[dimension] = ''; - _this.setState({ - collapsing: false - }); - }; - - this._addEndEventListener(node, complete); - - this.setState({ - collapsing: true - }); - }, - - _handleCollapse: function _handleCollapse() { - var _this2 = this; - - var node = this.getCollapsibleDOMNode(); - - var complete = function complete() { - _this2._removeEndEventListener(node, complete); - _this2.setState({ - collapsing: false - }); - }; + module.exports = { "default": __webpack_require__(76), __esModule: true }; - this._addEndEventListener(node, complete); - - this.setState({ - collapsing: true - }); - }, - - // helps enable test stubs - _addEndEventListener: function _addEndEventListener(node, complete) { - _utilsTransitionEvents2['default'].addEndEventListener(node, complete); - }, - - // helps enable test stubs - _removeEndEventListener: function _removeEndEventListener(node, complete) { - _utilsTransitionEvents2['default'].removeEndEventListener(node, complete); - }, +/***/ }, +/* 76 */ +/***/ function(module, exports, __webpack_require__) { - dimension: function dimension() { - return typeof this.getCollapsibleDimension === 'function' ? this.getCollapsibleDimension() : 'height'; - }, + __webpack_require__(77); + module.exports = __webpack_require__(15).Object.keys; - isExpanded: function isExpanded() { - return this.props.expanded != null ? this.props.expanded : this.state.expanded; - }, +/***/ }, +/* 77 */ +/***/ function(module, exports, __webpack_require__) { - getCollapsibleClassSet: function getCollapsibleClassSet(className) { - var classes = {}; + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(17); - if (typeof className === 'string') { - className.split(' ').forEach(function (subClasses) { - if (subClasses) { - classes[subClasses] = true; - } - }); - } + __webpack_require__(78)('keys', function($keys){ + return function keys(it){ + return $keys(toObject(it)); + }; + }); - classes.collapsing = this.state.collapsing; - classes.collapse = !this.state.collapsing; - classes['in'] = this.isExpanded() && !this.state.collapsing; +/***/ }, +/* 78 */ +/***/ function(module, exports, __webpack_require__) { - return classes; - } + // most Object methods by ES6 should accept primitives + module.exports = function(KEY, exec){ + var $def = __webpack_require__(13) + , fn = (__webpack_require__(15).Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $def($def.S + $def.F * __webpack_require__(24)(function(){ fn(1); }), 'Object', exp); }; - exports['default'] = CollapsibleMixin; - module.exports = exports['default']; - /***/ }, -/* 88 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _Collapse = __webpack_require__(89); + var _Collapse = __webpack_require__(80); var _Collapse2 = _interopRequireDefault(_Collapse); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _utilsCreateChainedFunction = __webpack_require__(6); var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); @@ -4776,9 +4298,8 @@ return /******/ (function(modules) { // webpackBootstrap { 'in': this.props.expanded }, nav ); - } else { - return nav; } + return nav; }, getChildActiveProp: function getChildActiveProp(child) { @@ -4828,42 +4349,38 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 89 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _reactOverlaysLibTransition = __webpack_require__(90); + var _domHelpersStyle = __webpack_require__(81); - var _reactOverlaysLibTransition2 = _interopRequireDefault(_reactOverlaysLibTransition); + var _domHelpersStyle2 = _interopRequireDefault(_domHelpersStyle); - var _utilsDomUtils = __webpack_require__(31); + var _react = __webpack_require__(4); - var _utilsDomUtils2 = _interopRequireDefault(_utilsDomUtils); + var _react2 = _interopRequireDefault(_react); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactOverlaysLibTransition = __webpack_require__(88); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactOverlaysLibTransition2 = _interopRequireDefault(_reactOverlaysLibTransition); - var _utilsDeprecationWarning = __webpack_require__(16); + var _reactPropTypesLibDeprecated = __webpack_require__(91); - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); + var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _utilsCreateChainedFunction = __webpack_require__(6); var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); @@ -4886,7 +4403,7 @@ return /******/ (function(modules) { // webpackBootstrap var value = elem['offset' + capitalize(dimension)]; var margins = MARGINS[dimension]; - return value + parseInt(_utilsDomUtils2['default'].css(elem, margins[0]), 10) + parseInt(_utilsDomUtils2['default'].css(elem, margins[1]), 10); + return value + parseInt(_domHelpersStyle2['default'](elem, margins[0]), 10) + parseInt(_domHelpersStyle2['default'](elem, margins[1]), 10); } var Collapse = (function (_React$Component) { @@ -4973,7 +4490,7 @@ return /******/ (function(modules) { // webpackBootstrap return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension; }; - //for testing + // for testing Collapse.prototype._getTransitionInstance = function _getTransitionInstance() { return this.refs.transition; @@ -5014,12 +4531,7 @@ return /******/ (function(modules) { // webpackBootstrap * duration * @private */ - duration: _utilsCustomPropTypes2['default'].all([_react2['default'].PropTypes.number, function (props) { - if (props.duration != null) { - _utilsDeprecationWarning2['default']('Collapse `duration`', 'the `timeout` prop'); - } - return null; - }]), + duration: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.number, 'Use `timeout`.'), /** * Callback fired before the component expands @@ -5084,7 +4596,162 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 90 */ +/* 81 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var camelize = __webpack_require__(82), + hyphenate = __webpack_require__(84), + _getComputedStyle = __webpack_require__(86), + removeStyle = __webpack_require__(87); + + var has = Object.prototype.hasOwnProperty; + + module.exports = function style(node, property, value) { + var css = '', + props = property; + + if (typeof property === 'string') { + + if (value === undefined) return node.style[camelize(property)] || _getComputedStyle(node).getPropertyValue(hyphenate(property));else (props = {})[property] = value; + } + + for (var key in props) if (has.call(props, key)) { + !props[key] && props[key] !== 0 ? removeStyle(node, hyphenate(key)) : css += hyphenate(key) + ':' + props[key] + ';'; + } + + node.style.cssText += ';' + css; + }; + +/***/ }, +/* 82 */ +/***/ function(module, exports, __webpack_require__) { + + /**
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
+ * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js
+ */ + + 'use strict'; + var camelize = __webpack_require__(83); + var msPattern = /^-ms-/; + + module.exports = function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); + }; + +/***/ }, +/* 83 */ +/***/ function(module, exports) { + + "use strict"; + + var rHyphen = /-(.)/g; + + module.exports = function camelize(string) { + return string.replace(rHyphen, function (_, chr) { + return chr.toUpperCase(); + }); + }; + +/***/ }, +/* 84 */ +/***/ function(module, exports, __webpack_require__) { + + /**
+ * Copyright 2013-2014, Facebook, Inc.
+ * All rights reserved.
+ * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
+ */ + + "use strict"; + + var hyphenate = __webpack_require__(85); + var msPattern = /^ms-/; + + module.exports = function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, "-ms-"); + }; + +/***/ }, +/* 85 */ +/***/ function(module, exports) { + + 'use strict'; + + var rUpper = /([A-Z])/g; + + module.exports = function hyphenate(string) { + return string.replace(rUpper, '-$1').toLowerCase(); + }; + +/***/ }, +/* 86 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(38); + + var _utilCamelizeStyle = __webpack_require__(82); + + var _utilCamelizeStyle2 = babelHelpers.interopRequireDefault(_utilCamelizeStyle); + + var rposition = /^(top|right|bottom|left)$/; + var rnumnonpx = /^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i; + + module.exports = function _getComputedStyle(node) { + if (!node) throw new TypeError('No Element passed to `getComputedStyle()`'); + var doc = node.ownerDocument; + + return 'defaultView' in doc ? doc.defaultView.opener ? node.ownerDocument.defaultView.getComputedStyle(node, null) : window.getComputedStyle(node, null) : { //ie 8 "magic" from: https://github.com/jquery/jquery/blob/1.11-stable/src/css/curCSS.js#L72 + getPropertyValue: function getPropertyValue(prop) { + var style = node.style; + + prop = (0, _utilCamelizeStyle2['default'])(prop); + + if (prop == 'float') prop = 'styleFloat'; + + var current = node.currentStyle[prop] || null; + + if (current == null && style && style[prop]) current = style[prop]; + + if (rnumnonpx.test(current) && !rposition.test(prop)) { + // Remember the original values + var left = style.left; + var runStyle = node.runtimeStyle; + var rsLeft = runStyle && runStyle.left; + + // Put in the new values to get a computed value out + if (rsLeft) runStyle.left = node.currentStyle.left; + + style.left = prop === 'fontSize' ? '1em' : current; + current = style.pixelLeft + 'px'; + + // Revert the changed values + style.left = left; + if (rsLeft) runStyle.left = rsLeft; + } + + return current; + } + }; + }; + +/***/ }, +/* 87 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function removeStyle(node, key) { + return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key); + }; + +/***/ }, +/* 88 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -5101,19 +4768,23 @@ return /******/ (function(modules) { // webpackBootstrap function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _domHelpersTransitionProperties = __webpack_require__(91); + var _reactDom = __webpack_require__(34); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _domHelpersTransitionProperties = __webpack_require__(89); var _domHelpersTransitionProperties2 = _interopRequireDefault(_domHelpersTransitionProperties); - var _domHelpersEventsOn = __webpack_require__(92); + var _domHelpersEventsOn = __webpack_require__(90); var _domHelpersEventsOn2 = _interopRequireDefault(_domHelpersEventsOn); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -5210,7 +4881,7 @@ return /******/ (function(modules) { // webpackBootstrap var _this = this; this.cancelNextCallback(); - var node = _react2['default'].findDOMNode(this); + var node = _reactDom2['default'].findDOMNode(this); // Not this.props, because we might be about to receive new props. props.onEnter(node); @@ -5230,7 +4901,7 @@ return /******/ (function(modules) { // webpackBootstrap var _this2 = this; this.cancelNextCallback(); - var node = _react2['default'].findDOMNode(this); + var node = _reactDom2['default'].findDOMNode(this); // Not this.props, because we might be about to receive new props. props.onExit(node); @@ -5422,11 +5093,11 @@ return /******/ (function(modules) { // webpackBootstrap exports['default'] = Transition; /***/ }, -/* 91 */ +/* 89 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var canUseDOM = __webpack_require__(33); + var canUseDOM = __webpack_require__(41); var has = Object.prototype.hasOwnProperty, transform = 'transform', @@ -5482,11 +5153,11 @@ return /******/ (function(modules) { // webpackBootstrap } /***/ }, -/* 92 */ +/* 90 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var canUseDOM = __webpack_require__(33); + var canUseDOM = __webpack_require__(41); var on = function on() {}; if (canUseDOM) { @@ -5503,73 +5174,124 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = on; /***/ }, -/* 93 */ +/* 91 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + exports.__esModule = true; + exports['default'] = deprecated; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _classCallCheck = __webpack_require__(28)['default']; + var _warning = __webpack_require__(48); - var _extends = __webpack_require__(58)['default']; + var _warning2 = _interopRequireDefault(_warning); - var _interopRequireDefault = __webpack_require__(14)['default']; + function deprecated(propType, explanation) { + return function validate(props, propName, componentName) { + if (props[propName] != null) { + _warning2['default'](false, '"' + propName + '" property of "' + componentName + '" has been deprecated.\n' + explanation); + } + + return propType(props, propName, componentName); + }; + } + + module.exports = exports['default']; + +/***/ }, +/* 92 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _inherits = __webpack_require__(50)['default']; + + var _classCallCheck = __webpack_require__(61)['default']; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _classnames = __webpack_require__(27); - var _react2 = _interopRequireDefault(_react); + var _classnames2 = _interopRequireDefault(_classnames); + + var _domHelpersActiveElement = __webpack_require__(93); + + var _domHelpersActiveElement2 = _interopRequireDefault(_domHelpersActiveElement); + + var _domHelpersQueryContains = __webpack_require__(40); + + var _domHelpersQueryContains2 = _interopRequireDefault(_domHelpersQueryContains); var _keycode = __webpack_require__(94); var _keycode2 = _interopRequireDefault(_keycode); - var _classnames = __webpack_require__(68); + var _lodashCompatCollectionFind = __webpack_require__(95); - var _classnames2 = _interopRequireDefault(_classnames); + var _lodashCompatCollectionFind2 = _interopRequireDefault(_lodashCompatCollectionFind); - var _uncontrollable = __webpack_require__(95); + var _lodashCompatObjectOmit = __webpack_require__(148); - var _uncontrollable2 = _interopRequireDefault(_uncontrollable); + var _lodashCompatObjectOmit2 = _interopRequireDefault(_lodashCompatObjectOmit); - var _ButtonGroup = __webpack_require__(81); + var _react = __webpack_require__(4); - var _ButtonGroup2 = _interopRequireDefault(_ButtonGroup); + var _react2 = _interopRequireDefault(_react); - var _DropdownToggle = __webpack_require__(99); + var _reactDom = __webpack_require__(34); - var _DropdownToggle2 = _interopRequireDefault(_DropdownToggle); + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _reactPropTypesLibAll = __webpack_require__(69); + + var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll); + + var _reactPropTypesLibElementType = __webpack_require__(63); + + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); + + var _reactPropTypesLibIsRequiredForA11y = __webpack_require__(163); + + var _reactPropTypesLibIsRequiredForA11y2 = _interopRequireDefault(_reactPropTypesLibIsRequiredForA11y); + + var _uncontrollable = __webpack_require__(164); - var _DropdownMenu = __webpack_require__(101); + var _uncontrollable2 = _interopRequireDefault(_uncontrollable); + + var _ButtonGroup = __webpack_require__(68); + + var _ButtonGroup2 = _interopRequireDefault(_ButtonGroup); + + var _DropdownMenu = __webpack_require__(168); var _DropdownMenu2 = _interopRequireDefault(_DropdownMenu); - var _utilsCustomPropTypes = __webpack_require__(53); + var _DropdownToggle = __webpack_require__(174); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _DropdownToggle2 = _interopRequireDefault(_DropdownToggle); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _utilsCreateChainedFunction = __webpack_require__(6); var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - var _lodashCollectionFind = __webpack_require__(107); + var _utilsCustomPropTypes = __webpack_require__(175); - var _lodashCollectionFind2 = _interopRequireDefault(_lodashCollectionFind); + var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); - var _lodashObjectOmit = __webpack_require__(156); + var _utilsValidComponentChildren = __webpack_require__(7); - var _lodashObjectOmit2 = _interopRequireDefault(_lodashObjectOmit); + var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); var TOGGLE_REF = 'toggle-btn'; - var TOGGLE_ROLE = _DropdownToggle2['default'].defaultProps.bsRole; - exports.TOGGLE_ROLE = TOGGLE_ROLE; var MENU_ROLE = _DropdownMenu2['default'].defaultProps.bsRole; - exports.MENU_ROLE = MENU_ROLE; - var Dropdown = (function (_React$Component) { _inherits(Dropdown, _React$Component); @@ -5605,19 +5327,32 @@ return /******/ (function(modules) { // webpackBootstrap }]; this.state = {}; + + this.lastOpenEventType = null; } Dropdown.prototype.componentDidMount = function componentDidMount() { - var menu = this.refs.menu; - if (this.props.open && menu.focusNext) { - menu.focusNext(); + this.focusNextOnOpen(); + }; + + Dropdown.prototype.componentWillUpdate = function componentWillUpdate(nextProps) { + if (!nextProps.open && this.props.open) { + this._focusInDropdown = _domHelpersQueryContains2['default'](_reactDom2['default'].findDOMNode(this.refs.menu), _domHelpersActiveElement2['default'](document)); } }; - Dropdown.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { - var menu = this.refs.menu; - if (this.props.open && !prevProps.open && menu.focusNext) { - menu.focusNext(); + Dropdown.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { + if (this.props.open && !prevProps.open) { + this.focusNextOnOpen(); + } + + if (!this.props.open && prevProps.open) { + // if focus hasn't already moved from the menu lets return it + // to the toggle + if (this._focusInDropdown) { + this._focusInDropdown = false; + this.focus(); + } } }; @@ -5625,10 +5360,11 @@ return /******/ (function(modules) { // webpackBootstrap var children = this.extractChildren(); var Component = this.props.componentClass; - var props = _lodashObjectOmit2['default'](this.props, ['id']); + var props = _lodashCompatObjectOmit2['default'](this.props, ['id', 'role']); var rootClasses = { open: this.props.open, + disabled: this.props.disabled, dropdown: !this.props.dropup, dropup: this.props.dropup }; @@ -5636,6 +5372,7 @@ return /******/ (function(modules) { // webpackBootstrap return _react2['default'].createElement( Component, _extends({}, props, { + tabIndex: '-1', className: _classnames2['default'](this.props.className, rootClasses) }), children @@ -5643,79 +5380,85 @@ return /******/ (function(modules) { // webpackBootstrap }; Dropdown.prototype.toggleOpen = function toggleOpen() { + var eventType = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0]; + var open = !this.props.open; + if (open) { + this.lastOpenEventType = eventType; + } + if (this.props.onToggle) { this.props.onToggle(open); } }; - Dropdown.prototype.handleClick = function handleClick(event) { + Dropdown.prototype.handleClick = function handleClick() { if (this.props.disabled) { return; } - this.toggleOpen(); + this.toggleOpen('click'); }; Dropdown.prototype.handleKeyDown = function handleKeyDown(event) { - var _this = this; - - var focusNext = function focusNext() { - if (_this.refs.menu.focusNext) { - _this.refs.menu.focusNext(); - } - }; + if (this.props.disabled) { + return; + } switch (event.keyCode) { case _keycode2['default'].codes.down: if (!this.props.open) { - this.toggleOpen(); - } else { - focusNext(); + this.toggleOpen('keydown'); + } else if (this.refs.menu.focusNext) { + this.refs.menu.focusNext(); } event.preventDefault(); break; case _keycode2['default'].codes.esc: case _keycode2['default'].codes.tab: - if (this.props.open) { - this.handleClose(event); - } + this.handleClose(event); break; default: } }; - Dropdown.prototype.handleClose = function handleClose(event) { + Dropdown.prototype.handleClose = function handleClose() { if (!this.props.open) { return; } - // we need to let the current event finish before closing the menu. - // otherwise the menu may close, shifting focus to document.body, before focus has moved - // to the next focusable input - if (event && event.keyCode === _keycode2['default'].codes.tab) { - setTimeout(this.toggleOpen); - } else { - this.toggleOpen(); + this.toggleOpen(); + }; + + Dropdown.prototype.focusNextOnOpen = function focusNextOnOpen() { + var menu = this.refs.menu; + + if (!menu.focusNext) { + return; } - if (event && event.type === 'keydown' && event.keyCode === _keycode2['default'].codes.esc) { - var toggle = _react2['default'].findDOMNode(this.refs[TOGGLE_REF]); - event.preventDefault(); - event.stopPropagation(); + if (this.lastOpenEventType === 'keydown' || this.props.role === 'menuitem') { + menu.focusNext(); + } + }; + + Dropdown.prototype.focus = function focus() { + var toggle = _reactDom2['default'].findDOMNode(this.refs[TOGGLE_REF]); + + if (toggle && toggle.focus) { toggle.focus(); } }; Dropdown.prototype.extractChildren = function extractChildren() { - var _this2 = this; + var _this = this; var open = !!this.props.open; var seen = {}; - return _react2['default'].Children.map(this.props.children, function (child) { - var extractor = _lodashCollectionFind2['default'](_this2.childExtractors, function (x) { + return _utilsValidComponentChildren2['default'].map(this.props.children, function (child) { + var extractor = _lodashCompatCollectionFind2['default'](_this.childExtractors, function (x) { return x.matches(child); }); @@ -5751,7 +5494,8 @@ return /******/ (function(modules) { // webpackBootstrap var toggleProps = { open: open, id: this.props.id, - ref: TOGGLE_REF + ref: TOGGLE_REF, + role: this.props.role }; toggleProps.onClick = _utilsCreateChainedFunction2['default'](toggle.props.onClick, this.handleClick); @@ -5767,9 +5511,12 @@ return /******/ (function(modules) { // webpackBootstrap Dropdown.Toggle = _DropdownToggle2['default']; Dropdown.TOGGLE_REF = TOGGLE_REF; + Dropdown.TOGGLE_ROLE = TOGGLE_ROLE; + Dropdown.MENU_ROLE = MENU_ROLE; Dropdown.defaultProps = { - componentClass: _ButtonGroup2['default'] + componentClass: _ButtonGroup2['default'], + alwaysFocusNextOnOpen: false }; Dropdown.propTypes = { @@ -5783,15 +5530,15 @@ return /******/ (function(modules) { // webpackBootstrap * @type {string|number} * @required */ - id: _utilsCustomPropTypes2['default'].isRequiredForA11y(_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])), + id: _reactPropTypesLibIsRequiredForA11y2['default'](_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])), - componentClass: _utilsCustomPropTypes2['default'].elementType, + componentClass: _reactPropTypesLibElementType2['default'], /** * The children of a Dropdown may be a `<Dropdown.Toggle/>` or a `<Dropdown.Menu/>`. * @type {node} */ - children: _utilsCustomPropTypes2['default'].all([_utilsCustomPropTypes2['default'].requiredRoles(TOGGLE_ROLE, MENU_ROLE), _utilsCustomPropTypes2['default'].exclusiveRoles(MENU_ROLE)]), + children: _reactPropTypesLibAll2['default'](_utilsCustomPropTypes2['default'].requiredRoles(TOGGLE_ROLE, MENU_ROLE), _utilsCustomPropTypes2['default'].exclusiveRoles(MENU_ROLE)), /** * Whether or not component is disabled. @@ -5799,7 +5546,7 @@ return /******/ (function(modules) { // webpackBootstrap disabled: _react2['default'].PropTypes.bool, /** - * Align the menu to the right side of the Dropdown toggle + * Align the menu to the right side of the Dropdown toggle */ pullRight: _react2['default'].PropTypes.bool, @@ -5820,7 +5567,7 @@ return /******/ (function(modules) { // webpackBootstrap * `open` value. * * ```js - * function(Boolean isOpen){} + * function(Boolean isOpen) {} * ``` * @controllable open */ @@ -5833,7 +5580,13 @@ return /******/ (function(modules) { // webpackBootstrap * function(Object event, Any eventKey) * ``` */ - onSelect: _react2['default'].PropTypes.func + onSelect: _react2['default'].PropTypes.func, + + /** + * If `'menuitem'`, causes the dropdown to behave like a menu item rather than + * a menu button. + */ + role: _react2['default'].PropTypes.string }; Dropdown = _uncontrollable2['default'](Dropdown, { open: 'onToggle' }); @@ -5842,6 +5595,36 @@ return /******/ (function(modules) { // webpackBootstrap Dropdown.Menu = _DropdownMenu2['default']; exports['default'] = Dropdown; + module.exports = exports['default']; + +/***/ }, +/* 93 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(38); + + exports.__esModule = true; + + /**
+ * document.activeElement
+ */ + exports['default'] = activeElement; + + var _ownerDocument = __webpack_require__(36); + + var _ownerDocument2 = babelHelpers.interopRequireDefault(_ownerDocument); + + function activeElement() { + var doc = arguments[0] === undefined ? document : arguments[0]; + + try { + return doc.activeElement; + } catch (e) {} + } + + module.exports = exports['default']; /***/ }, /* 94 */ @@ -6000,936 +5783,8 @@ return /******/ (function(modules) { // webpackBootstrap /* 95 */ /***/ function(module, exports, __webpack_require__) { - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _createUncontrollable = __webpack_require__(96); - - var _createUncontrollable2 = _interopRequireDefault(_createUncontrollable); - - var mixin = { - shouldComponentUpdate: function shouldComponentUpdate() { - //let the setState trigger the update - return !this._notifying; - } - }; - - function set(component, propName, handler, value, args) { - if (handler) { - component._notifying = true; - handler.call.apply(handler, [component, value].concat(args)); - component._notifying = false; - } - - component._values[propName] = value; - component.forceUpdate(); - } - - exports['default'] = _createUncontrollable2['default']([mixin], set); - module.exports = exports['default']; - -/***/ }, -/* 96 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - exports['default'] = createUncontrollable; - - function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _utils = __webpack_require__(97); - - var utils = _interopRequireWildcard(_utils); - - function createUncontrollable(mixins, set) { - - return uncontrollable; - - function uncontrollable(Component, controlledValues) { - var forwardMethods = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2]; - - var displayName = Component.displayName || Component.name || 'Component', - basePropTypes = utils.getType(Component).propTypes, - propTypes; - - propTypes = utils.uncontrolledPropTypes(controlledValues, basePropTypes, displayName); - - var methods = utils.transform(forwardMethods, function (proto, method) { - proto[method] = function () { - var controlled = this.refs.controlled; - return controlled[method].apply(controlled, arguments); - }; - }, {}); - - var component = _react2['default'].createClass(_extends({ - - displayName: 'Uncontrolled(' + displayName + ')', - - mixins: mixins, - - propTypes: propTypes - - }, methods, { - - componentWillMount: function componentWillMount() { - var props = this.props, - keys = Object.keys(controlledValues); - - this._values = utils.transform(keys, function (values, key) { - values[key] = props[utils.defaultKey(key)]; - }, {}); - }, - - render: function render() { - var _this = this; - - var newProps = {}; - var _props = this.props; - var valueLink = _props.valueLink; - var checkedLink = _props.checkedLink; - - var props = _objectWithoutProperties(_props, ['valueLink', 'checkedLink']); - - utils.each(controlledValues, function (handle, propName) { - var linkPropName = utils.getLinkName(propName), - prop = _this.props[propName]; - - if (linkPropName && !isProp(_this.props, propName) && isProp(_this.props, linkPropName)) { - prop = _this.props[linkPropName].value; - } - - newProps[propName] = prop !== undefined ? prop : _this._values[propName]; - - newProps[handle] = setAndNotify.bind(_this, propName); - }); - - newProps = _extends({ ref: 'controlled' }, props, newProps); - - return _react2['default'].createElement(Component, newProps); - } - - })); - - component.ControlledComponent = Component; - - return component; - - function setAndNotify(propName, value) { - var linkName = utils.getLinkName(propName), - handler = this.props[controlledValues[propName]]; - - if (linkName && isProp(this.props, linkName) && !handler) { - handler = this.props[linkName].requestChange; - } - - for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } - - set(this, propName, handler, value, args); - } - - function isProp(props, prop) { - return props[prop] !== undefined; - } - } - } - - module.exports = exports['default']; - -/***/ }, -/* 97 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.customPropType = customPropType; - exports.uncontrolledPropTypes = uncontrolledPropTypes; - exports.getType = getType; - exports.getLinkName = getLinkName; - exports.defaultKey = defaultKey; - exports.chain = chain; - exports.transform = transform; - exports.each = each; - exports.has = has; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _invariant = __webpack_require__(98); - - var _invariant2 = _interopRequireDefault(_invariant); - - function customPropType(handler, propType, name) { - - return function (props, propName, componentName) { - - if (props[propName] !== undefined) { - if (!props[handler]) { - return new Error('You have provided a `' + propName + '` prop to ' + '`' + name + '` without an `' + handler + '` handler. This will render a read-only field. ' + 'If the field should be mutable use `' + defaultKey(propName) + '`. Otherwise, set `' + handler + '`'); - } - - return propType && propType(props, propName, name); - } - }; - } - - function uncontrolledPropTypes(controlledValues, basePropTypes, displayName) { - var propTypes = {}; - - if (("development") !== 'production' && basePropTypes) { - transform(controlledValues, function (obj, handler, prop) { - var type = basePropTypes[prop]; - - _invariant2['default'](typeof handler === 'string' && handler.trim().length, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop); - - obj[prop] = customPropType(handler, type, displayName); - - if (type !== undefined) obj[defaultKey(prop)] = type; - }, propTypes); - } - - return propTypes; - } - - var version = _react2['default'].version.split('.').map(parseFloat); - - exports.version = version; - - function getType(component) { - if (version[0] === 0 && version[1] >= 13) return component; - - return component.type; - } - - function getLinkName(name) { - return name === 'value' ? 'valueLink' : name === 'checked' ? 'checkedLink' : null; - } - - function defaultKey(key) { - return 'default' + key.charAt(0).toUpperCase() + key.substr(1); - } - - function chain(thisArg, a, b) { - return function chainedFunction() { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - a && a.call.apply(a, [thisArg].concat(args)); - b && b.call.apply(b, [thisArg].concat(args)); - }; - } - - function transform(obj, cb, seed) { - each(obj, cb.bind(null, seed = seed || (Array.isArray(obj) ? [] : {}))); - return seed; - } - - function each(obj, cb, thisArg) { - if (Array.isArray(obj)) return obj.forEach(cb, thisArg); - - for (var key in obj) if (has(obj, key)) cb.call(thisArg, obj[key], key, obj); - } - - function has(o, k) { - return o ? Object.prototype.hasOwnProperty.call(o, k) : false; - } - -/***/ }, -/* 98 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule invariant - */ - - 'use strict'; - - /** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - - var invariant = function(condition, format, a, b, c, d, e, f) { - if (true) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } - - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - 'Invariant Violation: ' + - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } - }; - - module.exports = invariant; - - -/***/ }, -/* 99 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _inherits = __webpack_require__(17)['default']; - - var _classCallCheck = __webpack_require__(28)['default']; - - var _extends = __webpack_require__(58)['default']; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _classnames = __webpack_require__(68); - - var _classnames2 = _interopRequireDefault(_classnames); - - var _Button = __webpack_require__(76); - - var _Button2 = _interopRequireDefault(_Button); - - var _utilsCustomPropTypes = __webpack_require__(53); - - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); - - var _SafeAnchor = __webpack_require__(100); - - var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); - - var CARET = _react2['default'].createElement( - 'span', - null, - ' ', - _react2['default'].createElement('span', { className: 'caret' }) - ); - - var DropdownToggle = (function (_React$Component) { - _inherits(DropdownToggle, _React$Component); - - function DropdownToggle() { - _classCallCheck(this, DropdownToggle); - - _React$Component.apply(this, arguments); - } - - DropdownToggle.prototype.render = function render() { - var caret = this.props.noCaret ? null : CARET; - - var classes = { - 'dropdown-toggle': true - }; - - var Component = this.props.useAnchor ? _SafeAnchor2['default'] : _Button2['default']; - - return _react2['default'].createElement( - Component, - _extends({}, this.props, { - className: _classnames2['default'](classes, this.props.className), - type: 'button', - 'aria-haspopup': true, - 'aria-expanded': this.props.open }), - this.props.title || this.props.children, - caret - ); - }; - - return DropdownToggle; - })(_react2['default'].Component); - - exports['default'] = DropdownToggle; - - var titleAndChildrenValidation = _utilsCustomPropTypes2['default'].singlePropFrom(['title', 'children']); - - DropdownToggle.defaultProps = { - open: false, - useAnchor: false, - bsRole: 'toggle' - }; - - DropdownToggle.propTypes = { - bsRole: _react2['default'].PropTypes.string, - children: titleAndChildrenValidation, - noCaret: _react2['default'].PropTypes.bool, - open: _react2['default'].PropTypes.bool, - title: titleAndChildrenValidation, - useAnchor: _react2['default'].PropTypes.bool - }; - - DropdownToggle.isToggle = true; - DropdownToggle.titleProp = 'title'; - DropdownToggle.onClickProp = 'onClick'; - module.exports = exports['default']; - -/***/ }, -/* 100 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _inherits = __webpack_require__(17)['default']; - - var _classCallCheck = __webpack_require__(28)['default']; - - var _extends = __webpack_require__(58)['default']; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _utilsCreateChainedFunction = __webpack_require__(56); - - var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - - /** - * Note: This is intended as a stop-gap for accessibility concerns that the - * Bootstrap CSS does not address as they have styled anchors and not buttons - * in many cases. - */ - - var SafeAnchor = (function (_React$Component) { - _inherits(SafeAnchor, _React$Component); - - function SafeAnchor(props) { - _classCallCheck(this, SafeAnchor); - - _React$Component.call(this, props); - - this.handleClick = this.handleClick.bind(this); - } - - SafeAnchor.prototype.handleClick = function handleClick(event) { - if (this.props.href === undefined) { - event.preventDefault(); - } - }; - - SafeAnchor.prototype.render = function render() { - return _react2['default'].createElement('a', _extends({ role: this.props.href ? undefined : 'button' - }, this.props, { - onClick: _utilsCreateChainedFunction2['default'](this.props.onClick, this.handleClick), - href: this.props.href || '' })); - }; - - return SafeAnchor; - })(_react2['default'].Component); - - exports['default'] = SafeAnchor; - - SafeAnchor.propTypes = { - href: _react2['default'].PropTypes.string, - onClick: _react2['default'].PropTypes.func - }; - module.exports = exports['default']; - -/***/ }, -/* 101 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _inherits = __webpack_require__(17)['default']; - - var _classCallCheck = __webpack_require__(28)['default']; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _keycode = __webpack_require__(94); - - var _keycode2 = _interopRequireDefault(_keycode); - - var _classnames = __webpack_require__(68); - - var _classnames2 = _interopRequireDefault(_classnames); - - var _reactOverlaysLibRootCloseWrapper = __webpack_require__(102); - - var _reactOverlaysLibRootCloseWrapper2 = _interopRequireDefault(_reactOverlaysLibRootCloseWrapper); - - var _utilsValidComponentChildren = __webpack_require__(55); - - var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - - var _utilsCreateChainedFunction = __webpack_require__(56); - - var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - - var DropdownMenu = (function (_React$Component) { - _inherits(DropdownMenu, _React$Component); - - function DropdownMenu(props) { - _classCallCheck(this, DropdownMenu); - - _React$Component.call(this, props); - - this.focusNext = this.focusNext.bind(this); - this.focusPrevious = this.focusPrevious.bind(this); - this.getFocusableMenuItems = this.getFocusableMenuItems.bind(this); - this.getItemsAndActiveIndex = this.getItemsAndActiveIndex.bind(this); - - this.handleKeyDown = this.handleKeyDown.bind(this); - } - - DropdownMenu.prototype.handleKeyDown = function handleKeyDown(event) { - - switch (event.keyCode) { - case _keycode2['default'].codes.down: - this.focusNext(); - event.preventDefault(); - break; - case _keycode2['default'].codes.up: - this.focusPrevious(); - event.preventDefault(); - break; - case _keycode2['default'].codes.esc: - case _keycode2['default'].codes.tab: - this.props.onClose(event); - break; - default: - } - }; - - DropdownMenu.prototype.focusNext = function focusNext() { - var _getItemsAndActiveIndex = this.getItemsAndActiveIndex(); - - var items = _getItemsAndActiveIndex.items; - var activeItemIndex = _getItemsAndActiveIndex.activeItemIndex; - - if (activeItemIndex === items.length - 1) { - items[0].focus(); - return; - } - - items[activeItemIndex + 1].focus(); - }; - - DropdownMenu.prototype.focusPrevious = function focusPrevious() { - var _getItemsAndActiveIndex2 = this.getItemsAndActiveIndex(); - - var items = _getItemsAndActiveIndex2.items; - var activeItemIndex = _getItemsAndActiveIndex2.activeItemIndex; - - if (activeItemIndex === 0) { - items[items.length - 1].focus(); - return; - } - - items[activeItemIndex - 1].focus(); - }; - - DropdownMenu.prototype.getItemsAndActiveIndex = function getItemsAndActiveIndex() { - var items = this.getFocusableMenuItems(); - var activeElement = document.activeElement; - var activeItemIndex = items.indexOf(activeElement); - - return { items: items, activeItemIndex: activeItemIndex }; - }; - - DropdownMenu.prototype.getFocusableMenuItems = function getFocusableMenuItems() { - var menuNode = _react2['default'].findDOMNode(this); - - if (menuNode === undefined) { - return []; - } - - return [].slice.call(menuNode.querySelectorAll('[tabIndex="-1"]'), 0); - }; - - DropdownMenu.prototype.render = function render() { - var _this = this; - - var items = _utilsValidComponentChildren2['default'].map(this.props.children, function (child) { - var _ref = child.props || {}; - - var children = _ref.children; - var onKeyDown = _ref.onKeyDown; - var onSelect = _ref.onSelect; - - return _react2['default'].cloneElement(child, { - onKeyDown: _utilsCreateChainedFunction2['default'](onKeyDown, _this.handleKeyDown), - onSelect: _utilsCreateChainedFunction2['default'](onSelect, _this.props.onSelect) - }, children); - }); - - var classes = { - 'dropdown-menu': true, - 'dropdown-menu-right': this.props.pullRight - }; - - var list = _react2['default'].createElement( - 'ul', - { - className: _classnames2['default'](this.props.className, classes), - role: 'menu', - 'aria-labelledby': this.props.labelledBy - }, - items - ); - - if (this.props.open) { - list = _react2['default'].createElement( - _reactOverlaysLibRootCloseWrapper2['default'], - { noWrap: true, onRootClose: this.props.onClose }, - list - ); - } - - return list; - }; - - return DropdownMenu; - })(_react2['default'].Component); - - DropdownMenu.defaultProps = { - bsRole: 'menu', - pullRight: false - }; - - DropdownMenu.propTypes = { - open: _react2['default'].PropTypes.bool, - pullRight: _react2['default'].PropTypes.bool, - onClose: _react2['default'].PropTypes.func, - labelledBy: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), - onSelect: _react2['default'].PropTypes.func - }; - - exports['default'] = DropdownMenu; - module.exports = exports['default']; - -/***/ }, -/* 102 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _utilsAddEventListener = __webpack_require__(103); - - var _utilsAddEventListener2 = _interopRequireDefault(_utilsAddEventListener); - - var _utilsCreateChainedFunction = __webpack_require__(105); - - var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - - var _utilsOwnerDocument = __webpack_require__(106); - - var _utilsOwnerDocument2 = _interopRequireDefault(_utilsOwnerDocument); - - // TODO: Consider using an ES6 symbol here, once we use babel-runtime. - var CLICK_WAS_INSIDE = '__click_was_inside'; - - function suppressRootClose(event) { - // Tag the native event to prevent the root close logic on document click. - // This seems safer than using event.nativeEvent.stopImmediatePropagation(), - // which is only supported in IE >= 9. - event.nativeEvent[CLICK_WAS_INSIDE] = true; - } - - var RootCloseWrapper = (function (_React$Component) { - function RootCloseWrapper(props) { - _classCallCheck(this, RootCloseWrapper); - - _React$Component.call(this, props); - - this.handleDocumentClick = this.handleDocumentClick.bind(this); - this.handleDocumentKeyUp = this.handleDocumentKeyUp.bind(this); - } - - _inherits(RootCloseWrapper, _React$Component); - - RootCloseWrapper.prototype.bindRootCloseHandlers = function bindRootCloseHandlers() { - var doc = _utilsOwnerDocument2['default'](this); - - this._onDocumentClickListener = _utilsAddEventListener2['default'](doc, 'click', this.handleDocumentClick); - - this._onDocumentKeyupListener = _utilsAddEventListener2['default'](doc, 'keyup', this.handleDocumentKeyUp); - }; - - RootCloseWrapper.prototype.handleDocumentClick = function handleDocumentClick(e) { - // This is now the native event. - if (e[CLICK_WAS_INSIDE]) { - return; - } - - this.props.onRootClose(); - }; - - RootCloseWrapper.prototype.handleDocumentKeyUp = function handleDocumentKeyUp(e) { - if (e.keyCode === 27) { - this.props.onRootClose(); - } - }; - - RootCloseWrapper.prototype.unbindRootCloseHandlers = function unbindRootCloseHandlers() { - if (this._onDocumentClickListener) { - this._onDocumentClickListener.remove(); - } - - if (this._onDocumentKeyupListener) { - this._onDocumentKeyupListener.remove(); - } - }; - - RootCloseWrapper.prototype.componentDidMount = function componentDidMount() { - this.bindRootCloseHandlers(); - }; - - RootCloseWrapper.prototype.render = function render() { - var _props = this.props; - var noWrap = _props.noWrap; - var children = _props.children; - - var child = _react2['default'].Children.only(children); - - if (noWrap) { - return _react2['default'].cloneElement(child, { - onClick: _utilsCreateChainedFunction2['default'](suppressRootClose, child.props.onClick) - }); - } - - // Wrap the child in a new element, so the child won't have to handle - // potentially combining multiple onClick listeners. - return _react2['default'].createElement( - 'div', - { onClick: suppressRootClose }, - child - ); - }; - - RootCloseWrapper.prototype.getWrappedDOMNode = function getWrappedDOMNode() { - // We can't use a ref to identify the wrapped child, since we might be - // stealing the ref from the owner, but we know exactly the DOM structure - // that will be rendered, so we can just do this to get the child's DOM - // node for doing size calculations in OverlayMixin. - var node = _react2['default'].findDOMNode(this); - return this.props.noWrap ? node : node.firstChild; - }; - - RootCloseWrapper.prototype.componentWillUnmount = function componentWillUnmount() { - this.unbindRootCloseHandlers(); - }; - - return RootCloseWrapper; - })(_react2['default'].Component); - - exports['default'] = RootCloseWrapper; - - RootCloseWrapper.displayName = 'RootCloseWrapper'; - - RootCloseWrapper.propTypes = { - onRootClose: _react2['default'].PropTypes.func.isRequired, - - /**
- * Passes the suppress click handler directly to the child component instead
- * of placing it on a wrapping div. Only use when you can be sure the child
- * properly handle the click event.
- */ - noWrap: _react2['default'].PropTypes.bool - }; - module.exports = exports['default']; - -/***/ }, -/* 103 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _domHelpersEventsOn = __webpack_require__(92); - - var _domHelpersEventsOn2 = _interopRequireDefault(_domHelpersEventsOn); - - var _domHelpersEventsOff = __webpack_require__(104); - - var _domHelpersEventsOff2 = _interopRequireDefault(_domHelpersEventsOff); - - exports['default'] = function (node, event, handler) { - _domHelpersEventsOn2['default'](node, event, handler); - return { - remove: function remove() { - _domHelpersEventsOff2['default'](node, event, handler); - } - }; - }; - - module.exports = exports['default']; - -/***/ }, -/* 104 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - var canUseDOM = __webpack_require__(33); - var off = function off() {}; - - if (canUseDOM) { - - off = (function () { - - if (document.addEventListener) return function (node, eventName, handler, capture) { - return node.removeEventListener(eventName, handler, capture || false); - };else if (document.attachEvent) return function (node, eventName, handler) { - return node.detachEvent('on' + eventName, handler); - }; - })(); - } - - module.exports = off; - -/***/ }, -/* 105 */ -/***/ function(module, exports) { - - /**
- * Safe chained function
- *
- * Will only create a new function if needed,
- * otherwise will pass back existing functions or null.
- *
- * @param {function} functions to chain
- * @returns {function|null}
- */ - 'use strict'; - - exports.__esModule = true; - function createChainedFunction() { - for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { - funcs[_key] = arguments[_key]; - } - - return funcs.filter(function (f) { - return f != null; - }).reduce(function (acc, f) { - if (typeof f !== 'function') { - throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.'); - } - - if (acc === null) { - return f; - } - - return function chainedFunction() { - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - acc.apply(this, args); - f.apply(this, args); - }; - }, null); - } - - exports['default'] = createChainedFunction; - module.exports = exports['default']; - -/***/ }, -/* 106 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _domHelpersOwnerDocument = __webpack_require__(34); - - var _domHelpersOwnerDocument2 = _interopRequireDefault(_domHelpersOwnerDocument); - - exports['default'] = function (componentOrElement) { - return _domHelpersOwnerDocument2['default'](_react2['default'].findDOMNode(componentOrElement)); - }; - - module.exports = exports['default']; - -/***/ }, -/* 107 */ -/***/ function(module, exports, __webpack_require__) { - - var baseEach = __webpack_require__(108), - createFind = __webpack_require__(129); + var baseEach = __webpack_require__(96), + createFind = __webpack_require__(121); /** * Iterates over elements of `collection`, returning the first element @@ -6987,11 +5842,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 108 */ +/* 96 */ /***/ function(module, exports, __webpack_require__) { - var baseForOwn = __webpack_require__(109), - createBaseEach = __webpack_require__(128); + var baseForOwn = __webpack_require__(97), + createBaseEach = __webpack_require__(120); /** * The base implementation of `_.forEach` without support for callback @@ -7008,11 +5863,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 109 */ +/* 97 */ /***/ function(module, exports, __webpack_require__) { - var baseFor = __webpack_require__(110), - keys = __webpack_require__(114); + var baseFor = __webpack_require__(98), + keys = __webpack_require__(105); /** * The base implementation of `_.forOwn` without support for callback @@ -7031,10 +5886,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 110 */ +/* 98 */ /***/ function(module, exports, __webpack_require__) { - var createBaseFor = __webpack_require__(111); + var createBaseFor = __webpack_require__(99); /** * The base implementation of `baseForIn` and `baseForOwn` which iterates @@ -7054,10 +5909,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 111 */ +/* 99 */ /***/ function(module, exports, __webpack_require__) { - var toObject = __webpack_require__(112); + var toObject = __webpack_require__(100); /** * Creates a base function for `_.forIn` or `_.forInRight`. @@ -7087,10 +5942,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 112 */ +/* 100 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(113); + var isObject = __webpack_require__(101), + isString = __webpack_require__(102), + support = __webpack_require__(104); /** * Converts `value` to an object if it's not one. @@ -7100,6 +5957,16 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {Object} Returns the object. */ function toObject(value) { + if (support.unindexedChars && isString(value)) { + var index = -1, + length = value.length, + result = Object(value); + + while (++index < length) { + result[index] = value.charAt(index); + } + return result; + } return isObject(value) ? value : Object(value); } @@ -7107,7 +5974,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 113 */ +/* 101 */ /***/ function(module, exports) { /** @@ -7141,13 +6008,175 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 114 */ +/* 102 */ /***/ function(module, exports, __webpack_require__) { - var getNative = __webpack_require__(115), - isArrayLike = __webpack_require__(119), - isObject = __webpack_require__(113), - shimKeys = __webpack_require__(123); + var isObjectLike = __webpack_require__(103); + + /** `Object#toString` result references. */ + var stringTag = '[object String]'; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); + } + + module.exports = isString; + + +/***/ }, +/* 103 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + module.exports = isObjectLike; + + +/***/ }, +/* 104 */ +/***/ function(module, exports) { + + /** Used for native method references. */ + var arrayProto = Array.prototype, + errorProto = Error.prototype, + objectProto = Object.prototype; + + /** Native method references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + + /** + * An object environment feature flags. + * + * @static + * @memberOf _ + * @type Object + */ + var support = {}; + + (function(x) { + var Ctor = function() { this.x = x; }, + object = { '0': x, 'length': x }, + props = []; + + Ctor.prototype = { 'valueOf': x, 'y': x }; + for (var key in new Ctor) { props.push(key); } + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default (IE < 9, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || + propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly set the `[[Enumerable]]` value of a function's `prototype` + * property to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype'); + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an object's own properties, shadowing non-enumerable ones, + * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects + * correctly. + * + * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array + * `shift()` and `splice()` functions that fail to remove the last element, + * `value[0]`, of array-like objects even though the "length" property is + * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8, + * while `splice()` is buggy regardless of mode in IE < 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index. IE 8 can only access characters + * by index on string literals, not string objects. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; + }(1, 0)); + + module.exports = support; + + +/***/ }, +/* 105 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(106), + isArrayLike = __webpack_require__(110), + isObject = __webpack_require__(101), + shimKeys = __webpack_require__(114), + support = __webpack_require__(104); /* Native method references for those with the same name as other `lodash` methods. */ var nativeKeys = getNative(Object, 'keys'); @@ -7182,7 +6211,7 @@ return /******/ (function(modules) { // webpackBootstrap var keys = !nativeKeys ? shimKeys : function(object) { var Ctor = object == null ? undefined : object.constructor; if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && isArrayLike(object))) { + (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) { return shimKeys(object); } return isObject(object) ? nativeKeys(object) : []; @@ -7192,10 +6221,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 115 */ +/* 106 */ /***/ function(module, exports, __webpack_require__) { - var isNative = __webpack_require__(116); + var isNative = __webpack_require__(107); /** * Gets the native function at `key` of `object`. @@ -7214,11 +6243,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 116 */ +/* 107 */ /***/ function(module, exports, __webpack_require__) { - var isFunction = __webpack_require__(117), - isObjectLike = __webpack_require__(118); + var isFunction = __webpack_require__(108), + isHostObject = __webpack_require__(109), + isObjectLike = __webpack_require__(103); /** Used to detect host constructors (Safari > 5). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; @@ -7261,17 +6291,17 @@ return /******/ (function(modules) { // webpackBootstrap if (isFunction(value)) { return reIsNative.test(fnToString.call(value)); } - return isObjectLike(value) && reIsHostCtor.test(value); + return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); } module.exports = isNative; /***/ }, -/* 117 */ +/* 108 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(113); + var isObject = __webpack_require__(101); /** `Object#toString` result references. */ var funcTag = '[object Function]'; @@ -7312,29 +6342,38 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 118 */ +/* 109 */ /***/ function(module, exports) { /** - * Checks if `value` is object-like. + * Checks if `value` is a host object in IE < 9. * * @private * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. */ - function isObjectLike(value) { - return !!value && typeof value == 'object'; - } + var isHostObject = (function() { + try { + Object({ 'toString': 0 } + ''); + } catch(e) { + return function() { return false; }; + } + return function(value) { + // IE < 9 presents many host objects as `Object` objects that can coerce + // to strings despite having improperly defined `toString` methods. + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + }; + }()); - module.exports = isObjectLike; + module.exports = isHostObject; /***/ }, -/* 119 */ +/* 110 */ /***/ function(module, exports, __webpack_require__) { - var getLength = __webpack_require__(120), - isLength = __webpack_require__(122); + var getLength = __webpack_require__(111), + isLength = __webpack_require__(113); /** * Checks if `value` is array-like. @@ -7351,10 +6390,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 120 */ +/* 111 */ /***/ function(module, exports, __webpack_require__) { - var baseProperty = __webpack_require__(121); + var baseProperty = __webpack_require__(112); /** * Gets the "length" property value of `object`. @@ -7372,8 +6411,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 121 */ -/***/ function(module, exports) { +/* 112 */ +/***/ function(module, exports, __webpack_require__) { + + var toObject = __webpack_require__(100); /** * The base implementation of `_.property` without support for deep paths. @@ -7384,7 +6425,7 @@ return /******/ (function(modules) { // webpackBootstrap */ function baseProperty(key) { return function(object) { - return object == null ? undefined : object[key]; + return object == null ? undefined : toObject(object)[key]; }; } @@ -7392,7 +6433,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 122 */ +/* 113 */ /***/ function(module, exports) { /** @@ -7418,14 +6459,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 123 */ +/* 114 */ /***/ function(module, exports, __webpack_require__) { - var isArguments = __webpack_require__(124), - isArray = __webpack_require__(125), - isIndex = __webpack_require__(126), - isLength = __webpack_require__(122), - keysIn = __webpack_require__(127); + var isArguments = __webpack_require__(115), + isArray = __webpack_require__(116), + isIndex = __webpack_require__(117), + isLength = __webpack_require__(113), + isString = __webpack_require__(102), + keysIn = __webpack_require__(118); /** Used for native method references. */ var objectProto = Object.prototype; @@ -7447,7 +6489,7 @@ return /******/ (function(modules) { // webpackBootstrap length = propsLength && object.length; var allowIndexes = !!length && isLength(length) && - (isArray(object) || isArguments(object)); + (isArray(object) || isArguments(object) || isString(object)); var index = -1, result = []; @@ -7465,11 +6507,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 124 */ +/* 115 */ /***/ function(module, exports, __webpack_require__) { - var isArrayLike = __webpack_require__(119), - isObjectLike = __webpack_require__(118); + var isArrayLike = __webpack_require__(110), + isObjectLike = __webpack_require__(103); /** Used for native method references. */ var objectProto = Object.prototype; @@ -7505,12 +6547,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 125 */ +/* 116 */ /***/ function(module, exports, __webpack_require__) { - var getNative = __webpack_require__(115), - isLength = __webpack_require__(122), - isObjectLike = __webpack_require__(118); + var getNative = __webpack_require__(106), + isLength = __webpack_require__(113), + isObjectLike = __webpack_require__(103); /** `Object#toString` result references. */ var arrayTag = '[object Array]'; @@ -7551,7 +6593,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 126 */ +/* 117 */ /***/ function(module, exports) { /** Used to detect unsigned integer values. */ @@ -7581,22 +6623,67 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 127 */ +/* 118 */ /***/ function(module, exports, __webpack_require__) { - var isArguments = __webpack_require__(124), - isArray = __webpack_require__(125), - isIndex = __webpack_require__(126), - isLength = __webpack_require__(122), - isObject = __webpack_require__(113); + var arrayEach = __webpack_require__(119), + isArguments = __webpack_require__(115), + isArray = __webpack_require__(116), + isFunction = __webpack_require__(108), + isIndex = __webpack_require__(117), + isLength = __webpack_require__(113), + isObject = __webpack_require__(101), + isString = __webpack_require__(102), + support = __webpack_require__(104); + + /** `Object#toString` result references. */ + var arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + + /** Used to fix the JScript `[[DontEnum]]` bug. */ + var shadowProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' + ]; /** Used for native method references. */ - var objectProto = Object.prototype; + var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to avoid iterating over non-enumerable properties in IE < 9. */ + var nonEnumProps = {}; + nonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; + nonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true }; + nonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true }; + nonEnumProps[objectTag] = { 'constructor': true }; + + arrayEach(shadowProps, function(key) { + for (var tag in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, tag)) { + var props = nonEnumProps[tag]; + props[key] = hasOwnProperty.call(props, key); + } + } + }); + + /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. @@ -7626,24 +6713,51 @@ return /******/ (function(modules) { // webpackBootstrap object = Object(object); } var length = object.length; + length = (length && isLength(length) && - (isArray(object) || isArguments(object)) && length) || 0; + (isArray(object) || isArguments(object) || isString(object)) && length) || 0; var Ctor = object.constructor, index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype === object, + proto = (isFunction(Ctor) && Ctor.prototype) || objectProto, + isProto = proto === object, result = Array(length), - skipIndexes = length > 0; + skipIndexes = length > 0, + skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error), + skipProto = support.enumPrototypes && isFunction(object); while (++index < length) { result[index] = (index + ''); } + // lodash skips the `constructor` property when it infers it's iterating + // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]` + // attribute of an existing property and the `constructor` property of a + // prototype defaults to non-enumerable. for (var key in object) { - if (!(skipIndexes && isIndex(key, length)) && + if (!(skipProto && key == 'prototype') && + !(skipErrorProps && (key == 'message' || key == 'name')) && + !(skipIndexes && isIndex(key, length)) && !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } + if (support.nonEnumShadows && object !== objectProto) { + var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)), + nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag]; + + if (tag == objectTag) { + proto = objectProto; + } + length = shadowProps.length; + while (length--) { + key = shadowProps[length]; + var nonEnum = nonEnums[key]; + if (!(isProto && nonEnum) && + (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) { + result.push(key); + } + } + } return result; } @@ -7651,12 +6765,40 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 128 */ +/* 119 */ +/***/ function(module, exports) { + + /** + * A specialized version of `_.forEach` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + module.exports = arrayEach; + + +/***/ }, +/* 120 */ /***/ function(module, exports, __webpack_require__) { - var getLength = __webpack_require__(120), - isLength = __webpack_require__(122), - toObject = __webpack_require__(112); + var getLength = __webpack_require__(111), + isLength = __webpack_require__(113), + toObject = __webpack_require__(100); /** * Creates a `baseEach` or `baseEachRight` function. @@ -7688,13 +6830,13 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 129 */ +/* 121 */ /***/ function(module, exports, __webpack_require__) { - var baseCallback = __webpack_require__(130), - baseFind = __webpack_require__(154), - baseFindIndex = __webpack_require__(155), - isArray = __webpack_require__(125); + var baseCallback = __webpack_require__(122), + baseFind = __webpack_require__(146), + baseFindIndex = __webpack_require__(147), + isArray = __webpack_require__(116); /** * Creates a `_.find` or `_.findLast` function. @@ -7719,14 +6861,14 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 130 */ +/* 122 */ /***/ function(module, exports, __webpack_require__) { - var baseMatches = __webpack_require__(131), - baseMatchesProperty = __webpack_require__(143), - bindCallback = __webpack_require__(150), - identity = __webpack_require__(151), - property = __webpack_require__(152); + var baseMatches = __webpack_require__(123), + baseMatchesProperty = __webpack_require__(135), + bindCallback = __webpack_require__(142), + identity = __webpack_require__(143), + property = __webpack_require__(144); /** * The base implementation of `_.callback` which supports specifying the @@ -7760,12 +6902,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 131 */ +/* 123 */ /***/ function(module, exports, __webpack_require__) { - var baseIsMatch = __webpack_require__(132), - getMatchData = __webpack_require__(140), - toObject = __webpack_require__(112); + var baseIsMatch = __webpack_require__(124), + getMatchData = __webpack_require__(132), + toObject = __webpack_require__(100); /** * The base implementation of `_.matches` which does not clone `source`. @@ -7784,7 +6926,8 @@ return /******/ (function(modules) { // webpackBootstrap if (object == null) { return false; } - return object[key] === value && (value !== undefined || (key in toObject(object))); + object = toObject(object); + return object[key] === value && (value !== undefined || (key in object)); }; } return function(object) { @@ -7796,11 +6939,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 132 */ +/* 124 */ /***/ function(module, exports, __webpack_require__) { - var baseIsEqual = __webpack_require__(133), - toObject = __webpack_require__(112); + var baseIsEqual = __webpack_require__(125), + toObject = __webpack_require__(100); /** * The base implementation of `_.isMatch` without support for callback @@ -7854,12 +6997,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 133 */ +/* 125 */ /***/ function(module, exports, __webpack_require__) { - var baseIsEqualDeep = __webpack_require__(134), - isObject = __webpack_require__(113), - isObjectLike = __webpack_require__(118); + var baseIsEqualDeep = __webpack_require__(126), + isObject = __webpack_require__(101), + isObjectLike = __webpack_require__(103); /** * The base implementation of `_.isEqual` without support for `this` binding @@ -7888,14 +7031,15 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 134 */ +/* 126 */ /***/ function(module, exports, __webpack_require__) { - var equalArrays = __webpack_require__(135), - equalByTag = __webpack_require__(137), - equalObjects = __webpack_require__(138), - isArray = __webpack_require__(125), - isTypedArray = __webpack_require__(139); + var equalArrays = __webpack_require__(127), + equalByTag = __webpack_require__(129), + equalObjects = __webpack_require__(130), + isArray = __webpack_require__(116), + isHostObject = __webpack_require__(109), + isTypedArray = __webpack_require__(131); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', @@ -7951,8 +7095,8 @@ return /******/ (function(modules) { // webpackBootstrap othIsArr = isTypedArray(other); } } - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, + var objIsObj = objTag == objectTag && !isHostObject(object), + othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag; if (isSameTag && !(objIsArr || objIsObj)) { @@ -7996,10 +7140,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 135 */ +/* 127 */ /***/ function(module, exports, __webpack_require__) { - var arraySome = __webpack_require__(136); + var arraySome = __webpack_require__(128); /** * A specialized version of `baseIsEqualDeep` for arrays with support for @@ -8053,7 +7197,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 136 */ +/* 128 */ /***/ function(module, exports) { /** @@ -8082,7 +7226,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 137 */ +/* 129 */ /***/ function(module, exports) { /** `Object#toString` result references. */ @@ -8136,10 +7280,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 138 */ +/* 130 */ /***/ function(module, exports, __webpack_require__) { - var keys = __webpack_require__(114); + var keys = __webpack_require__(105); /** Used for native method references. */ var objectProto = Object.prototype; @@ -8209,11 +7353,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 139 */ +/* 131 */ /***/ function(module, exports, __webpack_require__) { - var isLength = __webpack_require__(122), - isObjectLike = __webpack_require__(118); + var isLength = __webpack_require__(113), + isObjectLike = __webpack_require__(103); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', @@ -8289,11 +7433,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 140 */ +/* 132 */ /***/ function(module, exports, __webpack_require__) { - var isStrictComparable = __webpack_require__(141), - pairs = __webpack_require__(142); + var isStrictComparable = __webpack_require__(133), + pairs = __webpack_require__(134); /** * Gets the propery names, values, and compare flags of `object`. @@ -8316,10 +7460,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 141 */ +/* 133 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(113); + var isObject = __webpack_require__(101); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. @@ -8337,11 +7481,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 142 */ +/* 134 */ /***/ function(module, exports, __webpack_require__) { - var keys = __webpack_require__(114), - toObject = __webpack_require__(112); + var keys = __webpack_require__(105), + toObject = __webpack_require__(100); /** * Creates a two dimensional array of the key-value pairs for `object`, @@ -8376,18 +7520,18 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 143 */ +/* 135 */ /***/ function(module, exports, __webpack_require__) { - var baseGet = __webpack_require__(144), - baseIsEqual = __webpack_require__(133), - baseSlice = __webpack_require__(145), - isArray = __webpack_require__(125), - isKey = __webpack_require__(146), - isStrictComparable = __webpack_require__(141), - last = __webpack_require__(147), - toObject = __webpack_require__(112), - toPath = __webpack_require__(148); + var baseGet = __webpack_require__(136), + baseIsEqual = __webpack_require__(125), + baseSlice = __webpack_require__(137), + isArray = __webpack_require__(116), + isKey = __webpack_require__(138), + isStrictComparable = __webpack_require__(133), + last = __webpack_require__(139), + toObject = __webpack_require__(100), + toPath = __webpack_require__(140); /** * The base implementation of `_.matchesProperty` which does not clone `srcValue`. @@ -8427,10 +7571,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 144 */ +/* 136 */ /***/ function(module, exports, __webpack_require__) { - var toObject = __webpack_require__(112); + var toObject = __webpack_require__(100); /** * The base implementation of `get` without support for string paths @@ -8446,14 +7590,15 @@ return /******/ (function(modules) { // webpackBootstrap if (object == null) { return; } - if (pathKey !== undefined && pathKey in toObject(object)) { + object = toObject(object); + if (pathKey !== undefined && pathKey in object) { path = [pathKey]; } var index = 0, length = path.length; while (object != null && index < length) { - object = object[path[index++]]; + object = toObject(object)[path[index++]]; } return (index && index == length) ? object : undefined; } @@ -8462,7 +7607,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 145 */ +/* 137 */ /***/ function(module, exports) { /** @@ -8500,11 +7645,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 146 */ +/* 138 */ /***/ function(module, exports, __webpack_require__) { - var isArray = __webpack_require__(125), - toObject = __webpack_require__(112); + var isArray = __webpack_require__(116), + toObject = __webpack_require__(100); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, @@ -8534,7 +7679,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 147 */ +/* 139 */ /***/ function(module, exports) { /** @@ -8559,11 +7704,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 148 */ +/* 140 */ /***/ function(module, exports, __webpack_require__) { - var baseToString = __webpack_require__(149), - isArray = __webpack_require__(125); + var baseToString = __webpack_require__(141), + isArray = __webpack_require__(116); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; @@ -8593,7 +7738,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 149 */ +/* 141 */ /***/ function(module, exports) { /** @@ -8612,10 +7757,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 150 */ +/* 142 */ /***/ function(module, exports, __webpack_require__) { - var identity = __webpack_require__(151); + var identity = __webpack_require__(143); /** * A specialized version of `baseCallback` which only supports `this` binding @@ -8657,7 +7802,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 151 */ +/* 143 */ /***/ function(module, exports) { /** @@ -8683,12 +7828,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 152 */ +/* 144 */ /***/ function(module, exports, __webpack_require__) { - var baseProperty = __webpack_require__(121), - basePropertyDeep = __webpack_require__(153), - isKey = __webpack_require__(146); + var baseProperty = __webpack_require__(112), + basePropertyDeep = __webpack_require__(145), + isKey = __webpack_require__(138); /** * Creates a function that returns the property value at `path` on a @@ -8720,11 +7865,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 153 */ +/* 145 */ /***/ function(module, exports, __webpack_require__) { - var baseGet = __webpack_require__(144), - toPath = __webpack_require__(148); + var baseGet = __webpack_require__(136), + toPath = __webpack_require__(140); /** * A specialized version of `baseProperty` which supports deep paths. @@ -8745,7 +7890,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 154 */ +/* 146 */ /***/ function(module, exports) { /** @@ -8776,7 +7921,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 155 */ +/* 147 */ /***/ function(module, exports) { /** @@ -8805,17 +7950,17 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 156 */ +/* 148 */ /***/ function(module, exports, __webpack_require__) { - var arrayMap = __webpack_require__(157), - baseDifference = __webpack_require__(158), - baseFlatten = __webpack_require__(165), - bindCallback = __webpack_require__(150), - keysIn = __webpack_require__(127), - pickByArray = __webpack_require__(167), - pickByCallback = __webpack_require__(168), - restParam = __webpack_require__(170); + var arrayMap = __webpack_require__(149), + baseDifference = __webpack_require__(150), + baseFlatten = __webpack_require__(157), + bindCallback = __webpack_require__(142), + keysIn = __webpack_require__(118), + pickByArray = __webpack_require__(159), + pickByCallback = __webpack_require__(160), + restParam = __webpack_require__(162); /** * The opposite of `_.pick`; this method creates an object composed of the @@ -8858,7 +8003,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 157 */ +/* 149 */ /***/ function(module, exports) { /** @@ -8885,12 +8030,12 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 158 */ +/* 150 */ /***/ function(module, exports, __webpack_require__) { - var baseIndexOf = __webpack_require__(159), - cacheIndexOf = __webpack_require__(161), - createCache = __webpack_require__(162); + var baseIndexOf = __webpack_require__(151), + cacheIndexOf = __webpack_require__(153), + createCache = __webpack_require__(154); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -8946,10 +8091,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 159 */ +/* 151 */ /***/ function(module, exports, __webpack_require__) { - var indexOfNaN = __webpack_require__(160); + var indexOfNaN = __webpack_require__(152); /** * The base implementation of `_.indexOf` without support for binary searches. @@ -8979,7 +8124,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 160 */ +/* 152 */ /***/ function(module, exports) { /** @@ -9008,10 +8153,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 161 */ +/* 153 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(113); + var isObject = __webpack_require__(101); /** * Checks if `value` is in `cache` mimicking the return signature of @@ -9033,11 +8178,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 162 */ +/* 154 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(global) {var SetCache = __webpack_require__(163), - getNative = __webpack_require__(115); + /* WEBPACK VAR INJECTION */(function(global) {var SetCache = __webpack_require__(155), + getNative = __webpack_require__(106); /** Native method references. */ var Set = getNative(global, 'Set'); @@ -9061,11 +8206,11 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 163 */ +/* 155 */ /***/ function(module, exports, __webpack_require__) { - /* WEBPACK VAR INJECTION */(function(global) {var cachePush = __webpack_require__(164), - getNative = __webpack_require__(115); + /* WEBPACK VAR INJECTION */(function(global) {var cachePush = __webpack_require__(156), + getNative = __webpack_require__(106); /** Native method references. */ var Set = getNative(global, 'Set'); @@ -9097,10 +8242,10 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 164 */ +/* 156 */ /***/ function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(113); + var isObject = __webpack_require__(101); /** * Adds `value` to the cache. @@ -9123,14 +8268,14 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 165 */ +/* 157 */ /***/ function(module, exports, __webpack_require__) { - var arrayPush = __webpack_require__(166), - isArguments = __webpack_require__(124), - isArray = __webpack_require__(125), - isArrayLike = __webpack_require__(119), - isObjectLike = __webpack_require__(118); + var arrayPush = __webpack_require__(158), + isArguments = __webpack_require__(115), + isArray = __webpack_require__(116), + isArrayLike = __webpack_require__(110), + isObjectLike = __webpack_require__(103); /** * The base implementation of `_.flatten` with added support for restricting @@ -9170,7 +8315,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 166 */ +/* 158 */ /***/ function(module, exports) { /** @@ -9196,10 +8341,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 167 */ +/* 159 */ /***/ function(module, exports, __webpack_require__) { - var toObject = __webpack_require__(112); + var toObject = __webpack_require__(100); /** * A specialized version of `_.pick` which picks `object` properties specified @@ -9230,10 +8375,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 168 */ +/* 160 */ /***/ function(module, exports, __webpack_require__) { - var baseForIn = __webpack_require__(169); + var baseForIn = __webpack_require__(161); /** * A specialized version of `_.pick` which picks `object` properties `predicate` @@ -9258,11 +8403,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 169 */ +/* 161 */ /***/ function(module, exports, __webpack_require__) { - var baseFor = __webpack_require__(110), - keysIn = __webpack_require__(127); + var baseFor = __webpack_require__(98), + keysIn = __webpack_require__(118); /** * The base implementation of `_.forIn` without support for callback @@ -9281,7 +8426,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 170 */ +/* 162 */ /***/ function(module, exports) { /** Used as the `TypeError` message for "Functions" methods. */ @@ -9345,317 +8490,858 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 171 */ +/* 163 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + exports["default"] = isRequiredForA11y; + + function isRequiredForA11y(propType) { + return function validate(props, propName, componentName) { + if (props[propName] == null) { + return new Error("The prop '" + propName + "' is required to make '" + componentName + "' accessible" + " for users using assistive technologies such as screen readers"); + } + + return propType(props, propName, componentName); + }; + } + + module.exports = exports["default"]; + +/***/ }, +/* 164 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _createUncontrollable = __webpack_require__(165); + + var _createUncontrollable2 = _interopRequireDefault(_createUncontrollable); + + var mixin = { + shouldComponentUpdate: function shouldComponentUpdate() { + //let the forceUpdate trigger the update + return !this._notifying; + } + }; + + function set(component, propName, handler, value, args) { + if (handler) { + component._notifying = true; + handler.call.apply(handler, [component, value].concat(args)); + component._notifying = false; + } - var _classCallCheck = __webpack_require__(28)['default']; + component._values[propName] = value; + component.forceUpdate(); + } - var _extends = __webpack_require__(58)['default']; + exports['default'] = _createUncontrollable2['default']([mixin], set); + module.exports = exports['default']; - var _objectWithoutProperties = __webpack_require__(67)['default']; +/***/ }, +/* 165 */ +/***/ function(module, exports, __webpack_require__) { - var _interopRequireDefault = __webpack_require__(14)['default']; + 'use strict'; exports.__esModule = true; - var _react = __webpack_require__(32); + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + exports['default'] = createUncontrollable; + + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _BootstrapMixin = __webpack_require__(69); + var _utils = __webpack_require__(166); - var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); + var utils = _interopRequireWildcard(_utils); - var _Dropdown = __webpack_require__(93); + function createUncontrollable(mixins, set) { - var _Dropdown2 = _interopRequireDefault(_Dropdown); + return uncontrollable; + + function uncontrollable(Component, controlledValues) { + var methods = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2]; - var _NavDropdown = __webpack_require__(172); + var displayName = Component.displayName || Component.name || 'Component', + basePropTypes = utils.getType(Component).propTypes, + propTypes; - var _NavDropdown2 = _interopRequireDefault(_NavDropdown); + propTypes = utils.uncontrolledPropTypes(controlledValues, basePropTypes, displayName); - var _utilsCustomPropTypes = __webpack_require__(53); + methods = utils.transform(methods, function (obj, method) { + obj[method] = function () { + var _refs$inner; - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + return (_refs$inner = this.refs.inner)[method].apply(_refs$inner, arguments); + }; + }, {}); - var _utilsDeprecationWarning = __webpack_require__(16); + var component = _react2['default'].createClass(_extends({ - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); + displayName: 'Uncontrolled(' + displayName + ')', - var _lodashObjectOmit = __webpack_require__(156); + mixins: mixins, - var _lodashObjectOmit2 = _interopRequireDefault(_lodashObjectOmit); + propTypes: propTypes - var DropdownButton = (function (_React$Component) { - _inherits(DropdownButton, _React$Component); + }, methods, { - function DropdownButton(props) { - _classCallCheck(this, DropdownButton); + componentWillMount: function componentWillMount() { + var props = this.props, + keys = Object.keys(controlledValues); - _React$Component.call(this, props); + this._values = utils.transform(keys, function (values, key) { + values[key] = props[utils.defaultKey(key)]; + }, {}); + }, + + /**
+ * If a prop switches from controlled to Uncontrolled
+ * reset its value to the defaultValue
+ */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + var _this = this; + + var props = this.props, + keys = Object.keys(controlledValues); + + keys.forEach(function (key) { + if (utils.getValue(nextProps, key) === undefined && utils.getValue(props, key) !== undefined) { + _this._values[key] = nextProps[utils.defaultKey(key)]; + } + }); + }, + + render: function render() { + var _this2 = this; + + var newProps = {}; + var _props = this.props; + var valueLink = _props.valueLink; + var checkedLink = _props.checkedLink; + + var props = _objectWithoutProperties(_props, ['valueLink', 'checkedLink']); + + utils.each(controlledValues, function (handle, propName) { + var linkPropName = utils.getLinkName(propName), + prop = _this2.props[propName]; + + if (linkPropName && !isProp(_this2.props, propName) && isProp(_this2.props, linkPropName)) { + prop = _this2.props[linkPropName].value; + } + + newProps[propName] = prop !== undefined ? prop : _this2._values[propName]; + + newProps[handle] = setAndNotify.bind(_this2, propName); + }); + + newProps = _extends({}, props, newProps, { ref: 'inner' }); + + return _react2['default'].createElement(Component, newProps); + } + + })); + + component.ControlledComponent = Component; + + return component; + + function setAndNotify(propName, value) { + var linkName = utils.getLinkName(propName), + handler = this.props[controlledValues[propName]]; + + if (linkName && isProp(this.props, linkName) && !handler) { + handler = this.props[linkName].requestChange; + } + + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + set(this, propName, handler, value, args); + } + + function isProp(props, prop) { + return props[prop] !== undefined; + } } + } - DropdownButton.prototype.render = function render() { - var _props = this.props; - var title = _props.title; - var navItem = _props.navItem; + module.exports = exports['default']; + +/***/ }, +/* 166 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; - var props = _objectWithoutProperties(_props, ['title', 'navItem']); + exports.__esModule = true; + exports.customPropType = customPropType; + exports.uncontrolledPropTypes = uncontrolledPropTypes; + exports.getType = getType; + exports.getValue = getValue; + exports.getLinkName = getLinkName; + exports.defaultKey = defaultKey; + exports.chain = chain; + exports.transform = transform; + exports.each = each; + exports.has = has; - var toggleProps = _lodashObjectOmit2['default'](props, _Dropdown2['default'].ControlledComponent.propTypes); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - if (navItem) { - return _react2['default'].createElement(_NavDropdown2['default'], this.props); + var _react = __webpack_require__(4); + + var _react2 = _interopRequireDefault(_react); + + var _invariant = __webpack_require__(167); + + var _invariant2 = _interopRequireDefault(_invariant); + + function customPropType(handler, propType, name) { + + return function (props, propName) { + + if (props[propName] !== undefined) { + if (!props[handler]) { + return new Error('You have provided a `' + propName + '` prop to ' + '`' + name + '` without an `' + handler + '` handler. This will render a read-only field. ' + 'If the field should be mutable use `' + defaultKey(propName) + '`. Otherwise, set `' + handler + '`'); + } + + return propType && propType(props, propName, name); } + }; + } - return _react2['default'].createElement( - _Dropdown2['default'], - props, - _react2['default'].createElement( - _Dropdown2['default'].Toggle, - toggleProps, - title - ), - _react2['default'].createElement( - _Dropdown2['default'].Menu, - null, - this.props.children - ) - ); + function uncontrolledPropTypes(controlledValues, basePropTypes, displayName) { + var propTypes = {}; + + if (("development") !== 'production' && basePropTypes) { + transform(controlledValues, function (obj, handler, prop) { + var type = basePropTypes[prop]; + + _invariant2['default'](typeof handler === 'string' && handler.trim().length, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop); + + obj[prop] = customPropType(handler, type, displayName); + + if (type !== undefined) obj[defaultKey(prop)] = type; + }, propTypes); + } + + return propTypes; + } + + var version = _react2['default'].version.split('.').map(parseFloat); + + exports.version = version; + + function getType(component) { + if (version[0] === 0 && version[1] >= 13) return component; + + return component.type; + } + + function getValue(props, name) { + var linkPropName = getLinkName(name); + + if (linkPropName && !isProp(props, name) && isProp(props, linkPropName)) return props[linkPropName].value; + + return props[name]; + } + + function isProp(props, prop) { + return props[prop] !== undefined; + } + + function getLinkName(name) { + return name === 'value' ? 'valueLink' : name === 'checked' ? 'checkedLink' : null; + } + + function defaultKey(key) { + return 'default' + key.charAt(0).toUpperCase() + key.substr(1); + } + + function chain(thisArg, a, b) { + return function chainedFunction() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + a && a.call.apply(a, [thisArg].concat(args)); + b && b.call.apply(b, [thisArg].concat(args)); }; + } - return DropdownButton; - })(_react2['default'].Component); + function transform(obj, cb, seed) { + each(obj, cb.bind(null, seed = seed || (Array.isArray(obj) ? [] : {}))); + return seed; + } - DropdownButton.propTypes = _extends({ - /** - * When used with the `title` prop, the noCaret option will not render a caret icon, in the toggle element. - */ - noCaret: _react2['default'].PropTypes.bool, + function each(obj, cb, thisArg) { + if (Array.isArray(obj)) return obj.forEach(cb, thisArg); - /** - * Specify whether this Dropdown is part of a Nav component - * - * @type {bool} - * @deprecated Use the `NavDropdown` instead. - */ - navItem: _utilsCustomPropTypes2['default'].all([_react2['default'].PropTypes.bool, function (props, propName, componentName) { - if (props.navItem) { - _utilsDeprecationWarning2['default']('navItem', 'NavDropdown component', 'https://github.com/react-bootstrap/react-bootstrap/issues/526'); + for (var key in obj) if (has(obj, key)) cb.call(thisArg, obj[key], key, obj); + } + + function has(o, k) { + return o ? Object.prototype.hasOwnProperty.call(o, k) : false; + } + +/***/ }, +/* 167 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule invariant + */ + + 'use strict'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var invariant = function(condition, format, a, b, c, d, e, f) { + if (true) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); } - }]), - title: _react2['default'].PropTypes.node.isRequired - }, _Dropdown2['default'].propTypes, _BootstrapMixin2['default'].propTypes); + } - DropdownButton.defaultProps = { - pullRight: false, - dropup: false, - navItem: false, - noCaret: false + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + 'Invariant Violation: ' + + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } }; - exports['default'] = DropdownButton; - module.exports = exports['default']; + module.exports = invariant; + /***/ }, -/* 172 */ +/* 168 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _keycode = __webpack_require__(94); + + var _keycode2 = _interopRequireDefault(_keycode); + + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _Dropdown = __webpack_require__(93); + var _reactDom = __webpack_require__(34); - var _Dropdown2 = _interopRequireDefault(_Dropdown); + var _reactDom2 = _interopRequireDefault(_reactDom); - var NavDropdown = (function (_React$Component) { - _inherits(NavDropdown, _React$Component); + var _reactOverlaysLibRootCloseWrapper = __webpack_require__(169); - function NavDropdown() { - _classCallCheck(this, NavDropdown); + var _reactOverlaysLibRootCloseWrapper2 = _interopRequireDefault(_reactOverlaysLibRootCloseWrapper); - _React$Component.apply(this, arguments); + var _utilsValidComponentChildren = __webpack_require__(7); + + var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); + + var _utilsCreateChainedFunction = __webpack_require__(6); + + var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); + + var DropdownMenu = (function (_React$Component) { + _inherits(DropdownMenu, _React$Component); + + function DropdownMenu(props) { + _classCallCheck(this, DropdownMenu); + + _React$Component.call(this, props); + + this.focusNext = this.focusNext.bind(this); + this.focusPrevious = this.focusPrevious.bind(this); + this.getFocusableMenuItems = this.getFocusableMenuItems.bind(this); + this.getItemsAndActiveIndex = this.getItemsAndActiveIndex.bind(this); + + this.handleKeyDown = this.handleKeyDown.bind(this); } - NavDropdown.prototype.render = function render() { + DropdownMenu.prototype.handleKeyDown = function handleKeyDown(event) { + switch (event.keyCode) { + case _keycode2['default'].codes.down: + this.focusNext(); + event.preventDefault(); + break; + case _keycode2['default'].codes.up: + this.focusPrevious(); + event.preventDefault(); + break; + case _keycode2['default'].codes.esc: + case _keycode2['default'].codes.tab: + this.props.onClose(event); + break; + default: + } + }; + + DropdownMenu.prototype.focusNext = function focusNext() { + var _getItemsAndActiveIndex = this.getItemsAndActiveIndex(); + + var items = _getItemsAndActiveIndex.items; + var activeItemIndex = _getItemsAndActiveIndex.activeItemIndex; + + if (items.length === 0) { + return; + } + + if (activeItemIndex === items.length - 1) { + items[0].focus(); + return; + } + + items[activeItemIndex + 1].focus(); + }; + + DropdownMenu.prototype.focusPrevious = function focusPrevious() { + var _getItemsAndActiveIndex2 = this.getItemsAndActiveIndex(); + + var items = _getItemsAndActiveIndex2.items; + var activeItemIndex = _getItemsAndActiveIndex2.activeItemIndex; + + if (activeItemIndex === 0) { + items[items.length - 1].focus(); + return; + } + + items[activeItemIndex - 1].focus(); + }; + + DropdownMenu.prototype.getItemsAndActiveIndex = function getItemsAndActiveIndex() { + var items = this.getFocusableMenuItems(); + var activeElement = document.activeElement; + var activeItemIndex = items.indexOf(activeElement); + + return { items: items, activeItemIndex: activeItemIndex }; + }; + + DropdownMenu.prototype.getFocusableMenuItems = function getFocusableMenuItems() { + var menuNode = _reactDom2['default'].findDOMNode(this); + + if (menuNode === undefined) { + return []; + } + + return [].slice.call(menuNode.querySelectorAll('[tabIndex="-1"]'), 0); + }; + + DropdownMenu.prototype.render = function render() { + var _this = this; + var _props = this.props; var children = _props.children; - var title = _props.title; - var noCaret = _props.noCaret; + var onSelect = _props.onSelect; + var pullRight = _props.pullRight; + var className = _props.className; + var labelledBy = _props.labelledBy; + var open = _props.open; + var onClose = _props.onClose; - var props = _objectWithoutProperties(_props, ['children', 'title', 'noCaret']); + var props = _objectWithoutProperties(_props, ['children', 'onSelect', 'pullRight', 'className', 'labelledBy', 'open', 'onClose']); - return _react2['default'].createElement( - _Dropdown2['default'], - _extends({}, props, { componentClass: 'li' }), - _react2['default'].createElement( - _Dropdown2['default'].Toggle, - { - useAnchor: true, - disabled: props.disabled, - noCaret: noCaret - }, - title - ), - _react2['default'].createElement( - _Dropdown2['default'].Menu, - null, - children - ) + var items = _utilsValidComponentChildren2['default'].map(children, function (child) { + var childProps = child.props || {}; + + return _react2['default'].cloneElement(child, { + onKeyDown: _utilsCreateChainedFunction2['default'](childProps.onKeyDown, _this.handleKeyDown), + onSelect: _utilsCreateChainedFunction2['default'](childProps.onSelect, onSelect) + }, childProps.children); + }); + + var classes = { + 'dropdown-menu': true, + 'dropdown-menu-right': pullRight + }; + + var list = _react2['default'].createElement( + 'ul', + _extends({ + className: _classnames2['default'](className, classes), + role: 'menu', + 'aria-labelledby': labelledBy + }, props), + items ); + + if (open) { + list = _react2['default'].createElement( + _reactOverlaysLibRootCloseWrapper2['default'], + { noWrap: true, onRootClose: onClose }, + list + ); + } + + return list; }; - return NavDropdown; + return DropdownMenu; })(_react2['default'].Component); - NavDropdown.propTypes = _extends({ - noCaret: _react2['default'].PropTypes.bool, - title: _react2['default'].PropTypes.node.isRequired - }, _Dropdown2['default'].propTypes); + DropdownMenu.defaultProps = { + bsRole: 'menu', + pullRight: false + }; - exports['default'] = NavDropdown; + DropdownMenu.propTypes = { + open: _react2['default'].PropTypes.bool, + pullRight: _react2['default'].PropTypes.bool, + onClose: _react2['default'].PropTypes.func, + labelledBy: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), + onSelect: _react2['default'].PropTypes.func + }; + + exports['default'] = DropdownMenu; module.exports = exports['default']; /***/ }, -/* 173 */ +/* 169 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + exports.__esModule = true; - var _classCallCheck = __webpack_require__(28)['default']; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _extends = __webpack_require__(58)['default']; + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _objectWithoutProperties = __webpack_require__(67)['default']; + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _interopRequireDefault = __webpack_require__(14)['default']; + var _react = __webpack_require__(4); - exports.__esModule = true; + var _react2 = _interopRequireDefault(_react); - var _react = __webpack_require__(32); + var _reactDom = __webpack_require__(34); - var _react2 = _interopRequireDefault(_react); + var _reactDom2 = _interopRequireDefault(_reactDom); - var _BootstrapMixin = __webpack_require__(69); + var _utilsAddEventListener = __webpack_require__(170); - var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); + var _utilsAddEventListener2 = _interopRequireDefault(_utilsAddEventListener); - var _Button = __webpack_require__(76); + var _utilsCreateChainedFunction = __webpack_require__(172); - var _Button2 = _interopRequireDefault(_Button); + var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - var _Dropdown = __webpack_require__(93); + var _utilsOwnerDocument = __webpack_require__(173); - var _Dropdown2 = _interopRequireDefault(_Dropdown); + var _utilsOwnerDocument2 = _interopRequireDefault(_utilsOwnerDocument); - var _SplitToggle = __webpack_require__(174); + // TODO: Consider using an ES6 symbol here, once we use babel-runtime. + var CLICK_WAS_INSIDE = '__click_was_inside'; - var _SplitToggle2 = _interopRequireDefault(_SplitToggle); + var counter = 0; - var SplitButton = (function (_React$Component) { - _inherits(SplitButton, _React$Component); + function getSuppressRootClose() { + var id = CLICK_WAS_INSIDE + '_' + counter++; + return { + id: id, + suppressRootClose: function suppressRootClose(event) { + // Tag the native event to prevent the root close logic on document click. + // This seems safer than using event.nativeEvent.stopImmediatePropagation(), + // which is only supported in IE >= 9. + event.nativeEvent[id] = true; + } + }; + } - function SplitButton() { - _classCallCheck(this, SplitButton); + var RootCloseWrapper = (function (_React$Component) { + function RootCloseWrapper(props) { + _classCallCheck(this, RootCloseWrapper); - _React$Component.apply(this, arguments); + _React$Component.call(this, props); + + this.handleDocumentClick = this.handleDocumentClick.bind(this); + this.handleDocumentKeyUp = this.handleDocumentKeyUp.bind(this); + + var _getSuppressRootClose = getSuppressRootClose(); + + var id = _getSuppressRootClose.id; + var suppressRootClose = _getSuppressRootClose.suppressRootClose; + + this._suppressRootId = id; + + this._suppressRootCloseHandler = suppressRootClose; } - SplitButton.prototype.render = function render() { + _inherits(RootCloseWrapper, _React$Component); + + RootCloseWrapper.prototype.bindRootCloseHandlers = function bindRootCloseHandlers() { + var doc = _utilsOwnerDocument2['default'](this); + + this._onDocumentClickListener = _utilsAddEventListener2['default'](doc, 'click', this.handleDocumentClick); + + this._onDocumentKeyupListener = _utilsAddEventListener2['default'](doc, 'keyup', this.handleDocumentKeyUp); + }; + + RootCloseWrapper.prototype.handleDocumentClick = function handleDocumentClick(e) { + // This is now the native event. + if (e[this._suppressRootId]) { + return; + } + + this.props.onRootClose(); + }; + + RootCloseWrapper.prototype.handleDocumentKeyUp = function handleDocumentKeyUp(e) { + if (e.keyCode === 27) { + this.props.onRootClose(); + } + }; + + RootCloseWrapper.prototype.unbindRootCloseHandlers = function unbindRootCloseHandlers() { + if (this._onDocumentClickListener) { + this._onDocumentClickListener.remove(); + } + + if (this._onDocumentKeyupListener) { + this._onDocumentKeyupListener.remove(); + } + }; + + RootCloseWrapper.prototype.componentDidMount = function componentDidMount() { + this.bindRootCloseHandlers(); + }; + + RootCloseWrapper.prototype.render = function render() { var _props = this.props; + var noWrap = _props.noWrap; var children = _props.children; - var title = _props.title; - var onClick = _props.onClick; - var target = _props.target; - var href = _props.href; - var - // bsStyle is validated by 'Button' component - bsStyle = _props.bsStyle; - - var props = _objectWithoutProperties(_props, ['children', 'title', 'onClick', 'target', 'href', 'bsStyle']); - var disabled = props.disabled; + var child = _react2['default'].Children.only(children); - var button = _react2['default'].createElement( - _Button2['default'], - { - onClick: onClick, - bsStyle: bsStyle, - disabled: disabled, - target: target, - href: href - }, - title - ); + if (noWrap) { + return _react2['default'].cloneElement(child, { + onClick: _utilsCreateChainedFunction2['default'](this._suppressRootCloseHandler, child.props.onClick) + }); + } + // Wrap the child in a new element, so the child won't have to handle + // potentially combining multiple onClick listeners. return _react2['default'].createElement( - _Dropdown2['default'], - props, - button, - _react2['default'].createElement(_SplitToggle2['default'], { - 'aria-label': title, - bsStyle: bsStyle, - disabled: disabled - }), - _react2['default'].createElement( - _Dropdown2['default'].Menu, - null, - children - ) + 'div', + { onClick: this._suppressRootCloseHandler }, + child ); }; - return SplitButton; + RootCloseWrapper.prototype.getWrappedDOMNode = function getWrappedDOMNode() { + // We can't use a ref to identify the wrapped child, since we might be + // stealing the ref from the owner, but we know exactly the DOM structure + // that will be rendered, so we can just do this to get the child's DOM + // node for doing size calculations in OverlayMixin. + var node = _reactDom2['default'].findDOMNode(this); + return this.props.noWrap ? node : node.firstChild; + }; + + RootCloseWrapper.prototype.componentWillUnmount = function componentWillUnmount() { + this.unbindRootCloseHandlers(); + }; + + return RootCloseWrapper; })(_react2['default'].Component); - SplitButton.propTypes = _extends({}, _Dropdown2['default'].propTypes, _BootstrapMixin2['default'].propTypes, { + exports['default'] = RootCloseWrapper; - /** - * @private - */ - onClick: function onClick() {}, - target: _react2['default'].PropTypes.string, - href: _react2['default'].PropTypes.string, - /** - * The content of the split button. + RootCloseWrapper.displayName = 'RootCloseWrapper'; + + RootCloseWrapper.propTypes = { + onRootClose: _react2['default'].PropTypes.func.isRequired, + + /**
+ * Passes the suppress click handler directly to the child component instead
+ * of placing it on a wrapping div. Only use when you can be sure the child
+ * properly handle the click event.
*/ - title: _react2['default'].PropTypes.node.isRequired - }); + noWrap: _react2['default'].PropTypes.bool + }; + module.exports = exports['default']; - SplitButton.defaultProps = { - disabled: false, - dropup: false, - pullRight: false +/***/ }, +/* 170 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _domHelpersEventsOn = __webpack_require__(90); + + var _domHelpersEventsOn2 = _interopRequireDefault(_domHelpersEventsOn); + + var _domHelpersEventsOff = __webpack_require__(171); + + var _domHelpersEventsOff2 = _interopRequireDefault(_domHelpersEventsOff); + + exports['default'] = function (node, event, handler) { + _domHelpersEventsOn2['default'](node, event, handler); + return { + remove: function remove() { + _domHelpersEventsOff2['default'](node, event, handler); + } + }; }; - SplitButton.Toggle = _SplitToggle2['default']; + module.exports = exports['default']; - exports['default'] = SplitButton; +/***/ }, +/* 171 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var canUseDOM = __webpack_require__(41); + var off = function off() {}; + + if (canUseDOM) { + + off = (function () { + + if (document.addEventListener) return function (node, eventName, handler, capture) { + return node.removeEventListener(eventName, handler, capture || false); + };else if (document.attachEvent) return function (node, eventName, handler) { + return node.detachEvent('on' + eventName, handler); + }; + })(); + } + + module.exports = off; + +/***/ }, +/* 172 */ +/***/ function(module, exports) { + + /**
+ * Safe chained function
+ *
+ * Will only create a new function if needed,
+ * otherwise will pass back existing functions or null.
+ *
+ * @param {function} functions to chain
+ * @returns {function|null}
+ */ + 'use strict'; + + exports.__esModule = true; + function createChainedFunction() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + return funcs.filter(function (f) { + return f != null; + }).reduce(function (acc, f) { + if (typeof f !== 'function') { + throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.'); + } + + if (acc === null) { + return f; + } + + return function chainedFunction() { + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + acc.apply(this, args); + f.apply(this, args); + }; + }, null); + } + + exports['default'] = createChainedFunction; module.exports = exports['default']; - // eslint-disable-line - //dropup: React.PropTypes.bool, +/***/ }, +/* 173 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _reactDom = __webpack_require__(34); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _domHelpersOwnerDocument = __webpack_require__(36); + + var _domHelpersOwnerDocument2 = _interopRequireDefault(_domHelpersOwnerDocument); + + exports['default'] = function (componentOrElement) { + return _domHelpersOwnerDocument2['default'](_reactDom2['default'].findDOMNode(componentOrElement)); + }; + + module.exports = exports['default']; /***/ }, /* 174 */ @@ -9663,46 +9349,98 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _DropdownToggle = __webpack_require__(99); + var _classnames = __webpack_require__(27); - var _DropdownToggle2 = _interopRequireDefault(_DropdownToggle); + var _classnames2 = _interopRequireDefault(_classnames); - var SplitToggle = (function (_React$Component) { - _inherits(SplitToggle, _React$Component); + var _Button = __webpack_require__(62); - function SplitToggle() { - _classCallCheck(this, SplitToggle); + var _Button2 = _interopRequireDefault(_Button); + + var _reactPropTypesLibSinglePropFrom = __webpack_require__(5); + + var _reactPropTypesLibSinglePropFrom2 = _interopRequireDefault(_reactPropTypesLibSinglePropFrom); + + var _SafeAnchor = __webpack_require__(49); + + var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); + + var CARET = _react2['default'].createElement( + 'span', + null, + ' ', + _react2['default'].createElement('span', { className: 'caret' }) + ); + + var DropdownToggle = (function (_React$Component) { + _inherits(DropdownToggle, _React$Component); + + function DropdownToggle() { + _classCallCheck(this, DropdownToggle); _React$Component.apply(this, arguments); } - SplitToggle.prototype.render = function render() { - return _react2['default'].createElement(_DropdownToggle2['default'], _extends({}, this.props, { - useAnchor: false, - noCaret: false - })); + DropdownToggle.prototype.render = function render() { + var caret = this.props.noCaret ? null : CARET; + + var classes = { + 'dropdown-toggle': true + }; + + var Component = this.props.useAnchor ? _SafeAnchor2['default'] : _Button2['default']; + + return _react2['default'].createElement( + Component, + _extends({}, this.props, { + className: _classnames2['default'](classes, this.props.className), + type: 'button', + 'aria-haspopup': true, + 'aria-expanded': this.props.open }), + this.props.title || this.props.children, + caret + ); }; - return SplitToggle; + return DropdownToggle; })(_react2['default'].Component); - exports['default'] = SplitToggle; + exports['default'] = DropdownToggle; - SplitToggle.defaultProps = _DropdownToggle2['default'].defaultProps; + var titleAndChildrenValidation = _reactPropTypesLibSinglePropFrom2['default']('title', 'children'); + + DropdownToggle.defaultProps = { + open: false, + useAnchor: false, + bsRole: 'toggle' + }; + + DropdownToggle.propTypes = { + bsRole: _react2['default'].PropTypes.string, + children: titleAndChildrenValidation, + noCaret: _react2['default'].PropTypes.bool, + open: _react2['default'].PropTypes.bool, + title: titleAndChildrenValidation, + useAnchor: _react2['default'].PropTypes.bool + }; + + DropdownToggle.isToggle = true; + DropdownToggle.titleProp = 'title'; + DropdownToggle.onClickProp = 'onClick'; module.exports = exports['default']; /***/ }, @@ -9711,121 +9449,220 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _reactPropTypesLibCommon = __webpack_require__(31); - var _react2 = _interopRequireDefault(_react); + var _childrenToArray = __webpack_require__(176); + + var _childrenToArray2 = _interopRequireDefault(_childrenToArray); - var _utilsDomUtils = __webpack_require__(31); + exports['default'] = { - var _utilsDomUtils2 = _interopRequireDefault(_utilsDomUtils); + requiredRoles: function requiredRoles() { + for (var _len = arguments.length, roles = Array(_len), _key = 0; _key < _len; _key++) { + roles[_key] = arguments[_key]; + } - var _utilsDeprecationWarning = __webpack_require__(16); + return _reactPropTypesLibCommon.createChainableTypeChecker(function requiredRolesValidator(props, propName, component) { + var missing = undefined; + var children = _childrenToArray2['default'](props.children); - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); + var inRole = function inRole(role, child) { + return role === child.props.bsRole; + }; - // TODO: listen for onTransitionEnd to remove el - function getElementsAndSelf(root, classes) { - var els = root.querySelectorAll('.' + classes.join('.')); + roles.every(function (role) { + if (!children.some(function (child) { + return inRole(role, child); + })) { + missing = role; + return false; + } + return true; + }); - els = [].map.call(els, function (e) { - return e; - }); + if (missing) { + return new Error('(children) ' + component + ' - Missing a required child with bsRole: ' + missing + '. ' + (component + ' must have at least one child of each of the following bsRoles: ' + roles.join(', '))); + } + }); + }, - for (var i = 0; i < classes.length; i++) { - if (!root.className.match(new RegExp('\\b' + classes[i] + '\\b'))) { - return els; + exclusiveRoles: function exclusiveRoles() { + for (var _len2 = arguments.length, roles = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + roles[_key2] = arguments[_key2]; } + + return _reactPropTypesLibCommon.createChainableTypeChecker(function exclusiveRolesValidator(props, propName, component) { + var children = _childrenToArray2['default'](props.children); + var duplicate = undefined; + + roles.every(function (role) { + var childrenWithRole = children.filter(function (child) { + return child.props.bsRole === role; + }); + + if (childrenWithRole.length > 1) { + duplicate = role; + return false; + } + return true; + }); + + if (duplicate) { + return new Error('(children) ' + component + ' - Duplicate children detected of bsRole: ' + duplicate + '. ' + ('Only one child each allowed with the following bsRoles: ' + roles.join(', '))); + } + }); + } + }; + module.exports = exports['default']; + +/***/ }, +/* 176 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports['default'] = childrenAsArray; + + var _ValidComponentChildren = __webpack_require__(7); + + var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren); + + function childrenAsArray(children) { + var result = []; + + if (children === undefined) { + return result; } - els.unshift(root); - return els; + + _ValidComponentChildren2['default'].forEach(children, function (child) { + result.push(child); + }); + + return result; } - exports['default'] = { - componentWillMount: function componentWillMount() { - _utilsDeprecationWarning2['default']('FadeMixin', 'Fade Component'); - }, + module.exports = exports['default']; - _fadeIn: function _fadeIn() { - var els = undefined; +/***/ }, +/* 177 */ +/***/ function(module, exports, __webpack_require__) { - if (this.isMounted()) { - els = getElementsAndSelf(_react2['default'].findDOMNode(this), ['fade']); + 'use strict'; - if (els.length) { - els.forEach(function (el) { - el.className += ' in'; - }); - } - } - }, + var _inherits = __webpack_require__(50)['default']; - _fadeOut: function _fadeOut() { - var els = getElementsAndSelf(this._fadeOutEl, ['fade', 'in']); + var _classCallCheck = __webpack_require__(61)['default']; - if (els.length) { - els.forEach(function (el) { - el.className = el.className.replace(/\bin\b/, ''); - }); - } + var _extends = __webpack_require__(9)['default']; - setTimeout(this._handleFadeOutEnd, 300); - }, + var _objectWithoutProperties = __webpack_require__(26)['default']; - _handleFadeOutEnd: function _handleFadeOutEnd() { - if (this._fadeOutEl && this._fadeOutEl.parentNode) { - this._fadeOutEl.parentNode.removeChild(this._fadeOutEl); - } - }, + var _interopRequireDefault = __webpack_require__(1)['default']; - componentDidMount: function componentDidMount() { - if (document.querySelectorAll) { - // Firefox needs delay for transition to be triggered - setTimeout(this._fadeIn, 20); - } - }, + exports.__esModule = true; - componentWillUnmount: function componentWillUnmount() { - var els = getElementsAndSelf(_react2['default'].findDOMNode(this), ['fade']); - var container = this.props.container && _react2['default'].findDOMNode(this.props.container) || _utilsDomUtils2['default'].ownerDocument(this).body; + var _react = __webpack_require__(4); - if (els.length) { - this._fadeOutEl = document.createElement('div'); - container.appendChild(this._fadeOutEl); - this._fadeOutEl.appendChild(_react2['default'].findDOMNode(this).cloneNode(true)); - // Firefox needs delay for transition to be triggered - setTimeout(this._fadeOut, 20); - } + var _react2 = _interopRequireDefault(_react); + + var _BootstrapMixin = __webpack_require__(28); + + var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); + + var _Dropdown = __webpack_require__(92); + + var _Dropdown2 = _interopRequireDefault(_Dropdown); + + var _lodashCompatObjectOmit = __webpack_require__(148); + + var _lodashCompatObjectOmit2 = _interopRequireDefault(_lodashCompatObjectOmit); + + var DropdownButton = (function (_React$Component) { + _inherits(DropdownButton, _React$Component); + + function DropdownButton(props) { + _classCallCheck(this, DropdownButton); + + _React$Component.call(this, props); } + + DropdownButton.prototype.render = function render() { + var _props = this.props; + var title = _props.title; + + var props = _objectWithoutProperties(_props, ['title']); + + var toggleProps = _lodashCompatObjectOmit2['default'](props, _Dropdown2['default'].ControlledComponent.propTypes); + + return _react2['default'].createElement( + _Dropdown2['default'], + props, + _react2['default'].createElement( + _Dropdown2['default'].Toggle, + toggleProps, + title + ), + _react2['default'].createElement( + _Dropdown2['default'].Menu, + null, + this.props.children + ) + ); + }; + + return DropdownButton; + })(_react2['default'].Component); + + DropdownButton.propTypes = _extends({ + /** + * When used with the `title` prop, the noCaret option will not render a caret icon, in the toggle element. + */ + noCaret: _react2['default'].PropTypes.bool, + + title: _react2['default'].PropTypes.node.isRequired + + }, _Dropdown2['default'].propTypes, _BootstrapMixin2['default'].propTypes); + + DropdownButton.defaultProps = { + pullRight: false, + dropup: false, + navItem: false, + noCaret: false }; + + exports['default'] = DropdownButton; module.exports = exports['default']; /***/ }, -/* 176 */ +/* 178 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibElementType = __webpack_require__(63); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); var Grid = _react2['default'].createClass({ displayName: 'Grid', @@ -9840,7 +9677,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * You can use a custom element for this component */ - componentClass: _utilsCustomPropTypes2['default'].elementType + componentClass: _reactPropTypesLibElementType2['default'] }, getDefaultProps: function getDefaultProps() { @@ -9867,34 +9704,104 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 177 */ +/* 179 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; - var _classCallCheck = __webpack_require__(28)['default']; + var _react = __webpack_require__(4); - var _interopRequireDefault = __webpack_require__(14)['default']; + var _react2 = _interopRequireDefault(_react); - var _interopRequireWildcard = __webpack_require__(15)['default']; + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var Image = _react2['default'].createClass({ + displayName: 'Image', + + propTypes: { + + /** + * Sets image as responsive image + */ + responsive: _react2['default'].PropTypes.bool, + + /** + * Sets image shape as rounded + */ + rounded: _react2['default'].PropTypes.bool, + + /** + * Sets image shape as circle + */ + circle: _react2['default'].PropTypes.bool, + + /** + * Sets image shape as thumbnail + */ + thumbnail: _react2['default'].PropTypes.bool + }, + + getDefaultProps: function getDefaultProps() { + return { + responsive: false, + rounded: false, + circle: false, + thumbnail: false + }; + }, + + render: function render() { + var classes = { + 'img-responsive': this.props.responsive, + 'img-rounded': this.props.rounded, + 'img-circle': this.props.circle, + 'img-thumbnail': this.props.thumbnail + }; + + return _react2['default'].createElement('img', _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) })); + } + }); + + exports['default'] = Image; + module.exports = exports['default']; + +/***/ }, +/* 180 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _inherits = __webpack_require__(50)['default']; + + var _classCallCheck = __webpack_require__(61)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + var _interopRequireWildcard = __webpack_require__(2)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _InputBase2 = __webpack_require__(79); + var _InputBase2 = __webpack_require__(66); var _InputBase3 = _interopRequireDefault(_InputBase2); - var _FormControls = __webpack_require__(178); + var _FormControls = __webpack_require__(181); var FormControls = _interopRequireWildcard(_FormControls); - var _utilsDeprecationWarning = __webpack_require__(16); + var _utilsDeprecationWarning = __webpack_require__(183); var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); @@ -9909,7 +9816,7 @@ return /******/ (function(modules) { // webpackBootstrap Input.prototype.render = function render() { if (this.props.type === 'static') { - _utilsDeprecationWarning2['default']('Input type=static', 'StaticText'); + _utilsDeprecationWarning2['default']('Input type=static', 'FormControls.Static'); return _react2['default'].createElement(FormControls.Static, this.props); } @@ -9927,50 +9834,50 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 178 */ +/* 181 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _Static2 = __webpack_require__(179); + var _Static2 = __webpack_require__(182); var _Static3 = _interopRequireDefault(_Static2); exports.Static = _Static3['default']; /***/ }, -/* 179 */ +/* 182 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _InputBase2 = __webpack_require__(79); + var _InputBase2 = __webpack_require__(66); var _InputBase3 = _interopRequireDefault(_InputBase2); - var _utilsChildrenValueInputValidation = __webpack_require__(52); + var _utilsChildrenValueInputValidation = __webpack_require__(3); var _utilsChildrenValueInputValidation2 = _interopRequireDefault(_utilsChildrenValueInputValidation); @@ -10011,7 +9918,83 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 180 */ +/* 183 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _inherits = __webpack_require__(50)['default']; + + var _classCallCheck = __webpack_require__(61)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _warning = __webpack_require__(48); + + var _warning2 = _interopRequireDefault(_warning); + + var warned = {}; + + function deprecationWarning(oldname, newname, link) { + var message = undefined; + + if (typeof oldname === 'object') { + message = oldname.message; + } else { + message = oldname + ' is deprecated. Use ' + newname + ' instead.'; + + if (link) { + message += '\nYou can read more about it at ' + link; + } + } + + if (warned[message]) { + return; + } + + _warning2['default'](false, message); + warned[message] = true; + } + + deprecationWarning.wrapper = function (Component) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return (function (_Component) { + _inherits(DeprecatedComponent, _Component); + + function DeprecatedComponent() { + _classCallCheck(this, DeprecatedComponent); + + _Component.apply(this, arguments); + } + + DeprecatedComponent.prototype.componentWillMount = function componentWillMount() { + deprecationWarning.apply(undefined, args); + + if (_Component.prototype.componentWillMount) { + var _Component$prototype$componentWillMount; + + for (var _len2 = arguments.length, methodArgs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + methodArgs[_key2] = arguments[_key2]; + } + + (_Component$prototype$componentWillMount = _Component.prototype.componentWillMount).call.apply(_Component$prototype$componentWillMount, [this].concat(methodArgs)); + } + }; + + return DeprecatedComponent; + })(Component); + }; + + exports['default'] = deprecationWarning; + module.exports = exports['default']; + +/***/ }, +/* 184 */ /***/ function(module, exports, __webpack_require__) { // https://www.npmjs.org/package/react-interpolate-component @@ -10019,17 +10002,17 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); @@ -10085,28 +10068,27 @@ return /******/ (function(modules) { // webpackBootstrap props.dangerouslySetInnerHTML = { __html: content }; return _react2['default'].createElement(parent, props); - } else { - var kids = format.split(REGEXP).reduce(function (memo, match, index) { - var child = undefined; - - if (index % 2 === 0) { - if (match.length === 0) { - return memo; - } + } + var kids = format.split(REGEXP).reduce(function (memo, match, index) { + var child = undefined; - child = match; - } else { - child = props[match]; - delete props[match]; + if (index % 2 === 0) { + if (match.length === 0) { + return memo; } - memo.push(child); + child = match; + } else { + child = props[match]; + delete props[match]; + } - return memo; - }, []); + memo.push(child); - return _react2['default'].createElement(parent, props, kids); - } + return memo; + }, []); + + return _react2['default'].createElement(parent, props, kids); } }); @@ -10114,28 +10096,28 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 181 */ +/* 185 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibElementType = __webpack_require__(63); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); var Jumbotron = _react2['default'].createClass({ displayName: 'Jumbotron', @@ -10144,7 +10126,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * You can use a custom element for this component */ - componentClass: _utilsCustomPropTypes2['default'].elementType + componentClass: _reactPropTypesLibElementType2['default'] }, getDefaultProps: function getDefaultProps() { @@ -10166,26 +10148,26 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 182 */ +/* 186 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); @@ -10216,30 +10198,34 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 183 */ +/* 187 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _ListGroupItem = __webpack_require__(188); + + var _ListGroupItem2 = _interopRequireDefault(_ListGroupItem); + + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); @@ -10259,31 +10245,49 @@ return /******/ (function(modules) { // webpackBootstrap return _react.cloneElement(item, { key: item.key ? item.key : index }); }); + if (this.areCustomChildren(items)) { + var Component = this.props.componentClass; + return _react2['default'].createElement( + Component, + _extends({}, this.props, { + className: _classnames2['default'](this.props.className, 'list-group') }), + items + ); + } + var shouldRenderDiv = false; if (!this.props.children) { shouldRenderDiv = true; } else { - _react2['default'].Children.forEach(this.props.children, function (child) { + _utilsValidComponentChildren2['default'].forEach(this.props.children, function (child) { if (_this.isAnchorOrButton(child.props)) { shouldRenderDiv = true; } }); } - if (shouldRenderDiv) { - return this.renderDiv(items); - } else { - return this.renderUL(items); - } + return shouldRenderDiv ? this.renderDiv(items) : this.renderUL(items); }; ListGroup.prototype.isAnchorOrButton = function isAnchorOrButton(props) { return props.href || props.onClick; }; + ListGroup.prototype.areCustomChildren = function areCustomChildren(children) { + var customChildren = false; + + _utilsValidComponentChildren2['default'].forEach(children, function (child) { + if (child.type !== _ListGroupItem2['default']) { + customChildren = true; + } + }, this); + + return customChildren; + }; + ListGroup.prototype.renderUL = function renderUL(items) { - var listItems = _utilsValidComponentChildren2['default'].map(items, function (item, index) { + var listItems = _utilsValidComponentChildren2['default'].map(items, function (item) { return _react.cloneElement(item, { listItem: true }); }); @@ -10307,8 +10311,18 @@ return /******/ (function(modules) { // webpackBootstrap return ListGroup; })(_react2['default'].Component); + ListGroup.defaultProps = { + componentClass: 'div' + }; + ListGroup.propTypes = { className: _react2['default'].PropTypes.string, + /** + * The element for ListGroup if children are + * user-defined custom components. + * @type {("ul"|"div")} + */ + componentClass: _react2['default'].PropTypes.oneOf(['ul', 'div']), id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]) }; @@ -10316,26 +10330,26 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 184 */ +/* 188 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -10352,9 +10366,7 @@ return /******/ (function(modules) { // webpackBootstrap header: _react2['default'].PropTypes.node, listItem: _react2['default'].PropTypes.bool, onClick: _react2['default'].PropTypes.func, - eventKey: _react2['default'].PropTypes.any, - href: _react2['default'].PropTypes.string, - target: _react2['default'].PropTypes.string + href: _react2['default'].PropTypes.string }, getDefaultProps: function getDefaultProps() { @@ -10376,9 +10388,8 @@ return /******/ (function(modules) { // webpackBootstrap return this.renderButton(classes); } else if (this.props.listItem) { return this.renderLi(classes); - } else { - return this.renderSpan(classes); } + return this.renderSpan(classes); }, renderLi: function renderLi(classes) { @@ -10406,7 +10417,7 @@ return /******/ (function(modules) { // webpackBootstrap type: 'button' }, this.props, { className: _classnames2['default'](this.props.className, classes) }), - this.props.children + this.props.header ? this.renderStructuredContent() : this.props.children ); }, @@ -10447,32 +10458,32 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 185 */ +/* 189 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibAll = __webpack_require__(69); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll); - var _SafeAnchor = __webpack_require__(100); + var _SafeAnchor = __webpack_require__(49); var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); @@ -10515,7 +10526,8 @@ return /******/ (function(modules) { // webpackBootstrap } var classes = { - disabled: this.props.disabled + disabled: this.props.disabled, + active: this.props.active }; return _react2['default'].createElement( @@ -10546,12 +10558,13 @@ return /******/ (function(modules) { // webpackBootstrap exports['default'] = MenuItem; MenuItem.propTypes = { + active: _react2['default'].PropTypes.bool, disabled: _react2['default'].PropTypes.bool, - divider: _utilsCustomPropTypes2['default'].all([_react2['default'].PropTypes.bool, function (props, propName, componentName) { + divider: _reactPropTypesLibAll2['default'](_react2['default'].PropTypes.bool, function (props) { if (props.divider && props.children) { return new Error('Children will not be rendered for dividers'); } - }]), + }), eventKey: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]), header: _react2['default'].PropTypes.bool, href: _react2['default'].PropTypes.string, @@ -10570,77 +10583,94 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 186 */ +/* 190 */ /***/ function(module, exports, __webpack_require__) { - /*eslint-disable react/prop-types */ + /* eslint-disable react/prop-types */ + 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _Object$isFrozen = __webpack_require__(187)['default']; + var _Object$isFrozen = __webpack_require__(191)['default']; - var _Object$keys = __webpack_require__(1)['default']; + var _Object$keys = __webpack_require__(75)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _reactDom = __webpack_require__(34); - var _classnames2 = _interopRequireDefault(_classnames); + var _reactDom2 = _interopRequireDefault(_reactDom); - var _utilsDomUtils = __webpack_require__(31); + var _utilsDomUtils = __webpack_require__(35); var _utilsDomUtils2 = _interopRequireDefault(_utilsDomUtils); - var _domHelpersUtilScrollbarSize = __webpack_require__(190); + var _domHelpersUtilScrollbarSize = __webpack_require__(194); var _domHelpersUtilScrollbarSize2 = _interopRequireDefault(_domHelpersUtilScrollbarSize); - var _utilsEventListener = __webpack_require__(73); + var _utilsEventListener = __webpack_require__(43); var _utilsEventListener2 = _interopRequireDefault(_utilsEventListener); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _utilsCreateChainedFunction = __webpack_require__(6); var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibElementType = __webpack_require__(63); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); - var _reactOverlaysLibPortal = __webpack_require__(191); + var _domHelpersUtilInDOM = __webpack_require__(41); + + var _domHelpersUtilInDOM2 = _interopRequireDefault(_domHelpersUtilInDOM); + + var _domHelpersQueryContains = __webpack_require__(40); + + var _domHelpersQueryContains2 = _interopRequireDefault(_domHelpersQueryContains); + + var _domHelpersActiveElement = __webpack_require__(93); + + var _domHelpersActiveElement2 = _interopRequireDefault(_domHelpersActiveElement); + + var _reactOverlaysLibPortal = __webpack_require__(195); var _reactOverlaysLibPortal2 = _interopRequireDefault(_reactOverlaysLibPortal); - var _Fade = __webpack_require__(195); + var _Fade = __webpack_require__(199); var _Fade2 = _interopRequireDefault(_Fade); - var _ModalDialog = __webpack_require__(196); + var _ModalDialog = __webpack_require__(200); var _ModalDialog2 = _interopRequireDefault(_ModalDialog); - var _ModalBody = __webpack_require__(197); + var _ModalBody = __webpack_require__(201); var _ModalBody2 = _interopRequireDefault(_ModalBody); - var _ModalHeader = __webpack_require__(198); + var _ModalHeader = __webpack_require__(202); var _ModalHeader2 = _interopRequireDefault(_ModalHeader); - var _ModalTitle = __webpack_require__(199); + var _ModalTitle = __webpack_require__(203); var _ModalTitle2 = _interopRequireDefault(_ModalTitle); - var _ModalFooter = __webpack_require__(200); + var _ModalFooter = __webpack_require__(204); var _ModalFooter2 = _interopRequireDefault(_ModalFooter); @@ -10658,7 +10688,7 @@ return /******/ (function(modules) { // webpackBootstrap } function getContainer(context) { - return context.props.container && _react2['default'].findDOMNode(context.props.container) || _utilsDomUtils2['default'].ownerDocument(context).body; + return context.props.container && _reactDom2['default'].findDOMNode(context.props.container) || _utilsDomUtils2['default'].ownerDocument(context).body; } var currentFocusListener = undefined; @@ -10722,7 +10752,7 @@ return /******/ (function(modules) { // webpackBootstrap * A Component type that provides the modal content Markup. This is a useful prop when you want to use your own * styles and markup to create a custom modal component. */ - dialogComponent: _utilsCustomPropTypes2['default'].elementType, + dialogComponent: _reactPropTypesLibElementType2['default'], /** * When `true` The modal will automatically shift focus to itself when it opens, and replace it to the last focused element when it closes. @@ -10883,7 +10913,7 @@ return /******/ (function(modules) { // webpackBootstrap this.refs.dialog = ref; - //maintains backwards compat with older component breakdown + // maintains backwards compat with older component breakdown if (!this.props.backdrop) { this.refs.modal = ref; } @@ -10914,7 +10944,7 @@ return /******/ (function(modules) { // webpackBootstrap var animation = this.props.animation; if (prevProps.show && !this.props.show && !animation) { - //otherwise handleHidden will call this. + // otherwise handleHidden will call this. this.onHide(); } else if (!prevProps.show && this.props.show) { this.onShow(); @@ -10953,10 +10983,6 @@ return /******/ (function(modules) { // webpackBootstrap container.style.paddingRight = parseInt(this._originalPadding || 0, 10) + _domHelpersUtilScrollbarSize2['default']() + 'px'; } - if (this.props.backdrop) { - this.iosClickHack(); - } - this.setState(this._getStyles(), function () { return _this2.focusModalContent(); }); @@ -11010,15 +11036,15 @@ return /******/ (function(modules) { // webpackBootstrap }, checkForFocus: function checkForFocus() { - if (_utilsDomUtils2['default'].canUseDom) { - this.lastFocus = _utilsDomUtils2['default'].activeElement(document); + if (_domHelpersUtilInDOM2['default']) { + this.lastFocus = _domHelpersActiveElement2['default'](document); } }, focusModalContent: function focusModalContent() { - var modalContent = _react2['default'].findDOMNode(this.refs.dialog); - var current = _utilsDomUtils2['default'].activeElement(_utilsDomUtils2['default'].ownerDocument(this)); - var focusInModal = current && _utilsDomUtils2['default'].contains(modalContent, current); + var modalContent = _reactDom2['default'].findDOMNode(this.refs.dialog); + var current = _domHelpersActiveElement2['default'](_utilsDomUtils2['default'].ownerDocument(this)); + var focusInModal = current && _domHelpersQueryContains2['default'](modalContent, current); if (modalContent && this.props.autoFocus && !focusInModal) { this.lastFocus = current; @@ -11038,28 +11064,20 @@ return /******/ (function(modules) { // webpackBootstrap return; } - var active = _utilsDomUtils2['default'].activeElement(_utilsDomUtils2['default'].ownerDocument(this)); - var modal = _react2['default'].findDOMNode(this.refs.dialog); + var active = _domHelpersActiveElement2['default'](_utilsDomUtils2['default'].ownerDocument(this)); + var modal = _reactDom2['default'].findDOMNode(this.refs.dialog); - if (modal && modal !== active && !_utilsDomUtils2['default'].contains(modal, active)) { + if (modal && modal !== active && !_domHelpersQueryContains2['default'](modal, active)) { modal.focus(); } }, - iosClickHack: function iosClickHack() { - // IOS only allows click events to be delegated to the document on elements - // it considers 'clickable' - anchors, buttons, etc. We fake a click handler on the - // DOM nodes themselves. Remove if handled by React: https://github.com/facebook/react/issues/1169 - _react2['default'].findDOMNode(this.refs.modal).onclick = function () {}; - _react2['default'].findDOMNode(this.refs.backdrop).onclick = function () {}; - }, - _getStyles: function _getStyles() { - if (!_utilsDomUtils2['default'].canUseDom) { + if (!_domHelpersUtilInDOM2['default']) { return {}; } - var node = _react2['default'].findDOMNode(this.refs.modal); + var node = _reactDom2['default'].findDOMNode(this.refs.modal); var scrollHt = node.scrollHeight; var container = getContainer(this); var containerIsOverflowing = this._containerIsOverflowing; @@ -11089,38 +11107,38 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 187 */ +/* 191 */ /***/ function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(188), __esModule: true }; + module.exports = { "default": __webpack_require__(192), __esModule: true }; /***/ }, -/* 188 */ +/* 192 */ /***/ function(module, exports, __webpack_require__) { - __webpack_require__(189); - module.exports = __webpack_require__(9).Object.isFrozen; + __webpack_require__(193); + module.exports = __webpack_require__(15).Object.isFrozen; /***/ }, -/* 189 */ +/* 193 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.12 Object.isFrozen(O) - var isObject = __webpack_require__(24); + var isObject = __webpack_require__(57); - __webpack_require__(6)('isFrozen', function($isFrozen){ + __webpack_require__(78)('isFrozen', function($isFrozen){ return function isFrozen(it){ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; }; }); /***/ }, -/* 190 */ +/* 194 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var canUseDOM = __webpack_require__(33); + var canUseDOM = __webpack_require__(41); var size; @@ -11145,7 +11163,7 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 191 */ +/* 195 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -11154,19 +11172,23 @@ return /******/ (function(modules) { // webpackBootstrap function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _reactPropTypesLibMountable = __webpack_require__(192); + var _reactDom = __webpack_require__(34); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _reactPropTypesLibMountable = __webpack_require__(196); var _reactPropTypesLibMountable2 = _interopRequireDefault(_reactPropTypesLibMountable); - var _utilsOwnerDocument = __webpack_require__(106); + var _utilsOwnerDocument = __webpack_require__(173); var _utilsOwnerDocument2 = _interopRequireDefault(_utilsOwnerDocument); - var _utilsGetContainer = __webpack_require__(194); + var _utilsGetContainer = __webpack_require__(198); var _utilsGetContainer2 = _interopRequireDefault(_utilsGetContainer); @@ -11221,7 +11243,7 @@ return /******/ (function(modules) { // webpackBootstrap // Save reference for future access. if (overlay !== null) { this._mountOverlayTarget(); - this._overlayInstance = _react2['default'].render(overlay, this._overlayTarget); + this._overlayInstance = _reactDom2['default'].unstable_renderSubtreeIntoContainer(this, overlay, this._overlayTarget); } else { // Unrender if the component is null for transitions to null this._unrenderOverlay(); @@ -11231,7 +11253,7 @@ return /******/ (function(modules) { // webpackBootstrap _unrenderOverlay: function _unrenderOverlay() { if (this._overlayTarget) { - _react2['default'].unmountComponentAtNode(this._overlayTarget); + _reactDom2['default'].unmountComponentAtNode(this._overlayTarget); this._overlayInstance = null; } }, @@ -11240,6 +11262,10 @@ return /******/ (function(modules) { // webpackBootstrap return null; }, + getMountNode: function getMountNode() { + return this._overlayTarget; + }, + getOverlayDOMNode: function getOverlayDOMNode() { if (!this.isMounted()) { throw new Error('getOverlayDOMNode(): A component must be mounted to have a DOM node.'); @@ -11249,7 +11275,7 @@ return /******/ (function(modules) { // webpackBootstrap if (this._overlayInstance.getWrappedDOMNode) { return this._overlayInstance.getWrappedDOMNode(); } else { - return _react2['default'].findDOMNode(this._overlayInstance); + return _reactDom2['default'].findDOMNode(this._overlayInstance); } } @@ -11265,14 +11291,14 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 192 */ +/* 196 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; - var _common = __webpack_require__(193); + var _common = __webpack_require__(197); /** * Checks whether a prop provides a DOM element @@ -11297,7 +11323,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 193 */ +/* 197 */ /***/ function(module, exports) { 'use strict'; @@ -11336,7 +11362,7 @@ return /******/ (function(modules) { // webpackBootstrap } /***/ }, -/* 194 */ +/* 198 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -11346,48 +11372,44 @@ return /******/ (function(modules) { // webpackBootstrap function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _react = __webpack_require__(32); + var _reactDom = __webpack_require__(34); - var _react2 = _interopRequireDefault(_react); + var _reactDom2 = _interopRequireDefault(_reactDom); function getContainer(container, defaultContainer) { container = typeof container === 'function' ? container() : container; - return _react2['default'].findDOMNode(container) || defaultContainer; + return _reactDom2['default'].findDOMNode(container) || defaultContainer; } module.exports = exports['default']; /***/ }, -/* 195 */ +/* 199 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _reactOverlaysLibTransition = __webpack_require__(90); + var _reactOverlaysLibTransition = __webpack_require__(88); var _reactOverlaysLibTransition2 = _interopRequireDefault(_reactOverlaysLibTransition); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibDeprecated = __webpack_require__(91); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); - - var _utilsDeprecationWarning = __webpack_require__(16); - - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); + var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated); var Fade = (function (_React$Component) { _inherits(Fade, _React$Component); @@ -11447,12 +11469,7 @@ return /******/ (function(modules) { // webpackBootstrap * duration * @private */ - duration: _utilsCustomPropTypes2['default'].all([_react2['default'].PropTypes.number, function (props) { - if (props.duration != null) { - _utilsDeprecationWarning2['default']('Fade `duration`', 'the `timeout` prop'); - } - return null; - }]), + duration: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.number, 'Use `timeout`.'), /** * Callback fired before the component fades in @@ -11491,27 +11508,27 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 196 */ +/* 200 */ /***/ function(module, exports, __webpack_require__) { - /*eslint-disable react/prop-types */ + /* eslint-disable react/prop-types */ 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); @@ -11577,26 +11594,26 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 197 */ +/* 201 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -11636,26 +11653,26 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 198 */ +/* 202 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -11668,7 +11685,7 @@ return /******/ (function(modules) { // webpackBootstrap _React$Component.apply(this, arguments); } - //used in liue of parent contexts right now to auto wire the close button + // used in liue of parent contexts right now to auto wire the close button ModalHeader.prototype.render = function render() { return _react2['default'].createElement( @@ -11729,26 +11746,26 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 199 */ +/* 203 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -11788,26 +11805,26 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 200 */ +/* 204 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -11847,38 +11864,38 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 201 */ +/* 205 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _Collapse = __webpack_require__(89); + var _Collapse = __webpack_require__(80); var _Collapse2 = _interopRequireDefault(_Collapse); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _utilsCreateChainedFunction = __webpack_require__(6); var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); @@ -12005,40 +12022,54 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 202 */ +/* 206 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; + + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _BootstrapMixin = __webpack_require__(69); + var _reactPropTypesLibDeprecated = __webpack_require__(91); + + var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated); + + var _reactPropTypesLibElementType = __webpack_require__(63); + + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); + + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _classnames = __webpack_require__(68); + var _Grid = __webpack_require__(178); - var _classnames2 = _interopRequireDefault(_classnames); + var _Grid2 = _interopRequireDefault(_Grid); - var _utilsValidComponentChildren = __webpack_require__(55); + var _NavBrand = __webpack_require__(207); - var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); + var _NavBrand2 = _interopRequireDefault(_NavBrand); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _utilsCreateChainedFunction = __webpack_require__(6); var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - var _utilsCustomPropTypes = __webpack_require__(53); + var _utilsValidComponentChildren = __webpack_require__(7); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); var Navbar = _react2['default'].createClass({ displayName: 'Navbar', @@ -12055,8 +12086,8 @@ return /******/ (function(modules) { // webpackBootstrap /** * You can use a custom element for this component */ - componentClass: _utilsCustomPropTypes2['default'].elementType, - brand: _react2['default'].PropTypes.node, + componentClass: _reactPropTypesLibElementType2['default'], + brand: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.node, 'Use the `NavBrand` component.'), toggleButton: _react2['default'].PropTypes.node, toggleNavKey: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]), onToggle: _react2['default'].PropTypes.func, @@ -12106,116 +12137,299 @@ return /******/ (function(modules) { // webpackBootstrap return this.props.navExpanded != null ? this.props.navExpanded : this.state.navExpanded; }, + hasNavBrandChild: function hasNavBrandChild() { + return _utilsValidComponentChildren2['default'].findValidComponents(this.props.children, function (child) { + return child.props.bsRole === 'brand'; + }).length > 0; + }, + render: function render() { + var _props = this.props; + var brand = _props.brand; + var toggleButton = _props.toggleButton; + var toggleNavKey = _props.toggleNavKey; + var fixedTop = _props.fixedTop; + var fixedBottom = _props.fixedBottom; + var staticTop = _props.staticTop; + var inverse = _props.inverse; + var ComponentClass = _props.componentClass; + var fluid = _props.fluid; + var className = _props.className; + var children = _props.children; + + var props = _objectWithoutProperties(_props, ['brand', 'toggleButton', 'toggleNavKey', 'fixedTop', 'fixedBottom', 'staticTop', 'inverse', 'componentClass', 'fluid', 'className', 'children']); + var classes = this.getBsClassSet(); - var ComponentClass = this.props.componentClass; + classes['navbar-fixed-top'] = fixedTop; + classes['navbar-fixed-bottom'] = fixedBottom; + classes['navbar-static-top'] = staticTop; + classes['navbar-inverse'] = inverse; - classes['navbar-fixed-top'] = this.props.fixedTop; - classes['navbar-fixed-bottom'] = this.props.fixedBottom; - classes['navbar-static-top'] = this.props.staticTop; - classes['navbar-inverse'] = this.props.inverse; + var showHeader = (brand || toggleButton || toggleNavKey != null) && !this.hasNavBrandChild(); return _react2['default'].createElement( ComponentClass, - _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), + _extends({}, props, { className: _classnames2['default'](className, classes) }), _react2['default'].createElement( - 'div', - { className: this.props.fluid ? 'container-fluid' : 'container' }, - this.props.brand || this.props.toggleButton || this.props.toggleNavKey != null ? this.renderHeader() : null, - _utilsValidComponentChildren2['default'].map(this.props.children, this.renderChild) + _Grid2['default'], + { fluid: fluid }, + showHeader ? this.renderBrandHeader() : null, + _utilsValidComponentChildren2['default'].map(children, this.renderChild) ) ); }, - renderChild: function renderChild(child, index) { - return _react.cloneElement(child, { - navbar: true, - collapsible: this.props.toggleNavKey != null && this.props.toggleNavKey === child.props.eventKey, - expanded: this.props.toggleNavKey != null && this.props.toggleNavKey === child.props.eventKey && this.isNavExpanded(), - key: child.key ? child.key : index - }); - }, + renderBrandHeader: function renderBrandHeader() { + var brand = this.props.brand; - renderHeader: function renderHeader() { - var brand = undefined; - - if (this.props.brand) { - if (_react2['default'].isValidElement(this.props.brand)) { - brand = _react.cloneElement(this.props.brand, { - className: _classnames2['default'](this.props.brand.props.className, 'navbar-brand') - }); - } else { - brand = _react2['default'].createElement( - 'span', - { className: 'navbar-brand' }, - this.props.brand - ); - } + if (brand) { + brand = _react2['default'].createElement( + _NavBrand2['default'], + null, + brand + ); } + return this.renderHeader(brand); + }, + + renderHeader: function renderHeader(brand) { + var hasToggle = this.props.toggleButton || this.props.toggleNavKey != null; + return _react2['default'].createElement( 'div', { className: 'navbar-header' }, brand, - this.props.toggleButton || this.props.toggleNavKey != null ? this.renderToggleButton() : null + hasToggle ? this.renderToggleButton() : null ); }, - renderToggleButton: function renderToggleButton() { - var children = undefined; + renderChild: function renderChild(child, index) { + var key = child.key != null ? child.key : index; + + if (child.props.bsRole === 'brand') { + return _react2['default'].cloneElement(this.renderHeader(child), { key: key }); + } + + var toggleNavKey = this.props.toggleNavKey; + + var collapsible = toggleNavKey != null && toggleNavKey === child.props.eventKey; + + return _react2['default'].cloneElement(child, { + navbar: true, + collapsible: collapsible, + expanded: collapsible && this.isNavExpanded(), + key: key + }); + }, - if (_react2['default'].isValidElement(this.props.toggleButton)) { + renderToggleButton: function renderToggleButton() { + var toggleButton = this.props.toggleButton; - return _react.cloneElement(this.props.toggleButton, { - className: _classnames2['default'](this.props.toggleButton.props.className, 'navbar-toggle'), - onClick: _utilsCreateChainedFunction2['default'](this.handleToggle, this.props.toggleButton.props.onClick) + if (_react2['default'].isValidElement(toggleButton)) { + return _react2['default'].cloneElement(toggleButton, { + className: _classnames2['default'](toggleButton.props.className, 'navbar-toggle'), + onClick: _utilsCreateChainedFunction2['default'](this.handleToggle, toggleButton.props.onClick) }); } - children = this.props.toggleButton != null ? this.props.toggleButton : [_react2['default'].createElement( - 'span', - { className: 'sr-only', key: 0 }, - 'Toggle navigation' - ), _react2['default'].createElement('span', { className: 'icon-bar', key: 1 }), _react2['default'].createElement('span', { className: 'icon-bar', key: 2 }), _react2['default'].createElement('span', { className: 'icon-bar', key: 3 })]; + var children = undefined; + if (toggleButton != null) { + children = toggleButton; + } else { + children = [_react2['default'].createElement( + 'span', + { className: 'sr-only', key: 0 }, + 'Toggle navigation' + ), _react2['default'].createElement('span', { className: 'icon-bar', key: 1 }), _react2['default'].createElement('span', { className: 'icon-bar', key: 2 }), _react2['default'].createElement('span', { className: 'icon-bar', key: 3 })]; + } return _react2['default'].createElement( 'button', - { className: 'navbar-toggle', type: 'button', onClick: this.handleToggle }, + { + type: 'button', + onClick: this.handleToggle, + className: 'navbar-toggle' + }, children ); } + }); exports['default'] = Navbar; module.exports = exports['default']; /***/ }, -/* 203 */ +/* 207 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _inherits = __webpack_require__(50)['default']; + + var _classCallCheck = __webpack_require__(61)['default']; + + var _objectWithoutProperties = __webpack_require__(26)['default']; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(4); + + var _react2 = _interopRequireDefault(_react); + + var NavBrand = (function (_React$Component) { + _inherits(NavBrand, _React$Component); + + function NavBrand() { + _classCallCheck(this, NavBrand); + + _React$Component.apply(this, arguments); + } + + NavBrand.prototype.render = function render() { + var _props = this.props; + var className = _props.className; + var children = _props.children; + + var props = _objectWithoutProperties(_props, ['className', 'children']); + + if (_react2['default'].isValidElement(children)) { + return _react2['default'].cloneElement(children, { + className: _classnames2['default'](children.props.className, className, 'navbar-brand') + }); + } + + return _react2['default'].createElement( + 'span', + _extends({}, props, { className: _classnames2['default'](className, 'navbar-brand') }), + children + ); + }; + + return NavBrand; + })(_react2['default'].Component); + + NavBrand.propTypes = { + bsRole: _react2['default'].PropTypes.string + }; + + NavBrand.defaultProps = { + bsRole: 'brand' + }; + + exports['default'] = NavBrand; + module.exports = exports['default']; + +/***/ }, +/* 208 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _inherits = __webpack_require__(50)['default']; - var _extends = __webpack_require__(58)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _extends = __webpack_require__(9)['default']; + + var _objectWithoutProperties = __webpack_require__(26)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _Dropdown = __webpack_require__(92); + + var _Dropdown2 = _interopRequireDefault(_Dropdown); + + var NavDropdown = (function (_React$Component) { + _inherits(NavDropdown, _React$Component); + + function NavDropdown() { + _classCallCheck(this, NavDropdown); + + _React$Component.apply(this, arguments); + } + + NavDropdown.prototype.render = function render() { + var _props = this.props; + var children = _props.children; + var title = _props.title; + var noCaret = _props.noCaret; + + var props = _objectWithoutProperties(_props, ['children', 'title', 'noCaret']); + + return _react2['default'].createElement( + _Dropdown2['default'], + _extends({}, props, { componentClass: 'li' }), + _react2['default'].createElement( + _Dropdown2['default'].Toggle, + { + useAnchor: true, + disabled: props.disabled, + noCaret: noCaret + }, + title + ), + _react2['default'].createElement( + _Dropdown2['default'].Menu, + null, + children + ) + ); + }; + + return NavDropdown; + })(_react2['default'].Component); + + NavDropdown.propTypes = _extends({ + noCaret: _react2['default'].PropTypes.bool, + title: _react2['default'].PropTypes.node.isRequired + }, _Dropdown2['default'].propTypes); + + exports['default'] = NavDropdown; + module.exports = exports['default']; + +/***/ }, +/* 209 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _objectWithoutProperties = __webpack_require__(26)['default']; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _react = __webpack_require__(4); + + var _react2 = _interopRequireDefault(_react); + + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _SafeAnchor = __webpack_require__(100); + var _SafeAnchor = __webpack_require__(49); var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); @@ -12254,9 +12468,10 @@ return /******/ (function(modules) { // webpackBootstrap var title = _props.title; var target = _props.target; var children = _props.children; + var tabIndex = _props.tabIndex; var ariaControls = _props['aria-controls']; - var props = _objectWithoutProperties(_props, ['role', 'linkId', 'disabled', 'active', 'href', 'title', 'target', 'children', 'aria-controls']); + var props = _objectWithoutProperties(_props, ['role', 'linkId', 'disabled', 'active', 'href', 'title', 'target', 'children', 'tabIndex', 'aria-controls']); var classes = { active: active, @@ -12267,6 +12482,7 @@ return /******/ (function(modules) { // webpackBootstrap href: href, title: title, target: target, + tabIndex: tabIndex, id: linkId, onClick: this.handleClick }; @@ -12299,9 +12515,10 @@ return /******/ (function(modules) { // webpackBootstrap exports['default'] = NavItem; module.exports = exports['default']; + //eslint-disable-line /***/ }, -/* 204 */ +/* 210 */ /***/ function(module, exports, __webpack_require__) { /* eslint react/prop-types: [2, {ignore: ["container", "containerPadding", "target", "placement", "children"] }] */ @@ -12309,35 +12526,35 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _inherits = __webpack_require__(17)['default']; + var _inherits = __webpack_require__(50)['default']; - var _classCallCheck = __webpack_require__(28)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _reactOverlaysLibOverlay = __webpack_require__(205); + var _reactOverlaysLibOverlay = __webpack_require__(211); var _reactOverlaysLibOverlay2 = _interopRequireDefault(_reactOverlaysLibOverlay); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibElementType = __webpack_require__(63); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); - var _Fade = __webpack_require__(195); + var _Fade = __webpack_require__(199); var _Fade2 = _interopRequireDefault(_Fade); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -12390,14 +12607,15 @@ return /******/ (function(modules) { // webpackBootstrap */ rootClose: _react2['default'].PropTypes.bool, /** - * A Callback fired by the Overlay when it wishes to be hidden. + * A callback invoked by the overlay when it wishes to be hidden. Required if + * `rootClose` is specified. */ onHide: _react2['default'].PropTypes.func, /** * Use animation */ - animation: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.bool, _utilsCustomPropTypes2['default'].elementType]), + animation: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.bool, _reactPropTypesLibElementType2['default']]), /** * Callback fired before the Overlay transitions in @@ -12440,7 +12658,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 205 */ +/* 211 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -12457,23 +12675,23 @@ return /******/ (function(modules) { // webpackBootstrap function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _Portal = __webpack_require__(191); + var _Portal = __webpack_require__(195); var _Portal2 = _interopRequireDefault(_Portal); - var _Position = __webpack_require__(206); + var _Position = __webpack_require__(212); var _Position2 = _interopRequireDefault(_Position); - var _RootCloseWrapper = __webpack_require__(102); + var _RootCloseWrapper = __webpack_require__(169); var _RootCloseWrapper2 = _interopRequireDefault(_RootCloseWrapper); - var _reactPropTypesLibElementType = __webpack_require__(208); + var _reactPropTypesLibElementType = __webpack_require__(218); var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); @@ -12639,7 +12857,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 206 */ +/* 212 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -12656,25 +12874,29 @@ return /******/ (function(modules) { // webpackBootstrap function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _reactDom = __webpack_require__(34); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsOwnerDocument = __webpack_require__(106); + var _utilsOwnerDocument = __webpack_require__(173); var _utilsOwnerDocument2 = _interopRequireDefault(_utilsOwnerDocument); - var _utilsGetContainer = __webpack_require__(194); + var _utilsGetContainer = __webpack_require__(198); var _utilsGetContainer2 = _interopRequireDefault(_utilsGetContainer); - var _utilsOverlayPositionUtils = __webpack_require__(207); + var _utilsOverlayPositionUtils = __webpack_require__(213); - var _reactPropTypesLibMountable = __webpack_require__(192); + var _reactPropTypesLibMountable = __webpack_require__(196); var _reactPropTypesLibMountable2 = _interopRequireDefault(_reactPropTypesLibMountable); @@ -12787,7 +13009,7 @@ return /******/ (function(modules) { // webpackBootstrap return; } - var overlay = _react2['default'].findDOMNode(this); + var overlay = _reactDom2['default'].findDOMNode(this); var container = _utilsGetContainer2['default'](this.props.container, _utilsOwnerDocument2['default'](this).body); this.setState(_utilsOverlayPositionUtils.calcOverlayPosition(this.props.placement, overlay, target, container, this.props.containerPadding)); @@ -12826,7 +13048,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 207 */ +/* 213 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -12835,7 +13057,7 @@ return /******/ (function(modules) { // webpackBootstrap function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _ownerDocument = __webpack_require__(106); + var _ownerDocument = __webpack_require__(173); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); @@ -12843,11 +13065,11 @@ return /******/ (function(modules) { // webpackBootstrap var _domHelpersQueryOffset2 = _interopRequireDefault(_domHelpersQueryOffset); - var _domHelpersQueryPosition = __webpack_require__(49); + var _domHelpersQueryPosition = __webpack_require__(214); var _domHelpersQueryPosition2 = _interopRequireDefault(_domHelpersQueryPosition); - var _domHelpersQueryScrollTop = __webpack_require__(50); + var _domHelpersQueryScrollTop = __webpack_require__(216); var _domHelpersQueryScrollTop2 = _interopRequireDefault(_domHelpersQueryScrollTop); @@ -12965,7 +13187,135 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 208 */ +/* 214 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(38); + + exports.__esModule = true; + exports['default'] = position; + + var _offset = __webpack_require__(39); + + var _offset2 = babelHelpers.interopRequireDefault(_offset); + + var _offsetParent = __webpack_require__(215); + + var _offsetParent2 = babelHelpers.interopRequireDefault(_offsetParent); + + var _scrollTop = __webpack_require__(216); + + var _scrollTop2 = babelHelpers.interopRequireDefault(_scrollTop); + + var _scrollLeft = __webpack_require__(217); + + var _scrollLeft2 = babelHelpers.interopRequireDefault(_scrollLeft); + + var _style = __webpack_require__(81); + + var _style2 = babelHelpers.interopRequireDefault(_style); + + function nodeName(node) { + return node.nodeName && node.nodeName.toLowerCase(); + } + + function position(node, offsetParent) { + var parentOffset = { top: 0, left: 0 }, + offset; + + // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, + // because it is its only offset parent + if ((0, _style2['default'])(node, 'position') === 'fixed') { + offset = node.getBoundingClientRect(); + } else { + offsetParent = offsetParent || (0, _offsetParent2['default'])(node); + offset = (0, _offset2['default'])(node); + + if (nodeName(offsetParent) !== 'html') parentOffset = (0, _offset2['default'])(offsetParent); + + parentOffset.top += parseInt((0, _style2['default'])(offsetParent, 'borderTopWidth'), 10) - (0, _scrollTop2['default'])(offsetParent) || 0; + parentOffset.left += parseInt((0, _style2['default'])(offsetParent, 'borderLeftWidth'), 10) - (0, _scrollLeft2['default'])(offsetParent) || 0; + } + + // Subtract parent offsets and node margins + return babelHelpers._extends({}, offset, { + top: offset.top - parentOffset.top - (parseInt((0, _style2['default'])(node, 'marginTop'), 10) || 0), + left: offset.left - parentOffset.left - (parseInt((0, _style2['default'])(node, 'marginLeft'), 10) || 0) + }); + } + + module.exports = exports['default']; + +/***/ }, +/* 215 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(38); + + exports.__esModule = true; + exports['default'] = offsetParent; + + var _ownerDocument = __webpack_require__(36); + + var _ownerDocument2 = babelHelpers.interopRequireDefault(_ownerDocument); + + var _style = __webpack_require__(81); + + var _style2 = babelHelpers.interopRequireDefault(_style); + + function nodeName(node) { + return node.nodeName && node.nodeName.toLowerCase(); + } + + function offsetParent(node) { + var doc = (0, _ownerDocument2['default'])(node), + offsetParent = node && node.offsetParent; + + while (offsetParent && nodeName(node) !== 'html' && (0, _style2['default'])(offsetParent, 'position') === 'static') { + offsetParent = offsetParent.offsetParent; + } + + return offsetParent || doc.documentElement; + } + + module.exports = exports['default']; + +/***/ }, +/* 216 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var getWindow = __webpack_require__(42); + + module.exports = function scrollTop(node, val) { + var win = getWindow(node); + + if (val === undefined) return win ? 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop : node.scrollTop; + + if (win) win.scrollTo('pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft, val);else node.scrollTop = val; + }; + +/***/ }, +/* 217 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var getWindow = __webpack_require__(42); + + module.exports = function scrollTop(node, val) { + var win = getWindow(node); + + if (val === undefined) return win ? 'pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft : node.scrollLeft; + + if (win) win.scrollTo(val, 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop);else node.scrollLeft = val; + }; + +/***/ }, +/* 218 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -12974,11 +13324,11 @@ return /******/ (function(modules) { // webpackBootstrap function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _common = __webpack_require__(193); + var _common = __webpack_require__(197); /** * Checks whether a prop provides a type of element. @@ -13011,43 +13361,48 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 209 */ +/* 219 */ /***/ function(module, exports, __webpack_require__) { - /*eslint-disable react/prop-types */ + /* eslint-disable react/prop-types */ + 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _Object$keys = __webpack_require__(1)['default']; + var _Object$keys = __webpack_require__(75)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _domHelpersQueryContains = __webpack_require__(40); - var _react2 = _interopRequireDefault(_react); + var _domHelpersQueryContains2 = _interopRequireDefault(_domHelpersQueryContains); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _lodashCompatObjectPick = __webpack_require__(220); - var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); + var _lodashCompatObjectPick2 = _interopRequireDefault(_lodashCompatObjectPick); + + var _react = __webpack_require__(4); - var _utilsCreateContextWrapper = __webpack_require__(210); + var _react2 = _interopRequireDefault(_react); - var _utilsCreateContextWrapper2 = _interopRequireDefault(_utilsCreateContextWrapper); + var _reactDom = __webpack_require__(34); - var _Overlay = __webpack_require__(204); + var _reactDom2 = _interopRequireDefault(_reactDom); - var _Overlay2 = _interopRequireDefault(_Overlay); + var _warning = __webpack_require__(48); + + var _warning2 = _interopRequireDefault(_warning); - var _reactLibWarning = __webpack_require__(29); + var _Overlay = __webpack_require__(210); - var _reactLibWarning2 = _interopRequireDefault(_reactLibWarning); + var _Overlay2 = _interopRequireDefault(_Overlay); - var _lodashObjectPick = __webpack_require__(211); + var _utilsCreateChainedFunction = __webpack_require__(6); - var _lodashObjectPick2 = _interopRequireDefault(_lodashObjectPick); + var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); /** * Check if value one is inside or equal to the of value @@ -13118,7 +13473,7 @@ return /******/ (function(modules) { // webpackBootstrap */ onMouseLeave: _react2['default'].PropTypes.func, - //override specific overlay props + // override specific overlay props /** * @private */ @@ -13166,29 +13521,38 @@ return /******/ (function(modules) { // webpackBootstrap } }, + componentWillMount: function componentWillMount() { + this.handleMouseOver = this.handleMouseOverOut.bind(null, this.handleDelayedShow); + this.handleMouseOut = this.handleMouseOverOut.bind(null, this.handleDelayedHide); + }, + componentDidMount: function componentDidMount() { this._mountNode = document.createElement('div'); - _react2['default'].render(this._overlay, this._mountNode); + this.renderOverlay(); + }, + + renderOverlay: function renderOverlay() { + _reactDom2['default'].unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode); }, componentWillUnmount: function componentWillUnmount() { - _react2['default'].unmountComponentAtNode(this._mountNode); + _reactDom2['default'].unmountComponentAtNode(this._mountNode); this._mountNode = null; clearTimeout(this._hoverDelay); }, componentDidUpdate: function componentDidUpdate() { if (this._mountNode) { - _react2['default'].render(this._overlay, this._mountNode); + this.renderOverlay(); } }, getOverlayTarget: function getOverlayTarget() { - return _react2['default'].findDOMNode(this); + return _reactDom2['default'].findDOMNode(this); }, getOverlay: function getOverlay() { - var overlayProps = _extends({}, _lodashObjectPick2['default'](this.props, _Object$keys(_Overlay2['default'].propTypes)), { + var overlayProps = _extends({}, _lodashCompatObjectPick2['default'](this.props, _Object$keys(_Overlay2['default'].propTypes)), { show: this.state.isOverlayShown, onHide: this.hide, target: this.getOverlayTarget, @@ -13214,6 +13578,7 @@ return /******/ (function(modules) { // webpackBootstrap render: function render() { var trigger = _react2['default'].Children.only(this.props.children); + var triggerProps = trigger.props; var props = { 'aria-describedby': this.props.overlay.props.id @@ -13222,22 +13587,22 @@ return /******/ (function(modules) { // webpackBootstrap // create in render otherwise owner is lost... this._overlay = this.getOverlay(); - props.onClick = _utilsCreateChainedFunction2['default'](trigger.props.onClick, this.props.onClick); + props.onClick = _utilsCreateChainedFunction2['default'](triggerProps.onClick, this.props.onClick); if (isOneOf('click', this.props.trigger)) { props.onClick = _utilsCreateChainedFunction2['default'](this.toggle, props.onClick); } if (isOneOf('hover', this.props.trigger)) { - _reactLibWarning2['default'](!(this.props.trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the visibilty of the overlay to just mouse users. ' + 'Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'); + _warning2['default'](!(this.props.trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the visibilty of the overlay to just mouse users. ' + 'Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'); - props.onMouseOver = _utilsCreateChainedFunction2['default'](this.handleDelayedShow, this.props.onMouseOver); - props.onMouseOut = _utilsCreateChainedFunction2['default'](this.handleDelayedHide, this.props.onMouseOut); + props.onMouseOver = _utilsCreateChainedFunction2['default'](this.handleMouseOver, this.props.onMouseOver, triggerProps.onMouseOver); + props.onMouseOut = _utilsCreateChainedFunction2['default'](this.handleMouseOut, this.props.onMouseOut, triggerProps.onMouseOut); } if (isOneOf('focus', this.props.trigger)) { - props.onFocus = _utilsCreateChainedFunction2['default'](this.handleDelayedShow, this.props.onFocus); - props.onBlur = _utilsCreateChainedFunction2['default'](this.handleDelayedHide, this.props.onBlur); + props.onFocus = _utilsCreateChainedFunction2['default'](this.handleDelayedShow, this.props.onFocus, triggerProps.onFocus); + props.onBlur = _utilsCreateChainedFunction2['default'](this.handleDelayedHide, this.props.onBlur, triggerProps.onBlur); } return _react.cloneElement(trigger, props); @@ -13285,130 +13650,35 @@ return /******/ (function(modules) { // webpackBootstrap _this2._hoverDelay = null; _this2.hide(); }, delay); + }, + + // Simple implementation of mouseEnter and mouseLeave. + // React's built version is broken: https://github.com/facebook/react/issues/4251 + // for cases when the trigger is disabled and mouseOut/Over can cause flicker moving + // from one child element to another. + handleMouseOverOut: function handleMouseOverOut(handler, e) { + var target = e.currentTarget; + var related = e.relatedTarget || e.nativeEvent.toElement; + + if (!related || related !== target && !_domHelpersQueryContains2['default'](target, related)) { + handler(e); + } } }); - /** - * Creates a new OverlayTrigger class that forwards the relevant context - * - * This static method should only be called at the module level, instead of in - * e.g. a render() method, because it's expensive to create new classes. - * - * For example, you would want to have: - * - * > export default OverlayTrigger.withContext({ - * > myContextKey: React.PropTypes.object - * > }); - * - * and import this when needed. - */ - OverlayTrigger.withContext = _utilsCreateContextWrapper2['default'](OverlayTrigger, 'overlay'); - exports['default'] = OverlayTrigger; module.exports = exports['default']; /***/ }, -/* 210 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _inherits = __webpack_require__(17)['default']; - - var _classCallCheck = __webpack_require__(28)['default']; - - var _extends = __webpack_require__(58)['default']; - - var _objectWithoutProperties = __webpack_require__(67)['default']; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - exports['default'] = createContextWrapper; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - /** - * Creates new trigger class that injects context into overlay. - */ - - function createContextWrapper(Trigger, propName) { - return function (contextTypes) { - var ContextWrapper = (function (_React$Component) { - _inherits(ContextWrapper, _React$Component); - - function ContextWrapper() { - _classCallCheck(this, ContextWrapper); - - _React$Component.apply(this, arguments); - } - - ContextWrapper.prototype.getChildContext = function getChildContext() { - return this.props.context; - }; - - ContextWrapper.prototype.render = function render() { - // Strip injected props from below. - var _props = this.props; - var wrapped = _props.wrapped; - var context = _props.context; - - var props = _objectWithoutProperties(_props, ['wrapped', 'context']); - - return _react2['default'].cloneElement(wrapped, props); - }; - - return ContextWrapper; - })(_react2['default'].Component); - - ContextWrapper.childContextTypes = contextTypes; - - var TriggerWithContext = (function () { - function TriggerWithContext() { - _classCallCheck(this, TriggerWithContext); - } - - TriggerWithContext.prototype.render = function render() { - var props = _extends({}, this.props); - props[propName] = this.getWrappedOverlay(); - - return _react2['default'].createElement( - Trigger, - props, - this.props.children - ); - }; - - TriggerWithContext.prototype.getWrappedOverlay = function getWrappedOverlay() { - return _react2['default'].createElement(ContextWrapper, { - context: this.context, - wrapped: this.props[propName] - }); - }; - - return TriggerWithContext; - })(); - - TriggerWithContext.contextTypes = contextTypes; - - return TriggerWithContext; - }; - } - - module.exports = exports['default']; - -/***/ }, -/* 211 */ +/* 220 */ /***/ function(module, exports, __webpack_require__) { - var baseFlatten = __webpack_require__(165), - bindCallback = __webpack_require__(150), - pickByArray = __webpack_require__(167), - pickByCallback = __webpack_require__(168), - restParam = __webpack_require__(170); + var baseFlatten = __webpack_require__(157), + bindCallback = __webpack_require__(142), + pickByArray = __webpack_require__(159), + pickByCallback = __webpack_require__(160), + restParam = __webpack_require__(162); /** * Creates an object composed of the picked `object` properties. Property @@ -13449,22 +13719,22 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 212 */ +/* 221 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); @@ -13488,26 +13758,26 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 213 */ +/* 222 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _SafeAnchor = __webpack_require__(100); + var _SafeAnchor = __webpack_require__(49); var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); @@ -13571,30 +13841,30 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 214 */ +/* 223 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _utilsCreateChainedFunction = __webpack_require__(6); var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); @@ -13626,38 +13896,38 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 215 */ +/* 224 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _PaginationButton = __webpack_require__(216); + var _PaginationButton = __webpack_require__(225); var _PaginationButton2 = _interopRequireDefault(_PaginationButton); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibElementType = __webpack_require__(63); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); - var _SafeAnchor = __webpack_require__(100); + var _SafeAnchor = __webpack_require__(49); var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); @@ -13679,7 +13949,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * You can use a custom element for the buttons */ - buttonComponentClass: _utilsCustomPropTypes2['default'].elementType + buttonComponentClass: _reactPropTypesLibElementType2['default'] }, getDefaultProps: function getDefaultProps() { @@ -13862,38 +14132,38 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 216 */ +/* 225 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _utilsCreateSelectedEvent = __webpack_require__(217); + var _utilsCreateSelectedEvent = __webpack_require__(226); var _utilsCreateSelectedEvent2 = _interopRequireDefault(_utilsCreateSelectedEvent); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibElementType = __webpack_require__(63); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); var PaginationButton = _react2['default'].createClass({ displayName: 'PaginationButton', @@ -13909,7 +14179,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * You can use a custom element for this component */ - buttonComponentClass: _utilsCustomPropTypes2['default'].elementType + buttonComponentClass: _reactPropTypesLibElementType2['default'] }, getDefaultProps: function getDefaultProps() { @@ -13956,7 +14226,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 217 */ +/* 226 */ /***/ function(module, exports) { "use strict"; @@ -13983,32 +14253,32 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports["default"]; /***/ }, -/* 218 */ +/* 227 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _Collapse = __webpack_require__(89); + var _Collapse = __webpack_require__(80); var _Collapse2 = _interopRequireDefault(_Collapse); @@ -14107,6 +14377,8 @@ return /******/ (function(modules) { // webpackBootstrap }, renderBody: function renderBody() { + var _this = this; + var allChildren = this.props.children; var bodyElements = []; var panelBodyChildren = []; @@ -14145,9 +14417,8 @@ return /******/ (function(modules) { // webpackBootstrap addPanelBody(allChildren); } } else { - - allChildren.forEach((function (child) { - if (this.shouldRenderFill(child)) { + allChildren.forEach(function (child) { + if (_this.shouldRenderFill(child)) { maybeRenderPanelBody(); // Separately add the filled element. @@ -14155,7 +14426,7 @@ return /******/ (function(modules) { // webpackBootstrap } else { panelBodyChildren.push(child); } - }).bind(this)); + }); maybeRenderPanelBody(); } @@ -14236,32 +14507,32 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 219 */ +/* 228 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibIsRequiredForA11y = __webpack_require__(163); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibIsRequiredForA11y2 = _interopRequireDefault(_reactPropTypesLibIsRequiredForA11y); var Popover = _react2['default'].createClass({ displayName: 'Popover', @@ -14274,7 +14545,7 @@ return /******/ (function(modules) { // webpackBootstrap * @type {string} * @required */ - id: _utilsCustomPropTypes2['default'].isRequiredForA11y(_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])), + id: _reactPropTypesLibIsRequiredForA11y2['default'](_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])), /** * Sets the direction the Popover is positioned towards. @@ -14355,7 +14626,7 @@ return /******/ (function(modules) { // webpackBootstrap // we don't want to expose the `style` property /***/ }, -/* 220 */ +/* 229 */ /***/ function(module, exports, __webpack_require__) { /* eslint react/prop-types: [2, {ignore: "bsStyle"}] */ @@ -14363,31 +14634,31 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _Interpolate = __webpack_require__(180); + var _Interpolate = __webpack_require__(184); var _Interpolate2 = _interopRequireDefault(_Interpolate); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); @@ -14402,7 +14673,7 @@ return /******/ (function(modules) { // webpackBootstrap srOnly: _react.PropTypes.bool, striped: _react.PropTypes.bool, active: _react.PropTypes.bool, - children: onlyProgressBar, + children: onlyProgressBar, // eslint-disable-line no-use-before-define className: _react2['default'].PropTypes.string, interpolateClass: _react.PropTypes.node, /** @@ -14550,28 +14821,125 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 221 */ +/* 230 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _inherits = __webpack_require__(50)['default']; + + var _classCallCheck = __webpack_require__(61)['default']; + + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _warning = __webpack_require__(48); + + var _warning2 = _interopRequireDefault(_warning); + + var ResponsiveEmbed = (function (_React$Component) { + _inherits(ResponsiveEmbed, _React$Component); + + function ResponsiveEmbed() { + _classCallCheck(this, ResponsiveEmbed); + + _React$Component.apply(this, arguments); + } + + ResponsiveEmbed.prototype.render = function render() { + var _props = this.props; + var bsClass = _props.bsClass; + var className = _props.className; + var a16by9 = _props.a16by9; + var a4by3 = _props.a4by3; + + var props = _objectWithoutProperties(_props, ['bsClass', 'className', 'a16by9', 'a4by3']); + + _warning2['default'](!(!a16by9 && !a4by3), '`a16by9` or `a4by3` attribute must be set.'); + _warning2['default'](!(a16by9 && a4by3), 'Either `a16by9` or `a4by3` attribute can be set. Not both.'); + + var aspectRatio = { + 'embed-responsive-16by9': a16by9, + 'embed-responsive-4by3': a4by3 + }; + + return _react2['default'].createElement( + 'div', + { className: _classnames2['default'](bsClass, aspectRatio) }, + _react.cloneElement(this.props.children, _extends({}, props, { + className: _classnames2['default'](className, 'embed-responsive-item') + })) + ); + }; + + return ResponsiveEmbed; + })(_react2['default'].Component); + + ResponsiveEmbed.defaultProps = { + bsClass: 'embed-responsive', + a16by9: false, + a4by3: false + }; + + ResponsiveEmbed.propTypes = { + /** + * bootstrap className + * @private + */ + bsClass: _react.PropTypes.string, + /** + * This component accepts only one child element + */ + children: _react.PropTypes.element.isRequired, + /** + * 16by9 aspect ratio + */ + a16by9: _react.PropTypes.bool, + /** + * 4by3 aspect ratio + */ + a4by3: _react.PropTypes.bool + }; + + exports['default'] = ResponsiveEmbed; + module.exports = exports['default']; + +/***/ }, +/* 231 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _react = __webpack_require__(4); + + var _react2 = _interopRequireDefault(_react); + + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsCustomPropTypes = __webpack_require__(53); + var _reactPropTypesLibElementType = __webpack_require__(63); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType); var Row = _react2['default'].createClass({ displayName: 'Row', @@ -14580,7 +14948,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * You can use a custom element for this component */ - componentClass: _utilsCustomPropTypes2['default'].elementType + componentClass: _reactPropTypesLibElementType2['default'] }, getDefaultProps: function getDefaultProps() { @@ -14604,38 +14972,206 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 222 */ +/* 232 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _inherits = __webpack_require__(50)['default']; + + var _classCallCheck = __webpack_require__(61)['default']; + + var _extends = __webpack_require__(9)['default']; + + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _BootstrapMixin = __webpack_require__(28); + + var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); + + var _Button = __webpack_require__(62); + + var _Button2 = _interopRequireDefault(_Button); + + var _Dropdown = __webpack_require__(92); + + var _Dropdown2 = _interopRequireDefault(_Dropdown); + + var _SplitToggle = __webpack_require__(233); + + var _SplitToggle2 = _interopRequireDefault(_SplitToggle); + + var SplitButton = (function (_React$Component) { + _inherits(SplitButton, _React$Component); + + function SplitButton() { + _classCallCheck(this, SplitButton); + + _React$Component.apply(this, arguments); + } + + SplitButton.prototype.render = function render() { + var _props = this.props; + var children = _props.children; + var title = _props.title; + var onClick = _props.onClick; + var target = _props.target; + var href = _props.href; + var + // bsStyle is validated by 'Button' component + bsStyle = _props.bsStyle; + + var props = _objectWithoutProperties(_props, ['children', 'title', 'onClick', 'target', 'href', 'bsStyle']); + + var disabled = props.disabled; + + var button = _react2['default'].createElement( + _Button2['default'], + { + onClick: onClick, + bsStyle: bsStyle, + disabled: disabled, + target: target, + href: href + }, + title + ); + + return _react2['default'].createElement( + _Dropdown2['default'], + props, + button, + _react2['default'].createElement(_SplitToggle2['default'], { + 'aria-label': title, + bsStyle: bsStyle, + disabled: disabled + }), + _react2['default'].createElement( + _Dropdown2['default'].Menu, + null, + children + ) + ); + }; + + return SplitButton; + })(_react2['default'].Component); + + SplitButton.propTypes = _extends({}, _Dropdown2['default'].propTypes, _BootstrapMixin2['default'].propTypes, { + + /** + * @private + */ + onClick: function onClick() {}, + target: _react2['default'].PropTypes.string, + href: _react2['default'].PropTypes.string, + /** + * The content of the split button. + */ + title: _react2['default'].PropTypes.node.isRequired + }); + + SplitButton.defaultProps = { + disabled: false, + dropup: false, + pullRight: false + }; + + SplitButton.Toggle = _SplitToggle2['default']; + + exports['default'] = SplitButton; + module.exports = exports['default']; + // eslint-disable-line + +/***/ }, +/* 233 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _inherits = __webpack_require__(50)['default']; + + var _classCallCheck = __webpack_require__(61)['default']; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _react = __webpack_require__(4); + + var _react2 = _interopRequireDefault(_react); + + var _DropdownToggle = __webpack_require__(174); + + var _DropdownToggle2 = _interopRequireDefault(_DropdownToggle); + + var SplitToggle = (function (_React$Component) { + _inherits(SplitToggle, _React$Component); + + function SplitToggle() { + _classCallCheck(this, SplitToggle); + + _React$Component.apply(this, arguments); + } + + SplitToggle.prototype.render = function render() { + return _react2['default'].createElement(_DropdownToggle2['default'], _extends({}, this.props, { + useAnchor: false, + noCaret: false + })); + }; + + return SplitToggle; + })(_react2['default'].Component); + + exports['default'] = SplitToggle; + + SplitToggle.defaultProps = _DropdownToggle2['default'].defaultProps; + module.exports = exports['default']; + +/***/ }, +/* 234 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _extends = __webpack_require__(9)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _react = __webpack_require__(4); + + var _react2 = _interopRequireDefault(_react); + + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - var _utilsCreateChainedFunction = __webpack_require__(56); + var _utilsCreateChainedFunction = __webpack_require__(6); var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _SafeAnchor = __webpack_require__(100); + var _SafeAnchor = __webpack_require__(49); var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); @@ -14680,6 +15216,8 @@ return /******/ (function(modules) { // webpackBootstrap }, isChildActive: function isChildActive(child) { + var _this = this; + if (child.props.active) { return true; } @@ -14696,7 +15234,7 @@ return /******/ (function(modules) { // webpackBootstrap var isActive = false; _utilsValidComponentChildren2['default'].forEach(child.props.children, function (grandchild) { - if (this.isChildActive(grandchild)) { + if (_this.isChildActive(grandchild)) { isActive = true; } }, this); @@ -14764,26 +15302,30 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 223 */ +/* 235 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _reactDom = __webpack_require__(34); - var _classnames2 = _interopRequireDefault(_classnames); + var _reactDom2 = _interopRequireDefault(_reactDom); - var _utilsTransitionEvents = __webpack_require__(85); + var _utilsTransitionEvents = __webpack_require__(73); var _utilsTransitionEvents2 = _interopRequireDefault(_utilsTransitionEvents); @@ -14802,7 +15344,11 @@ return /******/ (function(modules) { // webpackBootstrap */ onAnimateOutEnd: _react2['default'].PropTypes.func, disabled: _react2['default'].PropTypes.bool, - title: _react2['default'].PropTypes.node + title: _react2['default'].PropTypes.node, + /** + * tabClassName is used as className for the associated NavItem + */ + tabClassName: _react2['default'].PropTypes.string }, getDefaultProps: function getDefaultProps() { @@ -14837,7 +15383,7 @@ return /******/ (function(modules) { // webpackBootstrap setTimeout(this.startAnimateIn, 0); } if (this.state.animateOut) { - _utilsTransitionEvents2['default'].addEndEventListener(_react2['default'].findDOMNode(this), this.stopAnimateOut); + _utilsTransitionEvents2['default'].addEndEventListener(_reactDom2['default'].findDOMNode(this), this.stopAnimateOut); } }, @@ -14886,117 +15432,124 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 224 */ +/* 236 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _objectWithoutProperties = __webpack_require__(67)['default']; - - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _Tabs = __webpack_require__(225); - - var _Tabs2 = _interopRequireDefault(_Tabs); + var _classnames = __webpack_require__(27); - var _TabPane = __webpack_require__(226); - - var _TabPane2 = _interopRequireDefault(_TabPane); - - var _utilsValidComponentChildren = __webpack_require__(55); - - var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); - - var _utilsDeprecationWarning = __webpack_require__(16); + var _classnames2 = _interopRequireDefault(_classnames); - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); + var Table = _react2['default'].createClass({ + displayName: 'Table', - var TabbedArea = _react2['default'].createClass({ - displayName: 'TabbedArea', + propTypes: { + striped: _react2['default'].PropTypes.bool, + bordered: _react2['default'].PropTypes.bool, + condensed: _react2['default'].PropTypes.bool, + hover: _react2['default'].PropTypes.bool, + responsive: _react2['default'].PropTypes.bool + }, - componentWillMount: function componentWillMount() { - _utilsDeprecationWarning2['default']('TabbedArea', 'Tabs', 'https://github.com/react-bootstrap/react-bootstrap/pull/1091'); + getDefaultProps: function getDefaultProps() { + return { + bordered: false, + condensed: false, + hover: false, + responsive: false, + striped: false + }; }, render: function render() { - var _props = this.props; - var children = _props.children; - - var props = _objectWithoutProperties(_props, ['children']); - - var tabs = _utilsValidComponentChildren2['default'].map(children, function (child) { - var _child$props = child.props; - var title = _child$props.tab; - - var others = _objectWithoutProperties(_child$props, ['tab']); - - return _react2['default'].createElement(_TabPane2['default'], _extends({ title: title }, others)); - }); - - return _react2['default'].createElement( - _Tabs2['default'], - props, - tabs + var classes = { + 'table': true, + 'table-striped': this.props.striped, + 'table-bordered': this.props.bordered, + 'table-condensed': this.props.condensed, + 'table-hover': this.props.hover + }; + var table = _react2['default'].createElement( + 'table', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), + this.props.children ); + + return this.props.responsive ? _react2['default'].createElement( + 'div', + { className: 'table-responsive' }, + table + ) : table; } }); - exports['default'] = TabbedArea; + exports['default'] = Table; module.exports = exports['default']; /***/ }, -/* 225 */ +/* 237 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _objectWithoutProperties = __webpack_require__(67)['default']; + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _Object$keys = __webpack_require__(1)['default']; + var _Object$keys = __webpack_require__(75)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _Col = __webpack_require__(86); + var _reactDom = __webpack_require__(34); - var _Col2 = _interopRequireDefault(_Col); + var _reactDom2 = _interopRequireDefault(_reactDom); - var _Grid = __webpack_require__(176); + var _Col = __webpack_require__(74); - var _Grid2 = _interopRequireDefault(_Grid); + var _Col2 = _interopRequireDefault(_Col); - var _Nav = __webpack_require__(201); + var _Nav = __webpack_require__(205); var _Nav2 = _interopRequireDefault(_Nav); - var _NavItem = __webpack_require__(203); + var _NavItem = __webpack_require__(209); var _NavItem2 = _interopRequireDefault(_NavItem); - var _Row = __webpack_require__(221); + var _styleMaps = __webpack_require__(29); - var _Row2 = _interopRequireDefault(_Row); + var _styleMaps2 = _interopRequireDefault(_styleMaps); - var _styleMaps = __webpack_require__(70); + var _keycode = __webpack_require__(94); - var _styleMaps2 = _interopRequireDefault(_styleMaps); + var _keycode2 = _interopRequireDefault(_keycode); + + var _utilsCreateChainedFunction = __webpack_require__(6); + + var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction); - var _utilsValidComponentChildren = __webpack_require__(55); + var _utilsValidComponentChildren = __webpack_require__(7); var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren); @@ -15007,6 +15560,8 @@ return /******/ (function(modules) { // webpackBootstrap return child.props.id ? child.props.id + '___tab' : props.id && props.id + '___tab___' + child.props.eventKey; }; + var findChild = _utilsValidComponentChildren2['default'].find; + function getDefaultActiveKeyFromChildren(children) { var defaultActiveKey = undefined; @@ -15019,6 +15574,29 @@ return /******/ (function(modules) { // webpackBootstrap return defaultActiveKey; } + function move(children, currentKey, keys, moveNext) { + var lastIdx = keys.length - 1; + var stopAt = keys[moveNext ? Math.max(lastIdx, 0) : 0]; + var nextKey = currentKey; + + function getNext() { + var idx = keys.indexOf(nextKey); + nextKey = moveNext ? keys[Math.min(lastIdx, idx + 1)] : keys[Math.max(0, idx - 1)]; + + return findChild(children, function (_child) { + return _child.props.eventKey === nextKey; + }); + } + + var next = getNext(); + + while (next.props.eventKey !== stopAt && next.props.disabled) { + next = getNext(); + } + + return next.props.disabled ? currentKey : next.props.eventKey; + } + var Tabs = _react2['default'].createClass({ displayName: 'Tabs', @@ -15049,14 +15627,19 @@ return /******/ (function(modules) { // webpackBootstrap * specified, it will be treated as `styleMaps.GRID_COLUMNS` minus * `tabWidth`. */ - paneWidth: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.object]) + paneWidth: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.object]), + /** + * Render without clearfix if horizontally positioned + */ + standalone: _react2['default'].PropTypes.bool }, getDefaultProps: function getDefaultProps() { return { animation: true, tabWidth: 2, - position: 'top' + position: 'top', + standalone: false }; }, @@ -15090,6 +15673,22 @@ return /******/ (function(modules) { // webpackBootstrap } }, + componentDidUpdate: function componentDidUpdate() { + var tabs = this._tabs; + var tabIdx = this._eventKeys().indexOf(this.getActiveKey()); + + if (this._needsRefocus) { + this._needsRefocus = false; + if (tabs && tabIdx !== -1) { + var tabNode = _reactDom2['default'].findDOMNode(tabs[tabIdx]); + + if (tabNode) { + tabNode.firstChild.focus(); + } + } + } + }, + handlePaneAnimateOutEnd: function handlePaneAnimateOutEnd() { this.setState({ previousActiveKey: null @@ -15105,9 +15704,10 @@ return /******/ (function(modules) { // webpackBootstrap var bsStyle = _props.bsStyle; var tabWidth = _props.tabWidth; var paneWidth = _props.paneWidth; + var standalone = _props.standalone; var children = _props.children; - var props = _objectWithoutProperties(_props, ['id', 'className', 'style', 'position', 'bsStyle', 'tabWidth', 'paneWidth', 'children']); + var props = _objectWithoutProperties(_props, ['id', 'className', 'style', 'position', 'bsStyle', 'tabWidth', 'paneWidth', 'standalone', 'children']); var isHorizontal = position === 'left' || position === 'right'; @@ -15134,6 +15734,10 @@ return /******/ (function(modules) { // webpackBootstrap var childPanes = _utilsValidComponentChildren2['default'].map(children, this.renderPane); if (isHorizontal) { + if (!standalone) { + containerProps.className = _classnames2['default'](containerProps.className, 'clearfix'); + } + var _getColProps = this.getColProps({ tabWidth: tabWidth, paneWidth: paneWidth }); var tabsColProps = _getColProps.tabsColProps; @@ -15150,44 +15754,37 @@ return /******/ (function(modules) { // webpackBootstrap childPanes ); - var body = undefined; if (position === 'left') { - body = _react2['default'].createElement( - _Row2['default'], + return _react2['default'].createElement( + 'div', containerProps, tabs, panes ); - } else { - body = _react2['default'].createElement( - _Row2['default'], - containerProps, - panes, - tabs - ); } return _react2['default'].createElement( - _Grid2['default'], - null, - body - ); - } else { - return _react2['default'].createElement( 'div', containerProps, - _react2['default'].createElement( - _Nav2['default'], - tabsProps, - childTabs - ), - _react2['default'].createElement( - 'div', - panesProps, - childPanes - ) + panes, + tabs ); } + + return _react2['default'].createElement( + 'div', + containerProps, + _react2['default'].createElement( + _Nav2['default'], + tabsProps, + childTabs + ), + _react2['default'].createElement( + 'div', + panesProps, + childPanes + ) + ); }, getActiveKey: function getActiveKey() { @@ -15212,7 +15809,9 @@ return /******/ (function(modules) { // webpackBootstrap }); }, - renderTab: function renderTab(child) { + renderTab: function renderTab(child, index) { + var _this2 = this; + if (child.props.title == null) { return null; } @@ -15221,15 +15820,26 @@ return /******/ (function(modules) { // webpackBootstrap var eventKey = _child$props.eventKey; var title = _child$props.title; var disabled = _child$props.disabled; + var onKeyDown = _child$props.onKeyDown; + var tabClassName = _child$props.tabClassName; + var _child$props$tabIndex = _child$props.tabIndex; + var tabIndex = _child$props$tabIndex === undefined ? 0 : _child$props$tabIndex; + + var isActive = this.getActiveKey() === eventKey; return _react2['default'].createElement( _NavItem2['default'], { linkId: tabId(this.props, child), - ref: 'tab' + eventKey, + ref: function (ref) { + return (_this2._tabs || (_this2._tabs = []))[index] = ref; + }, 'aria-controls': paneId(this.props, child), + onKeyDown: _utilsCreateChainedFunction2['default'](this.handleKeyDown, onKeyDown), eventKey: eventKey, - disabled: disabled }, + tabIndex: isActive ? tabIndex : -1, + disabled: disabled, + className: tabClassName }, title ); }, @@ -15281,140 +15891,79 @@ return /******/ (function(modules) { // webpackBootstrap previousActiveKey: previousActiveKey }); } - } - }); - - exports['default'] = Tabs; - module.exports = exports['default']; - -/***/ }, -/* 226 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _utilsDeprecationWarning = __webpack_require__(16); - - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); - - var _Tab = __webpack_require__(223); - - var _Tab2 = _interopRequireDefault(_Tab); - - var TabPane = _react2['default'].createClass({ - displayName: 'TabPane', - - componentWillMount: function componentWillMount() { - _utilsDeprecationWarning2['default']('TabPane', 'Tab', 'https://github.com/react-bootstrap/react-bootstrap/pull/1091'); }, - render: function render() { - return _react2['default'].createElement(_Tab2['default'], this.props); - } - }); - - exports['default'] = TabPane; - module.exports = exports['default']; + handleKeyDown: function handleKeyDown(event) { + var keys = this._eventKeys(); + var currentKey = this.getActiveKey() || keys[0]; + var next = undefined; -/***/ }, -/* 227 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _extends = __webpack_require__(58)['default']; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _react = __webpack_require__(32); - - var _react2 = _interopRequireDefault(_react); - - var _classnames = __webpack_require__(68); + switch (event.keyCode) { - var _classnames2 = _interopRequireDefault(_classnames); + case _keycode2['default'].codes.left: + case _keycode2['default'].codes.up: + next = move(this.props.children, currentKey, keys, false); - var Table = _react2['default'].createClass({ - displayName: 'Table', + if (next && next !== currentKey) { + event.preventDefault(); + this.handleSelect(next); + this._needsRefocus = true; + } + break; + case _keycode2['default'].codes.right: + case _keycode2['default'].codes.down: + next = move(this.props.children, currentKey, keys, true); - propTypes: { - striped: _react2['default'].PropTypes.bool, - bordered: _react2['default'].PropTypes.bool, - condensed: _react2['default'].PropTypes.bool, - hover: _react2['default'].PropTypes.bool, - responsive: _react2['default'].PropTypes.bool + if (next && next !== currentKey) { + event.preventDefault(); + this.handleSelect(next); + this._needsRefocus = true; + } + break; + default: + } }, - getDefaultProps: function getDefaultProps() { - return { - bordered: false, - condensed: false, - hover: false, - responsive: false, - striped: false - }; - }, + _eventKeys: function _eventKeys() { + var keys = []; - render: function render() { - var classes = { - 'table': true, - 'table-striped': this.props.striped, - 'table-bordered': this.props.bordered, - 'table-condensed': this.props.condensed, - 'table-hover': this.props.hover - }; - var table = _react2['default'].createElement( - 'table', - _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), - this.props.children - ); + _utilsValidComponentChildren2['default'].forEach(this.props.children, function (_ref2) { + var eventKey = _ref2.props.eventKey; + return keys.push(eventKey); + }); - return this.props.responsive ? _react2['default'].createElement( - 'div', - { className: 'table-responsive' }, - table - ) : table; + return keys; } }); - exports['default'] = Table; + exports['default'] = Tabs; module.exports = exports['default']; /***/ }, -/* 228 */ +/* 238 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); - var _SafeAnchor = __webpack_require__(100); + var _SafeAnchor = __webpack_require__(49); var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); @@ -15444,26 +15993,26 @@ return /******/ (function(modules) { // webpackBootstrap _extends({}, this.props, { href: this.props.href, className: _classnames2['default'](this.props.className, classes) }), _react2['default'].createElement('img', { src: this.props.src, alt: this.props.alt }) ); - } else { - if (this.props.children) { - return _react2['default'].createElement( - 'div', - _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), - _react2['default'].createElement('img', { src: this.props.src, alt: this.props.alt }), - _react2['default'].createElement( - 'div', - { className: 'caption' }, - this.props.children - ) - ); - } else { - return _react2['default'].createElement( + } + + if (this.props.children) { + return _react2['default'].createElement( + 'div', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), + _react2['default'].createElement('img', { src: this.props.src, alt: this.props.alt }), + _react2['default'].createElement( 'div', - _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), - _react2['default'].createElement('img', { src: this.props.src, alt: this.props.alt }) - ); - } + { className: 'caption' }, + this.props.children + ) + ); } + + return _react2['default'].createElement( + 'div', + _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }), + _react2['default'].createElement('img', { src: this.props.src, alt: this.props.alt }) + ); } }); @@ -15471,133 +16020,139 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = exports['default']; /***/ }, -/* 229 */ +/* 239 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _inherits = __webpack_require__(50)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _classCallCheck = __webpack_require__(61)['default']; - exports.__esModule = true; - - var _react = __webpack_require__(32); + var _extends = __webpack_require__(9)['default']; - var _react2 = _interopRequireDefault(_react); + var _objectWithoutProperties = __webpack_require__(26)['default']; - var _classnames = __webpack_require__(68); + var _interopRequireDefault = __webpack_require__(1)['default']; - var _classnames2 = _interopRequireDefault(_classnames); + exports.__esModule = true; - var _BootstrapMixin = __webpack_require__(69); + var _classnames = __webpack_require__(27); - var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); + var _classnames2 = _interopRequireDefault(_classnames); - var _utilsCustomPropTypes = __webpack_require__(53); + var _react = __webpack_require__(4); - var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes); + var _react2 = _interopRequireDefault(_react); - var Tooltip = _react2['default'].createClass({ - displayName: 'Tooltip', + var _reactPropTypesLibIsRequiredForA11y = __webpack_require__(163); - mixins: [_BootstrapMixin2['default']], + var _reactPropTypesLibIsRequiredForA11y2 = _interopRequireDefault(_reactPropTypesLibIsRequiredForA11y); - propTypes: { - /** - * An html id attribute, necessary for accessibility - * @type {string} - * @required - */ - id: _utilsCustomPropTypes2['default'].isRequiredForA11y(_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])), + var Tooltip = (function (_React$Component) { + _inherits(Tooltip, _React$Component); - /** - * Sets the direction the Tooltip is positioned towards. - */ - placement: _react2['default'].PropTypes.oneOf(['top', 'right', 'bottom', 'left']), + function Tooltip() { + _classCallCheck(this, Tooltip); - /** - * The "left" position value for the Tooltip. - */ - positionLeft: _react2['default'].PropTypes.number, - /** - * The "top" position value for the Tooltip. - */ - positionTop: _react2['default'].PropTypes.number, - /** - * The "left" position value for the Tooltip arrow. - */ - arrowOffsetLeft: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]), - /** - * The "top" position value for the Tooltip arrow. - */ - arrowOffsetTop: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]), - /** - * Title text - */ - title: _react2['default'].PropTypes.node - }, - - getDefaultProps: function getDefaultProps() { - return { - placement: 'right' - }; - }, - - render: function render() { - var _classes; - - var classes = (_classes = { - 'tooltip': true - }, _classes[this.props.placement] = true, _classes); + _React$Component.apply(this, arguments); + } - var style = _extends({ - 'left': this.props.positionLeft, - 'top': this.props.positionTop - }, this.props.style); + Tooltip.prototype.render = function render() { + var _props = this.props; + var placement = _props.placement; + var positionLeft = _props.positionLeft; + var positionTop = _props.positionTop; + var arrowOffsetLeft = _props.arrowOffsetLeft; + var arrowOffsetTop = _props.arrowOffsetTop; + var className = _props.className; + var style = _props.style; + var children = _props.children; - var arrowStyle = { - 'left': this.props.arrowOffsetLeft, - 'top': this.props.arrowOffsetTop - }; + var props = _objectWithoutProperties(_props, ['placement', 'positionLeft', 'positionTop', 'arrowOffsetLeft', 'arrowOffsetTop', 'className', 'style', 'children']); return _react2['default'].createElement( 'div', - _extends({ role: 'tooltip' }, this.props, { className: _classnames2['default'](this.props.className, classes), style: style }), - _react2['default'].createElement('div', { className: 'tooltip-arrow', style: arrowStyle }), + _extends({ + role: 'tooltip' + }, props, { + className: _classnames2['default'](className, 'tooltip', placement), + style: _extends({ left: positionLeft, top: positionTop }, style) + }), + _react2['default'].createElement('div', { + className: 'tooltip-arrow', + style: { left: arrowOffsetLeft, top: arrowOffsetTop } + }), _react2['default'].createElement( 'div', { className: 'tooltip-inner' }, - this.props.children + children ) ); - } - }); + }; + + return Tooltip; + })(_react2['default'].Component); exports['default'] = Tooltip; + + Tooltip.propTypes = { + /** + * An html id attribute, necessary for accessibility + * @type {string} + * @required + */ + id: _reactPropTypesLibIsRequiredForA11y2['default'](_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])), + + /** + * The direction the tooltip is positioned towards + */ + placement: _react2['default'].PropTypes.oneOf(['top', 'right', 'bottom', 'left']), + + /** + * The `left` position value for the tooltip + */ + positionLeft: _react2['default'].PropTypes.number, + /** + * The `top` position value for the tooltip + */ + positionTop: _react2['default'].PropTypes.number, + /** + * The `left` position value for the tooltip arrow + */ + arrowOffsetLeft: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]), + /** + * The `top` position value for the tooltip arrow + */ + arrowOffsetTop: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]) + }; + + Tooltip.defaultProps = { + placement: 'right' + }; module.exports = exports['default']; /***/ }, -/* 230 */ +/* 240 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _extends = __webpack_require__(58)['default']; + var _extends = __webpack_require__(9)['default']; - var _interopRequireDefault = __webpack_require__(14)['default']; + var _interopRequireDefault = __webpack_require__(1)['default']; exports.__esModule = true; - var _react = __webpack_require__(32); + var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); - var _classnames = __webpack_require__(68); + var _classnames = __webpack_require__(27); var _classnames2 = _interopRequireDefault(_classnames); - var _BootstrapMixin = __webpack_require__(69); + var _BootstrapMixin = __webpack_require__(28); var _BootstrapMixin2 = _interopRequireDefault(_BootstrapMixin); @@ -15626,52 +16181,6 @@ return /******/ (function(modules) { // webpackBootstrap exports['default'] = Well; module.exports = exports['default']; -/***/ }, -/* 231 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _utilsDeprecationWarning = __webpack_require__(16); - - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); - - var _reactOverlaysLibPortal = __webpack_require__(191); - - var _reactOverlaysLibPortal2 = _interopRequireDefault(_reactOverlaysLibPortal); - - exports['default'] = _utilsDeprecationWarning2['default'].wrapper(_reactOverlaysLibPortal2['default'], { - message: 'The Portal component is deprecated in react-bootstrap. It has been moved to a more generic library: react-overlays. ' + 'You can read more at: ' + 'http://react-bootstrap.github.io/react-overlays/examples/#portal and ' + 'https://github.com/react-bootstrap/react-bootstrap/issues/1084' - }); - module.exports = exports['default']; - -/***/ }, -/* 232 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(14)['default']; - - exports.__esModule = true; - - var _utilsDeprecationWarning = __webpack_require__(16); - - var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning); - - var _reactOverlaysLibPosition = __webpack_require__(206); - - var _reactOverlaysLibPosition2 = _interopRequireDefault(_reactOverlaysLibPosition); - - exports['default'] = _utilsDeprecationWarning2['default'].wrapper(_reactOverlaysLibPosition2['default'], { - message: 'The Position component is deprecated in react-bootstrap. It has been moved to a more generic library: react-overlays. ' + 'You can read more at: ' + 'http://react-bootstrap.github.io/react-overlays/examples/#position and ' + 'https://github.com/react-bootstrap/react-bootstrap/issues/1084' - }); - module.exports = exports['default']; - /***/ } /******/ ]) }); diff --git a/web/static/js/react-bootstrap-0.27.1.min.js b/web/static/js/react-bootstrap-0.27.1.min.js new file mode 100644 index 000000000..6e198ee9a --- /dev/null +++ b/web/static/js/react-bootstrap-0.27.1.min.js @@ -0,0 +1,14 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactBootstrap=t(require("react"),require("react-dom")):e.ReactBootstrap=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r=n(2)["default"],o=n(76)["default"];t.__esModule=!0;var s=n(35),a=r(s),i=n(11),l=r(i),u=n(9),p=r(u),d=n(108),f=r(d);t.Accordion=f["default"];var c=n(109),h=r(c);t.Affix=h["default"];var m=n(54),v=r(m);t.AffixMixin=v["default"];var y=n(110),g=r(y);t.Alert=g["default"];var b=n(111),T=r(b);t.Badge=T["default"];var P=n(7),x=r(P);t.BootstrapMixin=x["default"];var E=n(112),C=r(E);t.Breadcrumb=C["default"];var _=n(113),N=r(_);t.BreadcrumbItem=N["default"];var O=n(24),w=r(O);t.Button=w["default"];var S=n(55),k=r(S);t.ButtonGroup=k["default"];var M=n(56),D=r(M);t.ButtonInput=D["default"];var I=n(114),A=r(I);t.ButtonToolbar=A["default"];var R=n(115),j=r(R);t.Carousel=j["default"];var K=n(116),L=r(K);t.CarouselItem=L["default"];var B=n(57),F=r(B);t.Col=F["default"];var H=n(117),W=r(H);t.CollapsibleNav=W["default"];var U=n(26),V=r(U);t.Dropdown=V["default"];var q=n(118),z=r(q);t.DropdownButton=z["default"];var G=n(33),Y=r(G);t.Glyphicon=Y["default"];var $=n(61),X=r($);t.Grid=X["default"];var Z=n(121),J=r(Z);t.Image=J["default"];var Q=n(122),ee=r(Q);t.Input=ee["default"];var te=n(62),ne=r(te);t.Interpolate=ne["default"];var re=n(123),oe=r(re);t.Jumbotron=oe["default"];var se=n(124),ae=r(se);t.Label=ae["default"];var ie=n(125),le=r(ie);t.ListGroup=le["default"];var ue=n(63),pe=r(ue);t.ListGroupItem=pe["default"];var de=n(126),fe=r(de);t.MenuItem=fe["default"];var ce=n(127),he=r(ce);t.Modal=he["default"];var me=n(64),ve=r(me);t.ModalBody=ve["default"];var ye=n(65),ge=r(ye);t.ModalFooter=ge["default"];var be=n(66),Te=r(be);t.ModalHeader=Te["default"];var Pe=n(67),xe=r(Pe);t.ModalTitle=xe["default"];var Ee=n(68),Ce=r(Ee);t.Nav=Ce["default"];var _e=n(130),Ne=r(_e);t.Navbar=Ne["default"];var Oe=n(69),we=r(Oe);t.NavBrand=we["default"];var Se=n(129),ke=r(Se);t.NavDropdown=ke["default"];var Me=n(70),De=r(Me);t.NavItem=De["default"];var Ie=n(71),Ae=r(Ie);t.Overlay=Ae["default"];var Re=n(131),je=r(Re);t.OverlayTrigger=je["default"];var Ke=n(132),Le=r(Ke);t.PageHeader=Le["default"];var Be=n(133),Fe=r(Be);t.PageItem=Fe["default"];var He=n(134),We=r(He);t.Pager=We["default"];var Ue=n(135),Ve=r(Ue);t.Pagination=Ve["default"];var qe=n(137),ze=r(qe);t.Panel=ze["default"];var Ge=n(72),Ye=r(Ge);t.PanelGroup=Ye["default"];var $e=n(138),Xe=r($e);t.Popover=Xe["default"];var Ze=n(139),Je=r(Ze);t.ProgressBar=Je["default"];var Qe=n(140),et=r(Qe);t.ResponsiveEmbed=et["default"];var tt=n(141),nt=r(tt);t.Row=nt["default"];var rt=n(14),ot=r(rt);t.SafeAnchor=ot["default"];var st=n(142),at=r(st);t.SplitButton=at["default"];var it=r(st);t.SplitButton=it["default"];var lt=n(27),ut=r(lt);t.styleMaps=ut["default"];var pt=n(144),dt=r(pt);t.SubNav=dt["default"];var ft=n(145),ct=r(ft);t.Tab=ct["default"];var ht=n(146),mt=r(ht);t.Table=mt["default"];var vt=n(147),yt=r(vt);t.Tabs=yt["default"];var gt=n(148),bt=r(gt);t.Thumbnail=bt["default"];var Tt=n(149),Pt=r(Tt);t.Tooltip=Pt["default"];var xt=n(150),Et=r(xt);t.Well=Et["default"];var Ct=n(25),_t=r(Ct);t.Collapse=_t["default"];var Nt=n(32),Ot=r(Nt);t.Fade=Ot["default"];var wt=n(59),St=o(wt);t.FormControls=St;var kt={childrenValueInputValidation:a["default"],createChainedFunction:l["default"],ValidComponentChildren:p["default"]};t.utils=kt},function(t,n){t.exports=e},function(e,t){"use strict";t["default"]=function(e){return e&&e.__esModule?e:{"default":e}},t.__esModule=!0},function(e,t,n){"use strict";var r=n(155)["default"];t["default"]=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.__esModule=!0},function(e,t,n){var r;/*! + Copyright (c) 2015 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames + */ +!function(){"use strict";function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e+=" "+n;else if(Array.isArray(n))e+=" "+o.apply(null,n);else if("object"===r)for(var a in n)s.call(n,a)&&n[a]&&(e+=" "+a)}}return e.substr(1)}var s={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=o:(r=function(){return o}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}()},function(e,t){"use strict";t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.__esModule=!0},function(e,t,n){"use strict";var r=n(156)["default"],o=n(158)["default"];t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=r(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o?o(e,t):e.__proto__=t)},t.__esModule=!0},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(1),s=r(o),a=n(27),i=r(a),l=n(236),u=r(l),p={propTypes:{bsClass:u["default"](i["default"].CLASSES),bsStyle:s["default"].PropTypes.oneOf(i["default"].STYLES),bsSize:u["default"](i["default"].SIZES)},getBsClassSet:function(){var e={},t=this.props.bsClass&&i["default"].CLASSES[this.props.bsClass];if(t){e[t]=!0;var n=t+"-",r=this.props.bsSize&&i["default"].SIZES[this.props.bsSize];r&&(e[n+r]=!0),this.props.bsStyle&&(i["default"].STYLES.indexOf(this.props.bsStyle)>=0?e[n+this.props.bsStyle]=!0:e[this.props.bsStyle]=!0)}return e},prefixClass:function(e){return i["default"].CLASSES[this.props.bsClass]+"-"+e}};t["default"]=p,e.exports=t["default"]},function(e,t){"use strict";t["default"]=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},t.__esModule=!0},function(e,t,n){"use strict";function r(e,t,n){var r=0;return d["default"].Children.map(e,function(e){if(d["default"].isValidElement(e)){var o=r;return r++,t.call(n,e,o)}return e})}function o(e,t,n){var r=0;return d["default"].Children.forEach(e,function(e){d["default"].isValidElement(e)&&(t.call(n,e,r),r++)})}function s(e){var t=0;return d["default"].Children.forEach(e,function(e){d["default"].isValidElement(e)&&t++}),t}function a(e){var t=!1;return d["default"].Children.forEach(e,function(e){!t&&d["default"].isValidElement(e)&&(t=!0)}),t}function i(e,t){var n=void 0;return o(e,function(r,o){!n&&t(r,o,e)&&(n=r)}),n}function l(e,t,n){var r=0,o=[];return d["default"].Children.forEach(e,function(e){d["default"].isValidElement(e)&&(t.call(n,e,r)&&o.push(e),r++)}),o}var u=n(2)["default"];t.__esModule=!0;var p=n(1),d=u(p);t["default"]={map:r,forEach:o,numberOf:s,find:i,findValidComponents:l,hasValidComponent:a},e.exports=t["default"]},function(e,n){e.exports=t},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return t.filter(function(e){return null!=e}).reduce(function(e,t){if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(){for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}},null)}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){var r=i.errMsg(e,t,n,". Expected an Element `type`");if("function"!=typeof e[t]){if(a["default"].isValidElement(e[t]))return new Error(r+", not an actual Element");if("string"!=typeof e[t])return new Error(r+" such as a tag name or return value of React.createClass(...)")}}t.__esModule=!0;var s=n(1),a=r(s),i=n(51);t["default"]=i.createChainableTypeChecker(o),e.exports=t["default"]},function(e,t,n){function r(e){if(a.unindexedChars&&s(e)){for(var t=-1,n=e.length,r=Object(e);++t<n;)r[t]=e.charAt(t);return r}return o(e)?e:Object(e)}var o=n(16),s=n(46),a=n(49);e.exports=r},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(11),p=a(u),d=function(e){function t(n){o(this,t),e.call(this,n),this.handleClick=this.handleClick.bind(this)}return r(t,e),t.prototype.handleClick=function(e){void 0===this.props.href&&e.preventDefault()},t.prototype.render=function(){return l["default"].createElement("a",s({role:this.props.href?void 0:"button"},this.props,{onClick:p["default"](this.props.onClick,this.handleClick),href:this.props.href||""}))},t}(l["default"].Component);t["default"]=d,d.propTypes={href:l["default"].PropTypes.string,onClick:l["default"].PropTypes.func},e.exports=t["default"]},function(e,t,n){var r=n(30),o=n(21),s=n(17),a="[object Array]",i=Object.prototype,l=i.toString,u=r(Array,"isArray"),p=u||function(e){return s(e)&&o(e.length)&&l.call(e)==a};e.exports=p},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t){var n=e.exports={version:"1.2.1"};"number"==typeof __e&&(__e=n)},function(e,t){"use strict";function n(e){return e&&e.ownerDocument||document}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";e.exports=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&r>=e}var r=9007199254740991;e.exports=n},function(e,t,n){var r,o,s;!function(n,a){o=[t],r=a,s="function"==typeof r?r.apply(t,o):r,!(void 0!==s&&(e.exports=s))}(this,function(e){var t=e;t.interopRequireDefault=function(e){return e&&e.__esModule?e:{"default":e}},t._extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}})},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=n(12),f=o(d),c=n(56),h=o(c),m=a["default"].createClass({displayName:"Button",mixins:[p["default"]],propTypes:{active:a["default"].PropTypes.bool,disabled:a["default"].PropTypes.bool,block:a["default"].PropTypes.bool,navItem:a["default"].PropTypes.bool,navDropdown:a["default"].PropTypes.bool,componentClass:f["default"],href:a["default"].PropTypes.string,target:a["default"].PropTypes.string,type:a["default"].PropTypes.oneOf(h["default"].types)},getDefaultProps:function(){return{active:!1,block:!1,bsClass:"button",bsStyle:"default",disabled:!1,navItem:!1,navDropdown:!1}},render:function(){var e=this.props.navDropdown?{}:this.getBsClassSet(),t=void 0;return e=r({active:this.props.active,"btn-block":this.props.block},e),this.props.navItem?this.renderNavItem(e):(t=this.props.href||this.props.target||this.props.navDropdown?"renderAnchor":"renderButton",this[t](e))},renderAnchor:function(e){var t=this.props.componentClass||"a",n=this.props.href||"#";return e.disabled=this.props.disabled,a["default"].createElement(t,r({},this.props,{href:n,className:l["default"](this.props.className,e),role:"button"}),this.props.children)},renderButton:function(e){var t=this.props.componentClass||"button";return a["default"].createElement(t,r({},this.props,{type:this.props.type||"button",className:l["default"](this.props.className,e)}),this.props.children)},renderNavItem:function(e){var t={active:this.props.active};return a["default"].createElement("li",{className:l["default"](t)},this.renderAnchor(e))}});t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n=t["offset"+g(e)],r=T[e];return n+parseInt(u["default"](t,r[0]),10)+parseInt(u["default"](t,r[1]),10)}var o=n(6)["default"],s=n(5)["default"],a=n(3)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(41),u=i(l),p=n(1),d=i(p),f=n(103),c=i(f),h=n(52),m=i(h),v=n(11),y=i(v),g=function(e){return e[0].toUpperCase()+e.substr(1)},b=function(e){return e.offsetHeight},T={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]},P=function(e){function t(n,r){s(this,t),e.call(this,n,r),this.onEnterListener=this.handleEnter.bind(this),this.onEnteringListener=this.handleEntering.bind(this),this.onEnteredListener=this.handleEntered.bind(this),this.onExitListener=this.handleExit.bind(this),this.onExitingListener=this.handleExiting.bind(this)}return o(t,e),t.prototype.render=function(){var e=y["default"](this.onEnterListener,this.props.onEnter),t=y["default"](this.onEnteringListener,this.props.onEntering),n=y["default"](this.onEnteredListener,this.props.onEntered),r=y["default"](this.onExitListener,this.props.onExit),o=y["default"](this.onExitingListener,this.props.onExiting);return d["default"].createElement(c["default"],a({ref:"transition"},this.props,{"aria-expanded":this.props.role?this.props["in"]:null,className:"width"===this._dimension()?"width":"",exitedClassName:"collapse",exitingClassName:"collapsing",enteredClassName:"collapse in",enteringClassName:"collapsing",onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:this.props.onExited}),this.props.children)},t.prototype.handleEnter=function(e){var t=this._dimension();e.style[t]="0"},t.prototype.handleEntering=function(e){var t=this._dimension();e.style[t]=this._getScrollDimensionValue(e,t)},t.prototype.handleEntered=function(e){var t=this._dimension();e.style[t]=null},t.prototype.handleExit=function(e){var t=this._dimension();e.style[t]=this.props.getDimensionValue(t,e)+"px"},t.prototype.handleExiting=function(e){var t=this._dimension();b(e),e.style[t]="0"},t.prototype._dimension=function(){return"function"==typeof this.props.dimension?this.props.dimension():this.props.dimension},t.prototype._getTransitionInstance=function(){return this.refs.transition},t.prototype._getScrollDimensionValue=function(e,t){return e["scroll"+g(t)]+"px"},t}(d["default"].Component);P.propTypes={"in":d["default"].PropTypes.bool,unmountOnExit:d["default"].PropTypes.bool,transitionAppear:d["default"].PropTypes.bool,timeout:d["default"].PropTypes.number,duration:m["default"](d["default"].PropTypes.number,"Use `timeout`."),onEnter:d["default"].PropTypes.func,onEntering:d["default"].PropTypes.func,onEntered:d["default"].PropTypes.func,onExit:d["default"].PropTypes.func,onExiting:d["default"].PropTypes.func,onExited:d["default"].PropTypes.func,dimension:d["default"].PropTypes.oneOfType([d["default"].PropTypes.oneOf(["height","width"]),d["default"].PropTypes.func]),getDimensionValue:d["default"].PropTypes.func,role:d["default"].PropTypes.string},P.defaultProps={"in":!1,timeout:300,unmountOnExit:!1,transitionAppear:!1,dimension:"height",getDimensionValue:r},t["default"]=P,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(4),l=a(i),u=n(80),p=a(u),d=n(29),f=a(d),c=n(42),h=a(c),m=n(192),v=a(m),y=n(99),g=a(y),b=n(1),T=a(b),P=n(10),x=a(P),E=n(50),C=a(E),_=n(12),N=a(_),O=n(53),w=a(O),S=n(238),k=a(S),M=n(55),D=a(M),I=n(119),A=a(I),R=n(58),j=a(R),K=n(11),L=a(K),B=n(151),F=a(B),H=n(9),W=a(H),U="toggle-btn",V=j["default"].defaultProps.bsRole,q=A["default"].defaultProps.bsRole,z=function(e){function t(n){o(this,t),e.call(this,n),this.Toggle=j["default"],this.toggleOpen=this.toggleOpen.bind(this),this.handleClick=this.handleClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleClose=this.handleClose.bind(this),this.extractChildren=this.extractChildren.bind(this),this.refineMenu=this.refineMenu.bind(this),this.refineToggle=this.refineToggle.bind(this),this.childExtractors=[{key:"toggle",matches:function(e){return e.props.bsRole===V},refine:this.refineToggle},{key:"menu",exclusive:!0,matches:function(e){return e.props.bsRole===q},refine:this.refineMenu}],this.state={},this.lastOpenEventType=null}return r(t,e),t.prototype.componentDidMount=function(){this.focusNextOnOpen()},t.prototype.componentWillUpdate=function(e){!e.open&&this.props.open&&(this._focusInDropdown=f["default"](x["default"].findDOMNode(this.refs.menu),p["default"](document)))},t.prototype.componentDidUpdate=function(e){this.props.open&&!e.open&&this.focusNextOnOpen(),!this.props.open&&e.open&&this._focusInDropdown&&(this._focusInDropdown=!1,this.focus())},t.prototype.render=function(){var e=this.extractChildren(),t=this.props.componentClass,n=g["default"](this.props,["id","role"]),r={open:this.props.open,disabled:this.props.disabled,dropdown:!this.props.dropup,dropup:this.props.dropup};return T["default"].createElement(t,s({},n,{tabIndex:"-1",className:l["default"](this.props.className,r)}),e)},t.prototype.toggleOpen=function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0],t=!this.props.open;t&&(this.lastOpenEventType=e),this.props.onToggle&&this.props.onToggle(t)},t.prototype.handleClick=function(){this.props.disabled||this.toggleOpen("click")},t.prototype.handleKeyDown=function(e){if(!this.props.disabled)switch(e.keyCode){case h["default"].codes.down:this.props.open?this.refs.menu.focusNext&&this.refs.menu.focusNext():this.toggleOpen("keydown"),e.preventDefault();break;case h["default"].codes.esc:case h["default"].codes.tab:this.handleClose(e)}},t.prototype.handleClose=function(){this.props.open&&this.toggleOpen()},t.prototype.focusNextOnOpen=function(){var e=this.refs.menu;e.focusNext&&("keydown"===this.lastOpenEventType||"menuitem"===this.props.role)&&e.focusNext()},t.prototype.focus=function(){var e=x["default"].findDOMNode(this.refs[U]);e&&e.focus&&e.focus()},t.prototype.extractChildren=function(){var e=this,t=!!this.props.open,n={};return W["default"].map(this.props.children,function(r){var o=v["default"](e.childExtractors,function(e){return e.matches(r)});if(o){if(n[o.key])return!1;n[o.key]=o.exclusive,r=o.refine(r,t)}return r})},t.prototype.refineMenu=function(e,t){var n={ref:"menu",open:t,labelledBy:this.props.id,pullRight:this.props.pullRight};return n.onClose=L["default"](e.props.onClose,this.props.onClose,this.handleClose),n.onSelect=L["default"](e.props.onSelect,this.props.onSelect,this.handleClose),b.cloneElement(e,n,e.props.children)},t.prototype.refineToggle=function(e,t){var n={open:t,id:this.props.id,ref:U,role:this.props.role};return n.onClick=L["default"](e.props.onClick,this.handleClick),n.onKeyDown=L["default"](e.props.onKeyDown,this.handleKeyDown),b.cloneElement(e,n,e.props.children)},t}(T["default"].Component);z.Toggle=j["default"],z.TOGGLE_REF=U,z.TOGGLE_ROLE=V,z.MENU_ROLE=q,z.defaultProps={componentClass:D["default"],alwaysFocusNextOnOpen:!1},z.propTypes={dropup:T["default"].PropTypes.bool,id:w["default"](T["default"].PropTypes.oneOfType([T["default"].PropTypes.string,T["default"].PropTypes.number])),componentClass:N["default"],children:C["default"](F["default"].requiredRoles(V,q),F["default"].exclusiveRoles(q)),disabled:T["default"].PropTypes.bool,pullRight:T["default"].PropTypes.bool,open:T["default"].PropTypes.bool,onClose:T["default"].PropTypes.func,onToggle:T["default"].PropTypes.func,onSelect:T["default"].PropTypes.func,role:T["default"].PropTypes.string},z=k["default"](z,{open:"onToggle"}),z.Toggle=j["default"],z.Menu=A["default"],t["default"]=z,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n={CLASSES:{alert:"alert",button:"btn","button-group":"btn-group","button-toolbar":"btn-toolbar",column:"col","input-group":"input-group",form:"form",glyphicon:"glyphicon",label:"label",thumbnail:"thumbnail","list-group-item":"list-group-item",panel:"panel","panel-group":"panel-group",pagination:"pagination","progress-bar":"progress-bar",nav:"nav",navbar:"navbar",modal:"modal",row:"row",well:"well"},STYLES:["default","primary","success","info","warning","danger","link","inline","tabs","pills"],addStyle:function(e){n.STYLES.push(e)},SIZES:{large:"lg",medium:"md",small:"sm",xsmall:"xs",lg:"lg",md:"md",sm:"sm",xs:"xs"},GRID_COLUMNS:12};t["default"]=n,e.exports=t["default"]},function(e,t,n){e.exports={"default":n(162),__esModule:!0}},function(e,t,n){"use strict";var r=n(20),o=function(){var e=r&&document.documentElement;return e&&e.contains?function(e,t){return e.contains(t)}:e&&e.compareDocumentPosition?function(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}:function(e,t){if(t)do if(t===e)return!0;while(t=t.parentNode);return!1}}();e.exports=o},function(e,t,n){function r(e,t){var n=null==e?void 0:e[t];return o(n)?n:void 0}var o=n(225);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(10),s=r(o),a=n(19),i=r(a);t["default"]=function(e){return i["default"](s["default"].findDOMNode(e))},e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(103),p=a(u),d=n(52),f=a(d),c=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props.timeout||this.props.duration;return l["default"].createElement(p["default"],s({},this.props,{timeout:e,className:"fade",enteredClassName:"in",enteringClassName:"in"}),this.props.children)},t}(l["default"].Component);c.propTypes={"in":l["default"].PropTypes.bool,unmountOnExit:l["default"].PropTypes.bool,transitionAppear:l["default"].PropTypes.bool,timeout:l["default"].PropTypes.number,duration:f["default"](l["default"].PropTypes.number,"Use `timeout`."),onEnter:l["default"].PropTypes.func,onEntering:l["default"].PropTypes.func,onEntered:l["default"].PropTypes.func,onExit:l["default"].PropTypes.func,onExiting:l["default"].PropTypes.func,onExited:l["default"].PropTypes.func},c.defaultProps={"in":!1,timeout:300,unmountOnExit:!1,transitionAppear:!1},t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=a["default"].createClass({displayName:"Glyphicon",propTypes:{bsClass:a["default"].PropTypes.string,glyph:a["default"].PropTypes.string.isRequired,formControlFeedback:a["default"].PropTypes.bool},getDefaultProps:function(){return{bsClass:"glyphicon",formControlFeedback:!1}},render:function(){var e,t=l["default"](this.props.className,(e={},e[this.props.bsClass]=!0,e["glyphicon-"+this.props.glyph]=!0,e["form-control-feedback"]=this.props.formControlFeedback,e));return a["default"].createElement("span",r({},this.props,{className:t}),this.props.children)}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(4),l=a(i),u=n(1),p=a(u),d=n(60),f=a(d),c=n(33),h=a(c),m=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.getInputDOMNode=function(){return this.refs.input},t.prototype.getValue=function(){if("static"===this.props.type)return this.props.value;if(this.props.type)return"select"===this.props.type&&this.props.multiple?this.getSelectedOptions():this.getInputDOMNode().value;throw new Error("Cannot use getValue without specifying input type.")},t.prototype.getChecked=function(){return this.getInputDOMNode().checked},t.prototype.getSelectedOptions=function(){var e=[];return Array.prototype.forEach.call(this.getInputDOMNode().getElementsByTagName("option"),function(t){if(t.selected){var n=t.getAttribute("value")||t.innerHtml;e.push(n)}}),e},t.prototype.isCheckboxOrRadio=function(){return"checkbox"===this.props.type||"radio"===this.props.type},t.prototype.isFile=function(){return"file"===this.props.type},t.prototype.renderInputGroup=function(e){var t=this.props.addonBefore?p["default"].createElement("span",{className:"input-group-addon",key:"addonBefore"},this.props.addonBefore):null,n=this.props.addonAfter?p["default"].createElement("span",{className:"input-group-addon",key:"addonAfter"},this.props.addonAfter):null,r=this.props.buttonBefore?p["default"].createElement("span",{className:"input-group-btn"},this.props.buttonBefore):null,o=this.props.buttonAfter?p["default"].createElement("span",{className:"input-group-btn"},this.props.buttonAfter):null,s=void 0;switch(this.props.bsSize){case"small":s="input-group-sm";break;case"large":s="input-group-lg"}return t||n||r||o?p["default"].createElement("div",{className:l["default"](s,"input-group"),key:"input-group"},t,r,e,n,o):e},t.prototype.renderIcon=function(){if(!this.props.hasFeedback)return null;if(this.props.feedbackIcon)return p["default"].cloneElement(this.props.feedbackIcon,{formControlFeedback:!0});switch(this.props.bsStyle){case"success":return p["default"].createElement(h["default"],{formControlFeedback:!0,glyph:"ok",key:"icon"});case"warning":return p["default"].createElement(h["default"],{formControlFeedback:!0,glyph:"warning-sign",key:"icon"});case"error":return p["default"].createElement(h["default"],{formControlFeedback:!0,glyph:"remove",key:"icon"});default:return p["default"].createElement("span",{className:"form-control-feedback",key:"icon"})}},t.prototype.renderHelp=function(){return this.props.help?p["default"].createElement("span",{className:"help-block",key:"help"},this.props.help):null},t.prototype.renderCheckboxAndRadioWrapper=function(e){var t={checkbox:"checkbox"===this.props.type,radio:"radio"===this.props.type};return p["default"].createElement("div",{className:l["default"](t),key:"checkboxRadioWrapper"},e)},t.prototype.renderWrapper=function(e){return this.props.wrapperClassName?p["default"].createElement("div",{className:this.props.wrapperClassName,key:"wrapper"},e):e},t.prototype.renderLabel=function(e){var t={"control-label":!this.isCheckboxOrRadio()};return t[this.props.labelClassName]=this.props.labelClassName,this.props.label?p["default"].createElement("label",{htmlFor:this.props.id,className:l["default"](t),key:"label"},e,this.props.label):e},t.prototype.renderInput=function(){if(!this.props.type)return this.props.children;switch(this.props.type){case"select":return p["default"].createElement("select",s({},this.props,{className:l["default"](this.props.className,"form-control"),ref:"input",key:"input"}),this.props.children);case"textarea":return p["default"].createElement("textarea",s({},this.props,{className:l["default"](this.props.className,"form-control"),ref:"input",key:"input"}));case"static":return p["default"].createElement("p",s({},this.props,{className:l["default"](this.props.className,"form-control-static"),ref:"input",key:"input"}),this.props.value);default:var e=this.isCheckboxOrRadio()||this.isFile()?"":"form-control";return p["default"].createElement("input",s({},this.props,{className:l["default"](this.props.className,e),ref:"input",key:"input"}))}},t.prototype.renderFormGroup=function(e){return p["default"].createElement(f["default"],this.props,e)},t.prototype.renderChildren=function(){return this.isCheckboxOrRadio()?this.renderWrapper([this.renderCheckboxAndRadioWrapper(this.renderLabel(this.renderInput())),this.renderHelp()]):[this.renderLabel(),this.renderWrapper([this.renderInputGroup(this.renderInput()),this.renderIcon(),this.renderHelp()])]},t.prototype.render=function(){var e=this.renderChildren();return this.renderFormGroup(e)},t}(p["default"].Component);m.propTypes={type:p["default"].PropTypes.string,label:p["default"].PropTypes.node,help:p["default"].PropTypes.node,addonBefore:p["default"].PropTypes.node,addonAfter:p["default"].PropTypes.node,buttonBefore:p["default"].PropTypes.node,buttonAfter:p["default"].PropTypes.node,bsSize:p["default"].PropTypes.oneOf(["small","medium","large"]),bsStyle:p["default"].PropTypes.oneOf(["success","warning","error"]),hasFeedback:p["default"].PropTypes.bool,feedbackIcon:p["default"].PropTypes.node,id:p["default"].PropTypes.oneOfType([p["default"].PropTypes.string,p["default"].PropTypes.number]),groupClassName:p["default"].PropTypes.string,wrapperClassName:p["default"].PropTypes.string,labelClassName:p["default"].PropTypes.string,multiple:p["default"].PropTypes.bool,disabled:p["default"].PropTypes.bool,value:p["default"].PropTypes.any},m.defaultProps={disabled:!1,hasFeedback:!1,multiple:!1},t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){var r=l["default"]("children","value")(e,t,n);return r||(r=a["default"].PropTypes.node(e,t,n)),r}var o=n(2)["default"];t.__esModule=!0,t["default"]=r;var s=n(1),a=o(s),i=n(107),l=o(i);e.exports=t["default"]},function(e,t,n){var r=n(171),o=n(18),s="prototype",a=function(e,t){return function(){return e.apply(t,arguments)}},i=function(e,t,n){var l,u,p,d,f=e&i.G,c=e&i.P,h=f?r:e&i.S?r[t]:(r[t]||{})[s],m=f?o:o[t]||(o[t]={});f&&(n=t);for(l in n)u=!(e&i.F)&&h&&l in h,u&&l in m||(p=u?h[l]:n[l],f&&"function"!=typeof h[l]?d=n[l]:e&i.B&&u?d=a(p,r):e&i.W&&h[l]==p?!function(e){d=function(t){return this instanceof e?new e(t):e(t)},d[s]=e[s]}(p):d=c&&"function"==typeof p?a(Function.call,p):p,m[l]=d,c&&((m[s]||(m[s]={}))[l]=p))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,e.exports=i},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t){"use strict";e.exports=function(e){return e===e.window?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}},function(e,t,n){"use strict";var r=n(29),o=n(39),s=n(19);e.exports=function(e){var t=s(e),n=o(t),a=t&&t.documentElement,i={top:0,left:0,height:0,width:0};if(t)return r(a,e)?(void 0!==e.getBoundingClientRect&&(i=e.getBoundingClientRect()),(i.width||i.height)&&(i={top:i.top+(n.pageYOffset||a.scrollTop)-(a.clientTop||0),left:i.left+(n.pageXOffset||a.scrollLeft)-(a.clientLeft||0),width:(null==i.width?e.offsetWidth:i.width)||0,height:(null==i.height?e.offsetHeight:i.height)||0}),i):i}},function(e,t,n){"use strict";var r=n(83),o=n(189),s=n(184),a=n(185),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var l="",u=t;if("string"==typeof t){if(void 0===n)return e.style[r(t)]||s(e).getPropertyValue(o(t));(u={})[t]=n}for(var p in u)i.call(u,p)&&(u[p]||0===u[p]?l+=o(p)+":"+u[p]+";":a(e,o(p)));e.style.cssText+=";"+l}},function(e,t){t=e.exports=function(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return s[e];var o=String(e),a=n[o.toLowerCase()];if(a)return a;var a=r[o.toLowerCase()];return a?a:1===o.length?o.charCodeAt(0):void 0};var n=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,"delete":46,command:91,"right click":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,"break":19,caps:20,"return":13,escape:27,spc:32,pgup:33,pgdn:33,ins:45,del:46,cmd:91};/*! + * Programatically add the following + */ +for(o=97;123>o;o++)n[String.fromCharCode(o)]=o-32;for(var o=48;58>o;o++)n[o-48]=o;for(o=1;13>o;o++)n["f"+o]=o+111;for(o=0;10>o;o++)n["numpad "+o]=o+96;var s=t.names=t.title={};for(o in n)s[n[o]]=o;for(var a in r)n[a]=r[a]},function(e,t,n){function r(e,t,n){if("function"!=typeof e)return o;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,s){return e.call(t,n,r,o,s)};case 5:return function(n,r,o,s,a){return e.call(t,n,r,o,s,a)}}return function(){return e.apply(t,arguments)}}var o=n(100);e.exports=r},function(e,t,n){function r(e){return null!=e&&s(o(e))}var o=n(90),s=n(21);e.exports=r},function(e,t,n){function r(e){return s(e)&&o(e)&&i.call(e,"callee")&&!l.call(e,"callee")}var o=n(44),s=n(17),a=Object.prototype,i=a.hasOwnProperty,l=a.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){return"string"==typeof e||o(e)&&i.call(e)==s}var o=n(17),s="[object String]",a=Object.prototype,i=a.toString;e.exports=r},function(e,t,n){var r=n(30),o=n(44),s=n(16),a=n(224),i=n(49),l=r(Object,"keys"),u=l?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?i.enumPrototypes:o(e))?a(e):s(e)?l(e):[]}:a;e.exports=u},function(e,t,n){function r(e){if(null==e)return[];p(e)||(e=Object(e));var t=e.length;t=t&&u(t)&&(a(e)||s(e)||d(e))&&t||0;for(var n=e.constructor,r=-1,o=i(n)&&n.prototype||C,c=o===e,h=Array(t),m=t>0,y=f.enumErrorProps&&(e===E||e instanceof Error),g=f.enumPrototypes&&i(e);++r<t;)h[r]=r+"";for(var T in e)g&&"prototype"==T||y&&("message"==T||"name"==T)||m&&l(T,t)||"constructor"==T&&(c||!N.call(e,T))||h.push(T);if(f.nonEnumShadows&&e!==C){var S=e===_?P:e===E?v:O.call(e),k=w[S]||w[b];for(S==b&&(o=C),t=x.length;t--;){T=x[t];var M=k[T];c&&M||(M?!N.call(e,T):e[T]===o[T])||h.push(T)}}return h}var o=n(194),s=n(45),a=n(15),i=n(98),l=n(92),u=n(21),p=n(16),d=n(46),f=n(49),c="[object Array]",h="[object Boolean]",m="[object Date]",v="[object Error]",y="[object Function]",g="[object Number]",b="[object Object]",T="[object RegExp]",P="[object String]",x=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],E=Error.prototype,C=Object.prototype,_=String.prototype,N=C.hasOwnProperty,O=C.toString,w={};w[c]=w[m]=w[g]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},w[h]=w[P]={constructor:!0,toString:!0,valueOf:!0},w[v]=w[y]=w[T]={constructor:!0,toString:!0},w[b]={constructor:!0},o(x,function(e){for(var t in w)if(N.call(w,t)){var n=w[t];n[e]=N.call(n,e)}}),e.exports=r},function(e,t){var n=Array.prototype,r=Error.prototype,o=Object.prototype,s=o.propertyIsEnumerable,a=n.splice,i={};!function(e){var t=function(){this.x=e},n={0:e,length:e},o=[];t.prototype={valueOf:e,y:e};for(var l in new t)o.push(l);i.enumErrorProps=s.call(r,"message")||s.call(r,"name"),i.enumPrototypes=s.call(t,"prototype"),i.nonEnumShadows=!/valueOf/.test(o),i.ownLast="x"!=o[0],i.spliceObjects=(a.call(n,0,1),!n[0]),i.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),e.exports=i},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];if(void 0===t)throw new Error("No validations provided");if(t.some(function(e){return"function"!=typeof e}))throw new Error("Invalid arguments, must be functions");if(0===t.length)throw new Error("No validations provided");return function(e,n,r){for(var o=0;o<t.length;o++){var s=t[o](e,n,r);if(void 0!==s&&null!==s)return s}}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n,r){return"Invalid prop '"+t+"' of value '"+e[t]+"'"+(" supplied to '"+n+"'"+r)}function r(e){function t(t,n,r,o){return o=o||"<<anonymous>>",null!=n[r]?e(n,r,o):t?new Error("Required prop '"+r+"' was not specified in '"+o+"'."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}t.__esModule=!0,t.errMsg=n,t.createChainableTypeChecker=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return function(n,r,o){return null!=n[r]&&a["default"](!1,'"'+r+'" property of "'+o+'" has been deprecated.\n'+t),e(n,r,o)}}t.__esModule=!0,t["default"]=o;var s=n(23),a=r(s);e.exports=t["default"]},function(e,t){"use strict";function n(e){return function(t,n,r){return null==t[n]?new Error("The prop '"+n+"' is required to make '"+r+"' accessible for users using assistive technologies such as screen readers"):e(t,n,r)}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(1),s=r(o),a=n(10),i=r(a),l=n(75),u=r(l),p=n(40),d=r(p),f=n(73),c=r(f),h={propTypes:{offset:s["default"].PropTypes.number,offsetTop:s["default"].PropTypes.number,offsetBottom:s["default"].PropTypes.number},getInitialState:function(){return{affixClass:"affix-top"}},getPinnedOffset:function(e){return this.pinnedOffset?this.pinnedOffset:(e.className=e.className.replace(/affix-top|affix-bottom|affix/,""),e.className+=e.className.length?" affix":"affix",this.pinnedOffset=d["default"](e).top-window.pageYOffset,this.pinnedOffset)},checkPosition:function(){var e=void 0,t=void 0,n=void 0,r=void 0,o=void 0,s=void 0,a=void 0,l=void 0,p=void 0;this.isMounted()&&(e=i["default"].findDOMNode(this),t=u["default"].getDocumentHeight(),n=window.pageYOffset,r=d["default"](e),"top"===this.affixed&&(r.top+=n),o=null!=this.props.offsetTop?this.props.offsetTop:this.props.offset,s=null!=this.props.offsetBottom?this.props.offsetBottom:this.props.offset,(null!=o||null!=s)&&(null==o&&(o=0),null==s&&(s=0),a=null!=this.unpin&&n+this.unpin<=r.top?!1:null!=s&&r.top+e.offsetHeight>=t-s?"bottom":null!=o&&o>=n?"top":!1,this.affixed!==a&&(null!=this.unpin&&(e.style.top=""),l="affix"+(a?"-"+a:""),this.affixed=a,this.unpin="bottom"===a?this.getPinnedOffset(e):null,"bottom"===a&&(e.className=e.className.replace(/affix-top|affix-bottom|affix/,"affix-bottom"),p=t-s-e.offsetHeight-d["default"](e).top),this.setState({affixClass:l,affixPositionTop:p}))))},checkPositionWithEventLoop:function(){setTimeout(this.checkPosition,0)},componentDidMount:function(){this._onWindowScrollListener=c["default"].listen(window,"scroll",this.checkPosition),this._onDocumentClickListener=c["default"].listen(u["default"].ownerDocument(this),"click",this.checkPositionWithEventLoop)},componentWillUnmount:function(){this._onWindowScrollListener&&this._onWindowScrollListener.remove(),this._onDocumentClickListener&&this._onDocumentClickListener.remove()},componentDidUpdate:function(e,t){t.affixClass===this.state.affixClass&&this.checkPositionWithEventLoop()}};t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=n(50),f=o(d),c=a["default"].createClass({displayName:"ButtonGroup",mixins:[p["default"]],propTypes:{vertical:a["default"].PropTypes.bool,justified:a["default"].PropTypes.bool,block:f["default"](a["default"].PropTypes.bool,function(e){return e.block&&!e.vertical?new Error("The block property requires the vertical property to be set to have any effect"):void 0})},getDefaultProps:function(){return{block:!1,bsClass:"button-group",justified:!1,vertical:!1}},render:function(){var e=this.getBsClassSet();return e["btn-group"]=!this.props.vertical,e["btn-group-vertical"]=this.props.vertical,e["btn-group-justified"]=this.props.justified,e["btn-block"]=this.props.block,a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(8)["default"],a=n(3)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(24),d=i(p),f=n(60),c=i(f),h=n(34),m=i(h),v=n(35),y=i(v),g=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.renderFormGroup=function(e){var t=this.props,n=(t.bsStyle,t.value,s(t,["bsStyle","value"]));return u["default"].createElement(c["default"],n,e)},t.prototype.renderInput=function(){var e=this.props,t=e.children,n=e.value,r=s(e,["children","value"]),o=t?t:n;return u["default"].createElement(d["default"],a({},r,{componentClass:"input",ref:"input",key:"input",value:o}))},t}(m["default"]);g.types=["button","reset","submit"],g.defaultProps={type:"button"},g.propTypes={type:u["default"].PropTypes.oneOf(g.types),bsStyle:function(){return null},children:y["default"],value:y["default"]},t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(28)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(27),d=s(p),f=n(12),c=s(f),h=i["default"].createClass({displayName:"Col",propTypes:{xs:i["default"].PropTypes.number,sm:i["default"].PropTypes.number,md:i["default"].PropTypes.number,lg:i["default"].PropTypes.number,xsOffset:i["default"].PropTypes.number,smOffset:i["default"].PropTypes.number,mdOffset:i["default"].PropTypes.number,lgOffset:i["default"].PropTypes.number,xsPush:i["default"].PropTypes.number,smPush:i["default"].PropTypes.number,mdPush:i["default"].PropTypes.number,lgPush:i["default"].PropTypes.number,xsPull:i["default"].PropTypes.number,smPull:i["default"].PropTypes.number,mdPull:i["default"].PropTypes.number,lgPull:i["default"].PropTypes.number,componentClass:c["default"]},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this,t=this.props.componentClass,n={};return o(d["default"].SIZES).forEach(function(t){var r=d["default"].SIZES[t],o=r,s=r+"-";e.props[o]&&(n["col-"+s+e.props[o]]=!0),o=r+"Offset",s=r+"-offset-",e.props[o]>=0&&(n["col-"+s+e.props[o]]=!0),o=r+"Push",s=r+"-push-",e.props[o]>=0&&(n["col-"+s+e.props[o]]=!0),o=r+"Pull",s=r+"-pull-",e.props[o]>=0&&(n["col-"+s+e.props[o]]=!0)},this),i["default"].createElement(t,r({},this.props,{className:u["default"](this.props.className,n)}),this.props.children)}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=n(24),f=a(d),c=n(107),h=a(c),m=n(14),v=a(m),y=l["default"].createElement("span",null," ",l["default"].createElement("span",{className:"caret"})),g=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props.noCaret?null:y,t={"dropdown-toggle":!0},n=this.props.useAnchor?v["default"]:f["default"];return l["default"].createElement(n,s({},this.props,{className:p["default"](t,this.props.className),type:"button","aria-haspopup":!0,"aria-expanded":this.props.open}),this.props.title||this.props.children,e)},t}(l["default"].Component);t["default"]=g;var b=h["default"]("title","children");g.defaultProps={open:!1,useAnchor:!1,bsRole:"toggle"},g.propTypes={bsRole:l["default"].PropTypes.string,children:b,noCaret:l["default"].PropTypes.bool,open:l["default"].PropTypes.bool,title:b,useAnchor:l["default"].PropTypes.bool},g.isToggle=!0,g.titleProp="title",g.onClickProp="onClick",e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(120),s=r(o);t.Static=s["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e={"form-group":!this.props.standalone,"form-group-lg":!this.props.standalone&&"large"===this.props.bsSize,"form-group-sm":!this.props.standalone&&"small"===this.props.bsSize,"has-feedback":this.props.hasFeedback,"has-success":"success"===this.props.bsStyle,"has-warning":"warning"===this.props.bsStyle,"has-error":"error"===this.props.bsStyle};return i["default"].createElement("div",{className:u["default"](e,this.props.groupClassName)},this.props.children)},t}(i["default"].Component);p.defaultProps={hasFeedback:!1,standalone:!1},p.propTypes={standalone:i["default"].PropTypes.bool,hasFeedback:i["default"].PropTypes.bool,bsSize:function(e){return e.standalone&&void 0!==e.bsSize?new Error("bsSize will not be used when `standalone` is set."):i["default"].PropTypes.oneOf(["small","medium","large"]).apply(null,arguments)},bsStyle:i["default"].PropTypes.oneOf(["success","warning","error"]),groupClassName:i["default"].PropTypes.string},t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(12),p=o(u),d=a["default"].createClass({displayName:"Grid",propTypes:{fluid:a["default"].PropTypes.bool,componentClass:p["default"]},getDefaultProps:function(){return{componentClass:"div",fluid:!1}},render:function(){var e=this.props.componentClass,t=this.props.fluid?"container-fluid":"container";return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,t)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(9),l=o(i),u=/\%\((.+?)\)s/,p=a["default"].createClass({displayName:"Interpolate",propTypes:{component:a["default"].PropTypes.node,format:a["default"].PropTypes.string,unsafe:a["default"].PropTypes.bool},getDefaultProps:function(){return{component:"span",unsafe:!1}},render:function(){var e=l["default"].hasValidComponent(this.props.children)||"string"==typeof this.props.children?this.props.children:this.props.format,t=this.props.component,n=this.props.unsafe===!0,o=r({},this.props);if(delete o.children,delete o.format,delete o.component,delete o.unsafe,n){var s=e.split(u).reduce(function(e,t,n){var r=void 0;if(n%2===0?r=t:(r=o[t],delete o[t]),a["default"].isValidElement(r))throw new Error("cannot interpolate a React component into unsafe text");return e+=r},"");return o.dangerouslySetInnerHTML={__html:s},a["default"].createElement(t,o)}var i=e.split(u).reduce(function(e,t,n){var r=void 0;if(n%2===0){if(0===t.length)return e;r=t}else r=o[t],delete o[t];return e.push(r),e},[]);return a["default"].createElement(t,o,i)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(7),l=o(i),u=n(4),p=o(u),d=a["default"].createClass({displayName:"ListGroupItem",mixins:[l["default"]],propTypes:{bsStyle:a["default"].PropTypes.oneOf(["danger","info","success","warning"]),className:a["default"].PropTypes.string,active:a["default"].PropTypes.any,disabled:a["default"].PropTypes.any,header:a["default"].PropTypes.node,listItem:a["default"].PropTypes.bool,onClick:a["default"].PropTypes.func,href:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"list-group-item",listItem:!1}},render:function(){var e=this.getBsClassSet();return e.active=this.props.active,e.disabled=this.props.disabled,this.props.href?this.renderAnchor(e):this.props.onClick?this.renderButton(e):this.props.listItem?this.renderLi(e):this.renderSpan(e)},renderLi:function(e){return a["default"].createElement("li",r({},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},renderAnchor:function(e){return a["default"].createElement("a",r({},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},renderButton:function(e){return a["default"].createElement("button",r({type:"button"},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},renderSpan:function(e){return a["default"].createElement("span",r({},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},renderStructuredContent:function(){var e=void 0;e=a["default"].isValidElement(this.props.header)?s.cloneElement(this.props.header,{key:"header",className:p["default"](this.props.header.props.className,"list-group-item-heading")}):a["default"].createElement("h4",{key:"header",className:"list-group-item-heading"},this.props.header);var t=a["default"].createElement("p",{key:"content",className:"list-group-item-text"},this.props.children);return[e,t]}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("div",s({},this.props,{className:p["default"](this.props.className,this.props.modalClassName)}),this.props.children)},t}(l["default"].Component);d.propTypes={modalClassName:l["default"].PropTypes.string},d.defaultProps={modalClassName:"modal-body"},t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("div",s({},this.props,{className:p["default"](this.props.className,this.props.modalClassName)}),this.props.children)},t}(l["default"].Component);d.propTypes={modalClassName:l["default"].PropTypes.string},d.defaultProps={modalClassName:"modal-footer"},t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("div",s({},this.props,{className:p["default"](this.props.className,this.props.modalClassName)}),this.props.closeButton&&l["default"].createElement("button",{className:"close",onClick:this.props.onHide},l["default"].createElement("span",{"aria-hidden":"true"},"×")),this.props.children)},t}(l["default"].Component);d.__isModalHeader=!0,d.propTypes={"aria-label":l["default"].PropTypes.string,modalClassName:l["default"].PropTypes.string,closeButton:l["default"].PropTypes.bool,onHide:l["default"].PropTypes.func},d.defaultProps={"aria-label":"Close",modalClassName:"modal-header",closeButton:!1},t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("h4",s({},this.props,{className:p["default"](this.props.className,this.props.modalClassName)}),this.props.children)},t}(l["default"].Component);d.propTypes={modalClassName:l["default"].PropTypes.string},d.defaultProps={modalClassName:"modal-title"},t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(7),l=o(i),u=n(25),p=o(u),d=n(4),f=o(d),c=n(9),h=o(c),m=n(11),v=o(m),y=a["default"].createClass({displayName:"Nav",mixins:[l["default"]],propTypes:{activeHref:a["default"].PropTypes.string,activeKey:a["default"].PropTypes.any,bsStyle:a["default"].PropTypes.oneOf(["tabs","pills"]),stacked:a["default"].PropTypes.bool,justified:a["default"].PropTypes.bool,onSelect:a["default"].PropTypes.func,collapsible:a["default"].PropTypes.bool,className:a["default"].PropTypes.string,id:a["default"].PropTypes.oneOfType([a["default"].PropTypes.string,a["default"].PropTypes.number]),ulClassName:a["default"].PropTypes.string,ulId:a["default"].PropTypes.string,expanded:a["default"].PropTypes.bool,navbar:a["default"].PropTypes.bool,eventKey:a["default"].PropTypes.any,pullRight:a["default"].PropTypes.bool,right:a["default"].PropTypes.bool},getDefaultProps:function(){return{bsClass:"nav",collapsible:!1,expanded:!0,justified:!1,navbar:!1,pullRight:!1,right:!1,stacked:!1}},render:function(){var e=this.props.collapsible?"navbar-collapse":null;return this.props.navbar&&!this.props.collapsible?this.renderUl():a["default"].createElement(p["default"],{"in":this.props.expanded},a["default"].createElement("nav",r({},this.props,{className:f["default"](this.props.className,e)}),this.renderUl()))},renderUl:function(){var e=this.getBsClassSet();return e["nav-stacked"]=this.props.stacked,e["nav-justified"]=this.props.justified,e["navbar-nav"]=this.props.navbar,e["pull-right"]=this.props.pullRight,e["navbar-right"]=this.props.right,a["default"].createElement("ul",r({},this.props,{role:"tabs"===this.props.bsStyle?"tablist":null,className:f["default"](this.props.ulClassName,e),id:this.props.ulId,ref:"ul"}),h["default"].map(this.props.children,this.renderNavItem))},getChildActiveProp:function(e){return e.props.active?!0:null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey?!0:null!=this.props.activeHref&&e.props.href===this.props.activeHref?!0:e.props.active},renderNavItem:function(e,t){return s.cloneElement(e,{role:"tabs"===this.props.bsStyle?"tab":null,active:this.getChildActiveProp(e),activeKey:this.props.activeKey,activeHref:this.props.activeHref,onSelect:v["default"](e.props.onSelect,this.props.onSelect),key:e.key?e.key:t,navItem:!0})}});t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(8)["default"],a=n(3)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(4),u=i(l),p=n(1),d=i(p),f=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,r=s(e,["className","children"]);return d["default"].isValidElement(n)?d["default"].cloneElement(n,{className:u["default"](n.props.className,t,"navbar-brand")}):d["default"].createElement("span",a({},r,{className:u["default"](t,"navbar-brand")}),n)},t}(d["default"].Component);f.propTypes={bsRole:d["default"].PropTypes.string},f.defaultProps={bsRole:"brand"},t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(8)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(7),d=s(p),f=n(14),c=s(f),h=i["default"].createClass({displayName:"NavItem",mixins:[d["default"]],propTypes:{linkId:i["default"].PropTypes.string,onSelect:i["default"].PropTypes.func,active:i["default"].PropTypes.bool,disabled:i["default"].PropTypes.bool,href:i["default"].PropTypes.string,role:i["default"].PropTypes.string,title:i["default"].PropTypes.node,eventKey:i["default"].PropTypes.any,target:i["default"].PropTypes.string,"aria-controls":i["default"].PropTypes.string},getDefaultProps:function(){return{active:!1,disabled:!1}},render:function(){var e=this.props,t=e.role,n=e.linkId,s=e.disabled,a=e.active,l=e.href,p=e.title,d=e.target,f=e.children,h=e.tabIndex,m=e["aria-controls"],v=r(e,["role","linkId","disabled","active","href","title","target","children","tabIndex","aria-controls"]),y={active:a,disabled:s},g={role:t,href:l,title:p,target:d,tabIndex:h,id:n,onClick:this.handleClick};return t||"#"!==l||(g.role="button"),i["default"].createElement("li",o({},v,{role:"presentation",className:u["default"](v.className,y)}),i["default"].createElement(c["default"],o({},g,{"aria-selected":a,"aria-controls":m}),f))},handleClick:function(e){this.props.onSelect&&(e.preventDefault(),this.props.disabled||this.props.onSelect(this.props.eventKey,this.props.href,this.props.target))}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(8)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(230),d=i(p),f=n(12),c=i(f),h=n(32),m=i(h),v=n(4),y=i(v),g=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.animation,r=a(e,["children","animation"]);return n===!0&&(n=m["default"]),n||(t=l.cloneElement(t,{className:y["default"]("in",t.props.className)})),u["default"].createElement(d["default"],s({},r,{transition:n}),t)},t}(u["default"].Component);g.propTypes=s({},d["default"].propTypes,{show:u["default"].PropTypes.bool,rootClose:u["default"].PropTypes.bool,onHide:u["default"].PropTypes.func,animation:u["default"].PropTypes.oneOfType([u["default"].PropTypes.bool,c["default"]]),onEnter:u["default"].PropTypes.func,onEntering:u["default"].PropTypes.func,onEntered:u["default"].PropTypes.func,onExit:u["default"].PropTypes.func,onExiting:u["default"].PropTypes.func,onExited:u["default"].PropTypes.func}),g.defaultProps={animation:m["default"],rootClose:!1,show:!1},t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(8)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(7),d=s(p),f=n(9),c=s(f),h=i["default"].createClass({displayName:"PanelGroup",mixins:[d["default"]],propTypes:{accordion:i["default"].PropTypes.bool,activeKey:i["default"].PropTypes.any,className:i["default"].PropTypes.string,children:i["default"].PropTypes.node,defaultActiveKey:i["default"].PropTypes.any,onSelect:i["default"].PropTypes.func},getDefaultProps:function(){return{accordion:!1,bsClass:"panel-group"}},getInitialState:function(){var e=this.props.defaultActiveKey;return{activeKey:e}},render:function(){var e=this.getBsClassSet(),t=this.props,n=t.className,s=r(t,["className"]);return this.props.accordion&&(s.role="tablist"),i["default"].createElement("div",o({},s,{className:u["default"](n,e),onSelect:null}),c["default"].map(s.children,this.renderPanel))},renderPanel:function(e,t){var n=null!=this.props.activeKey?this.props.activeKey:this.state.activeKey,r={bsStyle:e.props.bsStyle||this.props.bsStyle,key:e.key?e.key:t,ref:e.ref};return this.props.accordion&&(r.headerRole="tab",r.panelRole="tabpanel",r.collapsible=!0,r.expanded=e.props.eventKey===n,r.onSelect=this.handleSelect),a.cloneElement(e,r)},shouldComponentUpdate:function(){return!this._isChanging},handleSelect:function(e,t){e.preventDefault(),this.props.onSelect&&(this._isChanging=!0,this.props.onSelect(t),this._isChanging=!1),this.state.activeKey===t&&(t=null),this.setState({activeKey:t})}});t["default"]=h,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0}};t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(){var e=document.createElement("div"),t=e.style;"AnimationEvent"in window||delete a.animationend.animation,"TransitionEvent"in window||delete a.transitionend.transition;for(var n in a){var r=a[n];for(var o in r)if(o in t){i.push(r[o]);break}}}function r(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}t.__esModule=!0;var s=!("undefined"==typeof window||!window.document||!window.document.createElement),a={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},i=[];s&&n();var l={addEndEventListener:function(e,t){return 0===i.length?void window.setTimeout(t,0):void i.forEach(function(n){r(e,n,t)})},removeEndEventListener:function(e,t){0!==i.length&&i.forEach(function(n){o(e,n,t)})}};t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){var t=u["default"].findDOMNode(e);return d["default"](t&&t.ownerDocument||document)}function o(e){var t=r(e);return c["default"](t)}function s(){return Math.max(document.documentElement.offsetHeight,document.height,document.body.scrollHeight,document.body.offsetHeight)}function a(e){var t={width:e.offsetWidth||0,height:e.offsetHeight||0};if("undefined"!=typeof e.getBoundingClientRect){var n=e.getBoundingClientRect(),r=n.width,o=n.height;t.width=r||t.width,t.height=o||t.height}return t}var i=n(2)["default"];t.__esModule=!0;var l=n(10),u=i(l),p=n(19),d=i(p),f=n(180),c=i(f);t["default"]={ownerWindow:o,ownerDocument:r,getDocumentHeight:s,getSize:a},e.exports=t["default"]},function(e,t){"use strict";t["default"]=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t},t.__esModule=!0},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){e.exports=function(e,t){var r=n(36),o=(n(18).Object||{})[e]||Object[e],s={};s[e]=t(o),r(r.S+r.F*n(77)(function(){o(1)}),"Object",s)}},function(e,t,n){var r=n(169);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";function r(){var e=void 0===arguments[0]?document:arguments[0];try{return e.activeElement}catch(t){}}var o=n(22);t.__esModule=!0,t["default"]=r;var s=n(19);o.interopRequireDefault(s);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(20),o=function(){};r&&(o=function(){return document.addEventListener?function(e,t,n,r){return e.addEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.attachEvent("on"+t,n)}:void 0}()),e.exports=o},function(e,t,n){"use strict";var r=n(39);e.exports=function(e,t){var n=r(e);return void 0===t?n?"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop:e.scrollTop:void(n?n.scrollTo("pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft,t):e.scrollTop=t)}},function(e,t,n){"use strict";var r=n(187),o=/^-ms-/;e.exports=function(e){return r(e.replace(o,"ms-"))}},function(e,t){function n(e,t){if("function"!=typeof e)throw new TypeError(r);return t=o(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,s=o(n.length-t,0),a=Array(s);++r<s;)a[r]=n[t+r];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,n[0],a);case 2:return e.call(this,n[0],n[1],a)}var i=Array(t+1);for(r=-1;++r<t;)i[r]=n[r];return i[t]=a,e.apply(this,i)}}var r="Expected a function",o=Math.max;e.exports=n},function(e,t,n){function r(e,t,n,u){u||(u=[]);for(var p=-1,d=e.length;++p<d;){var f=e[p];l(f)&&i(f)&&(n||a(f)||s(f))?t?r(f,t,n,u):o(u,f):n||(u[u.length]=f)}return u}var o=n(196),s=n(45),a=n(15),i=n(44),l=n(17);e.exports=r},function(e,t,n){var r=n(216),o=r();e.exports=o},function(e,t,n){function r(e,t,n){if(null!=e){e=o(e),void 0!==n&&n in e&&(t=[n]);for(var r=0,s=t.length;null!=e&&s>r;)e=o(e)[t[r++]];return r&&r==s?e:void 0}}var o=n(13);e.exports=r},function(e,t,n){function r(e,t,n,i,l,u){return e===t?!0:null==e||null==t||!s(e)&&!a(t)?e!==e&&t!==t:o(e,t,r,n,i,l,u)}var o=n(206),s=n(16),a=n(17);e.exports=r},function(e,t,n){function r(e){return function(t){return null==t?void 0:o(t)[e]}}var o=n(13);e.exports=r},function(e,t,n){var r=n(89),o=r("length");e.exports=o},function(e,t){var n=function(){try{Object({toString:0}+"")}catch(e){return function(){return!1}}return function(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}}();e.exports=n},function(e,t){function n(e,t){return e="number"==typeof e||r.test(e)?+e:-1,t=null==t?o:t,e>-1&&e%1==0&&t>e}var r=/^\d+$/,o=9007199254740991;e.exports=n},function(e,t,n){function r(e,t){var n=typeof e;if("string"==n&&i.test(e)||"number"==n)return!0;if(o(e))return!1;var r=!a.test(e);return r||null!=t&&e in s(t)}var o=n(15),s=n(13),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=r},function(e,t,n){function r(e){return e===e&&!o(e)}var o=n(16);e.exports=r},function(e,t,n){function r(e,t){e=o(e);for(var n=-1,r=t.length,s={};++n<r;){var a=t[n];a in e&&(s[a]=e[a])}return s}var o=n(13);e.exports=r},function(e,t,n){function r(e,t){var n={};return o(e,function(e,r,o){ +t(e,r,o)&&(n[r]=e)}),n}var o=n(203);e.exports=r},function(e,t,n){function r(e){if(s(e))return e;var t=[];return o(e).replace(a,function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)}),t}var o=n(212),s=n(15),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,i=/\\(\\)?/g;e.exports=r},function(e,t,n){function r(e){return o(e)&&i.call(e)==s}var o=n(16),s="[object Function]",a=Object.prototype,i=a.toString;e.exports=r},function(e,t,n){var r=n(195),o=n(199),s=n(85),a=n(43),i=n(48),l=n(95),u=n(96),p=n(84),d=p(function(e,t){if(null==e)return{};if("function"!=typeof t[0]){var t=r(s(t),String);return l(e,o(i(e),t))}var n=a(t[0],t[1],3);return u(e,function(e,t,r){return!n(e,t,r)})});e.exports=d},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(1),s=r(o),a=n(10),i=r(a),l=n(106),u=r(l),p=n(31),d=r(p),f=n(104),c=r(f),h=s["default"].createClass({displayName:"Portal",propTypes:{container:s["default"].PropTypes.oneOfType([u["default"],s["default"].PropTypes.func])},componentDidMount:function(){this._renderOverlay()},componentDidUpdate:function(){this._renderOverlay()},componentWillUnmount:function(){this._unrenderOverlay(),this._unmountOverlayTarget()},_mountOverlayTarget:function(){this._overlayTarget||(this._overlayTarget=document.createElement("div"),this.getContainerDOMNode().appendChild(this._overlayTarget))},_unmountOverlayTarget:function(){this._overlayTarget&&(this.getContainerDOMNode().removeChild(this._overlayTarget),this._overlayTarget=null)},_renderOverlay:function(){var e=this.props.children?s["default"].Children.only(this.props.children):null;null!==e?(this._mountOverlayTarget(),this._overlayInstance=i["default"].unstable_renderSubtreeIntoContainer(this,e,this._overlayTarget)):(this._unrenderOverlay(),this._unmountOverlayTarget())},_unrenderOverlay:function(){this._overlayTarget&&(i["default"].unmountComponentAtNode(this._overlayTarget),this._overlayInstance=null)},render:function(){return null},getMountNode:function(){return this._overlayTarget},getOverlayDOMNode:function(){if(!this.isMounted())throw new Error("getOverlayDOMNode(): A component must be mounted to have a DOM node.");return this._overlayInstance?this._overlayInstance.getWrappedDOMNode?this._overlayInstance.getWrappedDOMNode():i["default"].findDOMNode(this._overlayInstance):null},getContainerDOMNode:function(){return c["default"](this.props.container,d["default"](this).body)}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}function a(){var e=y+"_"+g++;return{id:e,suppressRootClose:function(t){t.nativeEvent[e]=!0}}}t.__esModule=!0;var i=n(1),l=r(i),u=n(10),p=r(u),d=n(232),f=r(d),c=n(233),h=r(c),m=n(31),v=r(m),y="__click_was_inside",g=0,b=function(e){function t(n){o(this,t),e.call(this,n),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleDocumentKeyUp=this.handleDocumentKeyUp.bind(this);var r=a(),s=r.id,i=r.suppressRootClose;this._suppressRootId=s,this._suppressRootCloseHandler=i}return s(t,e),t.prototype.bindRootCloseHandlers=function(){var e=v["default"](this);this._onDocumentClickListener=f["default"](e,"click",this.handleDocumentClick),this._onDocumentKeyupListener=f["default"](e,"keyup",this.handleDocumentKeyUp)},t.prototype.handleDocumentClick=function(e){e[this._suppressRootId]||this.props.onRootClose()},t.prototype.handleDocumentKeyUp=function(e){27===e.keyCode&&this.props.onRootClose()},t.prototype.unbindRootCloseHandlers=function(){this._onDocumentClickListener&&this._onDocumentClickListener.remove(),this._onDocumentKeyupListener&&this._onDocumentKeyupListener.remove()},t.prototype.componentDidMount=function(){this.bindRootCloseHandlers()},t.prototype.render=function(){var e=this.props,t=e.noWrap,n=e.children,r=l["default"].Children.only(n);return t?l["default"].cloneElement(r,{onClick:h["default"](this._suppressRootCloseHandler,r.props.onClick)}):l["default"].createElement("div",{onClick:this._suppressRootCloseHandler},r)},t.prototype.getWrappedDOMNode=function(){var e=p["default"].findDOMNode(this);return this.props.noWrap?e:e.firstChild},t.prototype.componentWillUnmount=function(){this.unbindRootCloseHandlers()},t}(l["default"].Component);t["default"]=b,b.displayName="RootCloseWrapper",b.propTypes={onRootClose:l["default"].PropTypes.func.isRequired,noWrap:l["default"].PropTypes.bool},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}function i(){}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(1),p=r(u),d=n(10),f=r(d),c=n(186),h=r(c),m=n(81),v=r(m),y=n(4),g=r(y),b=h["default"].end,T=0;t.UNMOUNTED=T;var P=1;t.EXITED=P;var x=2;t.ENTERING=x;var E=3;t.ENTERED=E;var C=4;t.EXITING=C;var _=function(e){function t(n,r){s(this,t),e.call(this,n,r);var o=void 0;o=n["in"]?n.transitionAppear?P:E:n.unmountOnExit?T:P,this.state={status:o},this.nextCallback=null}return a(t,e),t.prototype.componentDidMount=function(){this.props.transitionAppear&&this.props["in"]&&this.performEnter(this.props)},t.prototype.componentWillReceiveProps=function(e){var t=this.state.status;e["in"]?t===C?this.performEnter(e):this.props.unmountOnExit?t===T&&this.setState({status:P}):t===P&&this.performEnter(e):(t===x||t===E)&&this.performExit(e)},t.prototype.componentDidUpdate=function(){this.props.unmountOnExit&&this.state.status===P&&(this.props["in"]?this.performEnter(this.props):this.setState({status:T}))},t.prototype.componentWillUnmount=function(){this.cancelNextCallback()},t.prototype.performEnter=function(e){var t=this;this.cancelNextCallback();var n=f["default"].findDOMNode(this);e.onEnter(n),this.safeSetState({status:x},function(){t.props.onEntering(n),t.onTransitionEnd(n,function(){t.safeSetState({status:E},function(){t.props.onEntered(n)})})})},t.prototype.performExit=function(e){var t=this;this.cancelNextCallback();var n=f["default"].findDOMNode(this);e.onExit(n),this.safeSetState({status:C},function(){t.props.onExiting(n),t.onTransitionEnd(n,function(){t.safeSetState({status:P},function(){t.props.onExited(n)})})})},t.prototype.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.prototype.safeSetState=function(e,t){this.setState(e,this.setNextCallback(t))},t.prototype.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},t.prototype.onTransitionEnd=function(e,t){this.setNextCallback(t),e?(v["default"](e,b,this.nextCallback),setTimeout(this.nextCallback,this.props.timeout)):setTimeout(this.nextCallback,0)},t.prototype.render=function(){var e=this.state.status;if(e===T)return null;var n=this.props,r=n.children,s=n.className,a=o(n,["children","className"]);Object.keys(t.propTypes).forEach(function(e){return delete a[e]});var i=void 0;e===P?i=this.props.exitedClassName:e===x?i=this.props.enteringClassName:e===E?i=this.props.enteredClassName:e===C&&(i=this.props.exitingClassName);var u=p["default"].Children.only(r);return p["default"].cloneElement(u,l({},a,{className:g["default"](u.props.className,s,i)}))},t}(p["default"].Component);_.propTypes={"in":p["default"].PropTypes.bool,unmountOnExit:p["default"].PropTypes.bool,transitionAppear:p["default"].PropTypes.bool,timeout:p["default"].PropTypes.number,exitedClassName:p["default"].PropTypes.string,exitingClassName:p["default"].PropTypes.string,enteredClassName:p["default"].PropTypes.string,enteringClassName:p["default"].PropTypes.string,onEnter:p["default"].PropTypes.func,onEntering:p["default"].PropTypes.func,onEntered:p["default"].PropTypes.func,onExit:p["default"].PropTypes.func,onExiting:p["default"].PropTypes.func,onExited:p["default"].PropTypes.func},_.displayName="Transition",_.defaultProps={"in":!1,unmountOnExit:!1,transitionAppear:!1,timeout:5e3,onEnter:i,onEntering:i,onEntered:i,onExit:i,onExiting:i,onExited:i},t["default"]=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return e="function"==typeof e?e():e,a["default"].findDOMNode(e)||t}t.__esModule=!0,t["default"]=o;var s=n(10),a=r(s);e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n,r){return"Invalid prop '"+t+"' of value '"+e[t]+"'"+(" supplied to '"+n+"'"+r)}function r(e){function t(t,n,r,o){return o=o||"<<anonymous>>",null!=n[r]?e(n,r,o):t?new Error("Required prop '"+r+"' was not specified in '"+o+"'."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}t.__esModule=!0,t.errMsg=n,t.createChainableTypeChecker=r},function(e,t,n){"use strict";function r(e,t,n){return"object"!=typeof e[t]||"function"!=typeof e[t].render&&1!==e[t].nodeType?new Error(o.errMsg(e,t,n,", expected a DOM element or an object that has a `render` method")):void 0}t.__esModule=!0;var o=n(105);t["default"]=o.createChainableTypeChecker(r),e.exports=t["default"]},function(e,t){"use strict";function n(){function e(e,t,r){var o=n.map(function(t){return e[t]}).reduce(function(e,t){return e+(void 0!==t?1:0)},0);if(o>1){var s=n[0],a=n.slice(1),i=a.join(", ")+" and "+s;return new Error("Invalid prop '"+t+"', only one of the following may be provided: "+i)}}for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(72),l=o(i),u=a["default"].createClass({displayName:"Accordion",render:function(){return a["default"].createElement(l["default"],r({},this.props,{accordion:!0}),this.props.children)}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(54),p=o(u),d=a["default"].createClass({displayName:"Affix",mixins:[p["default"]],render:function(){var e=r({top:this.state.affixPositionTop},this.props.style);return a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,this.state.affixClass),style:e}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=a["default"].createClass({displayName:"Alert",mixins:[p["default"]],propTypes:{onDismiss:a["default"].PropTypes.func,dismissAfter:a["default"].PropTypes.number,closeLabel:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"alert",bsStyle:"info",closeLabel:"Close Alert"}},renderDismissButton:function(){return a["default"].createElement("button",{type:"button",className:"close",onClick:this.props.onDismiss,"aria-hidden":"true"},a["default"].createElement("span",null,"×"))},renderSrOnlyDismissButton:function(){return a["default"].createElement("button",{type:"button",className:"close sr-only",onClick:this.props.onDismiss},this.props.closeLabel)},render:function(){var e=this.getBsClassSet(),t=!!this.props.onDismiss;return e["alert-dismissable"]=t,a["default"].createElement("div",r({},this.props,{role:"alert",className:l["default"](this.props.className,e)}),t?this.renderDismissButton():null,this.props.children,t?this.renderSrOnlyDismissButton():null)},componentDidMount:function(){this.props.dismissAfter&&this.props.onDismiss&&(this.dismissTimer=setTimeout(this.props.onDismiss,this.props.dismissAfter))},componentWillUnmount:function(){clearTimeout(this.dismissTimer)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(9),l=o(i),u=n(4),p=o(u),d=a["default"].createClass({displayName:"Badge",propTypes:{pullRight:a["default"].PropTypes.bool},getDefaultProps:function(){return{pullRight:!1}},hasContent:function(){return l["default"].hasValidComponent(this.props.children)||a["default"].Children.count(this.props.children)>1||"string"==typeof this.props.children||"number"==typeof this.props.children},render:function(){var e={"pull-right":this.props.pullRight,badge:this.hasContent()};return a["default"].createElement("span",r({},this.props,{className:p["default"](this.props.className,e)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(8)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(9),d=s(p),f=i["default"].createClass({displayName:"Breadcrumb",propTypes:{bsClass:i["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"breadcrumb"}},render:function(){var e=this.props,t=e.className,n=r(e,["className"]);return i["default"].createElement("ol",o({},n,{role:"navigation","aria-label":"breadcrumbs",className:u["default"](t,this.props.bsClass)}),d["default"].map(this.props.children,this.renderBreadcrumbItem))},renderBreadcrumbItem:function(e,t){return a.cloneElement(e,{key:e.key?e.key:t})}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(8)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(4),i=s(a),l=n(1),u=s(l),p=n(23),d=s(p),f=n(14),c=s(f),h=u["default"].createClass({displayName:"BreadcrumbItem",propTypes:{active:u["default"].PropTypes.bool,id:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),linkId:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),href:u["default"].PropTypes.string,title:u["default"].PropTypes.node,target:u["default"].PropTypes.string},getDefaultProps:function(){return{active:!1}},render:function(){var e=this.props,t=e.active,n=e.className,s=e.id,a=e.linkId,l=e.children,p=e.href,f=e.title,h=e.target,m=r(e,["active","className","id","linkId","children","href","title","target"]);d["default"](!(p&&t),"[react-bootstrap] `href` and `active` properties cannot be set at the same time");var v={href:p,title:f,target:h,id:a};return u["default"].createElement("li",{id:s,className:i["default"](n,{active:t})},t?u["default"].createElement("span",m,l):u["default"].createElement(c["default"],o({},m,v),l))}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=a["default"].createClass({displayName:"ButtonToolbar",mixins:[p["default"]],getDefaultProps:function(){return{bsClass:"button-toolbar"}},render:function(){var e=this.getBsClassSet();return a["default"].createElement("div",r({},this.props,{role:"toolbar",className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=n(9),f=o(d),c=n(33),h=o(c),m=a["default"].createClass({displayName:"Carousel",mixins:[p["default"]],propTypes:{slide:a["default"].PropTypes.bool,indicators:a["default"].PropTypes.bool,interval:a["default"].PropTypes.number,controls:a["default"].PropTypes.bool,pauseOnHover:a["default"].PropTypes.bool,wrap:a["default"].PropTypes.bool,onSelect:a["default"].PropTypes.func,onSlideEnd:a["default"].PropTypes.func,activeIndex:a["default"].PropTypes.number,defaultActiveIndex:a["default"].PropTypes.number,direction:a["default"].PropTypes.oneOf(["prev","next"]),prevIcon:a["default"].PropTypes.node,nextIcon:a["default"].PropTypes.node},getDefaultProps:function(){return{slide:!0,interval:5e3,pauseOnHover:!0,wrap:!0,indicators:!0,controls:!0,prevIcon:a["default"].createElement(h["default"],{glyph:"chevron-left"}),nextIcon:a["default"].createElement(h["default"],{glyph:"chevron-right"})}},getInitialState:function(){return{activeIndex:null==this.props.defaultActiveIndex?0:this.props.defaultActiveIndex,previousActiveIndex:null,direction:null}},getDirection:function(e,t){return e===t?null:e>t?"prev":"next"},componentWillReceiveProps:function(e){var t=this.getActiveIndex();null!=e.activeIndex&&e.activeIndex!==t&&(clearTimeout(this.timeout),this.setState({previousActiveIndex:t,direction:null!=e.direction?e.direction:this.getDirection(t,e.activeIndex)}))},componentDidMount:function(){this.waitForNext()},componentWillUnmount:function(){clearTimeout(this.timeout)},next:function(e){e&&e.preventDefault();var t=this.getActiveIndex()+1,n=f["default"].numberOf(this.props.children);if(t>n-1){if(!this.props.wrap)return;t=0}this.handleSelect(t,"next")},prev:function(e){e&&e.preventDefault();var t=this.getActiveIndex()-1;if(0>t){if(!this.props.wrap)return;t=f["default"].numberOf(this.props.children)-1}this.handleSelect(t,"prev")},pause:function(){this.isPaused=!0,clearTimeout(this.timeout)},play:function(){this.isPaused=!1,this.waitForNext()},waitForNext:function(){!this.isPaused&&this.props.slide&&this.props.interval&&null==this.props.activeIndex&&(this.timeout=setTimeout(this.next,this.props.interval))},handleMouseOver:function(){this.props.pauseOnHover&&this.pause()},handleMouseOut:function(){this.isPaused&&this.play()},render:function(){var e={carousel:!0,slide:this.props.slide};return a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e),onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut}),this.props.indicators?this.renderIndicators():null,a["default"].createElement("div",{className:"carousel-inner",ref:"inner"},f["default"].map(this.props.children,this.renderItem)),this.props.controls?this.renderControls():null)},renderPrev:function(){return a["default"].createElement("a",{className:"left carousel-control",href:"#prev",key:0,onClick:this.prev},this.props.prevIcon)},renderNext:function(){return a["default"].createElement("a",{className:"right carousel-control",href:"#next",key:1,onClick:this.next},this.props.nextIcon)},renderControls:function(){if(!this.props.wrap){var e=this.getActiveIndex(),t=f["default"].numberOf(this.props.children);return[0!==e?this.renderPrev():null,e!==t-1?this.renderNext():null]}return[this.renderPrev(),this.renderNext()]},renderIndicator:function(e,t){var n=t===this.getActiveIndex()?"active":null;return a["default"].createElement("li",{key:t,className:n,onClick:this.handleSelect.bind(this,t,null)})},renderIndicators:function(){var e=this,t=[];return f["default"].forEach(this.props.children,function(n,r){t.push(e.renderIndicator(n,r)," ")},this),a["default"].createElement("ol",{className:"carousel-indicators"},t)},getActiveIndex:function(){return null!=this.props.activeIndex?this.props.activeIndex:this.state.activeIndex},handleItemAnimateOutEnd:function(){var e=this;this.setState({previousActiveIndex:null,direction:null},function(){e.waitForNext(),e.props.onSlideEnd&&e.props.onSlideEnd()})},renderItem:function(e,t){var n=this.getActiveIndex(),r=t===n,o=null!=this.state.previousActiveIndex&&this.state.previousActiveIndex===t&&this.props.slide;return s.cloneElement(e,{active:r,ref:e.ref,key:e.key?e.key:t,index:t,animateOut:o,animateIn:r&&null!=this.state.previousActiveIndex&&this.props.slide,direction:this.state.direction,onAnimateOutEnd:o?this.handleItemAnimateOutEnd:null})},handleSelect:function(e,t){if(clearTimeout(this.timeout),this.isMounted()){var n=this.getActiveIndex();if(t=t||this.getDirection(n,e),this.props.onSelect&&this.props.onSelect(e,t),null==this.props.activeIndex&&e!==n){if(null!=this.state.previousActiveIndex)return;this.setState({activeIndex:e,previousActiveIndex:n,direction:t})}}}});t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(4),a=o(s),i=n(1),l=o(i),u=n(10),p=o(u),d=n(74),f=o(d),c=l["default"].createClass({displayName:"CarouselItem",propTypes:{direction:l["default"].PropTypes.oneOf(["prev","next"]),onAnimateOutEnd:l["default"].PropTypes.func,active:l["default"].PropTypes.bool,animateIn:l["default"].PropTypes.bool,animateOut:l["default"].PropTypes.bool,caption:l["default"].PropTypes.node,index:l["default"].PropTypes.number},getInitialState:function(){return{direction:null}},getDefaultProps:function(){return{active:!1,animateIn:!1,animateOut:!1}},handleAnimateOutEnd:function(){this.props.onAnimateOutEnd&&this.isMounted()&&this.props.onAnimateOutEnd(this.props.index)},componentWillReceiveProps:function(e){this.props.active!==e.active&&this.setState({direction:null})},componentDidUpdate:function(e){!this.props.active&&e.active&&f["default"].addEndEventListener(p["default"].findDOMNode(this),this.handleAnimateOutEnd),this.props.active!==e.active&&setTimeout(this.startAnimation,20)},startAnimation:function(){this.isMounted()&&this.setState({direction:"prev"===this.props.direction?"right":"left"})},render:function(){var e={item:!0,active:this.props.active&&!this.props.animateIn||this.props.animateOut,next:this.props.active&&this.props.animateIn&&"next"===this.props.direction,prev:this.props.active&&this.props.animateIn&&"prev"===this.props.direction};return this.state.direction&&(this.props.animateIn||this.props.animateOut)&&(e[this.state.direction]=!0),l["default"].createElement("div",r({},this.props,{className:a["default"](this.props.className,e)}),this.props.children,this.props.caption?this.renderCaption():null)},renderCaption:function(){return l["default"].createElement("div",{className:"carousel-caption"},this.props.caption)}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(1),s=r(o),a=n(7),i=r(a),l=n(25),u=r(l),p=n(4),d=r(p),f=n(9),c=r(f),h=n(11),m=r(h),v=s["default"].createClass({displayName:"CollapsibleNav",mixins:[i["default"]],propTypes:{onSelect:s["default"].PropTypes.func,activeHref:s["default"].PropTypes.string,activeKey:s["default"].PropTypes.any,collapsible:s["default"].PropTypes.bool,expanded:s["default"].PropTypes.bool,eventKey:s["default"].PropTypes.any},getDefaultProps:function(){return{collapsible:!1,expanded:!1}},render:function(){var e=this.props.collapsible?"navbar-collapse":null,t=this.props.collapsible?this.renderCollapsibleNavChildren:this.renderChildren,n=s["default"].createElement("div",{eventKey:this.props.eventKey,className:d["default"](this.props.className,e)},c["default"].map(this.props.children,t));return this.props.collapsible?s["default"].createElement(u["default"],{"in":this.props.expanded},n):n},getChildActiveProp:function(e){return e.props.active?!0:null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey?!0:null!=this.props.activeHref&&e.props.href===this.props.activeHref?!0:e.props.active},renderChildren:function(e,t){var n=e.key?e.key:t;return o.cloneElement(e,{activeKey:this.props.activeKey,activeHref:this.props.activeHref,ref:"nocollapse_"+n,key:n,navItem:!0})},renderCollapsibleNavChildren:function(e,t){var n=e.key?e.key:t;return o.cloneElement(e,{active:this.getChildActiveProp(e),activeKey:this.props.activeKey,activeHref:this.props.activeHref,onSelect:m["default"](e.props.onSelect,this.props.onSelect),ref:"collapsible_"+n,key:n,navItem:!0})}});t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(8)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(7),d=i(p),f=n(26),c=i(f),h=n(99),m=i(h),v=function(e){function t(n){o(this,t),e.call(this,n)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.title,n=a(e,["title"]),r=m["default"](n,c["default"].ControlledComponent.propTypes);return u["default"].createElement(c["default"],n,u["default"].createElement(c["default"].Toggle,r,t),u["default"].createElement(c["default"].Menu,null,this.props.children))},t}(u["default"].Component);v.propTypes=s({noCaret:u["default"].PropTypes.bool,title:u["default"].PropTypes.node.isRequired},c["default"].propTypes,d["default"].propTypes),v.defaultProps={pullRight:!1,dropup:!1,navItem:!1,noCaret:!1},t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(8)["default"],a=n(3)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(4),u=i(l),p=n(42),d=i(p),f=n(1),c=i(f),h=n(10),m=i(h),v=n(102),y=i(v),g=n(9),b=i(g),T=n(11),P=i(T),x=function(e){function t(n){o(this,t),e.call(this,n),this.focusNext=this.focusNext.bind(this),this.focusPrevious=this.focusPrevious.bind(this),this.getFocusableMenuItems=this.getFocusableMenuItems.bind(this),this.getItemsAndActiveIndex=this.getItemsAndActiveIndex.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}return r(t,e),t.prototype.handleKeyDown=function(e){switch(e.keyCode){case d["default"].codes.down:this.focusNext(),e.preventDefault();break;case d["default"].codes.up:this.focusPrevious(),e.preventDefault();break;case d["default"].codes.esc:case d["default"].codes.tab:this.props.onClose(e)}},t.prototype.focusNext=function(){var e=this.getItemsAndActiveIndex(),t=e.items,n=e.activeItemIndex;return 0!==t.length?n===t.length-1?void t[0].focus():void t[n+1].focus():void 0},t.prototype.focusPrevious=function(){var e=this.getItemsAndActiveIndex(),t=e.items,n=e.activeItemIndex;return 0===n?void t[t.length-1].focus():void t[n-1].focus()},t.prototype.getItemsAndActiveIndex=function(){var e=this.getFocusableMenuItems(),t=document.activeElement,n=e.indexOf(t);return{items:e,activeItemIndex:n}},t.prototype.getFocusableMenuItems=function(){var e=m["default"].findDOMNode(this);return void 0===e?[]:[].slice.call(e.querySelectorAll('[tabIndex="-1"]'),0)},t.prototype.render=function(){var e=this,t=this.props,n=t.children,r=t.onSelect,o=t.pullRight,i=t.className,l=t.labelledBy,p=t.open,d=t.onClose,f=s(t,["children","onSelect","pullRight","className","labelledBy","open","onClose"]),h=b["default"].map(n,function(t){var n=t.props||{};return c["default"].cloneElement(t,{onKeyDown:P["default"](n.onKeyDown,e.handleKeyDown),onSelect:P["default"](n.onSelect,r)},n.children)}),m={"dropdown-menu":!0,"dropdown-menu-right":o},v=c["default"].createElement("ul",a({className:u["default"](i,m),role:"menu","aria-labelledby":l},f),h);return p&&(v=c["default"].createElement(y["default"],{noWrap:!0,onRootClose:d},v)),v},t}(c["default"].Component);x.defaultProps={bsRole:"menu",pullRight:!1},x.propTypes={open:c["default"].PropTypes.bool,pullRight:c["default"].PropTypes.bool,onClose:c["default"].PropTypes.func,labelledBy:c["default"].PropTypes.oneOfType([c["default"].PropTypes.string,c["default"].PropTypes.number]),onSelect:c["default"].PropTypes.func},t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(4),p=a(u),d=n(34),f=a(d),c=n(35),h=a(c),m=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.getValue=function(){var e=this.props,t=e.children,n=e.value;return t?t:n},t.prototype.renderInput=function(){return l["default"].createElement("p",s({},this.props,{className:p["default"](this.props.className,"form-control-static"),ref:"input",key:"input"}),this.getValue())},t}(f["default"]);m.propTypes={value:h["default"],children:h["default"]},t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=a["default"].createClass({displayName:"Image",propTypes:{responsive:a["default"].PropTypes.bool,rounded:a["default"].PropTypes.bool,circle:a["default"].PropTypes.bool,thumbnail:a["default"].PropTypes.bool},getDefaultProps:function(){return{responsive:!1,rounded:!1,circle:!1,thumbnail:!1}},render:function(){var e={"img-responsive":this.props.responsive,"img-rounded":this.props.rounded,"img-circle":this.props.circle,"img-thumbnail":this.props.thumbnail};return a["default"].createElement("img",r({},this.props,{className:l["default"](this.props.className,e)}))}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(2)["default"],a=n(76)["default"];t.__esModule=!0;var i=n(1),l=s(i),u=n(34),p=s(u),d=n(59),f=a(d),c=n(154),h=s(c),m=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return"static"===this.props.type?(h["default"]("Input type=static","FormControls.Static"),l["default"].createElement(f.Static,this.props)):e.prototype.render.call(this)},t}(p["default"]);m.propTypes={type:l["default"].PropTypes.string},t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(12),p=o(u),d=a["default"].createClass({displayName:"Jumbotron",propTypes:{componentClass:p["default"]},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props.componentClass;return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,"jumbotron")}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=a["default"].createClass({displayName:"Label",mixins:[p["default"]],getDefaultProps:function(){return{bsClass:"label",bsStyle:"default"}},render:function(){var e=this.getBsClassSet();return a["default"].createElement("span",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(63),p=a(u),d=n(4),f=a(d),c=n(9),h=a(c),m=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this,t=h["default"].map(this.props.children,function(e,t){return i.cloneElement(e,{key:e.key?e.key:t})});if(this.areCustomChildren(t)){var n=this.props.componentClass;return l["default"].createElement(n,s({},this.props,{className:f["default"](this.props.className,"list-group")}),t)}var r=!1;return this.props.children?h["default"].forEach(this.props.children,function(t){e.isAnchorOrButton(t.props)&&(r=!0)}):r=!0,r?this.renderDiv(t):this.renderUL(t)},t.prototype.isAnchorOrButton=function(e){return e.href||e.onClick},t.prototype.areCustomChildren=function(e){var t=!1;return h["default"].forEach(e,function(e){e.type!==p["default"]&&(t=!0)},this),t},t.prototype.renderUL=function(e){var t=h["default"].map(e,function(e){return i.cloneElement(e,{listItem:!0})});return l["default"].createElement("ul",s({},this.props,{className:f["default"](this.props.className,"list-group")}),t)},t.prototype.renderDiv=function(e){return l["default"].createElement("div",s({},this.props,{className:f["default"](this.props.className,"list-group")}),e)},t}(l["default"].Component);m.defaultProps={componentClass:"div"},m.propTypes={className:l["default"].PropTypes.string,componentClass:l["default"].PropTypes.oneOf(["ul","div"]),id:l["default"].PropTypes.oneOfType([l["default"].PropTypes.string,l["default"].PropTypes.number])}, +t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(50),d=s(p),f=n(14),c=s(f),h=function(e){function t(n){o(this,t),e.call(this,n),this.handleClick=this.handleClick.bind(this)}return r(t,e),t.prototype.handleClick=function(e){(!this.props.href||this.props.disabled)&&e.preventDefault(),this.props.disabled||this.props.onSelect&&this.props.onSelect(e,this.props.eventKey)},t.prototype.render=function(){if(this.props.divider)return i["default"].createElement("li",{role:"separator",className:"divider"});if(this.props.header)return i["default"].createElement("li",{role:"heading",className:"dropdown-header"},this.props.children);var e={disabled:this.props.disabled,active:this.props.active};return i["default"].createElement("li",{role:"presentation",className:u["default"](this.props.className,e),style:this.props.style},i["default"].createElement(c["default"],{role:"menuitem",tabIndex:"-1",id:this.props.id,target:this.props.target,title:this.props.title,href:this.props.href||"",onKeyDown:this.props.onKeyDown,onClick:this.handleClick},this.props.children))},t}(i["default"].Component);t["default"]=h,h.propTypes={active:i["default"].PropTypes.bool,disabled:i["default"].PropTypes.bool,divider:d["default"](i["default"].PropTypes.bool,function(e){return e.divider&&e.children?new Error("Children will not be rendered for dividers"):void 0}),eventKey:i["default"].PropTypes.oneOfType([i["default"].PropTypes.number,i["default"].PropTypes.string]),header:i["default"].PropTypes.bool,href:i["default"].PropTypes.string,target:i["default"].PropTypes.string,title:i["default"].PropTypes.string,onKeyDown:i["default"].PropTypes.func,onSelect:i["default"].PropTypes.func,id:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.number])},h.defaultProps={divider:!1,disabled:!1,header:!1},e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n=g["default"].ownerDocument(t);return e===n.body||e===n.documentElement?n.documentElement.clientHeight:e.clientHeight}function o(e){return e.props.container&&v["default"].findDOMNode(e.props.container)||g["default"].ownerDocument(e).body}function s(e,t){var n=g["default"].ownerDocument(e),r=!n.addEventListener,o=void 0;return G&&G.remove(),r?(document.attachEvent("onfocusin",t),o=function(){return document.detachEvent("onfocusin",t)}):(document.addEventListener("focus",t,!0),o=function(){return document.removeEventListener("focus",t,!0)}),G={remove:o}}var a=n(3)["default"],i=n(8)["default"],l=n(157)["default"],u=n(28)["default"],p=n(2)["default"];t.__esModule=!0;var d=n(4),f=p(d),c=n(1),h=p(c),m=n(10),v=p(m),y=n(75),g=p(y),b=n(190),T=p(b),P=n(73),x=p(P),E=n(11),C=p(E),_=n(12),N=p(_),O=n(20),w=p(O),S=n(29),k=p(S),M=n(80),D=p(M),I=n(101),A=p(I),R=n(32),j=p(R),K=n(128),L=p(K),B=n(64),F=p(B),H=n(66),W=p(H),U=n(67),V=p(U),q=n(65),z=p(q),G=void 0,Y=h["default"].createClass({displayName:"Modal",propTypes:a({},A["default"].propTypes,L["default"].propTypes,{backdrop:h["default"].PropTypes.oneOf(["static",!0,!1]),keyboard:h["default"].PropTypes.bool,animation:h["default"].PropTypes.bool,dialogComponent:N["default"],autoFocus:h["default"].PropTypes.bool,enforceFocus:h["default"].PropTypes.bool,bsStyle:h["default"].PropTypes.string,show:h["default"].PropTypes.bool}),getDefaultProps:function(){return{bsClass:"modal",dialogComponent:L["default"],show:!1,animation:!0,backdrop:!0,keyboard:!0,autoFocus:!0,enforceFocus:!0}},getInitialState:function(){return{exited:!this.props.show}},render:function(){var e=this.props,t=(e.children,e.animation),n=e.backdrop,r=i(e,["children","animation","backdrop"]),o=r.onExit,s=r.onExiting,l=r.onEnter,u=r.onEntering,p=r.onEntered,d=!!r.show,c=r.dialogComponent,m=d||t&&!this.state.exited;if(!m)return null;var v=h["default"].createElement(c,a({},r,{ref:this._setDialogRef,className:f["default"](this.props.className,{"in":d&&!t}),onClick:n===!0?this.handleBackdropClick:null}),this.renderContent());return t&&(v=h["default"].createElement(j["default"],{transitionAppear:!0,unmountOnExit:!0,"in":d,timeout:Y.TRANSITION_DURATION,onExit:o,onExiting:s,onExited:this.handleHidden,onEnter:l,onEntering:u,onEntered:p},v)),n&&(v=this.renderBackdrop(v)),h["default"].createElement(A["default"],{container:r.container},v)},renderContent:function(){var e=this;return h["default"].Children.map(this.props.children,function(t){return t&&t.type&&t.type.__isModalHeader?c.cloneElement(t,{onHide:C["default"](e.props.onHide,t.props.onHide)}):t})},renderBackdrop:function(e){var t=this.props,n=t.animation,r=t.bsClass,o=Y.BACKDROP_TRANSITION_DURATION,s=this.props.backdrop===!0?this.handleBackdropClick:null,a=h["default"].createElement("div",{ref:"backdrop",className:f["default"](r+"-backdrop",{"in":this.props.show&&!n}),onClick:s});return h["default"].createElement("div",{ref:"modal"},n?h["default"].createElement(j["default"],{transitionAppear:!0,"in":this.props.show,timeout:o},a):a,e)},_setDialogRef:function(e){l(this.refs)&&!u(this.refs).length&&(this.refs={}),this.refs.dialog=e,this.props.backdrop||(this.refs.modal=e)},componentWillReceiveProps:function(e){e.show?this.setState({exited:!1}):e.animation||this.setState({exited:!0})},componentWillUpdate:function(e){e.show&&this.checkForFocus()},componentDidMount:function(){this.props.show&&this.onShow()},componentDidUpdate:function(e){var t=this.props.animation;!e.show||this.props.show||t?!e.show&&this.props.show&&this.onShow():this.onHide()},componentWillUnmount:function(){this.props.show&&this.onHide()},onShow:function(){var e=this,t=g["default"].ownerDocument(this),n=g["default"].ownerWindow(this);this._onDocumentKeyupListener=x["default"].listen(t,"keyup",this.handleDocumentKeyUp),this._onWindowResizeListener=x["default"].listen(n,"resize",this.handleWindowResize),this.props.enforceFocus&&(this._onFocusinListener=s(this,this.enforceFocus));var a=o(this);a.className+=a.className.length?" modal-open":"modal-open",this._containerIsOverflowing=a.scrollHeight>r(a,this),this._originalPadding=a.style.paddingRight,this._containerIsOverflowing&&(a.style.paddingRight=parseInt(this._originalPadding||0,10)+T["default"]()+"px"),this.setState(this._getStyles(),function(){return e.focusModalContent()})},onHide:function(){this._onDocumentKeyupListener.remove(),this._onWindowResizeListener.remove(),this._onFocusinListener&&this._onFocusinListener.remove();var e=o(this);e.style.paddingRight=this._originalPadding,e.className=e.className.replace(/ ?modal-open/,""),this.restoreLastFocus()},handleHidden:function(){if(this.setState({exited:!0}),this.onHide(),this.props.onExited){var e;(e=this.props).onExited.apply(e,arguments)}},handleBackdropClick:function(e){e.target===e.currentTarget&&this.props.onHide()},handleDocumentKeyUp:function(e){this.props.keyboard&&27===e.keyCode&&this.props.onHide()},handleWindowResize:function(){this.setState(this._getStyles())},checkForFocus:function(){w["default"]&&(this.lastFocus=D["default"](document))},focusModalContent:function(){var e=v["default"].findDOMNode(this.refs.dialog),t=D["default"](g["default"].ownerDocument(this)),n=t&&k["default"](e,t);e&&this.props.autoFocus&&!n&&(this.lastFocus=t,e.focus())},restoreLastFocus:function(){this.lastFocus&&this.lastFocus.focus&&(this.lastFocus.focus(),this.lastFocus=null)},enforceFocus:function(){if(this.isMounted()){var e=D["default"](g["default"].ownerDocument(this)),t=v["default"].findDOMNode(this.refs.dialog);t&&t!==e&&!k["default"](t,e)&&t.focus()}},_getStyles:function(){if(!w["default"])return{};var e=v["default"].findDOMNode(this.refs.modal),t=e.scrollHeight,n=o(this),s=this._containerIsOverflowing,a=t>r(n,this);return{dialogStyles:{paddingRight:s&&!a?T["default"]():void 0,paddingLeft:!s&&a?T["default"]():void 0}}}});Y.Body=F["default"],Y.Header=W["default"],Y.Title=V["default"],Y.Footer=z["default"],Y.Dialog=L["default"],Y.TRANSITION_DURATION=300,Y.BACKDROP_TRANSITION_DURATION=150,t["default"]=Y,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=a["default"].createClass({displayName:"ModalDialog",mixins:[p["default"]],propTypes:{onHide:a["default"].PropTypes.func.isRequired,dialogClassName:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"modal",closeButton:!0}},render:function(){var e=r({display:"block"},this.props.style),t=this.props.bsClass,n=this.getBsClassSet();return delete n.modal,n[t+"-dialog"]=!0,a["default"].createElement("div",r({},this.props,{title:null,tabIndex:"-1",role:"dialog",style:e,className:l["default"](this.props.className,t)}),a["default"].createElement("div",{className:l["default"](this.props.dialogClassName,n)},a["default"].createElement("div",{className:t+"-content",role:"document"},this.props.children)))}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(8)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(26),d=i(p),f=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.title,r=e.noCaret,o=a(e,["children","title","noCaret"]);return u["default"].createElement(d["default"],s({},o,{componentClass:"li"}),u["default"].createElement(d["default"].Toggle,{useAnchor:!0,disabled:o.disabled,noCaret:r},n),u["default"].createElement(d["default"].Menu,null,t))},t}(u["default"].Component);f.propTypes=s({noCaret:u["default"].PropTypes.bool,title:u["default"].PropTypes.node.isRequired},d["default"].propTypes),t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(8)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(4),i=s(a),l=n(1),u=s(l),p=n(52),d=s(p),f=n(12),c=s(f),h=n(7),m=s(h),v=n(61),y=s(v),g=n(69),b=s(g),T=n(11),P=s(T),x=n(9),E=s(x),C=u["default"].createClass({displayName:"Navbar",mixins:[m["default"]],propTypes:{fixedTop:u["default"].PropTypes.bool,fixedBottom:u["default"].PropTypes.bool,staticTop:u["default"].PropTypes.bool,inverse:u["default"].PropTypes.bool,fluid:u["default"].PropTypes.bool,role:u["default"].PropTypes.string,componentClass:c["default"],brand:d["default"](u["default"].PropTypes.node,"Use the `NavBrand` component."),toggleButton:u["default"].PropTypes.node,toggleNavKey:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),onToggle:u["default"].PropTypes.func,navExpanded:u["default"].PropTypes.bool,defaultNavExpanded:u["default"].PropTypes.bool},getDefaultProps:function(){return{bsClass:"navbar",bsStyle:"default",role:"navigation",componentClass:"nav",fixedTop:!1,fixedBottom:!1,staticTop:!1,inverse:!1,fluid:!1,defaultNavExpanded:!1}},getInitialState:function(){return{navExpanded:this.props.defaultNavExpanded}},shouldComponentUpdate:function(){return!this._isChanging},handleToggle:function(){this.props.onToggle&&(this._isChanging=!0,this.props.onToggle(),this._isChanging=!1),this.setState({navExpanded:!this.state.navExpanded})},isNavExpanded:function(){return null!=this.props.navExpanded?this.props.navExpanded:this.state.navExpanded},hasNavBrandChild:function(){return E["default"].findValidComponents(this.props.children,function(e){return"brand"===e.props.bsRole}).length>0},render:function(){var e=this.props,t=e.brand,n=e.toggleButton,s=e.toggleNavKey,a=e.fixedTop,l=e.fixedBottom,p=e.staticTop,d=e.inverse,f=e.componentClass,c=e.fluid,h=e.className,m=e.children,v=r(e,["brand","toggleButton","toggleNavKey","fixedTop","fixedBottom","staticTop","inverse","componentClass","fluid","className","children"]),g=this.getBsClassSet();g["navbar-fixed-top"]=a,g["navbar-fixed-bottom"]=l,g["navbar-static-top"]=p,g["navbar-inverse"]=d;var b=(t||n||null!=s)&&!this.hasNavBrandChild();return u["default"].createElement(f,o({},v,{className:i["default"](h,g)}),u["default"].createElement(y["default"],{fluid:c},b?this.renderBrandHeader():null,E["default"].map(m,this.renderChild)))},renderBrandHeader:function(){var e=this.props.brand;return e&&(e=u["default"].createElement(b["default"],null,e)),this.renderHeader(e)},renderHeader:function(e){var t=this.props.toggleButton||null!=this.props.toggleNavKey;return u["default"].createElement("div",{className:"navbar-header"},e,t?this.renderToggleButton():null)},renderChild:function(e,t){var n=null!=e.key?e.key:t;if("brand"===e.props.bsRole)return u["default"].cloneElement(this.renderHeader(e),{key:n});var r=this.props.toggleNavKey,o=null!=r&&r===e.props.eventKey;return u["default"].cloneElement(e,{navbar:!0,collapsible:o,expanded:o&&this.isNavExpanded(),key:n})},renderToggleButton:function(){var e=this.props.toggleButton;if(u["default"].isValidElement(e))return u["default"].cloneElement(e,{className:i["default"](e.props.className,"navbar-toggle"),onClick:P["default"](this.handleToggle,e.props.onClick)});var t=void 0;return t=null!=e?e:[u["default"].createElement("span",{className:"sr-only",key:0},"Toggle navigation"),u["default"].createElement("span",{className:"icon-bar",key:1}),u["default"].createElement("span",{className:"icon-bar",key:2}),u["default"].createElement("span",{className:"icon-bar",key:3})],u["default"].createElement("button",{type:"button",onClick:this.handleToggle,className:"navbar-toggle"},t)}});t["default"]=C,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)?t.indexOf(e)>=0:e===t}var o=n(3)["default"],s=n(28)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(29),l=a(i),u=n(228),p=a(u),d=n(1),f=a(d),c=n(10),h=a(c),m=n(23),v=a(m),y=n(71),g=a(y),b=n(11),T=a(b),P=f["default"].createClass({displayName:"OverlayTrigger",propTypes:o({},g["default"].propTypes,{trigger:f["default"].PropTypes.oneOfType([f["default"].PropTypes.oneOf(["click","hover","focus"]),f["default"].PropTypes.arrayOf(f["default"].PropTypes.oneOf(["click","hover","focus"]))]),delay:f["default"].PropTypes.number,delayShow:f["default"].PropTypes.number,delayHide:f["default"].PropTypes.number,defaultOverlayShown:f["default"].PropTypes.bool,overlay:f["default"].PropTypes.node.isRequired,onBlur:f["default"].PropTypes.func,onClick:f["default"].PropTypes.func,onFocus:f["default"].PropTypes.func,onMouseEnter:f["default"].PropTypes.func,onMouseLeave:f["default"].PropTypes.func,target:function(){},onHide:function(){},show:function(){}}),getDefaultProps:function(){return{defaultOverlayShown:!1,trigger:["hover","focus"]}},getInitialState:function(){return{isOverlayShown:this.props.defaultOverlayShown}},show:function(){this.setState({isOverlayShown:!0})},hide:function(){this.setState({isOverlayShown:!1})},toggle:function(){this.state.isOverlayShown?this.hide():this.show()},componentWillMount:function(){this.handleMouseOver=this.handleMouseOverOut.bind(null,this.handleDelayedShow),this.handleMouseOut=this.handleMouseOverOut.bind(null,this.handleDelayedHide)},componentDidMount:function(){this._mountNode=document.createElement("div"),this.renderOverlay()},renderOverlay:function(){h["default"].unstable_renderSubtreeIntoContainer(this,this._overlay,this._mountNode)},componentWillUnmount:function(){h["default"].unmountComponentAtNode(this._mountNode),this._mountNode=null,clearTimeout(this._hoverDelay)},componentDidUpdate:function(){this._mountNode&&this.renderOverlay()},getOverlayTarget:function(){return h["default"].findDOMNode(this)},getOverlay:function(){var e=o({},p["default"](this.props,s(g["default"].propTypes)),{show:this.state.isOverlayShown,onHide:this.hide,target:this.getOverlayTarget,onExit:this.props.onExit,onExiting:this.props.onExiting,onExited:this.props.onExited,onEnter:this.props.onEnter,onEntering:this.props.onEntering,onEntered:this.props.onEntered}),t=d.cloneElement(this.props.overlay,{placement:e.placement,container:e.container});return f["default"].createElement(g["default"],e,t)},render:function(){var e=f["default"].Children.only(this.props.children),t=e.props,n={"aria-describedby":this.props.overlay.props.id};return this._overlay=this.getOverlay(),n.onClick=T["default"](t.onClick,this.props.onClick),r("click",this.props.trigger)&&(n.onClick=T["default"](this.toggle,n.onClick)),r("hover",this.props.trigger)&&(v["default"](!("hover"===this.props.trigger),'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibilty of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),n.onMouseOver=T["default"](this.handleMouseOver,this.props.onMouseOver,t.onMouseOver),n.onMouseOut=T["default"](this.handleMouseOut,this.props.onMouseOut,t.onMouseOut)),r("focus",this.props.trigger)&&(n.onFocus=T["default"](this.handleDelayedShow,this.props.onFocus,t.onFocus),n.onBlur=T["default"](this.handleDelayedHide,this.props.onBlur,t.onBlur)),d.cloneElement(e,n)},handleDelayedShow:function(){var e=this;if(null!=this._hoverDelay)return clearTimeout(this._hoverDelay),void(this._hoverDelay=null);var t=null!=this.props.delayShow?this.props.delayShow:this.props.delay;return t?void(this._hoverDelay=setTimeout(function(){e._hoverDelay=null,e.show()},t)):void this.show()},handleDelayedHide:function(){var e=this;if(null!=this._hoverDelay)return clearTimeout(this._hoverDelay),void(this._hoverDelay=null);var t=null!=this.props.delayHide?this.props.delayHide:this.props.delay;return t?void(this._hoverDelay=setTimeout(function(){e._hoverDelay=null,e.hide()},t)):void this.hide()},handleMouseOverOut:function(e,t){var n=t.currentTarget,r=t.relatedTarget||t.nativeEvent.toElement;(!r||r!==n&&!l["default"](n,r))&&e(t)}});t["default"]=P,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=a["default"].createClass({displayName:"PageHeader",render:function(){return a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,"page-header")}),a["default"].createElement("h1",null,this.props.children))}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(14),p=o(u),d=a["default"].createClass({displayName:"PageItem",propTypes:{href:a["default"].PropTypes.string,target:a["default"].PropTypes.string,title:a["default"].PropTypes.string,disabled:a["default"].PropTypes.bool,previous:a["default"].PropTypes.bool,next:a["default"].PropTypes.bool,onSelect:a["default"].PropTypes.func,eventKey:a["default"].PropTypes.any},getDefaultProps:function(){return{disabled:!1,previous:!1,next:!1}},render:function(){var e={disabled:this.props.disabled,previous:this.props.previous,next:this.props.next};return a["default"].createElement("li",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement(p["default"],{href:this.props.href,title:this.props.title,target:this.props.target,onClick:this.handleSelect},this.props.children))},handleSelect:function(e){(this.props.onSelect||this.props.disabled)&&(e.preventDefault(),this.props.disabled||this.props.onSelect(this.props.eventKey,this.props.href,this.props.target))}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(9),p=o(u),d=n(11),f=o(d),c=a["default"].createClass({displayName:"Pager",propTypes:{onSelect:a["default"].PropTypes.func},render:function(){return a["default"].createElement("ul",r({},this.props,{className:l["default"](this.props.className,"pager")}),p["default"].map(this.props.children,this.renderPageItem))},renderPageItem:function(e,t){return s.cloneElement(e,{onSelect:f["default"](e.props.onSelect,this.props.onSelect),key:e.key?e.key:t})}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=n(136),f=o(d),c=n(12),h=o(c),m=n(14),v=o(m),y=a["default"].createClass({displayName:"Pagination",mixins:[p["default"]],propTypes:{activePage:a["default"].PropTypes.number,items:a["default"].PropTypes.number,maxButtons:a["default"].PropTypes.number,ellipsis:a["default"].PropTypes.bool,first:a["default"].PropTypes.bool,last:a["default"].PropTypes.bool,prev:a["default"].PropTypes.bool,next:a["default"].PropTypes.bool,onSelect:a["default"].PropTypes.func,buttonComponentClass:h["default"]},getDefaultProps:function(){return{activePage:1,items:1,maxButtons:0,first:!1,last:!1,prev:!1,next:!1,ellipsis:!0,buttonComponentClass:v["default"],bsClass:"pagination"}},renderPageButtons:function(){var e=[],t=void 0,n=void 0,r=void 0,o=this.props,s=o.maxButtons,i=o.activePage,l=o.items,u=o.onSelect,p=o.ellipsis,d=o.buttonComponentClass;if(s){var c=i-parseInt(s/2,10);t=c>1?c:1,r=l>=t+s,r?n=t+s-1:(n=l,t=l-s+1,1>t&&(t=1))}else t=1,n=l;for(var h=t;n>=h;h++)e.push(a["default"].createElement(f["default"],{key:h,eventKey:h,active:h===i,onSelect:u,buttonComponentClass:d},h));return s&&r&&p&&e.push(a["default"].createElement(f["default"],{key:"ellipsis",disabled:!0,buttonComponentClass:d},a["default"].createElement("span",{"aria-label":"More"},"..."))),e},renderPrev:function(){return this.props.prev?a["default"].createElement(f["default"],{key:"prev",eventKey:this.props.activePage-1,disabled:1===this.props.activePage,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"Previous"},"‹")):null},renderNext:function(){return this.props.next?a["default"].createElement(f["default"],{key:"next",eventKey:this.props.activePage+1,disabled:this.props.activePage>=this.props.items,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"Next"},"›")):null},renderFirst:function(){return this.props.first?a["default"].createElement(f["default"],{key:"first",eventKey:1,disabled:1===this.props.activePage,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"First"},"«")):null},renderLast:function(){return this.props.last?a["default"].createElement(f["default"],{key:"last",eventKey:this.props.items,disabled:this.props.activePage>=this.props.items,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"Last"},"»")):null},render:function(){return a["default"].createElement("ul",r({},this.props,{className:l["default"](this.props.className,this.getBsClassSet())}),this.renderFirst(),this.renderPrev(),this.renderPageButtons(),this.renderNext(),this.renderLast())}});t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(8)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(7),d=s(p),f=n(153),c=s(f),h=n(12),m=s(h),v=i["default"].createClass({displayName:"PaginationButton",mixins:[d["default"]],propTypes:{className:i["default"].PropTypes.string,eventKey:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.number]),onSelect:i["default"].PropTypes.func,disabled:i["default"].PropTypes.bool,active:i["default"].PropTypes.bool,buttonComponentClass:m["default"]},getDefaultProps:function(){return{active:!1,disabled:!1}},handleClick:function(e){if(!this.props.disabled&&this.props.onSelect){var t=c["default"](this.props.eventKey);this.props.onSelect(e,t)}},render:function(){var e=r({active:this.props.active,disabled:this.props.disabled},this.getBsClassSet()),t=this.props,n=t.className,s=o(t,["className"]),a=this.props.buttonComponentClass;return i["default"].createElement("li",{className:u["default"](n,e)},i["default"].createElement(a,r({},s,{onClick:this.handleClick})))}});t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(8)["default"],o=n(3)["default"],s=n(2)["default"];t.__esModule=!0;var a=n(1),i=s(a),l=n(4),u=s(l),p=n(7),d=s(p),f=n(25),c=s(f),h=i["default"].createClass({displayName:"Panel",mixins:[d["default"]],propTypes:{collapsible:i["default"].PropTypes.bool,onSelect:i["default"].PropTypes.func,header:i["default"].PropTypes.node,id:i["default"].PropTypes.oneOfType([i["default"].PropTypes.string,i["default"].PropTypes.number]),footer:i["default"].PropTypes.node,defaultExpanded:i["default"].PropTypes.bool,expanded:i["default"].PropTypes.bool,eventKey:i["default"].PropTypes.any,headerRole:i["default"].PropTypes.string,panelRole:i["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"panel",bsStyle:"default",defaultExpanded:!1}},getInitialState:function(){return{expanded:this.props.defaultExpanded}},handleSelect:function(e){e.selected=!0,this.props.onSelect?this.props.onSelect(e,this.props.eventKey):e.preventDefault(),e.selected&&this.handleToggle()},handleToggle:function(){this.setState({expanded:!this.state.expanded})},isExpanded:function(){return null!=this.props.expanded?this.props.expanded:this.state.expanded},render:function(){var e=this.props,t=e.headerRole,n=e.panelRole,s=r(e,["headerRole","panelRole"]);return i["default"].createElement("div",o({},s,{className:u["default"](this.props.className,this.getBsClassSet()),id:this.props.collapsible?null:this.props.id,onSelect:null}),this.renderHeading(t),this.props.collapsible?this.renderCollapsibleBody(n):this.renderBody(),this.renderFooter())},renderCollapsibleBody:function(e){var t={className:this.prefixClass("collapse"),id:this.props.id,ref:"panel","aria-hidden":!this.isExpanded()};return e&&(t.role=e),i["default"].createElement(c["default"],{"in":this.isExpanded()},i["default"].createElement("div",t,this.renderBody()))},renderBody:function(){function e(){return{key:u.length}}function t(t){u.push(a.cloneElement(t,e()))}function n(t){u.push(i["default"].createElement("div",o({className:d},e()),t))}function r(){0!==p.length&&(n(p),p=[])}var s=this,l=this.props.children,u=[],p=[],d=this.prefixClass("body");return Array.isArray(l)&&0!==l.length?(l.forEach(function(e){s.shouldRenderFill(e)?(r(),t(e)):p.push(e)}),r()):this.shouldRenderFill(l)?t(l):n(l),u},shouldRenderFill:function(e){return i["default"].isValidElement(e)&&null!=e.props.fill},renderHeading:function(e){var t=this.props.header;if(!t)return null;if(!i["default"].isValidElement(t)||Array.isArray(t))t=this.props.collapsible?this.renderCollapsibleTitle(t,e):t;else{var n=u["default"](this.prefixClass("title"),t.props.className);t=this.props.collapsible?a.cloneElement(t,{className:n,children:this.renderAnchor(t.props.children,e)}):a.cloneElement(t,{className:n})}return i["default"].createElement("div",{className:this.prefixClass("heading")},t)},renderAnchor:function(e,t){return i["default"].createElement("a",{href:"#"+(this.props.id||""),"aria-controls":this.props.collapsible?this.props.id:null,className:this.isExpanded()?null:"collapsed","aria-expanded":this.isExpanded(),"aria-selected":this.isExpanded(),onClick:this.handleSelect,role:t},e)},renderCollapsibleTitle:function(e,t){return i["default"].createElement("h4",{className:this.prefixClass("title"),role:"presentation"},this.renderAnchor(e,t))},renderFooter:function(){return this.props.footer?i["default"].createElement("div",{className:this.prefixClass("footer")},this.props.footer):null}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=n(53),f=o(d),c=a["default"].createClass({displayName:"Popover",mixins:[p["default"]],propTypes:{id:f["default"](a["default"].PropTypes.oneOfType([a["default"].PropTypes.string,a["default"].PropTypes.number])),placement:a["default"].PropTypes.oneOf(["top","right","bottom","left"]),positionLeft:a["default"].PropTypes.number,positionTop:a["default"].PropTypes.number,arrowOffsetLeft:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),arrowOffsetTop:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),title:a["default"].PropTypes.node},getDefaultProps:function(){return{placement:"right"}},render:function(){var e,t=(e={popover:!0},e[this.props.placement]=!0,e),n=r({left:this.props.positionLeft,top:this.props.positionTop,display:"block"},this.props.style),o={left:this.props.arrowOffsetLeft,top:this.props.arrowOffsetTop};return a["default"].createElement("div",r({role:"tooltip"},this.props,{className:l["default"](this.props.className,t),style:n,title:null}),a["default"].createElement("div",{className:"arrow",style:o}),this.props.title?this.renderTitle():null,a["default"].createElement("div",{className:"popover-content"},this.props.children))},renderTitle:function(){return a["default"].createElement("h3",{className:"popover-title"},this.props.title)}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){if(e[t]){var r=function(){var r=void 0,o=void 0;return l["default"].Children.forEach(e[t],function(e){e.type!==y&&(o=e.type.displayName?e.type.displayName:e.type,r=new Error("Children of "+n+" can contain only ProgressBar components. Found "+o))}),{v:r}}();if("object"==typeof r)return r.v}}var o=n(3)["default"],s=n(8)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(62),p=a(u),d=n(7),f=a(d),c=n(4),h=a(c),m=n(9),v=a(m),y=l["default"].createClass({displayName:"ProgressBar",propTypes:{min:i.PropTypes.number,now:i.PropTypes.number,max:i.PropTypes.number,label:i.PropTypes.node,srOnly:i.PropTypes.bool,striped:i.PropTypes.bool,active:i.PropTypes.bool,children:r,className:l["default"].PropTypes.string,interpolateClass:i.PropTypes.node,isChild:i.PropTypes.bool},mixins:[f["default"]],getDefaultProps:function(){return{bsClass:"progress-bar",min:0,max:100,active:!1,isChild:!1,srOnly:!1,striped:!1}},getPercentage:function(e,t,n){var r=1e3;return Math.round((e-t)/(n-t)*100*r)/r},render:function(){if(this.props.isChild)return this.renderProgressBar();var e=void 0;return e=this.props.children?v["default"].map(this.props.children,this.renderChildBar):this.renderProgressBar(),l["default"].createElement("div",o({},this.props,{className:h["default"](this.props.className,"progress"),min:null,max:null,label:null,"aria-valuetext":null}),e)},renderChildBar:function(e,t){return i.cloneElement(e,{isChild:!0,key:e.key?e.key:t})},renderProgressBar:function(){var e=this.props,t=e.className,n=e.label,r=e.now,a=e.min,i=e.max,u=s(e,["className","label","now","min","max"]),p=this.getPercentage(r,a,i);"string"==typeof n&&(n=this.renderLabel(p)),this.props.srOnly&&(n=l["default"].createElement("span",{className:"sr-only"},n));var d=h["default"](t,this.getBsClassSet(),{active:this.props.active,"progress-bar-striped":this.props.active||this.props.striped});return l["default"].createElement("div",o({},u,{className:d,role:"progressbar",style:{width:p+"%"},"aria-valuenow":this.props.now,"aria-valuemin":this.props.min,"aria-valuemax":this.props.max}),n)},renderLabel:function(e){var t=this.props.interpolateClass||p["default"];return l["default"].createElement(t,{now:this.props.now,min:this.props.min,max:this.props.max,percent:e,bsStyle:this.props.bsStyle},this.props.label)}});t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(8)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(4),u=i(l),p=n(1),d=i(p),f=n(23),c=i(f),h=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.bsClass,n=e.className,r=e.a16by9,o=e.a4by3,i=a(e,["bsClass","className","a16by9","a4by3"]);c["default"](!(!r&&!o),"`a16by9` or `a4by3` attribute must be set."),c["default"](!(r&&o),"Either `a16by9` or `a4by3` attribute can be set. Not both.");var l={"embed-responsive-16by9":r,"embed-responsive-4by3":o};return d["default"].createElement("div",{className:u["default"](t,l) +},p.cloneElement(this.props.children,s({},i,{className:u["default"](n,"embed-responsive-item")})))},t}(d["default"].Component);h.defaultProps={bsClass:"embed-responsive",a16by9:!1,a4by3:!1},h.propTypes={bsClass:p.PropTypes.string,children:p.PropTypes.element.isRequired,a16by9:p.PropTypes.bool,a4by3:p.PropTypes.bool},t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(12),p=o(u),d=a["default"].createClass({displayName:"Row",propTypes:{componentClass:p["default"]},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props.componentClass;return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,"row")}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(8)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(1),u=i(l),p=n(7),d=i(p),f=n(24),c=i(f),h=n(26),m=i(h),v=n(143),y=i(v),g=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.title,r=e.onClick,o=e.target,s=e.href,i=e.bsStyle,l=a(e,["children","title","onClick","target","href","bsStyle"]),p=l.disabled,d=u["default"].createElement(c["default"],{onClick:r,bsStyle:i,disabled:p,target:o,href:s},n);return u["default"].createElement(m["default"],l,d,u["default"].createElement(y["default"],{"aria-label":n,bsStyle:i,disabled:p}),u["default"].createElement(m["default"].Menu,null,t))},t}(u["default"].Component);g.propTypes=s({},m["default"].propTypes,d["default"].propTypes,{onClick:function(){},target:u["default"].PropTypes.string,href:u["default"].PropTypes.string,title:u["default"].PropTypes.node.isRequired}),g.defaultProps={disabled:!1,dropup:!1,pullRight:!1},g.Toggle=y["default"],t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(1),l=a(i),u=n(58),p=a(u),d=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement(p["default"],s({},this.props,{useAnchor:!1,noCaret:!1}))},t}(l["default"].Component);t["default"]=d,d.defaultProps=p["default"].defaultProps,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(9),p=o(u),d=n(11),f=o(d),c=n(7),h=o(c),m=n(14),v=o(m),y=a["default"].createClass({displayName:"SubNav",mixins:[h["default"]],propTypes:{onSelect:a["default"].PropTypes.func,active:a["default"].PropTypes.bool,activeHref:a["default"].PropTypes.string,activeKey:a["default"].PropTypes.any,disabled:a["default"].PropTypes.bool,eventKey:a["default"].PropTypes.any,href:a["default"].PropTypes.string,title:a["default"].PropTypes.string,text:a["default"].PropTypes.node,target:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"nav",active:!1,disabled:!1}},handleClick:function(e){this.props.onSelect&&(e.preventDefault(),this.props.disabled||this.props.onSelect(this.props.eventKey,this.props.href,this.props.target))},isActive:function(){return this.isChildActive(this)},isChildActive:function(e){var t=this;if(e.props.active)return!0;if(null!=this.props.activeKey&&this.props.activeKey===e.props.eventKey)return!0;if(null!=this.props.activeHref&&this.props.activeHref===e.props.href)return!0;if(e.props.children){var n=!1;return p["default"].forEach(e.props.children,function(e){t.isChildActive(e)&&(n=!0)},this),n}return!1},getChildActiveProp:function(e){return e.props.active?!0:null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey?!0:null!=this.props.activeHref&&e.props.href===this.props.activeHref?!0:e.props.active},render:function(){var e={active:this.isActive(),disabled:this.props.disabled};return a["default"].createElement("li",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement(v["default"],{href:this.props.href,title:this.props.title,target:this.props.target,onClick:this.handleClick},this.props.text),a["default"].createElement("ul",{className:"nav"},p["default"].map(this.props.children,this.renderNavItem)))},renderNavItem:function(e,t){return s.cloneElement(e,{active:this.getChildActiveProp(e),onSelect:f["default"](e.props.onSelect,this.props.onSelect),key:e.key?e.key:t})}});t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(4),a=o(s),i=n(1),l=o(i),u=n(10),p=o(u),d=n(74),f=o(d),c=l["default"].createClass({displayName:"Tab",propTypes:{active:l["default"].PropTypes.bool,animation:l["default"].PropTypes.bool,onAnimateOutEnd:l["default"].PropTypes.func,disabled:l["default"].PropTypes.bool,title:l["default"].PropTypes.node,tabClassName:l["default"].PropTypes.string},getDefaultProps:function(){return{animation:!0}},getInitialState:function(){return{animateIn:!1,animateOut:!1}},componentWillReceiveProps:function(e){this.props.animation&&(this.state.animateIn||!e.active||this.props.active?this.state.animateOut||e.active||!this.props.active||this.setState({animateOut:!0}):this.setState({animateIn:!0}))},componentDidUpdate:function(){this.state.animateIn&&setTimeout(this.startAnimateIn,0),this.state.animateOut&&f["default"].addEndEventListener(p["default"].findDOMNode(this),this.stopAnimateOut)},startAnimateIn:function(){this.isMounted()&&this.setState({animateIn:!1})},stopAnimateOut:function(){this.isMounted()&&(this.setState({animateOut:!1}),this.props.onAnimateOutEnd&&this.props.onAnimateOutEnd())},render:function(){var e={"tab-pane":!0,fade:!0,active:this.props.active||this.state.animateOut,"in":this.props.active&&!this.state.animateIn};return l["default"].createElement("div",r({},this.props,{title:void 0,role:"tabpanel","aria-hidden":!this.props.active,className:a["default"](this.props.className,e)}),this.props.children)}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=a["default"].createClass({displayName:"Table",propTypes:{striped:a["default"].PropTypes.bool,bordered:a["default"].PropTypes.bool,condensed:a["default"].PropTypes.bool,hover:a["default"].PropTypes.bool,responsive:a["default"].PropTypes.bool},getDefaultProps:function(){return{bordered:!1,condensed:!1,hover:!1,responsive:!1,striped:!1}},render:function(){var e={table:!0,"table-striped":this.props.striped,"table-bordered":this.props.bordered,"table-condensed":this.props.condensed,"table-hover":this.props.hover},t=a["default"].createElement("table",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children);return this.props.responsive?a["default"].createElement("div",{className:"table-responsive"},t):t}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){var t=void 0;return w["default"].forEach(e,function(e){null==t&&(t=e.props.eventKey)}),t}function o(e,t,n,r){function o(){var t=n.indexOf(i);return i=r?n[Math.min(s,t+1)]:n[Math.max(0,t-1)],M(e,function(e){return e.props.eventKey===i})}for(var s=n.length-1,a=n[r?Math.max(s,0):0],i=t,l=o();l.props.eventKey!==a&&l.props.disabled;)l=o();return l.props.disabled?t:l.props.eventKey}var s=n(3)["default"],a=n(8)["default"],i=n(28)["default"],l=n(2)["default"];t.__esModule=!0;var u=n(4),p=l(u),d=n(1),f=l(d),c=n(10),h=l(c),m=n(57),v=l(m),y=n(68),g=l(y),b=n(70),T=l(b),P=n(27),x=l(P),E=n(42),C=l(E),_=n(11),N=l(_),O=n(9),w=l(O),S=function(e,t){return t.props.id?t.props.id:e.id&&e.id+"___pane___"+t.props.eventKey},k=function(e,t){return t.props.id?t.props.id+"___tab":e.id&&e.id+"___tab___"+t.props.eventKey},M=w["default"].find,D=f["default"].createClass({displayName:"Tabs",propTypes:{activeKey:f["default"].PropTypes.any,defaultActiveKey:f["default"].PropTypes.any,bsStyle:f["default"].PropTypes.oneOf(["tabs","pills"]),animation:f["default"].PropTypes.bool,id:f["default"].PropTypes.oneOfType([f["default"].PropTypes.string,f["default"].PropTypes.number]),onSelect:f["default"].PropTypes.func,position:f["default"].PropTypes.oneOf(["top","left","right"]),tabWidth:f["default"].PropTypes.oneOfType([f["default"].PropTypes.number,f["default"].PropTypes.object]),paneWidth:f["default"].PropTypes.oneOfType([f["default"].PropTypes.number,f["default"].PropTypes.object]),standalone:f["default"].PropTypes.bool},getDefaultProps:function(){return{animation:!0,tabWidth:2,position:"top",standalone:!1}},getInitialState:function(){var e=null!=this.props.defaultActiveKey?this.props.defaultActiveKey:r(this.props.children);return{activeKey:e,previousActiveKey:null}},componentWillReceiveProps:function(e){var t=this;null!=e.activeKey&&e.activeKey!==this.props.activeKey&&!function(){var n=t.props.activeKey;f["default"].Children.forEach(e.children,function(e){return f["default"].isValidElement(e)&&e.props.eventKey===n?void t.setState({previousActiveKey:n}):void 0})}()},componentDidUpdate:function(){var e=this._tabs,t=this._eventKeys().indexOf(this.getActiveKey());if(this._needsRefocus&&(this._needsRefocus=!1,e&&-1!==t)){var n=h["default"].findDOMNode(e[t]);n&&n.firstChild.focus()}},handlePaneAnimateOutEnd:function(){this.setState({previousActiveKey:null})},render:function(){var e=this.props,t=e.id,n=e.className,r=e.style,o=e.position,i=e.bsStyle,l=e.tabWidth,u=e.paneWidth,d=e.standalone,c=e.children,h=a(e,["id","className","style","position","bsStyle","tabWidth","paneWidth","standalone","children"]),m="left"===o||"right"===o;null==i&&(i=m?"pills":"tabs");var y={id:t,className:n,style:r},b=s({},h,{bsStyle:i,stacked:m,activeKey:this.getActiveKey(),onSelect:this.handleSelect,ref:"tabs",role:"tablist"}),T=w["default"].map(c,this.renderTab),P={className:"tab-content",ref:"panes"},x=w["default"].map(c,this.renderPane);if(m){d||(y.className=p["default"](y.className,"clearfix"));var E=this.getColProps({tabWidth:l,paneWidth:u}),C=E.tabsColProps,_=E.panesColProps,N=f["default"].createElement(v["default"],s({componentClass:g["default"]},b,C),T),O=f["default"].createElement(v["default"],s({},P,_),x);return"left"===o?f["default"].createElement("div",y,N,O):f["default"].createElement("div",y,O,N)}return f["default"].createElement("div",y,f["default"].createElement(g["default"],b,T),f["default"].createElement("div",P,x))},getActiveKey:function(){return void 0!==this.props.activeKey?this.props.activeKey:this.state.activeKey},renderPane:function(e,t){var n=this.state.previousActiveKey,r=e.props.eventKey===this.getActiveKey(),o=null==n,s=null!=n&&e.props.eventKey===n;return d.cloneElement(e,{active:r&&(o||!this.props.animation),id:S(this.props,e),"aria-labelledby":k(this.props,e),key:e.key?e.key:t,animation:this.props.animation,onAnimateOutEnd:s?this.handlePaneAnimateOutEnd:null})},renderTab:function(e,t){var n=this;if(null==e.props.title)return null;var r=e.props,o=r.eventKey,s=r.title,a=r.disabled,i=r.onKeyDown,l=r.tabClassName,u=r.tabIndex,p=void 0===u?0:u,d=this.getActiveKey()===o;return f["default"].createElement(T["default"],{linkId:k(this.props,e),ref:function(e){return(n._tabs||(n._tabs=[]))[t]=e},"aria-controls":S(this.props,e),onKeyDown:N["default"](this.handleKeyDown,i),eventKey:o,tabIndex:d?p:-1,disabled:a,className:l},s)},getColProps:function(e){var t=e.tabWidth,n=e.paneWidth,r=void 0;r=t instanceof Object?t:{xs:t};var o=void 0;return null==n?(o={},i(r).forEach(function(e){o[e]=x["default"].GRID_COLUMNS-r[e]})):o=n instanceof Object?n:{xs:n},{tabsColProps:r,panesColProps:o}},shouldComponentUpdate:function(){return!this._isChanging},handleSelect:function(e){if(this.props.onSelect)return this._isChanging=!0,this.props.onSelect(e),void(this._isChanging=!1);var t=this.getActiveKey();e!==t&&this.setState({activeKey:e,previousActiveKey:t})},handleKeyDown:function(e){var t=this._eventKeys(),n=this.getActiveKey()||t[0],r=void 0;switch(e.keyCode){case C["default"].codes.left:case C["default"].codes.up:r=o(this.props.children,n,t,!1),r&&r!==n&&(e.preventDefault(),this.handleSelect(r),this._needsRefocus=!0);break;case C["default"].codes.right:case C["default"].codes.down:r=o(this.props.children,n,t,!0),r&&r!==n&&(e.preventDefault(),this.handleSelect(r),this._needsRefocus=!0)}},_eventKeys:function(){var e=[];return w["default"].forEach(this.props.children,function(t){var n=t.props.eventKey;return e.push(n)}),e}});t["default"]=D,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=n(14),f=o(d),c=a["default"].createClass({displayName:"Thumbnail",mixins:[p["default"]],propTypes:{alt:a["default"].PropTypes.string,href:a["default"].PropTypes.string,src:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"thumbnail"}},render:function(){var e=this.getBsClassSet();return this.props.href?a["default"].createElement(f["default"],r({},this.props,{href:this.props.href,className:l["default"](this.props.className,e)}),a["default"].createElement("img",{src:this.props.src,alt:this.props.alt})):this.props.children?a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement("img",{src:this.props.src,alt:this.props.alt}),a["default"].createElement("div",{className:"caption"},this.props.children)):a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement("img",{src:this.props.src,alt:this.props.alt}))}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(6)["default"],o=n(5)["default"],s=n(3)["default"],a=n(8)["default"],i=n(2)["default"];t.__esModule=!0;var l=n(4),u=i(l),p=n(1),d=i(p),f=n(53),c=i(f),h=function(e){function t(){o(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.placement,n=e.positionLeft,r=e.positionTop,o=e.arrowOffsetLeft,i=e.arrowOffsetTop,l=e.className,p=e.style,f=e.children,c=a(e,["placement","positionLeft","positionTop","arrowOffsetLeft","arrowOffsetTop","className","style","children"]);return d["default"].createElement("div",s({role:"tooltip"},c,{className:u["default"](l,"tooltip",t),style:s({left:n,top:r},p)}),d["default"].createElement("div",{className:"tooltip-arrow",style:{left:o,top:i}}),d["default"].createElement("div",{className:"tooltip-inner"},f))},t}(d["default"].Component);t["default"]=h,h.propTypes={id:c["default"](d["default"].PropTypes.oneOfType([d["default"].PropTypes.string,d["default"].PropTypes.number])),placement:d["default"].PropTypes.oneOf(["top","right","bottom","left"]),positionLeft:d["default"].PropTypes.number,positionTop:d["default"].PropTypes.number,arrowOffsetLeft:d["default"].PropTypes.oneOfType([d["default"].PropTypes.number,d["default"].PropTypes.string]),arrowOffsetTop:d["default"].PropTypes.oneOfType([d["default"].PropTypes.number,d["default"].PropTypes.string])},h.defaultProps={placement:"right"},e.exports=t["default"]},function(e,t,n){"use strict";var r=n(3)["default"],o=n(2)["default"];t.__esModule=!0;var s=n(1),a=o(s),i=n(4),l=o(i),u=n(7),p=o(u),d=a["default"].createClass({displayName:"Well",mixins:[p["default"]],getDefaultProps:function(){return{bsClass:"well"}},render:function(){var e=this.getBsClassSet();return a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var o=n(51),s=n(152),a=r(s);t["default"]={requiredRoles:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return o.createChainableTypeChecker(function(e,n,r){var o=void 0,s=a["default"](e.children),i=function(e,t){return e===t.props.bsRole};return t.every(function(e){return s.some(function(t){return i(e,t)})?!0:(o=e,!1)}),o?new Error("(children) "+r+" - Missing a required child with bsRole: "+o+". "+(r+" must have at least one child of each of the following bsRoles: "+t.join(", "))):void 0})},exclusiveRoles:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return o.createChainableTypeChecker(function(e,n,r){var o=a["default"](e.children),s=void 0;return t.every(function(e){var t=o.filter(function(t){return t.props.bsRole===e});return t.length>1?(s=e,!1):!0}),s?new Error("(children) "+r+" - Duplicate children detected of bsRole: "+s+". Only one child each allowed with the following bsRoles: "+t.join(", ")):void 0})}},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){var t=[];return void 0===e?t:(a["default"].forEach(e,function(e){t.push(e)}),t)}var o=n(2)["default"];t.__esModule=!0,t["default"]=r;var s=n(9),a=o(s);e.exports=t["default"]},function(e,t){"use strict";function n(e){var t=!1;return{eventKey:e,preventSelection:function(){t=!0},isSelectionPrevented:function(){return t}}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){var r=void 0;"object"==typeof e?r=e.message:(r=e+" is deprecated. Use "+t+" instead.",n&&(r+="\nYou can read more about it at "+n)),u[r]||(l["default"](!1,r),u[r]=!0)}var o=n(6)["default"],s=n(5)["default"],a=n(2)["default"];t.__esModule=!0;var i=n(23),l=a(i),u={};r.wrapper=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;t>a;a++)n[a-1]=arguments[a];return function(e){function t(){s(this,t),e.apply(this,arguments)}return o(t,e),t.prototype.componentWillMount=function(){if(r.apply(void 0,n),e.prototype.componentWillMount){for(var t,o=arguments.length,s=Array(o),a=0;o>a;a++)s[a]=arguments[a];(t=e.prototype.componentWillMount).call.apply(t,[this].concat(s))}},t}(e)},t["default"]=r,e.exports=t["default"]},function(e,t,n){e.exports={"default":n(159),__esModule:!0}},function(e,t,n){e.exports={"default":n(160),__esModule:!0}},function(e,t,n){e.exports={"default":n(161),__esModule:!0}},function(e,t,n){e.exports={"default":n(163),__esModule:!0}},function(e,t,n){n(175),e.exports=n(18).Object.assign},function(e,t,n){var r=n(38);e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){n(176),e.exports=n(18).Object.isFrozen},function(e,t,n){n(177),e.exports=n(18).Object.keys},function(e,t,n){n(178),e.exports=n(18).Object.setPrototypeOf},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(37);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(79),o=n(173),s=n(170),a=n(172);e.exports=n(77)(function(){var e=Object.assign,t={},n={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach(function(e){n[e]=e}),7!=e({},t)[r]||Object.keys(e({},n)).join("")!=o})?function(e,t){for(var n=r(e),i=arguments.length,l=1;i>l;)for(var u,p=o(arguments[l++]),d=s(p),f=d.length,c=0;f>c;)a(p,u=d[c++])&&(n[u]=p[u]);return n}:Object.assign},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(164);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(38);e.exports=function(e){var t=r.getKeys(e),n=r.getSymbols;if(n)for(var o,s=n(e),a=r.isEnum,i=0;s.length>i;)a.call(e,o=s[i++])&&t.push(o);return t}},function(e,t){var n="undefined",r=e.exports=typeof window!=n&&window.Math==Math?window:typeof self!=n&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(167);e.exports=0 in Object("z")?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(38).getDesc,o=n(37),s=n(165),a=function(e,t){if(s(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{o=n(168)(Function.call,r(Object.prototype,"__proto__").set,2),o(e,[]),t=!(e instanceof Array)}catch(s){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){var r=n(36);r(r.S+r.F,"Object",{assign:n(166)})},function(e,t,n){var r=n(37);n(78)("isFrozen",function(e){return function(t){return r(t)?e?e(t):!1:!0}})},function(e,t,n){var r=n(79);n(78)("keys",function(e){return function(t){return e(r(t))}})},function(e,t,n){var r=n(36);r(r.S,"Object",{setPrototypeOf:n(174).set})},function(e,t,n){"use strict";var r=n(20),o=function(){};r&&(o=function(){return document.addEventListener?function(e,t,n,r){return e.removeEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.detachEvent("on"+t,n)}:void 0}()),e.exports=o},function(e,t,n){"use strict";function r(e){var t=a["default"](e);return t&&t.defaultView||t.parentWindow}var o=n(22);t.__esModule=!0,t["default"]=r;var s=n(19),a=o.interopRequireDefault(s);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e.nodeName&&e.nodeName.toLowerCase()}function o(e){for(var t=i["default"](e),n=e&&e.offsetParent;n&&"html"!==r(e)&&"static"===u["default"](n,"position");)n=n.offsetParent;return n||t.documentElement}var s=n(22);t.__esModule=!0,t["default"]=o;var a=n(19),i=s.interopRequireDefault(a),l=n(41),u=s.interopRequireDefault(l);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e.nodeName&&e.nodeName.toLowerCase()}function o(e,t){var n,o={top:0,left:0};return"fixed"===m["default"](e,"position")?n=e.getBoundingClientRect():(t=t||u["default"](e),n=i["default"](e),"html"!==r(t)&&(o=i["default"](t)),o.top+=parseInt(m["default"](t,"borderTopWidth"),10)-d["default"](t)||0,o.left+=parseInt(m["default"](t,"borderLeftWidth"),10)-c["default"](t)||0),s._extends({},n,{top:n.top-o.top-(parseInt(m["default"](e,"marginTop"),10)||0),left:n.left-o.left-(parseInt(m["default"](e,"marginLeft"),10)||0)})}var s=n(22);t.__esModule=!0,t["default"]=o;var a=n(40),i=s.interopRequireDefault(a),l=n(181),u=s.interopRequireDefault(l),p=n(82),d=s.interopRequireDefault(p),f=n(183),c=s.interopRequireDefault(f),h=n(41),m=s.interopRequireDefault(h);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(39);e.exports=function(e,t){var n=r(e);return void 0===t?n?"pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft:e.scrollLeft:void(n?n.scrollTo(t,"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop):e.scrollLeft=t)}},function(e,t,n){"use strict";var r=n(22),o=n(83),s=r.interopRequireDefault(o),a=/^(top|right|bottom|left)$/,i=/^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;e.exports=function(e){if(!e)throw new TypeError("No Element passed to `getComputedStyle()`");var t=e.ownerDocument;return"defaultView"in t?t.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null):{getPropertyValue:function(t){var n=e.style;t=s["default"](t),"float"==t&&(t="styleFloat");var r=e.currentStyle[t]||null;if(null==r&&n&&n[t]&&(r=n[t]),i.test(r)&&!a.test(t)){var o=n.left,l=e.runtimeStyle,u=l&&l.left;u&&(l.left=e.currentStyle.left),n.left="fontSize"===t?"1em":r,r=n.pixelLeft+"px",n.left=o,u&&(l.left=u)}return r}}}},function(e,t){"use strict";e.exports=function(e,t){return"removeProperty"in e.style?e.style.removeProperty(t):e.style.removeAttribute(t)}},function(e,t,n){"use strict";function r(){var e,t="",n={O:"otransitionend",Moz:"transitionend",Webkit:"webkitTransitionEnd",ms:"MSTransitionEnd"},r=document.createElement("div");for(var o in n)if(u.call(n,o)&&void 0!==r.style[o+"TransitionProperty"]){t="-"+o.toLowerCase()+"-",e=n[o];break}return e||void 0===r.style.transitionProperty||(e="transitionend"),{end:e,prefix:t}}var o,s,a,i,l=n(20),u=Object.prototype.hasOwnProperty,p="transform",d={};l&&(d=r(),p=d.prefix+p,a=d.prefix+"transition-property",s=d.prefix+"transition-duration",i=d.prefix+"transition-delay",o=d.prefix+"transition-timing-function"),e.exports={transform:p,end:d.end,property:a,timing:o,delay:i,duration:s}},function(e,t){"use strict";var n=/-(.)/g;e.exports=function(e){return e.replace(n,function(e,t){return t.toUpperCase()})}},function(e,t){"use strict";var n=/([A-Z])/g;e.exports=function(e){return e.replace(n,"-$1").toLowerCase()}},function(e,t,n){"use strict";var r=n(188),o=/^ms-/;e.exports=function(e){return r(e).replace(o,"-ms-")}},function(e,t,n){"use strict";var r,o=n(20);e.exports=function(e){if((!r||e)&&o){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),r=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return r}},function(e,t){function n(e){var t=e?e.length:0;return t?e[t-1]:void 0}e.exports=n},function(e,t,n){var r=n(200),o=n(218),s=o(r);e.exports=s},function(e,t,n){(function(t){function r(e){var t=e?e.length:0;for(this.data={hash:i(null),set:new a};t--;)this.push(e[t])}var o=n(214),s=n(30),a=s(t,"Set"),i=s(Object,"create");r.prototype.push=o,e.exports=r}).call(t,function(){return this}())},function(e,t){function n(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t,n){function r(e,t,n){var r=typeof e;return"function"==r?void 0===t?e:a(e,t,n):null==e?i:"object"==r?o(e):void 0===t?l(e):s(e,t)}var o=n(208),s=n(209),a=n(43),i=n(100),l=n(229);e.exports=r},function(e,t,n){function r(e,t){var n=e?e.length:0,r=[];if(!n)return r;var l=-1,u=o,p=!0,d=p&&t.length>=i?a(t):null,f=t.length;d&&(u=s,p=!1,t=d);e:for(;++l<n;){var c=e[l];if(p&&c===c){for(var h=f;h--;)if(t[h]===c)continue e;r.push(c)}else u(t,c,0)<0&&r.push(c)}return r}var o=n(205),s=n(213),a=n(217),i=200;e.exports=r},function(e,t,n){var r=n(204),o=n(215),s=o(r);e.exports=s},function(e,t){function n(e,t,n,r){var o;return n(e,function(e,n,s){return t(e,n,s)?(o=r?n:e,!1):void 0}),o}e.exports=n},function(e,t){function n(e,t,n){for(var r=e.length,o=n?r:-1;n?o--:++o<r;)if(t(e[o],o,e))return o;return-1}e.exports=n},function(e,t,n){function r(e,t){return o(e,t,s)}var o=n(86),s=n(48);e.exports=r},function(e,t,n){function r(e,t){return o(e,t,s)}var o=n(86),s=n(47);e.exports=r},function(e,t,n){function r(e,t,n){if(t!==t)return o(e,n);for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}var o=n(223);e.exports=r},function(e,t,n){function r(e,t,n,r,c,v,y){var g=i(e),b=i(t),T=d,P=d;g||(T=m.call(e),T==p?T=f:T!=f&&(g=u(e))),b||(P=m.call(t),P==p?P=f:P!=f&&(b=u(t)));var x=T==f&&!l(e),E=P==f&&!l(t),C=T==P;if(C&&!g&&!x)return s(e,t,T);if(!c){var _=x&&h.call(e,"__wrapped__"),N=E&&h.call(t,"__wrapped__");if(_||N)return n(_?e.value():e,N?t.value():t,r,c,v,y)}if(!C)return!1;v||(v=[]),y||(y=[]);for(var O=v.length;O--;)if(v[O]==e)return y[O]==t;v.push(e),y.push(t);var w=(g?o:a)(e,t,n,r,c,v,y);return v.pop(),y.pop(),w}var o=n(219),s=n(220),a=n(221),i=n(15),l=n(91),u=n(226),p="[object Arguments]",d="[object Array]",f="[object Object]",c=Object.prototype,h=c.hasOwnProperty,m=c.toString;e.exports=r},function(e,t,n){function r(e,t,n){var r=t.length,a=r,i=!n;if(null==e)return!a;for(e=s(e);r--;){var l=t[r];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<a;){l=t[r];var u=l[0],p=e[u],d=l[1];if(i&&l[2]){if(void 0===p&&!(u in e))return!1}else{var f=n?n(p,d,u):void 0;if(!(void 0===f?o(d,p,n,!0):f))return!1}}return!0}var o=n(88),s=n(13);e.exports=r},function(e,t,n){function r(e){var t=s(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null==e?!1:(e=a(e),e[n]===r&&(void 0!==r||n in e))}}return function(e){return o(e,t)}}var o=n(207),s=n(222),a=n(13);e.exports=r},function(e,t,n){function r(e,t){var n=i(e),r=l(e)&&u(t),c=e+"";return e=f(e),function(i){if(null==i)return!1;var l=c;if(i=d(i),(n||!r)&&!(l in i)){if(i=1==e.length?i:o(i,a(e,0,-1)),null==i)return!1;l=p(e),i=d(i)}return i[l]===t?void 0!==t||l in i:s(t,i[l],void 0,!0)}}var o=n(87),s=n(88),a=n(211),i=n(15),l=n(93),u=n(94),p=n(191),d=n(13),f=n(97);e.exports=r},function(e,t,n){function r(e){var t=e+"";return e=s(e),function(n){return o(n,e,t)}}var o=n(87),s=n(97);e.exports=r},function(e,t){function n(e,t,n){var r=-1,o=e.length;t=null==t?0:+t||0,0>t&&(t=-t>o?0:o+t),n=void 0===n||n>o?o:+n||0,0>n&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++r<o;)s[r]=e[r+t];return s}e.exports=n},function(e,t){function n(e){return null==e?"":e+""}e.exports=n},function(e,t,n){function r(e,t){var n=e.data,r="string"==typeof t||o(t)?n.set.has(t):n.hash[t];return r?0:-1}var o=n(16);e.exports=r},function(e,t,n){function r(e){var t=this.data;"string"==typeof e||o(e)?t.set.add(e):t.hash[e]=!0}var o=n(16);e.exports=r},function(e,t,n){function r(e,t){return function(n,r){var i=n?o(n):0;if(!s(i))return e(n,r);for(var l=t?i:-1,u=a(n);(t?l--:++l<i)&&r(u[l],l,u)!==!1;);return n}}var o=n(90),s=n(21),a=n(13);e.exports=r},function(e,t,n){function r(e){return function(t,n,r){for(var s=o(t),a=r(t),i=a.length,l=e?i:-1;e?l--:++l<i;){var u=a[l];if(n(s[u],u,s)===!1)break}return t}}var o=n(13);e.exports=r},function(e,t,n){(function(t){function r(e){return i&&a?new o(e):null}var o=n(193),s=n(30),a=s(t,"Set"),i=s(Object,"create");e.exports=r}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return function(n,r,l){if(r=o(r,l,3),i(n)){var u=a(n,r,t);return u>-1?n[u]:void 0}return s(n,r,e)}}var o=n(198),s=n(201),a=n(202),i=n(15);e.exports=r},function(e,t,n){function r(e,t,n,r,s,a,i){var l=-1,u=e.length,p=t.length;if(u!=p&&!(s&&p>u))return!1;for(;++l<u;){var d=e[l],f=t[l],c=r?r(s?f:d,s?d:f,l):void 0;if(void 0!==c){if(c)continue;return!1}if(s){if(!o(t,function(e){return d===e||n(d,e,r,s,a,i)}))return!1}else if(d!==f&&!n(d,f,r,s,a,i))return!1}return!0}var o=n(197);e.exports=r},function(e,t){function n(e,t,n){switch(n){case r:case o:return+e==+t;case s:return e.name==t.name&&e.message==t.message;case a:return e!=+e?t!=+t:e==+t;case i:case l:return e==t+""}return!1}var r="[object Boolean]",o="[object Date]",s="[object Error]",a="[object Number]",i="[object RegExp]",l="[object String]";e.exports=n},function(e,t,n){function r(e,t,n,r,s,i,l){var u=o(e),p=u.length,d=o(t),f=d.length;if(p!=f&&!s)return!1;for(var c=p;c--;){var h=u[c];if(!(s?h in t:a.call(t,h)))return!1}for(var m=s;++c<p;){h=u[c];var v=e[h],y=t[h],g=r?r(s?y:v,s?v:y,h):void 0;if(!(void 0===g?n(v,y,r,s,i,l):g))return!1;m||(m="constructor"==h)}if(!m){var b=e.constructor,T=t.constructor;if(b!=T&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof T&&T instanceof T))return!1}return!0}var o=n(47),s=Object.prototype,a=s.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){for(var t=s(e),n=t.length;n--;)t[n][2]=o(t[n][1]);return t}var o=n(94),s=n(227);e.exports=r},function(e,t){function n(e,t,n){for(var r=e.length,o=t+(n?0:-1);n?o--:++o<r;){var s=e[o];if(s!==s)return o}return-1}e.exports=n},function(e,t,n){function r(e){for(var t=u(e),n=t.length,r=n&&e.length,p=!!r&&i(r)&&(s(e)||o(e)||l(e)),f=-1,c=[];++f<n;){var h=t[f];(p&&a(h,r)||d.call(e,h))&&c.push(h)}return c}var o=n(45),s=n(15),a=n(92),i=n(21),l=n(46),u=n(48),p=Object.prototype,d=p.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return null==e?!1:o(e)?d.test(u.call(e)):a(e)&&(s(e)?d:i).test(e)}var o=n(98),s=n(91),a=n(17),i=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,p=l.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"); +e.exports=r},function(e,t,n){function r(e){return s(e)&&o(e.length)&&!!S[M.call(e)]}var o=n(21),s=n(17),a="[object Arguments]",i="[object Array]",l="[object Boolean]",u="[object Date]",p="[object Error]",d="[object Function]",f="[object Map]",c="[object Number]",h="[object Object]",m="[object RegExp]",v="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",T="[object Float32Array]",P="[object Float64Array]",x="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",_="[object Uint8Array]",N="[object Uint8ClampedArray]",O="[object Uint16Array]",w="[object Uint32Array]",S={};S[T]=S[P]=S[x]=S[E]=S[C]=S[_]=S[N]=S[O]=S[w]=!0,S[a]=S[i]=S[b]=S[l]=S[u]=S[p]=S[d]=S[f]=S[c]=S[h]=S[m]=S[v]=S[y]=S[g]=!1;var k=Object.prototype,M=k.toString;e.exports=r},function(e,t,n){function r(e){e=s(e);for(var t=-1,n=o(e),r=n.length,a=Array(r);++t<r;){var i=n[t];a[t]=[i,e[i]]}return a}var o=n(47),s=n(13);e.exports=r},function(e,t,n){var r=n(85),o=n(43),s=n(95),a=n(96),i=n(84),l=i(function(e,t){return null==e?{}:"function"==typeof t[0]?a(e,o(t[0],t[1],3)):s(e,r(t))});e.exports=l},function(e,t,n){function r(e){return a(e)?o(e):s(e)}var o=n(89),s=n(210),a=n(93);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(1),u=r(l),p=n(101),d=r(p),f=n(231),c=r(f),h=n(102),m=r(h),v=n(235),y=r(v),g=function(e){function t(n,r){s(this,t),e.call(this,n,r),this.state={exited:!n.show},this.onHiddenListener=this.handleHidden.bind(this)}return a(t,e),t.prototype.componentWillReceiveProps=function(e){e.show?this.setState({exited:!1}):e.transition||this.setState({exited:!0})},t.prototype.render=function(){var e=this.props,t=e.container,n=e.containerPadding,r=e.target,s=e.placement,a=e.rootClose,i=e.children,l=e.transition,p=o(e,["container","containerPadding","target","placement","rootClose","children","transition"]),f=p.show||l&&!this.state.exited;if(!f)return null;var h=i;if(h=u["default"].createElement(c["default"],{container:t,containerPadding:n,target:r,placement:s},h),l){var v=p.onExit,y=p.onExiting,g=p.onEnter,b=p.onEntering,T=p.onEntered;h=u["default"].createElement(l,{"in":p.show,transitionAppear:!0,onExit:v,onExiting:y,onExited:this.onHiddenListener,onEnter:g,onEntering:b,onEntered:T},h)}return a&&(h=u["default"].createElement(m["default"],{onRootClose:p.onHide},h)),u["default"].createElement(d["default"],{container:t},h)},t.prototype.handleHidden=function(){if(this.setState({exited:!0}),this.props.onExited){var e;(e=this.props).onExited.apply(e,arguments)}},t}(u["default"].Component);g.propTypes=i({},d["default"].propTypes,c["default"].propTypes,{show:u["default"].PropTypes.bool,rootClose:u["default"].PropTypes.bool,onHide:u["default"].PropTypes.func,transition:y["default"],onEnter:u["default"].PropTypes.func,onEntering:u["default"].PropTypes.func,onEntered:u["default"].PropTypes.func,onExit:u["default"].PropTypes.func,onExiting:u["default"].PropTypes.func,onExited:u["default"].PropTypes.func}),t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(1),u=r(l),p=n(10),d=r(p),f=n(4),c=r(f),h=n(31),m=r(h),v=n(104),y=r(v),g=n(234),b=n(106),T=r(b),P=function(e){function t(n,r){s(this,t),e.call(this,n,r),this.state={positionLeft:null,positionTop:null,arrowOffsetLeft:null,arrowOffsetTop:null},this._needsFlush=!1,this._lastTarget=null}return a(t,e),t.prototype.componentDidMount=function(){this.updatePosition()},t.prototype.componentWillReceiveProps=function(){this._needsFlush=!0},t.prototype.componentDidUpdate=function(e){this._needsFlush&&(this._needsFlush=!1,this.updatePosition(e.placement!==this.props.placement))},t.prototype.componentWillUnmount=function(){this._lastTarget=null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=o(e,["children","className"]),s=this.state,a=s.positionLeft,p=s.positionTop,d=o(s,["positionLeft","positionTop"]),f=u["default"].Children.only(t);return l.cloneElement(f,i({},r,d,{positionLeft:a,positionTop:p,className:c["default"](n,f.props.className),style:i({},f.props.style,{left:a,top:p})}))},t.prototype.getTargetSafe=function(){if(!this.props.target)return null;var e=this.props.target(this.props);return e?e:null},t.prototype.updatePosition=function(e){var t=this.getTargetSafe();if(t!==this._lastTarget||e){if(this._lastTarget=t,!t)return void this.setState({positionLeft:null,positionTop:null,arrowOffsetLeft:null,arrowOffsetTop:null});var n=d["default"].findDOMNode(this),r=y["default"](this.props.container,m["default"](this).body);this.setState(g.calcOverlayPosition(this.props.placement,n,t,r,this.props.containerPadding))}},t}(u["default"].Component);P.propTypes={target:u["default"].PropTypes.func,container:T["default"],containerPadding:u["default"].PropTypes.number,placement:u["default"].PropTypes.oneOf(["top","right","bottom","left"])},P.displayName="Position",P.defaultProps={containerPadding:0,placement:"right"},t["default"]=P,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(81),s=r(o),a=n(179),i=r(a);t["default"]=function(e,t,n){return s["default"](e,t,n),{remove:function(){i["default"](e,t,n)}}},e.exports=t["default"]},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return t.filter(function(e){return null!=e}).reduce(function(e,t){if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(){for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}},null)}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n,r){var o=h.getContainerDimensions(n),s=o.scroll,a=o.height,i=e-r-s,l=e+r-s+t;return 0>i?-i:l>a?a-l:0}function s(e,t,n,r){var o=h.getContainerDimensions(n),s=o.width,a=e-r,i=e+r+t;return 0>a?-a:i>s?s-i:0}t.__esModule=!0;var a=n(31),i=r(a),l=n(40),u=r(l),p=n(182),d=r(p),f=n(82),c=r(f),h={getContainerDimensions:function(e){var t=void 0,n=void 0,r=void 0;if("BODY"===e.tagName)t=window.innerWidth,n=window.innerHeight,r=c["default"](i["default"](e).documentElement)||c["default"](e);else{var o=u["default"](e);t=o.width,n=o.height,r=c["default"](e)}return{width:t,height:n,scroll:r}},getPosition:function(e,t){var n="BODY"===t.tagName?u["default"](e):d["default"](e,t);return n},calcOverlayPosition:function(e,t,n,r,a){var i=h.getPosition(n,r),l=u["default"](t),p=l.height,d=l.width,f=void 0,c=void 0,m=void 0,v=void 0;if("left"===e||"right"===e){c=i.top+(i.height-p)/2,f="left"===e?i.left-d:i.left+i.width;var y=o(c,p,r,a);c+=y,v=50*(1-2*y/p)+"%",m=void 0}else{if("top"!==e&&"bottom"!==e)throw new Error('calcOverlayPosition(): No such placement of "'+e+'" found.');f=i.left+(i.width-d)/2,c="top"===e?i.top-p:i.top+i.height;var g=s(f,d,r,a);f+=g,m=50*(1-2*g/d)+"%",v=void 0}return{positionLeft:f,positionTop:c,arrowOffsetLeft:m,arrowOffsetTop:v}}};t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){var r=i.errMsg(e,t,n,". Expected an Element `type`");if("function"!=typeof e[t]){if(a["default"].isValidElement(e[t]))return new Error(r+", not an actual Element");if("string"!=typeof e[t])return new Error(r+" such as a tag name or return value of React.createClass(...)")}}t.__esModule=!0;var s=n(1),a=r(s),i=n(105);t["default"]=i.createChainableTypeChecker(o),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){function t(t,n,r){var s=t[n];if(!e.hasOwnProperty(s)){var a=JSON.stringify(Object.keys(e));return new Error(o.errMsg(t,n,r,", expected one of "+a+"."))}}return o.createChainableTypeChecker(t)}t.__esModule=!0,t["default"]=r;var o=n(51);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function s(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){function n(n,r){function o(e,n){var o=d.getLinkName(e),s=this.props[r[e]];o&&a(this.props,o)&&!s&&(s=this.props[o].requestChange);for(var i=arguments.length,l=Array(i>2?i-2:0),u=2;i>u;u++)l[u-2]=arguments[u];t(this,e,s,n,l)}function a(e,t){return void 0!==e[t]}var l,p=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],f=n.displayName||n.name||"Component",c=d.getType(n).propTypes;l=d.uncontrolledPropTypes(r,c,f),p=d.transform(p,function(e,t){e[t]=function(){var e;return(e=this.refs.inner)[t].apply(e,arguments)}},{});var h=u["default"].createClass(i({displayName:"Uncontrolled("+f+")",mixins:e,propTypes:l},p,{componentWillMount:function(){var e=this.props,t=Object.keys(r);this._values=d.transform(t,function(t,n){t[n]=e[d.defaultKey(n)]},{})},componentWillReceiveProps:function(e){var t=this,n=this.props,o=Object.keys(r);o.forEach(function(r){void 0===d.getValue(e,r)&&void 0!==d.getValue(n,r)&&(t._values[r]=e[d.defaultKey(r)])})},render:function(){var e=this,t={},l=this.props,p=(l.valueLink,l.checkedLink,s(l,["valueLink","checkedLink"]));return d.each(r,function(n,r){var s=d.getLinkName(r),i=e.props[r];s&&!a(e.props,r)&&a(e.props,s)&&(i=e.props[s].value),t[r]=void 0!==i?i:e._values[r],t[n]=o.bind(e,r)}),t=i({},p,t,{ref:"inner"}),u["default"].createElement(n,t)}}));return h.ControlledComponent=n,h}return n}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t["default"]=a;var l=n(1),u=o(l),p=n(240),d=r(p);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n,r,o){n&&(e._notifying=!0,n.call.apply(n,[e,r].concat(o)),e._notifying=!1),e._values[t]=r,e.forceUpdate()}t.__esModule=!0;var s=n(237),a=r(s),i={shouldComponentUpdate:function(){return!this._notifying}};t["default"]=a["default"]([i],o),e.exports=t["default"]},function(e,t,n){"use strict";var r=function(e,t,n,r,o,s,a,i){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,s,a,i],p=0;l=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[p++]}))}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return function(r,o){return void 0!==r[o]?r[e]?t&&t(r,o,n):new Error("You have provided a `"+o+"` prop to `"+n+"` without an `"+e+"` handler. This will render a read-only field. If the field should be mutable use `"+p(o)+"`. Otherwise, set `"+e+"`"):void 0}}function s(e,t,n){var r={};return r}function a(e){return 0===g[0]&&g[1]>=13?e:e.type}function i(e,t){var n=u(t);return n&&!l(e,t)&&l(e,n)?e[n].value:e[t]}function l(e,t){return void 0!==e[t]}function u(e){return"value"===e?"valueLink":"checked"===e?"checkedLink":null}function p(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function d(e,t,n){return function(){for(var r=arguments.length,o=Array(r),s=0;r>s;s++)o[s]=arguments[s];t&&t.call.apply(t,[e].concat(o)),n&&n.call.apply(n,[e].concat(o))}}function f(e,t,n){return c(e,t.bind(null,n=n||(Array.isArray(e)?[]:{}))),n}function c(e,t,n){if(Array.isArray(e))return e.forEach(t,n);for(var r in e)h(e,r)&&t.call(n,e[r],r,e)}function h(e,t){return e?Object.prototype.hasOwnProperty.call(e,t):!1}t.__esModule=!0,t.customPropType=o,t.uncontrolledPropTypes=s,t.getType=a,t.getValue=i,t.getLinkName=u,t.defaultKey=p,t.chain=d,t.transform=f,t.each=c,t.has=h;var m=n(1),v=r(m),y=n(239),g=(r(y),v["default"].version.split(".").map(parseFloat));t.version=g}])}); +//# sourceMappingURL=react-bootstrap.min.js.map
\ No newline at end of file diff --git a/web/static/js/react-dom-0.14.0.js b/web/static/js/react-dom-0.14.0.js new file mode 100644 index 000000000..8b3e85d6b --- /dev/null +++ b/web/static/js/react-dom-0.14.0.js @@ -0,0 +1,42 @@ +/** + * ReactDOM v0.14.0 + * + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +// Based off https://github.com/ForbesLindesay/umd/blob/master/template.js +;(function(f) { + // CommonJS + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = f(require('react')); + + // RequireJS + } else if (typeof define === "function" && define.amd) { + define(['react'], f); + + // <script> + } else { + var g + if (typeof window !== "undefined") { + g = window; + } else if (typeof global !== "undefined") { + g = global; + } else if (typeof self !== "undefined") { + g = self; + } else { + // works providing we're not in "use strict"; + // needed for Java 8 Nashorn + // see https://github.com/facebook/react/issues/3037 + g = this; + } + g.ReactDOM = f(g.React); + } + +})(function(React) { + return React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; +}); diff --git a/web/static/js/react-dom-0.14.0.min.js b/web/static/js/react-dom-0.14.0.min.js new file mode 100644 index 000000000..43c53e25d --- /dev/null +++ b/web/static/js/react-dom-0.14.0.min.js @@ -0,0 +1,12 @@ +/** + * ReactDOM v0.14.0 + * + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOM=e(f.React)}}(function(e){return e.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED});
\ No newline at end of file diff --git a/web/static/js/react-with-addons-0.13.3.min.js b/web/static/js/react-with-addons-0.13.3.min.js deleted file mode 100644 index 0e20d1ceb..000000000 --- a/web/static/js/react-with-addons-0.13.3.min.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * React (with addons) v0.13.3 - * - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";var r=e(25),o=e(31),i=e(42),a=e(34),s=e(67),u=e(95),l=e(97),c=e(124),p=e(119),d=e(165);o.addons={CSSTransitionGroup:a,LinkedStateMixin:r,PureRenderMixin:i,TransitionGroup:u,batchedUpdates:l.batchedUpdates,classSet:c,cloneWithProps:p,createFragment:s.create,update:d},t.exports=o},{119:119,124:124,165:165,25:25,31:31,34:34,42:42,67:67,95:95,97:97}],2:[function(e,t,n){"use strict";var r=e(131),o={componentDidMount:function(){this.props.autoFocus&&r(this.getDOMNode())}};t.exports=o},{131:131}],3:[function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function i(e){switch(e){case P.topCompositionStart:return I.compositionStart;case P.topCompositionEnd:return I.compositionEnd;case P.topCompositionUpdate:return I.compositionUpdate}}function a(e,t){return e===P.topKeyDown&&t.keyCode===b}function s(e,t){switch(e){case P.topKeyUp:return-1!==E.indexOf(t.keyCode);case P.topKeyDown:return t.keyCode!==b;case P.topKeyPress:case P.topMouseDown:case P.topBlur:return!0;default:return!1}}function u(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function l(e,t,n,r){var o,l;if(_?o=i(e):w?s(e,r)&&(o=I.compositionEnd):a(e,r)&&(o=I.compositionStart),!o)return null;M&&(w||o!==I.compositionStart?o===I.compositionEnd&&w&&(l=w.getData()):w=v.getPooled(t));var c=g.getPooled(o,n,r);if(l)c.data=l;else{var p=u(r);null!==p&&(c.data=p)}return h.accumulateTwoPhaseDispatches(c),c}function c(e,t){switch(e){case P.topCompositionEnd:return u(t);case P.topKeyPress:var n=t.which;return n!==T?null:(R=!0,N);case P.topTextInput:var r=t.data;return r===N&&R?null:r;default:return null}}function p(e,t){if(w){if(e===P.topCompositionEnd||s(e,t)){var n=w.getData();return v.release(w),w=null,n}return null}switch(e){case P.topPaste:return null;case P.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case P.topCompositionEnd:return M?null:t.data;default:return null}}function d(e,t,n,r){var o;if(o=D?c(e,r):p(e,r),!o)return null;var i=y.getPooled(I.beforeInput,n,r);return i.data=o,h.accumulateTwoPhaseDispatches(i),i}var f=e(16),h=e(21),m=e(22),v=e(23),g=e(103),y=e(107),C=e(154),E=[9,13,27,32],b=229,_=m.canUseDOM&&"CompositionEvent"in window,x=null;m.canUseDOM&&"documentMode"in document&&(x=document.documentMode);var D=m.canUseDOM&&"TextEvent"in window&&!x&&!r(),M=m.canUseDOM&&(!_||x&&x>8&&11>=x),T=32,N=String.fromCharCode(T),P=f.topLevelTypes,I={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[P.topCompositionEnd,P.topKeyPress,P.topTextInput,P.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[P.topBlur,P.topCompositionEnd,P.topKeyDown,P.topKeyPress,P.topKeyUp,P.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[P.topBlur,P.topCompositionStart,P.topKeyDown,P.topKeyPress,P.topKeyUp,P.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[P.topBlur,P.topCompositionUpdate,P.topKeyDown,P.topKeyPress,P.topKeyUp,P.topMouseDown]}},R=!1,w=null,O={eventTypes:I,extractEvents:function(e,t,n,r){return[l(e,t,n,r),d(e,t,n,r)]}};t.exports=O},{103:103,107:107,154:154,16:16,21:21,22:22,23:23}],4:[function(e,t,n){var r=e(147),o={addClass:function(e,t){return r(!/\s/.test(t)),t&&(e.classList?e.classList.add(t):o.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return r(!/\s/.test(t)),t&&(e.classList?e.classList.remove(t):o.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?o.addClass:o.removeClass)(e,t)},hasClass:function(e,t){return r(!/\s/.test(t)),e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}};t.exports=o},{147:147}],5:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){i.forEach(function(t){o[r(t,e)]=o[e]})});var a={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:a};t.exports=s},{}],6:[function(e,t,n){"use strict";var r=e(5),o=e(22),i=(e(118),e(125)),a=e(145),s=e(156),u=(e(166),s(function(e){return a(e)})),l="cssFloat";o.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(l="styleFloat");var c={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=u(n)+":",t+=i(n,r)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var o in t)if(t.hasOwnProperty(o)){var a=i(o,t[o]);if("float"===o&&(o=l),a)n[o]=a;else{var s=r.shorthandPropertyExpansions[o];if(s)for(var u in s)n[u]="";else n[o]=""}}}};t.exports=c},{118:118,125:125,145:145,156:156,166:166,22:22,5:5}],7:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e(30),i=e(29),a=e(147);i(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){a(e.length===t.length),this._callbacks=null,this._contexts=null;for(var n=0,r=e.length;r>n;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),t.exports=r},{147:147,29:29,30:30}],8:[function(e,t,n){"use strict";function r(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function o(e){var t=x.getPooled(P.change,R,e);E.accumulateTwoPhaseDispatches(t),_.batchedUpdates(i,t)}function i(e){C.enqueueEvents(e),C.processEventQueue()}function a(e,t){I=e,R=t,I.attachEvent("onchange",o)}function s(){I&&(I.detachEvent("onchange",o),I=null,R=null)}function u(e,t,n){return e===N.topChange?n:void 0}function l(e,t,n){e===N.topFocus?(s(),a(t,n)):e===N.topBlur&&s()}function c(e,t){I=e,R=t,w=e.value,O=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(I,"value",k),I.attachEvent("onpropertychange",d)}function p(){I&&(delete I.value,I.detachEvent("onpropertychange",d),I=null,R=null,w=null,O=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==w&&(w=t,o(e))}}function f(e,t,n){return e===N.topInput?n:void 0}function h(e,t,n){e===N.topFocus?(p(),c(t,n)):e===N.topBlur&&p()}function m(e,t,n){return e!==N.topSelectionChange&&e!==N.topKeyUp&&e!==N.topKeyDown||!I||I.value===w?void 0:(w=I.value,R)}function v(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===N.topClick?n:void 0}var y=e(16),C=e(18),E=e(21),b=e(22),_=e(97),x=e(105),D=e(148),M=e(150),T=e(154),N=y.topLevelTypes,P={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[N.topBlur,N.topChange,N.topClick,N.topFocus,N.topInput,N.topKeyDown,N.topKeyUp,N.topSelectionChange]}},I=null,R=null,w=null,O=null,S=!1;b.canUseDOM&&(S=D("change")&&(!("documentMode"in document)||document.documentMode>8));var A=!1;b.canUseDOM&&(A=D("input")&&(!("documentMode"in document)||document.documentMode>9));var k={get:function(){return O.get.call(this)},set:function(e){w=""+e,O.set.call(this,e)}},L={eventTypes:P,extractEvents:function(e,t,n,o){var i,a;if(r(t)?S?i=u:a=l:M(t)?A?i=f:(i=m,a=h):v(t)&&(i=g),i){var s=i(e,t,n);if(s){var c=x.getPooled(P.change,s,o);return E.accumulateTwoPhaseDispatches(c),c}}a&&a(e,t,n)}};t.exports=L},{105:105,148:148,150:150,154:154,16:16,18:18,21:21,22:22,97:97}],9:[function(e,t,n){"use strict";var r=0,o={createReactRootIndex:function(){return r++}};t.exports=o},{}],10:[function(e,t,n){"use strict";function r(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var o=e(13),i=e(77),a=e(160),s=e(147),u={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:a,processUpdates:function(e,t){for(var n,u=null,l=null,c=0;c<e.length;c++)if(n=e[c],n.type===i.MOVE_EXISTING||n.type===i.REMOVE_NODE){var p=n.fromIndex,d=n.parentNode.childNodes[p],f=n.parentID;s(d),u=u||{},u[f]=u[f]||[],u[f][p]=d,l=l||[],l.push(d)}var h=o.dangerouslyRenderMarkup(t);if(l)for(var m=0;m<l.length;m++)l[m].parentNode.removeChild(l[m]);for(var v=0;v<e.length;v++)switch(n=e[v],n.type){case i.INSERT_MARKUP:r(n.parentNode,h[n.markupIndex],n.toIndex);break;case i.MOVE_EXISTING:r(n.parentNode,u[n.parentID][n.fromIndex],n.toIndex);break;case i.TEXT_CONTENT:a(n.parentNode,n.textContent);break;case i.REMOVE_NODE:}}};t.exports=u},{13:13,147:147,160:160,77:77}],11:[function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=e(147),i={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=e.Properties||{},n=e.DOMAttributeNames||{},a=e.DOMPropertyNames||{},u=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var l in t){o(!s.isStandardName.hasOwnProperty(l)),s.isStandardName[l]=!0;var c=l.toLowerCase();if(s.getPossibleStandardName[c]=l,n.hasOwnProperty(l)){var p=n[l];s.getPossibleStandardName[p]=l,s.getAttributeName[l]=p}else s.getAttributeName[l]=c;s.getPropertyName[l]=a.hasOwnProperty(l)?a[l]:l,u.hasOwnProperty(l)?s.getMutationMethod[l]=u[l]:s.getMutationMethod[l]=null;var d=t[l];s.mustUseAttribute[l]=r(d,i.MUST_USE_ATTRIBUTE),s.mustUseProperty[l]=r(d,i.MUST_USE_PROPERTY),s.hasSideEffects[l]=r(d,i.HAS_SIDE_EFFECTS),s.hasBooleanValue[l]=r(d,i.HAS_BOOLEAN_VALUE),s.hasNumericValue[l]=r(d,i.HAS_NUMERIC_VALUE),s.hasPositiveNumericValue[l]=r(d,i.HAS_POSITIVE_NUMERIC_VALUE),s.hasOverloadedBooleanValue[l]=r(d,i.HAS_OVERLOADED_BOOLEAN_VALUE),o(!s.mustUseAttribute[l]||!s.mustUseProperty[l]),o(s.mustUseProperty[l]||!s.hasSideEffects[l]),o(!!s.hasBooleanValue[l]+!!s.hasNumericValue[l]+!!s.hasOverloadedBooleanValue[l]<=1)}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<s._isCustomAttributeFunctions.length;t++){var n=s._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=a[e];return r||(a[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:i};t.exports=s},{147:147}],12:[function(e,t,n){"use strict";function r(e,t){return null==t||o.hasBooleanValue[e]&&!t||o.hasNumericValue[e]&&isNaN(t)||o.hasPositiveNumericValue[e]&&1>t||o.hasOverloadedBooleanValue[e]&&t===!1}var o=e(11),i=e(158),a=(e(166),{createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+i(e)},createMarkupForProperty:function(e,t){if(o.isStandardName.hasOwnProperty(e)&&o.isStandardName[e]){if(r(e,t))return"";var n=o.getAttributeName[e];return o.hasBooleanValue[e]||o.hasOverloadedBooleanValue[e]&&t===!0?n:n+"="+i(t)}return o.isCustomAttribute(e)?null==t?"":e+"="+i(t):null},setValueForProperty:function(e,t,n){if(o.isStandardName.hasOwnProperty(t)&&o.isStandardName[t]){var i=o.getMutationMethod[t];if(i)i(e,n);else if(r(t,n))this.deleteValueForProperty(e,t);else if(o.mustUseAttribute[t])e.setAttribute(o.getAttributeName[t],""+n);else{var a=o.getPropertyName[t];o.hasSideEffects[t]&&""+e[a]==""+n||(e[a]=n)}}else o.isCustomAttribute(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){if(o.isStandardName.hasOwnProperty(t)&&o.isStandardName[t]){var n=o.getMutationMethod[t];if(n)n(e,void 0);else if(o.mustUseAttribute[t])e.removeAttribute(o.getAttributeName[t]);else{var r=o.getPropertyName[t],i=o.getDefaultValueForProperty(e.nodeName,r);o.hasSideEffects[t]&&""+e[r]===i||(e[r]=i)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}});t.exports=a},{11:11,158:158,166:166}],13:[function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=e(22),i=e(123),a=e(126),s=e(139),u=e(147),l=/^(<[^ \/>]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){u(o.canUseDOM);for(var t,n={},p=0;p<e.length;p++)u(e[p]),t=r(e[p]),t=s(t)?t:"*",n[t]=n[t]||[],n[t][p]=e[p];var d=[],f=0;for(t in n)if(n.hasOwnProperty(t)){var h,m=n[t];for(h in m)if(m.hasOwnProperty(h)){var v=m[h];m[h]=v.replace(l,"$1 "+c+'="'+h+'" ')}for(var g=i(m.join(""),a),y=0;y<g.length;++y){var C=g[y];C.hasAttribute&&C.hasAttribute(c)&&(h=+C.getAttribute(c),C.removeAttribute(c),u(!d.hasOwnProperty(h)),d[h]=C,f+=1)}}return u(f===d.length),u(d.length===e.length),d},dangerouslyReplaceNodeWithMarkup:function(e,t){u(o.canUseDOM),u(t),u("html"!==e.tagName.toLowerCase());var n=i(t,a)[0];e.parentNode.replaceChild(n,e)}};t.exports=p},{123:123,126:126,139:139,147:147,22:22}],14:[function(e,t,n){"use strict";var r=e(154),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null}),r({AnalyticsEventPlugin:null}),r({MobileSafariClickEventPlugin:null})];t.exports=o},{154:154}],15:[function(e,t,n){"use strict";var r=e(16),o=e(21),i=e(109),a=e(75),s=e(154),u=r.topLevelTypes,l=a.getFirstReactDOM,c={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},p=[null,null],d={eventTypes:c,extractEvents:function(e,t,n,r){if(e===u.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var s;if(t.window===t)s=t;else{var d=t.ownerDocument;s=d?d.defaultView||d.parentWindow:window}var f,h;if(e===u.topMouseOut?(f=t,h=l(r.relatedTarget||r.toElement)||s):(f=s,h=t),f===h)return null;var m=f?a.getID(f):"",v=h?a.getID(h):"",g=i.getPooled(c.mouseLeave,m,r);g.type="mouseleave",g.target=f,g.relatedTarget=h;var y=i.getPooled(c.mouseEnter,v,r);return y.type="mouseenter",y.target=h,y.relatedTarget=f,o.accumulateEnterLeaveDispatches(g,y,m,v),p[0]=g,p[1]=y,p}};t.exports=d},{109:109,154:154,16:16,21:21,75:75}],16:[function(e,t,n){"use strict";var r=e(153),o=r({bubbled:null,captured:null}),i=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:i,PropagationPhases:o};t.exports=a},{153:153}],17:[function(e,t,n){var r=e(126),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},{126:126}],18:[function(e,t,n){"use strict";var r=e(19),o=e(20),i=e(115),a=e(132),s=e(147),u={},l=null,c=function(e){if(e){var t=o.executeDispatch,n=r.getPluginModuleForEvent(e);n&&n.executeDispatch&&(t=n.executeDispatch),o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},p=null,d={injection:{injectMount:o.injection.injectMount,injectInstanceHandle:function(e){p=e},getInstanceHandle:function(){return p},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){s(!n||"function"==typeof n);var r=u[t]||(u[t]={});r[e]=n},getListener:function(e,t){var n=u[t];return n&&n[e]},deleteListener:function(e,t){var n=u[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in u)delete u[t][e]},extractEvents:function(e,t,n,o){for(var a,s=r.plugins,u=0,l=s.length;l>u;u++){var c=s[u];if(c){var p=c.extractEvents(e,t,n,o);p&&(a=i(a,p))}}return a},enqueueEvents:function(e){e&&(l=i(l,e))},processEventQueue:function(){var e=l;l=null,a(e,c),s(!l)},__purge:function(){u={}},__getListenerBank:function(){return u}};t.exports=d},{115:115,132:132,147:147,19:19,20:20}],19:[function(e,t,n){"use strict";function r(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(a(n>-1),!l.plugins[n]){a(t.extractEvents),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)a(o(r[i],t,i))}}}function o(e,t,n){a(!l.eventNameDispatchConfigs.hasOwnProperty(n)),l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,t,n)}return!0}return e.registrationName?(i(e.registrationName,t,n),!0):!1}function i(e,t,n){a(!l.registrationNameModules[e]),l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=e(147),s=null,u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){a(!s),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];u.hasOwnProperty(n)&&u[n]===o||(a(!u[n]),u[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=l},{147:147}],20:[function(e,t,n){"use strict";function r(e){return e===v.topMouseUp||e===v.topTouchEnd||e===v.topTouchCancel}function o(e){return e===v.topMouseMove||e===v.topTouchMove}function i(e){return e===v.topMouseDown||e===v.topTouchStart}function a(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)t(e,n[o],r[o]);else n&&t(e,n,r)}function s(e,t,n){e.currentTarget=m.Mount.getNode(n);var r=t(e,n);return e.currentTarget=null,r}function u(e,t){a(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function l(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function c(e){var t=l(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function p(e){var t=e._dispatchListeners,n=e._dispatchIDs;h(!Array.isArray(t));var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function d(e){return!!e._dispatchListeners}var f=e(16),h=e(147),m={Mount:null,injectMount:function(e){m.Mount=e}},v=f.topLevelTypes,g={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:p,executeDispatch:s,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:c,hasDispatches:d,injection:m,useTouchEvents:!1};t.exports=g},{147:147,16:16}],21:[function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return v(e,r)}function o(e,t,n){var o=t?m.bubbled:m.captured,i=r(e,n,o);i&&(n._dispatchListeners=f(n._dispatchListeners,i),n._dispatchIDs=f(n._dispatchIDs,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&d.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function a(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=v(e,r);o&&(n._dispatchListeners=f(n._dispatchListeners,o),n._dispatchIDs=f(n._dispatchIDs,e))}}function s(e){e&&e.dispatchConfig.registrationName&&a(e.dispatchMarker,null,e)}function u(e){h(e,i)}function l(e,t,n,r){d.injection.getInstanceHandle().traverseEnterLeave(n,r,a,e,t)}function c(e){h(e,s)}var p=e(16),d=e(18),f=e(115),h=e(132),m=p.PropagationPhases,v=d.getListener,g={accumulateTwoPhaseDispatches:u,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:l};t.exports=g},{115:115,132:132,16:16,18:18}],22:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],23:[function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=e(30),i=e(29),a=e(142);i(r.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;r>e&&n[e]===o[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===o[i-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),t.exports=r},{142:142,29:29,30:30}],24:[function(e,t,n){"use strict";var r,o=e(11),i=e(22),a=o.injection.MUST_USE_ATTRIBUTE,s=o.injection.MUST_USE_PROPERTY,u=o.injection.HAS_BOOLEAN_VALUE,l=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,cellPadding:null,cellSpacing:null,charSet:a,checked:s|u,classID:a,className:r?a:s,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,defer:u,dir:null,disabled:a|u,download:d,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|u,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,label:null,lang:null,list:a,loop:s|u,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,multiple:s|u,muted:s|u,name:null,noValidate:u,open:u,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scoped:u,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:s,srcSet:a,start:c,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|l,width:a,wmode:a,autoCapitalize:null,autoCorrect:null,itemProp:a,itemScope:a|u,itemType:a,itemID:a,itemRef:a,property:null,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=h},{11:11,22:22}],25:[function(e,t,n){"use strict";var r=e(73),o=e(92),i={linkState:function(e){return new r(this.state[e],o.createStateKeySetter(this,e))}};t.exports=i},{73:73,92:92}],26:[function(e,t,n){"use strict";function r(e){l(null==e.props.checkedLink||null==e.props.valueLink)}function o(e){r(e),l(null==e.props.value&&null==e.props.onChange)}function i(e){r(e),l(null==e.props.checked&&null==e.props.onChange)}function a(e){this.props.valueLink.requestChange(e.target.value)}function s(e){this.props.checkedLink.requestChange(e.target.checked)}var u=e(84),l=e(147),c={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},p={Mixin:{propTypes:{value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func}},getValue:function(e){return e.props.valueLink?(o(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(i(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(o(e),a):e.props.checkedLink?(i(e),s):e.props.onChange}};t.exports=p},{147:147,84:84}],27:[function(e,t,n){"use strict";function r(e){e.remove()}var o=e(33),i=e(115),a=e(132),s=e(147),u={trapBubbledEvent:function(e,t){s(this.isMounted());var n=this.getDOMNode();s(n);var r=o.trapBubbledEvent(e,t,n);this._localEventListeners=i(this._localEventListeners,r)},componentWillUnmount:function(){this._localEventListeners&&a(this._localEventListeners,r)}};t.exports=u},{115:115,132:132,147:147,33:33}],28:[function(e,t,n){"use strict";var r=e(16),o=e(126),i=r.topLevelTypes,a={eventTypes:null,extractEvents:function(e,t,n,r){if(e===i.topTouchStart){var a=r.target;a&&!a.onclick&&(a.onclick=o)}}};t.exports=a},{126:126,16:16}],29:[function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var i=arguments[o];if(null!=i){var a=Object(i);for(var s in a)r.call(a,s)&&(n[s]=a[s])}}return n}t.exports=r},{}],30:[function(e,t,n){"use strict";var r=e(147),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},u=function(e){var t=this;r(e instanceof t),e.destructor&&e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},l=10,c=o,p=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||c,n.poolSize||(n.poolSize=l),n.release=u,n},d={addPoolingTo:p,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fiveArgumentPooler:s};t.exports=d},{147:147}],31:[function(e,t,n){"use strict";var r=e(20),o=e(37),i=e(39),a=e(38),s=e(44),u=e(45),l=e(61),c=(e(62),e(46)),p=e(57),d=e(60),f=e(70),h=e(75),m=e(80),v=e(84),g=e(87),y=e(90),C=e(29),E=e(129),b=e(157);d.inject();var _=l.createElement,x=l.createFactory,D=l.cloneElement,M=m.measure("React","render",h.render),T={Children:{map:o.map,forEach:o.forEach,count:o.count,only:b},Component:i,DOM:c,PropTypes:v,initializeTouchEvents:function(e){r.useTouchEvents=e},createClass:a.createClass,createElement:_,cloneElement:D,createFactory:x,createMixin:function(e){return e},constructAndRenderComponent:h.constructAndRenderComponent,constructAndRenderComponentByID:h.constructAndRenderComponentByID,findDOMNode:E,render:M,renderToString:y.renderToString,renderToStaticMarkup:y.renderToStaticMarkup,unmountComponentAtNode:h.unmountComponentAtNode,isValidElement:l.isValidElement,withContext:s.withContext,__spread:C};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:u,InstanceHandles:f,Mount:h,Reconciler:g,TextComponent:p});T.version="0.13.3",t.exports=T},{129:129,157:157,20:20,29:29,37:37,38:38,39:39,44:44,45:45,46:46,57:57,60:60,61:61,62:62,70:70,75:75,80:80,84:84,87:87,90:90}],32:[function(e,t,n){"use strict";var r=e(129),o={getDOMNode:function(){return r(this)}};t.exports=o},{129:129}],33:[function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=f++,p[e[m]]={}),p[e[m]]}var o=e(16),i=e(18),a=e(19),s=e(65),u=e(114),l=e(29),c=e(148),p={},d=!1,f=0,h={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(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e; - -}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=r(n),s=a.registrationNameDependencies[e],u=o.topLevelTypes,l=0,p=s.length;p>l;l++){var d=s[l];i.hasOwnProperty(d)&&i[d]||(d===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):d===u.topScroll?c("scroll",!0)?v.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):v.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",v.ReactEventListener.WINDOW_HANDLE):d===u.topFocus||d===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)),i[u.topBlur]=!0,i[u.topFocus]=!0):h.hasOwnProperty(d)&&v.ReactEventListener.trapBubbledEvent(d,h[d],n),i[d]=!0)}},trapBubbledEvent:function(e,t,n){return v.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return v.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!d){var e=u.refreshScrollValues;v.ReactEventListener.monitorScrollValue(e),d=!0}},eventNameDispatchConfigs:i.eventNameDispatchConfigs,registrationNameModules:i.registrationNameModules,putListener:i.putListener,getListener:i.getListener,deleteListener:i.deleteListener,deleteAllListeners:i.deleteAllListeners});t.exports=v},{114:114,148:148,16:16,18:18,19:19,29:29,65:65}],34:[function(e,t,n){"use strict";var r=e(31),o=e(29),i=r.createFactory(e(95)),a=r.createFactory(e(35)),s=r.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:r.PropTypes.string.isRequired,transitionAppear:r.PropTypes.bool,transitionEnter:r.PropTypes.bool,transitionLeave:r.PropTypes.bool},getDefaultProps:function(){return{transitionAppear:!1,transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return a({name:this.props.transitionName,appear:this.props.transitionAppear,enter:this.props.transitionEnter,leave:this.props.transitionLeave},e)},render:function(){return i(o({},this.props,{childFactory:this._wrapChild}))}});t.exports=s},{29:29,31:31,35:35,95:95}],35:[function(e,t,n){"use strict";var r=e(31),o=e(4),i=e(94),a=e(157),s=(e(166),17),u=r.createClass({displayName:"ReactCSSTransitionGroupChild",transition:function(e,t){var n=this.getDOMNode(),r=this.props.name+"-"+e,a=r+"-active",s=function(e){e&&e.target!==n||(o.removeClass(n,r),o.removeClass(n,a),i.removeEndEventListener(n,s),t&&t())};i.addEndEventListener(n,s),o.addClass(n,r),this.queueClass(a)},queueClass:function(e){this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,s))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(o.addClass.bind(o,this.getDOMNode())),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout)},componentWillAppear:function(e){this.props.appear?this.transition("appear",e):e()},componentWillEnter:function(e){this.props.enter?this.transition("enter",e):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e):e()},render:function(){return a(this.props.children)}});t.exports=u},{157:157,166:166,31:31,4:4,94:94}],36:[function(e,t,n){"use strict";var r=e(87),o=e(130),i=e(146),a=e(162),s={instantiateChildren:function(e,t,n){var r=o(e);for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=i(s,null);r[a]=u}return r},updateChildren:function(e,t,n,s){var u=o(t);if(!u&&!e)return null;var l;for(l in u)if(u.hasOwnProperty(l)){var c=e&&e[l],p=c&&c._currentElement,d=u[l];if(a(p,d))r.receiveComponent(c,d,n,s),u[l]=c;else{c&&r.unmountComponent(c,l);var f=i(d,null);u[l]=f}}for(l in e)!e.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||r.unmountComponent(e[l]);return u},unmountChildren:function(e){for(var t in e){var n=e[t];r.unmountComponent(n)}}};t.exports=s},{130:130,146:146,162:162,87:87}],37:[function(e,t,n){"use strict";function r(e,t){this.forEachFunction=e,this.forEachContext=t}function o(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function i(e,t,n){if(null==e)return e;var i=r.getPooled(t,n);f(e,o,i),r.release(i)}function a(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function s(e,t,n,r){var o=e,i=o.mapResult,a=!i.hasOwnProperty(n);if(a){var s=o.mapFunction.call(o.mapContext,t,r);i[n]=s}}function u(e,t,n){if(null==e)return e;var r={},o=a.getPooled(r,t,n);return f(e,s,o),a.release(o),d.create(r)}function l(e,t,n,r){return null}function c(e,t){return f(e,l,null)}var p=e(30),d=e(67),f=e(164),h=(e(166),p.twoArgumentPooler),m=p.threeArgumentPooler;p.addPoolingTo(r,h),p.addPoolingTo(a,m);var v={forEach:i,map:u,count:c};t.exports=v},{164:164,166:166,30:30,67:67}],38:[function(e,t,n){"use strict";function r(e,t){var n=D.hasOwnProperty(t)?D[t]:null;T.hasOwnProperty(t)&&y(n===_.OVERRIDE_BASE),e.hasOwnProperty(t)&&y(n===_.DEFINE_MANY||n===_.DEFINE_MANY_MERGED)}function o(e,t){if(t){y("function"!=typeof t),y(!d.isValidElement(t));var n=e.prototype;t.hasOwnProperty(b)&&M.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==b){var i=t[o];if(r(n,o),M.hasOwnProperty(o))M[o](e,i);else{var a=D.hasOwnProperty(o),l=n.hasOwnProperty(o),c=i&&i.__reactDontBind,p="function"==typeof i,f=p&&!a&&!l&&!c;if(f)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[o]=i,n[o]=i;else if(l){var h=D[o];y(a&&(h===_.DEFINE_MANY_MERGED||h===_.DEFINE_MANY)),h===_.DEFINE_MANY_MERGED?n[o]=s(n[o],i):h===_.DEFINE_MANY&&(n[o]=u(n[o],i))}else n[o]=i}}}}function i(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in M;y(!o);var i=n in e;y(!i),e[n]=r}}}function a(e,t){y(e&&t&&"object"==typeof e&&"object"==typeof t);for(var n in t)t.hasOwnProperty(n)&&(y(void 0===e[n]),e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return a(o,n),a(o,r),o}}function u(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=l(e,f.guard(n,e.constructor.displayName+"."+t))}}var p=e(39),d=(e(45),e(61)),f=e(64),h=e(71),m=e(72),v=(e(83),e(82),e(96)),g=e(29),y=e(147),C=e(153),E=e(154),b=(e(166),E({mixins:null})),_=C({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),x=[],D={mixins:_.DEFINE_MANY,statics:_.DEFINE_MANY,propTypes:_.DEFINE_MANY,contextTypes:_.DEFINE_MANY,childContextTypes:_.DEFINE_MANY,getDefaultProps:_.DEFINE_MANY_MERGED,getInitialState:_.DEFINE_MANY_MERGED,getChildContext:_.DEFINE_MANY_MERGED,render:_.DEFINE_ONCE,componentWillMount:_.DEFINE_MANY,componentDidMount:_.DEFINE_MANY,componentWillReceiveProps:_.DEFINE_MANY,shouldComponentUpdate:_.DEFINE_ONCE,componentWillUpdate:_.DEFINE_MANY,componentDidUpdate:_.DEFINE_MANY,componentWillUnmount:_.DEFINE_MANY,updateComponent:_.OVERRIDE_BASE},M={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=g({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=g({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=s(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=g({},e.propTypes,t)},statics:function(e,t){i(e,t)}},T={replaceState:function(e,t){v.enqueueReplaceState(this,e),t&&v.enqueueCallback(this,t)},isMounted:function(){var e=h.get(this);return e&&e!==m.currentlyMountingInstance},setProps:function(e,t){v.enqueueSetProps(this,e),t&&v.enqueueCallback(this,t)},replaceProps:function(e,t){v.enqueueReplaceProps(this,e),t&&v.enqueueCallback(this,t)}},N=function(){};g(N.prototype,p.prototype,T);var P={createClass:function(e){var t=function(e,t){this.__reactAutoBindMap&&c(this),this.props=e,this.context=t,this.state=null;var n=this.getInitialState?this.getInitialState():null;y("object"==typeof n&&!Array.isArray(n)),this.state=n};t.prototype=new N,t.prototype.constructor=t,x.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),y(t.prototype.render);for(var n in D)t.prototype[n]||(t.prototype[n]=null);return t.type=t,t},injection:{injectMixin:function(e){x.push(e)}}};t.exports=P},{147:147,153:153,154:154,166:166,29:29,39:39,45:45,61:61,64:64,71:71,72:72,82:82,83:83,96:96}],39:[function(e,t,n){"use strict";function r(e,t){this.props=e,this.context=t}{var o=e(96),i=e(147);e(166)}r.prototype.setState=function(e,t){i("object"==typeof e||"function"==typeof e||null==e),o.enqueueSetState(this,e),t&&o.enqueueCallback(this,t)},r.prototype.forceUpdate=function(e){o.enqueueForceUpdate(this),e&&o.enqueueCallback(this,e)};t.exports=r},{147:147,166:166,96:96}],40:[function(e,t,n){"use strict";var r=e(50),o=e(75),i={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){o.purgeID(e)}};t.exports=i},{50:50,75:75}],41:[function(e,t,n){"use strict";var r=e(147),o=!1,i={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){r(!o),i.unmountIDFromEnvironment=e.unmountIDFromEnvironment,i.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};t.exports=i},{147:147}],42:[function(e,t,n){"use strict";var r=e(161),o={shouldComponentUpdate:function(e,t){return!r(this.props,e)||!r(this.state,t)}};t.exports=o},{161:161}],43:[function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}var o=e(41),i=e(44),a=e(45),s=e(61),u=(e(62),e(71)),l=e(72),c=e(78),p=e(80),d=e(83),f=(e(82),e(87)),h=e(97),m=e(29),v=e(127),g=e(147),y=e(162),C=(e(166),1),E={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._isTopLevel=!1,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=C++,this._rootNodeID=e;var r=this._processProps(this._currentElement.props),o=this._processContext(this._currentElement._context),i=c.getComponentClassForElement(this._currentElement),a=new i(r,o);a.props=r,a.context=o,a.refs=v,this._instance=a,u.set(a,this);var s=a.state;void 0===s&&(a.state=s=null),g("object"==typeof s&&!Array.isArray(s)),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var p,d,h=l.currentlyMountingInstance;l.currentlyMountingInstance=this;try{a.componentWillMount&&(a.componentWillMount(),this._pendingStateQueue&&(a.state=this._processPendingState(a.props,a.context))),p=this._getValidatedChildContext(n),d=this._renderValidatedComponent(p)}finally{l.currentlyMountingInstance=h}this._renderedComponent=this._instantiateReactComponent(d,this._currentElement.type);var m=f.mountComponent(this._renderedComponent,e,t,this._mergeChildContext(n,p));return a.componentDidMount&&t.getReactMountReady().enqueue(a.componentDidMount,a),m},unmountComponent:function(){var e=this._instance;if(e.componentWillUnmount){var t=l.currentlyUnmountingInstance;l.currentlyUnmountingInstance=this;try{e.componentWillUnmount()}finally{l.currentlyUnmountingInstance=t}}f.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,u.remove(e)},_setPropsInternal:function(e,t){var n=this._pendingElement||this._currentElement;this._pendingElement=s.cloneAndReplaceProps(n,m({},n.props,e)),h.enqueueUpdate(this,t)},_maskContext:function(e){var t=null;if("string"==typeof this._currentElement.type)return v;var n=this._currentElement.type.contextTypes;if(!n)return v;t={};for(var r in n)t[r]=e[r];return t},_processContext:function(e){var t=this._maskContext(e);return t},_getValidatedChildContext:function(e){var t=this._instance,n=t.getChildContext&&t.getChildContext();if(n){g("object"==typeof t.constructor.childContextTypes);for(var r in n)g(r in t.constructor.childContextTypes);return n}return null},_mergeChildContext:function(e,t){return t?m({},e,t):e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var o=this.getName();for(var i in e)if(e.hasOwnProperty(i)){var a;try{g("function"==typeof e[i]),a=e[i](t,i,o,n)}catch(s){a=s}a instanceof Error&&(r(this),n===d.prop)}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&f.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},_warnIfContextsDiffer:function(e,t){e=this._maskContext(e),t=this._maskContext(t);for(var n=Object.keys(t).sort(),r=(this.getName()||"ReactCompositeComponent",0);r<n.length;r++)n[r]},updateComponent:function(e,t,n,r,o){var i=this._instance,a=i.context,s=i.props;t!==n&&(a=this._processContext(n._context),s=this._processProps(n.props),i.componentWillReceiveProps&&i.componentWillReceiveProps(s,a));var u=this._processPendingState(s,a),l=this._pendingForceUpdate||!i.shouldComponentUpdate||i.shouldComponentUpdate(s,u,a);l?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,s,u,a,e,o)):(this._currentElement=n,this._context=o,i.props=s,i.state=u,i.context=a)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=m({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];m(i,"function"==typeof s?s.call(n,i,e,t):s)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a=this._instance,s=a.props,u=a.state,l=a.context;a.componentWillUpdate&&a.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,a.props=t,a.state=n,a.context=r,this._updateRenderedComponent(o,i),a.componentDidUpdate&&o.getReactMountReady().enqueue(a.componentDidUpdate.bind(a,s,u,l),a)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._getValidatedChildContext(),i=this._renderValidatedComponent(o);if(y(r,i))f.receiveComponent(n,i,e,this._mergeChildContext(t,o));else{var a=this._rootNodeID,s=n._rootNodeID;f.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(i,this._currentElement.type);var u=f.mountComponent(this._renderedComponent,a,e,this._mergeChildContext(t,o));this._replaceNodeWithMarkupByID(s,u)}},_replaceNodeWithMarkupByID:function(e,t){o.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(e){var t,n=i.current;i.current=this._mergeChildContext(this._currentElement._context,e),a.current=this;try{t=this._renderValidatedComponentWithoutOwnerOrContext()}finally{i.current=n,a.current=null}return g(null===t||t===!1||s.isValidElement(t)),t},attachRef:function(e,t){var n=this.getPublicInstance(),r=n.refs===v?n.refs={}:n.refs;r[e]=t.getPublicInstance()},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){return this._instance},_instantiateReactComponent:null};p.measureMethods(E,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var b={Mixin:E};t.exports=b},{127:127,147:147,162:162,166:166,29:29,41:41,44:44,45:45,61:61,62:62,71:71,72:72,78:78,80:80,82:82,83:83,87:87,97:97}],44:[function(e,t,n){"use strict";var r=e(29),o=e(127),i=(e(166),{current:o,withContext:function(e,t){var n,o=i.current;i.current=r({},o,e);try{n=t()}finally{i.current=o}return n}});t.exports=i},{127:127,166:166,29:29}],45:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],46:[function(e,t,n){"use strict";function r(e){return o.createFactory(e)}var o=e(61),i=(e(62),e(155)),a=i({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);t.exports=a},{155:155,61:61,62:62}],47:[function(e,t,n){"use strict";var r=e(2),o=e(32),i=e(38),a=e(61),s=e(153),u=a.createFactory("button"),l=s({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),c=i.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[r,o],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&l[t]||(e[t]=this.props[t]);return u(e,this.props.children)}});t.exports=c},{153:153,2:2,32:32,38:38,61:61}],48:[function(e,t,n){"use strict";function r(e){e&&(null!=e.dangerouslySetInnerHTML&&(g(null==e.children),g("object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML)),g(null==e.style||"object"==typeof e.style))}function o(e,t,n,r){var o=d.findReactContainerForID(e);if(o){var i=o.nodeType===D?o.ownerDocument:o;E(t,i)}r.getPutListenerQueue().enqueuePutListener(e,t,n)}function i(e){I.call(P,e)||(g(N.test(e)),P[e]=!0)}function a(e){i(e),this._tag=e,this._renderedChildren=null,this._previousStyleCopy=null,this._rootNodeID=null}var s=e(6),u=e(11),l=e(12),c=e(33),p=e(40),d=e(75),f=e(76),h=e(80),m=e(29),v=e(128),g=e(147),y=(e(148),e(154)),C=(e(166),c.deleteListener),E=c.listenTo,b=c.registrationNameModules,_={string:!0,number:!0},x=y({style:null}),D=1,M=null,T={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},N=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,P={},I={}.hasOwnProperty;a.displayName="ReactDOMComponent",a.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e,r(this._currentElement.props);var o=T[this._tag]?"":"</"+this._tag+">";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,n)+o},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(b.hasOwnProperty(r))o(this._rootNodeID,r,i,e);else{r===x&&(i&&(i=this._previousStyleCopy=m({},t.style)),i=s.createMarkupForStyles(i));var a=l.createMarkupForProperty(r,i);a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n+">";var u=l.createMarkupForID(this._rootNodeID);return n+" "+u+">"},_createContentMarkup:function(e,t){var n="";("listing"===this._tag||"pre"===this._tag||"textarea"===this._tag)&&(n="\n");var r=this._currentElement.props,o=r.dangerouslySetInnerHTML;if(null!=o){if(null!=o.__html)return n+o.__html}else{var i=_[typeof r.children]?r.children:null,a=null!=i?null:r.children;if(null!=i)return n+v(i);if(null!=a){var s=this.mountChildren(a,e,t);return n+s.join("")}}return n},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,o){r(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,o)},_updateDOMProperties:function(e,t){var n,r,i,a=this._currentElement.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===x){var s=this._previousStyleCopy;for(r in s)s.hasOwnProperty(r)&&(i=i||{},i[r]="");this._previousStyleCopy=null}else b.hasOwnProperty(n)?C(this._rootNodeID,n):(u.isStandardName[n]||u.isCustomAttribute(n))&&M.deletePropertyByID(this._rootNodeID,n);for(n in a){var l=a[n],c=n===x?this._previousStyleCopy:e[n];if(a.hasOwnProperty(n)&&l!==c)if(n===x)if(l?l=this._previousStyleCopy=m({},l):this._previousStyleCopy=null,c){for(r in c)!c.hasOwnProperty(r)||l&&l.hasOwnProperty(r)||(i=i||{},i[r]="");for(r in l)l.hasOwnProperty(r)&&c[r]!==l[r]&&(i=i||{},i[r]=l[r])}else i=l;else b.hasOwnProperty(n)?o(this._rootNodeID,n,l,t):(u.isStandardName[n]||u.isCustomAttribute(n))&&M.updatePropertyByID(this._rootNodeID,n,l)}i&&M.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t,n){var r=this._currentElement.props,o=_[typeof e.children]?e.children:null,i=_[typeof r.children]?r.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=r.dangerouslySetInnerHTML&&r.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,l=null!=i?null:r.children,c=null!=o||null!=a,p=null!=i||null!=s;null!=u&&null==l?this.updateChildren(null,t,n):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=s?a!==s&&M.updateInnerHTMLByID(this._rootNodeID,s):null!=l&&this.updateChildren(l,t,n)},unmountComponent:function(){this.unmountChildren(),c.deleteAllListeners(this._rootNodeID),p.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},h.measureMethods(a,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),m(a.prototype,a.Mixin,f.Mixin),a.injection={injectIDOperations:function(e){a.BackendIDOperations=M=e}},t.exports=a},{11:11,12:12,128:128,147:147,148:148,154:154,166:166,29:29,33:33,40:40,6:6,75:75,76:76,80:80}],49:[function(e,t,n){"use strict";var r=e(16),o=e(27),i=e(32),a=e(38),s=e(61),u=s.createFactory("form"),l=a.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[i,o],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(r.topLevelTypes.topSubmit,"submit")}});t.exports=l},{16:16,27:27,32:32,38:38,61:61}],50:[function(e,t,n){"use strict";var r=e(6),o=e(10),i=e(12),a=e(75),s=e(80),u=e(147),l=e(159),c={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},p={updatePropertyByID:function(e,t,n){var r=a.getNode(e);u(!c.hasOwnProperty(t)),null!=n?i.setValueForProperty(r,t,n):i.deleteValueForProperty(r,t)},deletePropertyByID:function(e,t,n){var r=a.getNode(e);u(!c.hasOwnProperty(t)),i.deleteValueForProperty(r,t,n)},updateStylesByID:function(e,t){var n=a.getNode(e);r.setValueForStyles(n,t)},updateInnerHTMLByID:function(e,t){var n=a.getNode(e);l(n,t)},updateTextContentByID:function(e,t){var n=a.getNode(e);o.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);o.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=a.getNode(e[n].parentID);o.processUpdates(e,t)}};s.measureMethods(p,"ReactDOMIDOperations",{updatePropertyByID:"updatePropertyByID",deletePropertyByID:"deletePropertyByID",updateStylesByID:"updateStylesByID",updateInnerHTMLByID:"updateInnerHTMLByID",updateTextContentByID:"updateTextContentByID",dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=p},{10:10,12:12,147:147,159:159,6:6,75:75,80:80}],51:[function(e,t,n){"use strict";var r=e(16),o=e(27),i=e(32),a=e(38),s=e(61),u=s.createFactory("iframe"),l=a.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[i,o],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load")}});t.exports=l},{16:16,27:27,32:32,38:38,61:61}],52:[function(e,t,n){"use strict";var r=e(16),o=e(27),i=e(32),a=e(38),s=e(61),u=s.createFactory("img"),l=a.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[i,o],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(r.topLevelTypes.topError,"error")}});t.exports=l},{16:16,27:27,32:32,38:38,61:61}],53:[function(e,t,n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=e(2),i=e(12),a=e(26),s=e(32),u=e(38),l=e(61),c=e(75),p=e(97),d=e(29),f=e(147),h=l.createFactory("input"),m={},v=u.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[o,a.Mixin,s],getInitialState:function(){var e=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=e?e:null}},render:function(){var e=d({},this.props);e.defaultChecked=null,e.defaultValue=null;var t=a.getValue(this);e.value=null!=t?t:this.state.initialValue;var n=a.getChecked(this);return e.checked=null!=n?n:this.state.initialChecked,e.onChange=this._handleChange,h(e,this.props.children)},componentDidMount:function(){var e=c.getID(this.getDOMNode());m[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=c.getID(e);delete m[t]},componentDidUpdate:function(e,t,n){var r=this.getDOMNode();null!=this.props.checked&&i.setValueForProperty(r,"checked",this.props.checked||!1);var o=a.getValue(this);null!=o&&i.setValueForProperty(r,"value",""+o)},_handleChange:function(e){var t,n=a.getOnChange(this);n&&(t=n.call(this,e)),p.asap(r,this);var o=this.props.name;if("radio"===this.props.type&&null!=o){for(var i=this.getDOMNode(),s=i;s.parentNode;)s=s.parentNode;for(var u=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),l=0,d=u.length;d>l;l++){var h=u[l];if(h!==i&&h.form===i.form){var v=c.getID(h);f(v);var g=m[v];f(g),p.asap(r,g)}}}return t}});t.exports=v},{12:12,147:147,2:2,26:26,29:29,32:32,38:38,61:61,75:75,97:97}],54:[function(e,t,n){"use strict";var r=e(32),o=e(38),i=e(61),a=(e(166),i.createFactory("option")),s=o.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[r],componentWillMount:function(){},render:function(){return a(this.props,this.props.children)}});t.exports=s},{166:166,32:32,38:38,61:61}],55:[function(e,t,n){"use strict";function r(){if(this._pendingUpdate){this._pendingUpdate=!1;var e=s.getValue(this);null!=e&&this.isMounted()&&i(this,e)}}function o(e,t,n){if(null==e[t])return null;if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function i(e,t){var n,r,o,i=e.getDOMNode().options;if(e.props.multiple){for(n={},r=0,o=t.length;o>r;r++)n[""+t[r]]=!0;for(r=0,o=i.length;o>r;r++){var a=n.hasOwnProperty(i[r].value);i[r].selected!==a&&(i[r].selected=a)}}else{for(n=""+t,r=0,o=i.length;o>r;r++)if(i[r].value===n)return void(i[r].selected=!0);i.length&&(i[0].selected=!0)}}var a=e(2),s=e(26),u=e(32),l=e(38),c=e(61),p=e(97),d=e(29),f=c.createFactory("select"),h=l.createClass({displayName:"ReactDOMSelect",tagName:"SELECT",mixins:[a,s.Mixin,u],propTypes:{defaultValue:o,value:o},render:function(){var e=d({},this.props);return e.onChange=this._handleChange,e.value=null,f(e,this.props.children)},componentWillMount:function(){this._pendingUpdate=!1},componentDidMount:function(){var e=s.getValue(this);null!=e?i(this,e):null!=this.props.defaultValue&&i(this,this.props.defaultValue)},componentDidUpdate:function(e){var t=s.getValue(this);null!=t?(this._pendingUpdate=!1,i(this,t)):!e.multiple!=!this.props.multiple&&(null!=this.props.defaultValue?i(this,this.props.defaultValue):i(this,this.props.multiple?[]:""))},_handleChange:function(e){var t,n=s.getOnChange(this);return n&&(t=n.call(this,e)),this._pendingUpdate=!0,p.asap(r,this),t}});t.exports=h},{2:2,26:26,29:29,32:32,38:38,61:61,97:97}],56:[function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0),u=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),l=u?0:s.toString().length,c=s.cloneRange();c.selectNodeContents(e),c.setEnd(s.startContainer,s.startOffset);var p=r(c.startContainer,c.startOffset,c.endContainer,c.endOffset),d=p?0:c.toString().length,f=d+l,h=document.createRange();h.setStart(n,o),h.setEnd(i,a);var m=h.collapsed;return{start:m?f:d,end:m?d:f}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=l(e,o),u=l(e,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=e(22),l=e(140),c=e(142),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:i,setOffsets:p?a:s};t.exports=d},{140:140,142:142,22:22}],57:[function(e,t,n){"use strict";var r=e(12),o=e(40),i=e(48),a=e(29),s=e(128),u=function(e){};a(u.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,n){this._rootNodeID=e;var o=s(this._stringText);return t.renderToStaticMarkup?o:"<span "+r.createMarkupForID(e)+">"+o+"</span>"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e; - -n!==this._stringText&&(this._stringText=n,i.BackendIDOperations.updateTextContentByID(this._rootNodeID,n))}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=u},{12:12,128:128,29:29,40:40,48:48}],58:[function(e,t,n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=e(2),i=e(12),a=e(26),s=e(32),u=e(38),l=e(61),c=e(97),p=e(29),d=e(147),f=(e(166),l.createFactory("textarea")),h=u.createClass({displayName:"ReactDOMTextarea",tagName:"TEXTAREA",mixins:[o,a.Mixin,s],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(d(null==e),Array.isArray(t)&&(d(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=a.getValue(this);return{initialValue:""+(null!=n?n:e)}},render:function(){var e=p({},this.props);return d(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,f(e,this.state.initialValue)},componentDidUpdate:function(e,t,n){var r=a.getValue(this);if(null!=r){var o=this.getDOMNode();i.setValueForProperty(o,"value",""+r)}},_handleChange:function(e){var t,n=a.getOnChange(this);return n&&(t=n.call(this,e)),c.asap(r,this),t}});t.exports=h},{12:12,147:147,166:166,2:2,26:26,29:29,32:32,38:38,61:61,97:97}],59:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e(97),i=e(113),a=e(29),s=e(126),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l={initialize:s,close:o.flushBatchedUpdates.bind(o)},c=[l,u];a(r.prototype,i.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o):p.perform(e,null,t,n,r,o)}};t.exports=d},{113:113,126:126,29:29,97:97}],60:[function(e,t,n){"use strict";function r(e){return h.createClass({tagName:e.toUpperCase(),render:function(){return new P(e,null,null,null,null,this.props)}})}function o(){R.EventEmitter.injectReactEventListener(I),R.EventPluginHub.injectEventPluginOrder(u),R.EventPluginHub.injectInstanceHandle(w),R.EventPluginHub.injectMount(O),R.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:L,EnterLeaveEventPlugin:l,ChangeEventPlugin:a,MobileSafariClickEventPlugin:d,SelectEventPlugin:A,BeforeInputEventPlugin:i}),R.NativeComponent.injectGenericComponentClass(g),R.NativeComponent.injectTextComponentClass(N),R.NativeComponent.injectAutoWrapper(r),R.Class.injectMixin(f),R.NativeComponent.injectComponentClasses({button:y,form:C,iframe:_,img:E,input:x,option:D,select:M,textarea:T,html:F("html"),head:F("head"),body:F("body")}),R.DOMProperty.injectDOMPropertyConfig(p),R.DOMProperty.injectDOMPropertyConfig(U),R.EmptyComponent.injectEmptyComponent("noscript"),R.Updates.injectReconcileTransaction(S),R.Updates.injectBatchingStrategy(v),R.RootIndex.injectCreateReactRootIndex(c.canUseDOM?s.createReactRootIndex:k.createReactRootIndex),R.Component.injectEnvironment(m),R.DOMComponent.injectIDOperations(b)}var i=e(3),a=e(8),s=e(9),u=e(14),l=e(15),c=e(22),p=e(24),d=e(28),f=e(32),h=e(38),m=e(40),v=e(59),g=e(48),y=e(47),C=e(49),E=e(52),b=e(50),_=e(51),x=e(53),D=e(54),M=e(55),T=e(58),N=e(57),P=e(61),I=e(66),R=e(68),w=e(70),O=e(75),S=e(86),A=e(99),k=e(100),L=e(101),U=e(98),F=e(122);t.exports={inject:o}},{100:100,101:101,122:122,14:14,15:15,22:22,24:24,28:28,3:3,32:32,38:38,40:40,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,57:57,58:58,59:59,61:61,66:66,68:68,70:70,75:75,8:8,86:86,9:9,98:98,99:99}],61:[function(e,t,n){"use strict";var r=e(44),o=e(45),i=e(29),a=(e(166),{key:!0,ref:!0}),s=function(e,t,n,r,o,i){this.type=e,this.key=t,this.ref=n,this._owner=r,this._context=o,this.props=i};s.prototype={_isReactElement:!0},s.createElement=function(e,t,n){var i,u={},l=null,c=null;if(null!=t){c=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key;for(i in t)t.hasOwnProperty(i)&&!a.hasOwnProperty(i)&&(u[i]=t[i])}var p=arguments.length-2;if(1===p)u.children=n;else if(p>1){for(var d=Array(p),f=0;p>f;f++)d[f]=arguments[f+2];u.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(i in h)"undefined"==typeof u[i]&&(u[i]=h[i])}return new s(e,l,c,o.current,r.current,u)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceProps=function(e,t){var n=new s(e.type,e.key,e.ref,e._owner,e._context,t);return n},s.cloneElement=function(e,t,n){var r,u=i({},e.props),l=e.key,c=e.ref,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=o.current),void 0!==t.key&&(l=""+t.key);for(r in t)t.hasOwnProperty(r)&&!a.hasOwnProperty(r)&&(u[r]=t[r])}var d=arguments.length-2;if(1===d)u.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];u.children=f}return new s(e.type,l,c,p,e._context,u)},s.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},t.exports=s},{166:166,29:29,44:44,45:45}],62:[function(e,t,n){"use strict";function r(){if(y.current){var e=y.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e){var t=e&&e.getPublicInstance();if(!t)return void 0;var n=t.constructor;return n?n.displayName||n.name||void 0:void 0}function i(){var e=y.current;return e&&o(e)||void 0}function a(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,u('Each child in an array or iterator should have a unique "key" prop.',e,t))}function s(e,t,n){D.test(e)&&u("Child objects should have non-numeric keys so ordering is preserved.",t,n)}function u(e,t,n){var r=i(),a="string"==typeof n?n:n.displayName||n.name,s=r||a,u=_[e]||(_[e]={});if(!u.hasOwnProperty(s)){u[s]=!0;var l="";if(t&&t._owner&&t._owner!==y.current){var c=o(t._owner);l=" It was passed a child from "+c+"."}}}function l(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];m.isValidElement(r)&&a(r,t)}else if(m.isValidElement(e))e._store.validated=!0;else if(e){var o=E(e);if(o){if(o!==e.entries)for(var i,u=o.call(e);!(i=u.next()).done;)m.isValidElement(i.value)&&a(i.value,t)}else if("object"==typeof e){var l=v.extractIfFragment(e);for(var c in l)l.hasOwnProperty(c)&&s(c,l[c],t)}}}function c(e,t,n,o){for(var i in t)if(t.hasOwnProperty(i)){var a;try{b("function"==typeof t[i]),a=t[i](n,i,e,o)}catch(s){a=s}a instanceof Error&&!(a.message in x)&&(x[a.message]=!0,r(this))}}function p(e,t){var n=t.type,r="string"==typeof n?n:n.displayName,o=t._owner?t._owner.getPublicInstance().constructor.displayName:null,i=e+"|"+r+"|"+o;if(!M.hasOwnProperty(i)){M[i]=!0;var a="";r&&(a=" <"+r+" />");var s="";o&&(s=" The element was created by "+o+".")}}function d(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function f(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&d(t[r],n[r])||(p(r,e),t[r]=n[r]))}}function h(e){if(null!=e.type){var t=C.getComponentClassForElement(e),n=t.displayName||t.name;t.propTypes&&c(n,t.propTypes,e.props,g.prop),"function"==typeof t.getDefaultProps}}var m=e(61),v=e(67),g=e(83),y=(e(82),e(45)),C=e(78),E=e(138),b=e(147),_=(e(166),{}),x={},D=/^\d+$/,M={},T={checkAndWarnForMutatedProps:f,createElement:function(e,t,n){var r=m.createElement.apply(this,arguments);if(null==r)return r;for(var o=2;o<arguments.length;o++)l(arguments[o],e);return h(r),r},createFactory:function(e){var t=T.createElement.bind(null,e);return t.type=e,t},cloneElement:function(e,t,n){for(var r=m.cloneElement.apply(this,arguments),o=2;o<arguments.length;o++)l(arguments[o],r.type);return h(r),r}};t.exports=T},{138:138,147:147,166:166,45:45,61:61,67:67,78:78,82:82,83:83}],63:[function(e,t,n){"use strict";function r(e){c[e]=!0}function o(e){delete c[e]}function i(e){return!!c[e]}var a,s=e(61),u=e(71),l=e(147),c={},p={injectEmptyComponent:function(e){a=s.createFactory(e)}},d=function(){};d.prototype.componentDidMount=function(){var e=u.get(this);e&&r(e._rootNodeID)},d.prototype.componentWillUnmount=function(){var e=u.get(this);e&&o(e._rootNodeID)},d.prototype.render=function(){return l(a),a()};var f=s.createElement(d),h={emptyElement:f,injection:p,isNullComponentID:i};t.exports=h},{147:147,61:61,71:71}],64:[function(e,t,n){"use strict";var r={guard:function(e,t){return e}};t.exports=r},{}],65:[function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue()}var o=e(18),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};t.exports=i},{18:18}],66:[function(e,t,n){"use strict";function r(e){var t=p.getID(e),n=c.getReactRootIDFromNodeID(t),r=p.findReactContainerForID(n),o=p.getFirstReactDOM(r);return o}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){for(var t=p.getFirstReactDOM(h(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var o=0,i=e.ancestors.length;i>o;o++){t=e.ancestors[o];var a=p.getID(t)||"";v._handleTopLevel(e.topLevelType,t,a,e.nativeEvent)}}function a(e){var t=m(window);e(t)}var s=e(17),u=e(22),l=e(30),c=e(70),p=e(75),d=e(97),f=e(29),h=e(137),m=e(143);f(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(o,l.twoArgumentPooler);var v={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(e){v._handleTopLevel=e},setEnabled:function(e){v._enabled=!!e},isEnabled:function(){return v._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,v.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,v.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(v._enabled){var n=o.getPooled(e,t);try{d.batchedUpdates(i,n)}finally{o.release(n)}}}};t.exports=v},{137:137,143:143,17:17,22:22,29:29,30:30,70:70,75:75,97:97}],67:[function(e,t,n){"use strict";var r=(e(61),e(166),{create:function(e){return e},extract:function(e){return e},extractIfFragment:function(e){return e}});t.exports=r},{166:166,61:61}],68:[function(e,t,n){"use strict";var r=e(11),o=e(18),i=e(41),a=e(38),s=e(63),u=e(33),l=e(78),c=e(48),p=e(80),d=e(89),f=e(97),h={Component:i.injection,Class:a.injection,DOMComponent:c.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventEmitter:u.injection,NativeComponent:l.injection,Perf:p.injection,RootIndex:d.injection,Updates:f.injection};t.exports=h},{11:11,18:18,33:33,38:38,41:41,48:48,63:63,78:78,80:80,89:89,97:97}],69:[function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=e(56),i=e(120),a=e(131),s=e(133),u={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=s();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,o),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};t.exports=u},{120:120,131:131,133:133,56:56}],70:[function(e,t,n){"use strict";function r(e){return f+e.toString(36)}function o(e,t){return e.charAt(t)===f||t===e.length}function i(e){return""===e||e.charAt(0)===f&&e.charAt(e.length-1)!==f}function a(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function s(e){return e?e.substr(0,e.lastIndexOf(f)):""}function u(e,t){if(d(i(e)&&i(t)),d(a(e,t)),e===t)return e;var n,r=e.length+h;for(n=r;n<t.length&&!o(t,n);n++);return t.substr(0,n)}function l(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var r=0,a=0;n>=a;a++)if(o(e,a)&&o(t,a))r=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,r);return d(i(s)),s}function c(e,t,n,r,o,i){e=e||"",t=t||"",d(e!==t);var l=a(t,e);d(l||a(e,t));for(var c=0,p=l?s:u,f=e;;f=p(f,t)){var h;if(o&&f===e||i&&f===t||(h=n(f,l,r)),h===!1||f===t)break;d(c++<m)}}var p=e(89),d=e(147),f=".",h=f.length,m=100,v={createReactRootID:function(){return r(p.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===f&&e.length>1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=l(e,t);i!==e&&c(e,i,n,r,!1,!0),i!==t&&c(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},_getFirstCommonAncestorID:l,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:f};t.exports=v},{147:147,89:89}],71:[function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=r},{}],72:[function(e,t,n){"use strict";var r={currentlyMountingInstance:null,currentlyUnmountingInstance:null};t.exports=r},{}],73:[function(e,t,n){"use strict";function r(e,t){this.value=e,this.requestChange=t}function o(e){var t={value:"undefined"==typeof e?i.PropTypes.any.isRequired:e.isRequired,requestChange:i.PropTypes.func.isRequired};return i.PropTypes.shape(t)}var i=e(31);r.PropTypes={link:o},t.exports=r},{31:31}],74:[function(e,t,n){"use strict";var r=e(116),o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(">"," "+o.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};t.exports=o},{116:116}],75:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){var t=I(e);return t&&K.getID(t)}function i(e){var t=a(e);if(t)if(L.hasOwnProperty(t)){var n=L[t];n!==e&&(w(!c(n,t)),L[t]=e)}else L[t]=e;return t}function a(e){return e&&e.getAttribute&&e.getAttribute(k)||""}function s(e,t){var n=a(e);n!==t&&delete L[n],e.setAttribute(k,t),L[t]=e}function u(e){return L.hasOwnProperty(e)&&c(L[e],e)||(L[e]=K.findReactNodeByID(e)),L[e]}function l(e){var t=b.get(e)._rootNodeID;return C.isNullComponentID(t)?null:(L.hasOwnProperty(t)&&c(L[t],t)||(L[t]=K.findReactNodeByID(t)),L[t])}function c(e,t){if(e){w(a(e)===t);var n=K.findReactContainerForID(t);if(n&&P(n,e))return!0}return!1}function p(e){delete L[e]}function d(e){var t=L[e];return t&&c(t,e)?void(W=t):!1}function f(e){W=null,E.traverseAncestors(e,d);var t=W;return W=null,t}function h(e,t,n,r,o){var i=D.mountComponent(e,t,r,N);e._isTopLevel=!0,K._mountImageIntoNode(i,n,o)}function m(e,t,n,r){var o=T.ReactReconcileTransaction.getPooled();o.perform(h,null,e,t,n,o,r),T.ReactReconcileTransaction.release(o)}var v=e(11),g=e(33),y=(e(45),e(61)),C=(e(62),e(63)),E=e(70),b=e(71),_=e(74),x=e(80),D=e(87),M=e(96),T=e(97),N=e(127),P=e(120),I=e(141),R=e(146),w=e(147),O=e(159),S=e(162),A=(e(166),E.SEPARATOR),k=v.ID_ATTRIBUTE_NAME,L={},U=1,F=9,B={},j={},V=[],W=null,K={_instancesByReactRootID:B,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return K.scrollMonitor(n,function(){M.enqueueElementInternal(e,t),r&&M.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){w(t&&(t.nodeType===U||t.nodeType===F)),g.ensureScrollValueMonitoring();var n=K.registerContainer(t);return B[n]=e,n},_renderNewRootComponent:function(e,t,n){var r=R(e,null),o=K._registerComponent(r,t);return T.batchedUpdates(m,r,o,t,n),r},render:function(e,t,n){w(y.isValidElement(e));var r=B[o(t)];if(r){var i=r._currentElement;if(S(i,e))return K._updateRootComponent(r,e,t,n).getPublicInstance();K.unmountComponentAtNode(t)}var a=I(t),s=a&&K.isRenderedByReact(a),u=s&&!r,l=K._renderNewRootComponent(e,t,u).getPublicInstance();return n&&n.call(l),l},constructAndRenderComponent:function(e,t,n){var r=y.createElement(e,t);return K.render(r,n)},constructAndRenderComponentByID:function(e,t,n){var r=document.getElementById(n);return w(r),K.constructAndRenderComponent(e,t,r)},registerContainer:function(e){var t=o(e);return t&&(t=E.getReactRootIDFromNodeID(t)),t||(t=E.createReactRootID()),j[t]=e,t},unmountComponentAtNode:function(e){w(e&&(e.nodeType===U||e.nodeType===F));var t=o(e),n=B[t];return n?(K.unmountComponentFromNode(n,e),delete B[t],delete j[t],!0):!1},unmountComponentFromNode:function(e,t){for(D.unmountComponent(e),t.nodeType===F&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=E.getReactRootIDFromNodeID(e),n=j[t];return n},findReactNodeByID:function(e){var t=K.findReactContainerForID(e);return K.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=K.getID(e);return t?t.charAt(0)===A:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(K.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=V,r=0,o=f(t)||e;for(n[0]=o.firstChild,n.length=1;r<n.length;){for(var i,a=n[r++];a;){var s=K.getID(a);s?t===s?i=a:E.isAncestorIDOf(s,t)&&(n.length=r=0,n.push(a.firstChild)):n.push(a.firstChild),a=a.nextSibling}if(i)return n.length=0,i}n.length=0,w(!1)},_mountImageIntoNode:function(e,t,n){if(w(t&&(t.nodeType===U||t.nodeType===F)),n){var o=I(t);if(_.canReuseMarkup(e,o))return;var i=o.getAttribute(_.CHECKSUM_ATTR_NAME);o.removeAttribute(_.CHECKSUM_ATTR_NAME);var a=o.outerHTML;o.setAttribute(_.CHECKSUM_ATTR_NAME,i);var s=r(e,a);" (client) "+e.substring(s-20,s+20)+"\n (server) "+a.substring(s-20,s+20),w(t.nodeType!==F)}w(t.nodeType!==F),O(t,e)},getReactRootID:o,getID:i,setID:s,getNode:u,getNodeFromInstance:l,purgeID:p};x.measureMethods(K,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),t.exports=K},{11:11,120:120,127:127,141:141,146:146,147:147,159:159,162:162,166:166,33:33,45:45,61:61,62:62,63:63,70:70,71:71,74:74,80:80,87:87,96:96,97:97}],76:[function(e,t,n){"use strict";function r(e,t,n){h.push({parentID:e,parentNode:null,type:c.INSERT_MARKUP,markupIndex:m.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function o(e,t,n){h.push({parentID:e,parentNode:null,type:c.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function i(e,t){h.push({parentID:e,parentNode:null,type:c.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function a(e,t){h.push({parentID:e,parentNode:null,type:c.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function s(){h.length&&(l.processChildrenUpdates(h,m),u())}function u(){h.length=0,m.length=0}var l=e(41),c=e(77),p=e(87),d=e(36),f=0,h=[],m=[],v={Mixin:{mountChildren:function(e,t,n){var r=d.instantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=this._rootNodeID+a,l=p.mountComponent(s,u,t,n);s._mountIndex=i,o.push(l),i++}return o},updateTextContent:function(e){f++;var t=!0;try{var n=this._renderedChildren;d.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{f--,f||(t?u():s())}},updateChildren:function(e,t,n){f++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{f--,f||(r?u():s())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=d.updateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var i,a=0,s=0;for(i in o)if(o.hasOwnProperty(i)){var u=r&&r[i],l=o[i];u===l?(this.moveChild(u,s,a),a=Math.max(u._mountIndex,a),u._mountIndex=s):(u&&(a=Math.max(u._mountIndex,a),this._unmountChildByName(u,i)),this._mountChildByNameAtIndex(l,i,s,t,n)),s++}for(i in r)!r.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var e=this._renderedChildren;d.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&o(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){r(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){i(this._rootNodeID,e._mountIndex)},setTextContent:function(e){a(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,o){var i=this._rootNodeID+t,a=p.mountComponent(e,i,r,o);e._mountIndex=n,this.createChild(e,a)},_unmountChildByName:function(e,t){this.removeChild(e),e._mountIndex=null}}};t.exports=v},{36:36,41:41,77:77,87:87}],77:[function(e,t,n){"use strict";var r=e(153),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});t.exports=o},{153:153}],78:[function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=l(t)),n}function o(e){return u(c),new c(e.type,e.props)}function i(e){return new d(e)}function a(e){return e instanceof d}var s=e(29),u=e(147),l=null,c=null,p={},d=null,f={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){d=e},injectComponentClasses:function(e){s(p,e)},injectAutoWrapper:function(e){l=e}},h={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:i,isTextComponent:a,injection:f};t.exports=h},{147:147,29:29}],79:[function(e,t,n){"use strict";var r=e(147),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){r(o.isValidOwner(n)),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){r(o.isValidOwner(n)),n.getPublicInstance().refs[t]===e.getPublicInstance()&&n.detachRef(t)}};t.exports=o},{147:147}],80:[function(e,t,n){"use strict";function r(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};t.exports=o},{}],81:[function(e,t,n){"use strict";function r(e){return function(t,n,r){t.hasOwnProperty(n)?t[n]=e(t[n],r):t[n]=r}}function o(e,t){for(var n in t)if(t.hasOwnProperty(n)){var r=l[n];r&&l.hasOwnProperty(n)?r(e,n,t[n]):e.hasOwnProperty(n)||(e[n]=t[n])}return e}var i=e(29),a=e(126),s=e(152),u=r(function(e,t){return i({},t,e)}),l={children:a,className:r(s),style:u},c={mergeProps:function(e,t){return o(i({},e),t)}};t.exports=c},{126:126,152:152,29:29}],82:[function(e,t,n){"use strict";var r={};t.exports=r},{}],83:[function(e,t,n){"use strict";var r=e(153),o=r({prop:null,context:null,childContext:null});t.exports=o},{153:153}],84:[function(e,t,n){"use strict";function r(e){function t(t,n,r,o,i){if(o=o||b,null==n[r]){var a=C[i];return t?new Error("Required "+a+" `"+r+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o){var i=t[n],a=m(i);if(a!==e){var s=C[o],u=v(i);return new Error("Invalid "+s+" `"+n+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `"+e+"`."))}return null}return r(t)}function i(){return r(E.thatReturns(null))}function a(e){function t(t,n,r,o){var i=t[n];if(!Array.isArray(i)){var a=C[o],s=m(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u<i.length;u++){var l=e(i,u,r,o);if(l instanceof Error)return l}return null}return r(t)}function s(){function e(e,t,n,r){if(!g.isValidElement(e[t])){var o=C[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactElement."))}return null}return r(e)}function u(e){function t(t,n,r,o){if(!(t[n]instanceof e)){var i=C[o],a=e.name||b;return new Error("Invalid "+i+" `"+n+"` supplied to "+("`"+r+"`, expected instance of `"+a+"`."))}return null}return r(t)}function l(e){function t(t,n,r,o){for(var i=t[n],a=0;a<e.length;a++)if(i===e[a])return null;var s=C[o],u=JSON.stringify(e);return new Error("Invalid "+s+" `"+n+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+u+"."))}return r(t)}function c(e){function t(t,n,r,o){var i=t[n],a=m(i);if("object"!==a){var s=C[o];return new Error("Invalid "+s+" `"+n+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var u in i)if(i.hasOwnProperty(u)){var l=e(i,u,r,o);if(l instanceof Error)return l}return null}return r(t)}function p(e){function t(t,n,r,o){for(var i=0;i<e.length;i++){var a=e[i];if(null==a(t,n,r,o))return null}var s=C[o];return new Error("Invalid "+s+" `"+n+"` supplied to "+("`"+r+"`."))}return r(t)}function d(){function e(e,t,n,r){if(!h(e[t])){var o=C[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e)}function f(e){function t(t,n,r,o){var i=t[n],a=m(i);if("object"!==a){var s=C[o];return new Error("Invalid "+s+" `"+n+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var u in e){var l=e[u];if(l){var c=l(i,u,r,o);if(c)return c}}return null}return r(t)}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||g.isValidElement(e))return!0;e=y.extractIfFragment(e);for(var t in e)if(!h(e[t]))return!1;return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function v(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}var g=e(61),y=e(67),C=e(82),E=e(126),b="<<anonymous>>",_=s(),x=d(),D={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:_,instanceOf:u,node:x,objectOf:c,oneOf:l,oneOfType:p,shape:f};t.exports=D},{126:126,61:61,67:67,82:82}],85:[function(e,t,n){"use strict";function r(){this.listenersToPut=[]}var o=e(30),i=e(33),a=e(29);a(r.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e<this.listenersToPut.length;e++){var t=this.listenersToPut[e];i.putListener(t.rootNodeID,t.propKey,t.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),o.addPoolingTo(r),t.exports=r},{29:29,30:30,33:33}],86:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.putListenerQueue=u.getPooled()}var o=e(7),i=e(30),a=e(33),s=e(69),u=e(85),l=e(113),c=e(29),p={initialize:s.getSelectionInformation,close:s.restoreSelection},d={initialize:function(){var e=a.isEnabled();return a.setEnabled(!1),e},close:function(e){a.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},m=[h,p,d,f],v={getTransactionWrappers:function(){return m},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null,u.release(this.putListenerQueue),this.putListenerQueue=null}};c(r.prototype,l.Mixin,v),i.addPoolingTo(r),t.exports=r},{113:113,29:29,30:30,33:33,69:69,7:7,85:85}],87:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e(88),i=(e(62),{mountComponent:function(e,t,n,o){var i=e.mountComponent(t,n,o);return n.getReactMountReady().enqueue(r,e),i},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||null==t._owner){var s=o.shouldUpdateRefs(a,t);s&&o.detachRefs(e,a),e.receiveComponent(t,n,i),s&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}});t.exports=i},{62:62,88:88}],88:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=e(79),a={};a.attachRefs=function(e,t){var n=t.ref;null!=n&&r(n,e,t._owner)},a.shouldUpdateRefs=function(e,t){return t._owner!==e._owner||t.ref!==e.ref},a.detachRefs=function(e,t){var n=t.ref;null!=n&&o(n,e,t._owner)},t.exports=a},{79:79}],89:[function(e,t,n){"use strict";var r={injectCreateReactRootIndex:function(e){o.createReactRootIndex=e}},o={createReactRootIndex:null,injection:r};t.exports=o},{}],90:[function(e,t,n){"use strict";function r(e){p(i.isValidElement(e));var t;try{var n=a.createReactRootID();return t=u.getPooled(!1),t.perform(function(){var r=c(e,null),o=r.mountComponent(n,t,l);return s.addChecksumToMarkup(o)},null)}finally{u.release(t)}}function o(e){p(i.isValidElement(e));var t;try{var n=a.createReactRootID();return t=u.getPooled(!0),t.perform(function(){var r=c(e,null);return r.mountComponent(n,t,l)},null)}finally{u.release(t)}}var i=e(61),a=e(70),s=e(74),u=e(91),l=e(127),c=e(146),p=e(147);t.exports={renderToString:r,renderToStaticMarkup:o}},{127:127,146:146,147:147,61:61,70:70,74:74,91:91}],91:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=i.getPooled(null),this.putListenerQueue=a.getPooled()}var o=e(30),i=e(7),a=e(85),s=e(113),u=e(29),l=e(126),c={initialize:function(){this.reactMountReady.reset()},close:l},p={initialize:function(){this.putListenerQueue.reset()},close:l},d=[p,c],f={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null,a.release(this.putListenerQueue),this.putListenerQueue=null}};u(r.prototype,s.Mixin,f),o.addPoolingTo(r),t.exports=r},{113:113,126:126,29:29,30:30,7:7,85:85}],92:[function(e,t,n){"use strict";function r(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}var o={createStateSetter:function(e,t){return function(n,r,o,i,a,s){var u=t.call(e,n,r,o,i,a,s);u&&e.setState(u)}},createStateKeySetter:function(e,t){var n=e.__keySetters||(e.__keySetters={});return n[t]||(n[t]=r(e,t))}};o.Mixin={createStateSetter:function(e){return o.createStateSetter(this,e)},createStateKeySetter:function(e){return o.createStateKeySetter(this,e)}},t.exports=o},{}],93:[function(e,t,n){"use strict";var r=e(37),o=e(67),i={getChildMapping:function(e){return e?o.extract(r.map(e,function(e){return e})):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a<r[u].length;a++){var l=r[u][a];s[r[u][a]]=n(l)}s[u]=n(u)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}};t.exports=i},{37:37,67:67}],94:[function(e,t,n){"use strict";function r(){var e=document.createElement("div"),t=e.style;"AnimationEvent"in window||delete s.animationend.animation,"TransitionEvent"in window||delete s.transitionend.transition;for(var n in s){var r=s[n];for(var o in r)if(o in t){u.push(r[o]);break}}}function o(e,t,n){e.addEventListener(t,n,!1)}function i(e,t,n){e.removeEventListener(t,n,!1)}var a=e(22),s={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},u=[];a.canUseDOM&&r();var l={addEndEventListener:function(e,t){ -return 0===u.length?void window.setTimeout(t,0):void u.forEach(function(n){o(e,n,t)})},removeEndEventListener:function(e,t){0!==u.length&&u.forEach(function(n){i(e,n,t)})}};t.exports=l},{22:22}],95:[function(e,t,n){"use strict";var r=e(31),o=e(93),i=e(29),a=e(119),s=e(126),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:o.getChildMapping(this.props.children)}},componentWillMount:function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidMount:function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},componentWillReceiveProps:function(e){var t=o.getChildMapping(e.children),n=this.state.children;this.setState({children:o.mergeChildMappings(n,t)});var r;for(r in t){var i=n&&n.hasOwnProperty(r);!t[r]||i||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n){var a=t&&t.hasOwnProperty(r);!n[r]||a||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performAppear:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)},_handleDoneAppearing:function(e){var t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);if(n&&n.hasOwnProperty(e))this.performEnter(e);else{var r=i({},this.state.children);delete r[e],this.setState({children:r})}},render:function(){var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(a(this.props.childFactory(n),{ref:t,key:t}))}return r.createElement(this.props.component,this.props,e)}});t.exports=u},{119:119,126:126,29:29,31:31,93:93}],96:[function(e,t,n){"use strict";function r(e){e!==i.currentlyMountingInstance&&l.enqueueUpdate(e)}function o(e,t){p(null==a.current);var n=u.get(e);return n?n===i.currentlyUnmountingInstance?null:n:null}var i=e(72),a=e(45),s=e(61),u=e(71),l=e(97),c=e(29),p=e(147),d=(e(166),{enqueueCallback:function(e,t){p("function"==typeof t);var n=o(e);return n&&n!==i.currentlyMountingInstance?(n._pendingCallbacks?n._pendingCallbacks.push(t):n._pendingCallbacks=[t],void r(n)):null},enqueueCallbackInternal:function(e,t){p("function"==typeof t),e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueSetProps:function(e,t){var n=o(e,"setProps");if(n){p(n._isTopLevel);var i=n._pendingElement||n._currentElement,a=c({},i.props,t);n._pendingElement=s.cloneAndReplaceProps(i,a),r(n)}},enqueueReplaceProps:function(e,t){var n=o(e,"replaceProps");if(n){p(n._isTopLevel);var i=n._pendingElement||n._currentElement;n._pendingElement=s.cloneAndReplaceProps(i,t),r(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}});t.exports=d},{147:147,166:166,29:29,45:45,61:61,71:71,72:72,97:97}],97:[function(e,t,n){"use strict";function r(){v(T.ReactReconcileTransaction&&E)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=T.ReactReconcileTransaction.getPooled()}function i(e,t,n,o,i){r(),E.batchedUpdates(e,t,n,o,i)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;v(t===g.length),g.sort(a);for(var n=0;t>n;n++){var r=g[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,f.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var i=0;i<o.length;i++)e.callbackQueue.enqueue(o[i],r.getPublicInstance())}}function u(e){return r(),E.isBatchingUpdates?void g.push(e):void E.batchedUpdates(u,e)}function l(e,t){v(E.isBatchingUpdates),y.enqueue(e,t),C=!0}var c=e(7),p=e(30),d=(e(45),e(80)),f=e(87),h=e(113),m=e(29),v=e(147),g=(e(166),[]),y=c.getPooled(),C=!1,E=null,b={initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),D()):g.length=0}},_={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[b,_];m(o.prototype,h.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,c.release(this.callbackQueue),this.callbackQueue=null,T.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return h.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),p.addPoolingTo(o);var D=function(){for(;g.length||C;){if(g.length){var e=o.getPooled();e.perform(s,null,e),o.release(e)}if(C){C=!1;var t=y;y=c.getPooled(),t.notifyAll(),c.release(t)}}};D=d.measure("ReactUpdates","flushBatchedUpdates",D);var M={injectReconcileTransaction:function(e){v(e),T.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){v(e),v("function"==typeof e.batchedUpdates),v("boolean"==typeof e.isBatchingUpdates),E=e}},T={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:u,flushBatchedUpdates:D,injection:M,asap:l};t.exports=T},{113:113,147:147,166:166,29:29,30:30,45:45,7:7,80:80,87:87}],98:[function(e,t,n){"use strict";var r=e(11),o=r.injection.MUST_USE_ATTRIBUTE,i={Properties:{clipPath:o,cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,y1:o,y2:o,y:o},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};t.exports=i},{11:11}],99:[function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&s.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e){if(y||null==m||m!==l())return null;var t=r(m);if(!g||!d(g,t)){g=t;var n=u.getPooled(h.select,v,e);return n.type="select",n.target=m,a.accumulateTwoPhaseDispatches(n),n}}var i=e(16),a=e(21),s=e(69),u=e(105),l=e(133),c=e(150),p=e(154),d=e(161),f=i.topLevelTypes,h={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[f.topBlur,f.topContextMenu,f.topFocus,f.topKeyDown,f.topMouseDown,f.topMouseUp,f.topSelectionChange]}},m=null,v=null,g=null,y=!1,C={eventTypes:h,extractEvents:function(e,t,n,r){switch(e){case f.topFocus:(c(t)||"true"===t.contentEditable)&&(m=t,v=n,g=null);break;case f.topBlur:m=null,v=null,g=null;break;case f.topMouseDown:y=!0;break;case f.topContextMenu:case f.topMouseUp:return y=!1,o(r);case f.topSelectionChange:case f.topKeyDown:case f.topKeyUp:return o(r)}}};t.exports=C},{105:105,133:133,150:150,154:154,16:16,161:161,21:21,69:69}],100:[function(e,t,n){"use strict";var r=Math.pow(2,53),o={createReactRootIndex:function(){return Math.ceil(Math.random()*r)}};t.exports=o},{}],101:[function(e,t,n){"use strict";var r=e(16),o=e(20),i=e(21),a=e(102),s=e(105),u=e(106),l=e(108),c=e(109),p=e(104),d=e(110),f=e(111),h=e(112),m=e(134),v=e(147),g=e(154),y=(e(166),r.topLevelTypes),C={blur:{phasedRegistrationNames:{bubbled:g({onBlur:!0}),captured:g({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:g({onClick:!0}),captured:g({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:g({onContextMenu:!0}),captured:g({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:g({onCopy:!0}),captured:g({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:g({onCut:!0}),captured:g({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:g({onDoubleClick:!0}),captured:g({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:g({onDrag:!0}),captured:g({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:g({onDragEnd:!0}),captured:g({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:g({onDragEnter:!0}),captured:g({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:g({onDragExit:!0}),captured:g({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:g({onDragLeave:!0}),captured:g({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:g({onDragOver:!0}),captured:g({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:g({onDragStart:!0}),captured:g({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:g({onDrop:!0}),captured:g({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:g({onFocus:!0}),captured:g({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:g({onInput:!0}),captured:g({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:g({onKeyDown:!0}),captured:g({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:g({onKeyPress:!0}),captured:g({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:g({onKeyUp:!0}),captured:g({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:g({onLoad:!0}),captured:g({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:g({onError:!0}),captured:g({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:g({onMouseDown:!0}),captured:g({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:g({onMouseMove:!0}),captured:g({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:g({onMouseOut:!0}),captured:g({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:g({onMouseOver:!0}),captured:g({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:g({onMouseUp:!0}),captured:g({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:g({onPaste:!0}),captured:g({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:g({onReset:!0}),captured:g({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:g({onScroll:!0}),captured:g({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:g({onSubmit:!0}),captured:g({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:g({onTouchCancel:!0}),captured:g({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:g({onTouchEnd:!0}),captured:g({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:g({onTouchMove:!0}),captured:g({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:g({onTouchStart:!0}),captured:g({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:g({onWheel:!0}),captured:g({onWheelCapture:!0})}}},E={topBlur:C.blur,topClick:C.click,topContextMenu:C.contextMenu,topCopy:C.copy,topCut:C.cut,topDoubleClick:C.doubleClick,topDrag:C.drag,topDragEnd:C.dragEnd,topDragEnter:C.dragEnter,topDragExit:C.dragExit,topDragLeave:C.dragLeave,topDragOver:C.dragOver,topDragStart:C.dragStart,topDrop:C.drop,topError:C.error,topFocus:C.focus,topInput:C.input,topKeyDown:C.keyDown,topKeyPress:C.keyPress,topKeyUp:C.keyUp,topLoad:C.load,topMouseDown:C.mouseDown,topMouseMove:C.mouseMove,topMouseOut:C.mouseOut,topMouseOver:C.mouseOver,topMouseUp:C.mouseUp,topPaste:C.paste,topReset:C.reset,topScroll:C.scroll,topSubmit:C.submit,topTouchCancel:C.touchCancel,topTouchEnd:C.touchEnd,topTouchMove:C.touchMove,topTouchStart:C.touchStart,topWheel:C.wheel};for(var b in E)E[b].dependencies=[b];var _={eventTypes:C,executeDispatch:function(e,t,n){var r=o.executeDispatch(e,t,n);r===!1&&(e.stopPropagation(),e.preventDefault())},extractEvents:function(e,t,n,r){var o=E[e];if(!o)return null;var g;switch(e){case y.topInput:case y.topLoad:case y.topError:case y.topReset:case y.topSubmit:g=s;break;case y.topKeyPress:if(0===m(r))return null;case y.topKeyDown:case y.topKeyUp:g=l;break;case y.topBlur:case y.topFocus:g=u;break;case y.topClick:if(2===r.button)return null;case y.topContextMenu:case y.topDoubleClick:case y.topMouseDown:case y.topMouseMove:case y.topMouseOut:case y.topMouseOver:case y.topMouseUp:g=c;break;case y.topDrag:case y.topDragEnd:case y.topDragEnter:case y.topDragExit:case y.topDragLeave:case y.topDragOver:case y.topDragStart:case y.topDrop:g=p;break;case y.topTouchCancel:case y.topTouchEnd:case y.topTouchMove:case y.topTouchStart:g=d;break;case y.topScroll:g=f;break;case y.topWheel:g=h;break;case y.topCopy:case y.topCut:case y.topPaste:g=a}v(g);var C=g.getPooled(o,n,r);return i.accumulateTwoPhaseDispatches(C),C}};t.exports=_},{102:102,104:104,105:105,106:106,108:108,109:109,110:110,111:111,112:112,134:134,147:147,154:154,16:16,166:166,20:20,21:21}],102:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(105),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),t.exports=r},{105:105}],103:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(105),i={data:null};o.augmentClass(r,i),t.exports=r},{105:105}],104:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(109),i={dataTransfer:null};o.augmentClass(r,i),t.exports=r},{109:109}],105:[function(e,t,n){"use strict";function r(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var i=r[o];i?this[o]=i(n):this[o]=n[o]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;s?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var o=e(30),i=e(29),a=e(126),s=e(137),u={type:null,target:s,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);i(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.threeArgumentPooler)},o.addPoolingTo(r,o.threeArgumentPooler),t.exports=r},{126:126,137:137,29:29,30:30}],106:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(111),i={relatedTarget:null};o.augmentClass(r,i),t.exports=r},{111:111}],107:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(105),i={data:null};o.augmentClass(r,i),t.exports=r},{105:105}],108:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(111),i=e(134),a=e(135),s=e(136),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,u),t.exports=r},{111:111,134:134,135:135,136:136}],109:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(111),i=e(114),a=e(136),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,s),t.exports=r},{111:111,114:114,136:136}],110:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(111),i=e(136),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),t.exports=r},{111:111,136:136}],111:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(105),i=e(137),a={view:function(e){if(e.view)return e.view;var t=i(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),t.exports=r},{105:105,137:137}],112:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e(109),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),t.exports=r},{109:109}],113:[function(e,t,n){"use strict";var r=e(147),o={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(e,t,n,o,i,a,s,u){r(!this.isInTransaction());var l,c;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,n,o,i,a,s,u),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=i.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){r(this.isInTransaction());for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,a=t[n],s=this.wrapperInitData[n];try{o=!0,s!==i.OBSERVED_ERROR&&a.close&&a.close.call(this,s),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(u){}}}this.wrapperInitData.length=0}},i={Mixin:o,OBSERVED_ERROR:{}};t.exports=i},{147:147}],114:[function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};t.exports=r},{}],115:[function(e,t,n){"use strict";function r(e,t){if(o(null!=t),null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=e(147);t.exports=r},{147:147}],116:[function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0;r<e.length;r++)t=(t+e.charCodeAt(r))%o,n=(n+t)%o;return t|n<<16}var o=65521;t.exports=r},{}],117:[function(e,t,n){function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;t.exports=r},{}],118:[function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=e(117),i=/^-ms-/;t.exports=r},{117:117}],119:[function(e,t,n){"use strict";function r(e,t){var n=i.mergeProps(t,e.props);return!n.hasOwnProperty(s)&&e.props.hasOwnProperty(s)&&(n.children=e.props.children),o.createElement(e.type,n)}var o=e(61),i=e(81),a=e(154),s=(e(166),a({children:null}));t.exports=r},{154:154,166:166,61:61,81:81}],120:[function(e,t,n){function r(e,t){return e&&t?e===t?!0:o(e)?!1:o(t)?r(e,t.parentNode):e.contains?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var o=e(151);t.exports=r},{151:151}],121:[function(e,t,n){function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function o(e){return r(e)?Array.isArray(e)?e.slice():i(e):[e]}var i=e(163);t.exports=o},{163:163}],122:[function(e,t,n){"use strict";function r(e){var t=i.createFactory(e),n=o.createClass({tagName:e.toUpperCase(),displayName:"ReactFullPageComponent"+e,componentWillUnmount:function(){a(!1)},render:function(){return t(this.props)}});return n}var o=e(38),i=e(61),a=e(147);t.exports=r},{147:147,38:38,61:61}],123:[function(e,t,n){function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=l;u(!!l);var o=r(e),i=o&&s(o);if(i){n.innerHTML=i[1]+e+i[2];for(var c=i[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(u(t),a(p).forEach(t));for(var d=a(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var i=e(22),a=e(121),s=e(139),u=e(147),l=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},{121:121,139:139,147:147,22:22}],124:[function(e,t,n){"use strict";function r(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).join(" "):Array.prototype.join.call(arguments," ")}e(166);t.exports=r},{166:166}],125:[function(e,t,n){"use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=e(5),i=o.isUnitlessNumber;t.exports=r},{5:5}],126:[function(e,t,n){function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],127:[function(e,t,n){"use strict";var r={};t.exports=r},{}],128:[function(e,t,n){"use strict";function r(e){return i[e]}function o(e){return(""+e).replace(a,r)}var i={"&":"&",">":">","<":"<",'"':""","'":"'"},a=/[&><"']/g;t.exports=o},{}],129:[function(e,t,n){"use strict";function r(e){return null==e?null:s(e)?e:o.has(e)?i.getNodeFromInstance(e):(a(null==e.render||"function"!=typeof e.render),void a(!1))}{var o=(e(45),e(71)),i=e(75),a=e(147),s=e(149);e(166)}t.exports=r},{147:147,149:149,166:166,45:45,71:71,75:75}],130:[function(e,t,n){"use strict";function r(e,t,n){var r=e,o=!r.hasOwnProperty(n);o&&null!=t&&(r[n]=t)}function o(e){if(null==e)return e;var t={};return i(e,r,t),t}{var i=e(164);e(166)}t.exports=o},{164:164,166:166}],131:[function(e,t,n){"use strict";function r(e){try{e.focus()}catch(t){}}t.exports=r},{}],132:[function(e,t,n){"use strict";var r=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=r},{}],133:[function(e,t,n){function r(){try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=r},{}],134:[function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],135:[function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=e(134),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{134:134}],136:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return r?!!n[r]:!1}function o(e){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],137:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=r},{}],138:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);return"function"==typeof t?t:void 0}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},{}],139:[function(e,t,n){function r(e){return i(!!a),d.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=e(22),i=e(147),a=o.canUseDOM?document.createElement("div"):null,s={circle:!0,clipPath:!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,'<select multiple="true">',"</select>"],l=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,"<svg>","</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c,circle:p,clipPath:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};t.exports=r},{147:147,22:22}],140:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var n=r(e),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,t>=i&&a>=t)return{node:n,offset:t-i};i=a}n=r(o(n))}}t.exports=i},{}],141:[function(e,t,n){"use strict";function r(e){return e?e.nodeType===o?e.documentElement:e.firstChild:null}var o=9;t.exports=r},{}],142:[function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=e(22),i=null;t.exports=r},{22:22}],143:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],144:[function(e,t,n){function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],145:[function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=e(144),i=/^ms-/;t.exports=r},{144:144}],146:[function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function o(e,t){var n;if((null===e||e===!1)&&(e=a.emptyElement),"object"==typeof e){var o=e;n=t===o.type&&"string"==typeof o.type?s.createInternalComponent(o):r(o.type)?new o.type(o):new c}else"string"==typeof e||"number"==typeof e?n=s.createInstanceForText(e):l(!1);return n.construct(e),n._mountIndex=0,n._mountImage=null,n}var i=e(43),a=e(63),s=e(78),u=e(29),l=e(147),c=(e(166),function(){});u(c.prototype,i.Mixin,{_instantiateReactComponent:o}),t.exports=o},{147:147,166:166,29:29,43:43,63:63,78:78}],147:[function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)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,o,i,a,s],c=0;u=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return l[c++]}))}throw u.framesToPop=1,u}};t.exports=r},{}],148:[function(e,t,n){"use strict";function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=e(22);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{22:22}],149:[function(e,t,n){function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],150:[function(e,t,n){"use strict";function r(e){return e&&("INPUT"===e.nodeName&&o[e.type]||"TEXTAREA"===e.nodeName)}var o={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=r},{}],151:[function(e,t,n){function r(e){return o(e)&&3==e.nodeType}var o=e(149);t.exports=r},{149:149}],152:[function(e,t,n){"use strict";function r(e){e||(e="");var t,n=arguments.length;if(n>1)for(var r=1;n>r;r++)t=arguments[r],t&&(e=(e?e+" ":"")+t);return e}t.exports=r},{}],153:[function(e,t,n){"use strict";var r=e(147),o=function(e){var t,n={};r(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{147:147}],154:[function(e,t,n){var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],155:[function(e,t,n){"use strict";function r(e,t,n){if(!e)return null;var r={};for(var i in e)o.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],156:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],157:[function(e,t,n){"use strict";function r(e){return i(o.isValidElement(e)),e}var o=e(61),i=e(147);t.exports=r},{147:147,61:61}],158:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e(128);t.exports=r},{128:128}],159:[function(e,t,n){"use strict";var r=e(22),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){ -e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML="\ufeff"+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=a},{22:22}],160:[function(e,t,n){"use strict";var r=e(22),o=e(128),i=e(159),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),t.exports=a},{128:128,159:159,22:22}],161:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=r},{}],162:[function(e,t,n){"use strict";function r(e,t){if(null!=e&&null!=t){var n=typeof e,r=typeof t;if("string"===n||"number"===n)return"string"===r||"number"===r;if("object"===r&&e.type===t.type&&e.key===t.key){var o=e._owner===t._owner;return o}}return!1}e(166);t.exports=r},{166:166}],163:[function(e,t,n){function r(e){var t=e.length;if(o(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),o("number"==typeof t),o(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),i=0;t>i;i++)r[i]=e[i];return r}var o=e(147);t.exports=r},{147:147}],164:[function(e,t,n){"use strict";function r(e){return v[e]}function o(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function i(e){return(""+e).replace(g,r)}function a(e){return"$"+i(e)}function s(e,t,n,r,i){var u=typeof e;if(("undefined"===u||"boolean"===u)&&(e=null),null===e||"string"===u||"number"===u||l.isValidElement(e))return r(i,e,""===t?h+o(e,0):t,n),1;var p,v,g,y=0;if(Array.isArray(e))for(var C=0;C<e.length;C++)p=e[C],v=(""!==t?t+m:h)+o(p,C),g=n+y,y+=s(p,v,g,r,i);else{var E=d(e);if(E){var b,_=E.call(e);if(E!==e.entries)for(var x=0;!(b=_.next()).done;)p=b.value,v=(""!==t?t+m:h)+o(p,x++),g=n+y,y+=s(p,v,g,r,i);else for(;!(b=_.next()).done;){var D=b.value;D&&(p=D[1],v=(""!==t?t+m:h)+a(D[0])+m+o(p,0),g=n+y,y+=s(p,v,g,r,i))}}else if("object"===u){f(1!==e.nodeType);var M=c.extract(e);for(var T in M)M.hasOwnProperty(T)&&(p=M[T],v=(""!==t?t+m:h)+a(T)+m+o(p,0),g=n+y,y+=s(p,v,g,r,i))}}return y}function u(e,t,n){return null==e?0:s(e,"",0,t,n)}var l=e(61),c=e(67),p=e(70),d=e(138),f=e(147),h=(e(166),p.SEPARATOR),m=":",v={"=":"=0",".":"=1",":":"=2"},g=/[=.:]/g;t.exports=u},{138:138,147:147,166:166,61:61,67:67,70:70}],165:[function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e.concat():e&&"object"==typeof e?a(new e.constructor,e):e}function o(e,t,n){u(Array.isArray(e));var r=t[n];u(Array.isArray(r))}function i(e,t){if(u("object"==typeof t),l.call(t,f))return u(1===Object.keys(t).length),t[f];var n=r(e);if(l.call(t,h)){var s=t[h];u(s&&"object"==typeof s),u(n&&"object"==typeof n),a(n,t[h])}l.call(t,c)&&(o(e,t,c),t[c].forEach(function(e){n.push(e)})),l.call(t,p)&&(o(e,t,p),t[p].forEach(function(e){n.unshift(e)})),l.call(t,d)&&(u(Array.isArray(e)),u(Array.isArray(t[d])),t[d].forEach(function(e){u(Array.isArray(e)),n.splice.apply(n,e)})),l.call(t,m)&&(u("function"==typeof t[m]),n=t[m](n));for(var v in t)g.hasOwnProperty(v)&&g[v]||(n[v]=i(e[v],t[v]));return n}var a=e(29),s=e(154),u=e(147),l={}.hasOwnProperty,c=s({$push:null}),p=s({$unshift:null}),d=s({$splice:null}),f=s({$set:null}),h=s({$merge:null}),m=s({$apply:null}),v=[c,p,d,f,h,m],g={};v.forEach(function(e){g[e]=!0}),t.exports=i},{147:147,154:154,29:29}],166:[function(e,t,n){"use strict";var r=e(126),o=r;t.exports=o},{126:126}]},{},[1])(1)});
\ No newline at end of file diff --git a/web/templates/admin_console.html b/web/templates/admin_console.html index a046478f6..574caf730 100644 --- a/web/templates/admin_console.html +++ b/web/templates/admin_console.html @@ -12,7 +12,7 @@ <div id='select_team_modal'></div> <script> - window.setup_admin_console_page(); + window.setup_admin_console_page({{ .Props }}); $(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip(); diff --git a/web/templates/channel.html b/web/templates/channel.html index 2af94e415..4b8318d43 100644 --- a/web/templates/channel.html +++ b/web/templates/channel.html @@ -54,7 +54,7 @@ <script> window.setup_channel_page({{ .Props }}); $('body').tooltip( {selector: '[data-toggle=tooltip]'} ); - $('.modal-body').css('max-height', $(window).height() * 0.7); + $('.modal-body').css('max-height', $(window).height() - 200); $('.modal-body').perfectScrollbar(); </script> </body> diff --git a/web/templates/head.html b/web/templates/head.html index e4f1b56b3..3466510d4 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -32,12 +32,13 @@ <link id="favicon" rel="icon" href="/static/images/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon"> - <script src="/static/js/react-with-addons-0.13.3.js"></script> - <script src="/static/js/jquery-1.11.1.js"></script> + <script src="/static/js/react-0.14.0.js"></script> + <script src="/static/js/react-dom-0.14.0.js"></script> + <script src="/static/js/jquery-2.1.4.js"></script> <script src="/static/js/bootstrap-3.3.5.js"></script> <script src="/static/js/bootstrap-colorpicker.min.js"></script> - <script src="/static/js/react-bootstrap-0.25.1.js"></script> - <script src="/static/js/perfect-scrollbar-0.6.5.jquery.min.js"></script> + <script src="/static/js/react-bootstrap-0.27.1.js"></script> + <script src="/static/js/perfect-scrollbar-0.6.7.jquery.min.js"></script> <script src="/static/js/jquery-dragster/jquery.dragster.js"></script> <style id="antiClickjack">body{display:none !important;}</style> diff --git a/web/web.go b/web/web.go index 7ab50a073..3bfed371b 100644 --- a/web/web.go +++ b/web/web.go @@ -15,7 +15,6 @@ import ( "gopkg.in/fsnotify.v1" "html/template" "net/http" - "regexp" "strconv" "strings" ) @@ -64,6 +63,9 @@ func InitWeb() { mainrouter.Handle("/signup/{service:[A-Za-z]+}/complete", api.AppHandlerIndependent(signupCompleteOAuth)).Methods("GET") mainrouter.Handle("/admin_console", api.UserRequired(adminConsole)).Methods("GET") + mainrouter.Handle("/admin_console/", api.UserRequired(adminConsole)).Methods("GET") + mainrouter.Handle("/admin_console/{tab:[A-Za-z0-9-_]+}", api.UserRequired(adminConsole)).Methods("GET") + mainrouter.Handle("/admin_console/{tab:[A-Za-z0-9-_]+}/{team:[A-Za-z0-9-]*}", api.UserRequired(adminConsole)).Methods("GET") mainrouter.Handle("/hooks/{id:[A-Za-z0-9]+}", api.ApiAppHandler(incomingWebhook)).Methods("POST") @@ -427,9 +429,9 @@ func verifyEmail(c *api.Context, w http.ResponseWriter, r *http.Request) { user := result.Data.(*model.User) if user.LastActivityAt > 0 { - api.FireAndForgetEmailChangeVerifyEmail(user.Id, user.Email, team.Name, team.DisplayName, c.GetSiteURL(), c.GetTeamURLFromTeam(team)) + api.SendEmailChangeVerifyEmailAndForget(user.Id, user.Email, team.Name, team.DisplayName, c.GetSiteURL(), c.GetTeamURLFromTeam(team)) } else { - api.FireAndForgetVerifyEmail(user.Id, user.Email, team.Name, team.DisplayName, c.GetSiteURL(), c.GetTeamURLFromTeam(team)) + api.SendVerifyEmailAndForget(user.Id, user.Email, team.Name, team.DisplayName, c.GetSiteURL(), c.GetTeamURLFromTeam(team)) } newAddress := strings.Replace(r.URL.String(), "&resend=true", "&resend_success=true", -1) @@ -699,7 +701,14 @@ func adminConsole(c *api.Context, w http.ResponseWriter, r *http.Request) { return } + params := mux.Vars(r) + activeTab := params["tab"] + teamId := params["team"] + page := NewHtmlTemplatePage("admin_console", "Admin Console") + + page.Props["ActiveTab"] = activeTab + page.Props["TeamId"] = teamId page.Render(c, w) } @@ -921,9 +930,6 @@ func incomingWebhook(c *api.Context, w http.ResponseWriter, r *http.Request) { channelName := props["channel"] - overrideUsername := props["username"] - overrideIconUrl := props["icon_url"] - var hook *model.IncomingWebhook if result := <-hchan; result.Err != nil { c.Err = model.NewAppError("incomingWebhook", "Invalid webhook", "err="+result.Err.Message) @@ -952,12 +958,8 @@ func incomingWebhook(c *api.Context, w http.ResponseWriter, r *http.Request) { cchan = api.Srv.Store.Channel().Get(hook.ChannelId) } - // parse links into Markdown format - linkWithTextRegex := regexp.MustCompile(`<([^<\|]+)\|([^>]+)>`) - text = linkWithTextRegex.ReplaceAllString(text, "[${2}](${1})") - - linkRegex := regexp.MustCompile(`<\s*(\S*)\s*>`) - text = linkRegex.ReplaceAllString(text, "${1}") + overrideUsername := props["username"] + overrideIconUrl := props["icon_url"] if result := <-cchan; result.Err != nil { c.Err = model.NewAppError("incomingWebhook", "Couldn't find the channel", "err="+result.Err.Message) @@ -968,27 +970,16 @@ func incomingWebhook(c *api.Context, w http.ResponseWriter, r *http.Request) { pchan := api.Srv.Store.Channel().CheckPermissionsTo(hook.TeamId, channel.Id, hook.UserId) - post := &model.Post{UserId: hook.UserId, ChannelId: channel.Id, Message: text} - post.AddProp("from_webhook", "true") - - if len(overrideUsername) != 0 && utils.Cfg.ServiceSettings.EnablePostUsernameOverride { - post.AddProp("override_username", overrideUsername) - } - - if len(overrideIconUrl) != 0 && utils.Cfg.ServiceSettings.EnablePostIconOverride { - post.AddProp("override_icon_url", overrideIconUrl) - } + // create a mock session + c.Session = model.Session{UserId: hook.UserId, TeamId: hook.TeamId, IsOAuth: false} if !c.HasPermissionsToChannel(pchan, "createIncomingHook") && channel.Type != model.CHANNEL_OPEN { c.Err = model.NewAppError("incomingWebhook", "Inappropriate channel permissions", "") return } - // create a mock session - c.Session = model.Session{UserId: hook.UserId, TeamId: hook.TeamId, IsOAuth: false} - - if _, err := api.CreatePost(c, post, false); err != nil { - c.Err = model.NewAppError("incomingWebhook", "Error creating post", "err="+err.Message) + if _, err := api.CreateWebhookPost(c, channel.Id, text, overrideUsername, overrideIconUrl); err != nil { + c.Err = err return } diff --git a/web/web_test.go b/web/web_test.go index ae29356c1..4e15037ad 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -4,15 +4,16 @@ package web import ( - "github.com/mattermost/platform/api" - "github.com/mattermost/platform/model" - "github.com/mattermost/platform/store" - "github.com/mattermost/platform/utils" "net/http" "net/url" "strings" "testing" "time" + + "github.com/mattermost/platform/api" + "github.com/mattermost/platform/model" + "github.com/mattermost/platform/store" + "github.com/mattermost/platform/utils" ) var ApiClient *model.Client @@ -27,6 +28,8 @@ func Setup() { InitWeb() URL = "http://localhost" + utils.Cfg.ServiceSettings.ListenAddress ApiClient = model.NewClient(URL) + + api.Srv.Store.MarkSystemRanUnitTests() } } |